stargrazer has contributed to 246 posts out of 18704 total posts
(1.32%) in 4,847 days (0.05 posts per day).
20 Most recent posts:
through an indirection of someone linking to me at github, I learned about:
A Python IQFeed library.
The API to Big Query is well defined:
There are a number of official client libraries, with Python being one of them:
It is possible to call c++ from Python with Boost.Python.
On the other hand, there are others in the forums who have C# code (with C# being a native client library), could probably interface directly to Big Query.
There may be others who have Python code for handling the IQFeed interface.
If all you desire is 1 minute Bar updates, it may be straight forward to use python natively to talk to IQFeed, decode the inbound streams, build the bars and send them to Big Query. I could maybe accomplish that task a s special project, if no others are available. The issue here is that if you are dealing with 100(s) of symbols, and depending upon their liquidity, there may be performance issues with handling the inbound streams.
Something to which I have not looked, IQFeed may supply real time bars. If so, then performance issues may not be a problem.
In any case, you will need some sort of server on which the interface code and the IQFeed client will need to reside.
If you are looking for c++ style tooling, I have some IQFeed code libraries at:
For further info, my email is associated with that account.
1) you will need to have the i386 wine packages installed
2) you need to run the iqfeed installer inside the wine environment, you can't just copy iqconnect over.
hope this helps.
i386 is kinda last century?
Any update in the roadmap as to when a native 64 bit version might be available? Which might run in the native 64 bit Wine environment?
Another code example:
@J: I needed to do a linear interpolation from 0 to 30 days for the TB30.X... that is why you see it as 0 in my list. I don't know what symbol might reflect a TB overnight rate, or similar, or if even there is such an animal. Any thoughts?
I havn't done the inverse calculation to see what others are doing. I'm still evolving towards matching up what other providers, like IB, are generating for IV first. Whether they use mid-bid, or log(mid-bid), or bid or ask, or last trade or .....
In case any one is interested in what I've done:
Basic binomial code is at:
The code where I build those tables and interpolate the interest rate:
Code where I bring all that together:
Thanx for that. I guess for what I found so far is not so far off the mark.
One of those links suggested using an interest rate near the expiry. There is an IQFeed LIBOR symbol set. The following seem to be active, based upon
An extract from some of my code for using the symbols.
structSymbol( time_duration( hours( 0 * 24 ) ), "ONLIB.X" ), // overnight
structSymbol( time_duration( hours( 7 * 24 ) ), "1WLIB.X" ), // 1 week
structSymbol( time_duration( hours( 30 * 24 ) ), "1MLIB.X" ), // 1 month
structSymbol( time_duration( hours( 60 * 24 ) ), "2MLIB.X" ), // 2 month
structSymbol( time_duration( hours( 90 * 24 ) ), "3MLIB.X" ), // 3 month
structSymbol( time_duration( hours( 180 * 24 ) ), "6MLIB.X" ), // 6 month
structSymbol( time_duration( hours( 365 * 24 ) ), "1YLIB.X" ); // 1 year
For treasury, I found these symbols:
structSymbol( time_duration( hours( 0 * 24 ) ), "TB30.X" ), // overnight, base at 0 days needed for algorithm
structSymbol( time_duration( hours( 30 * 24 ) ), "TB30.X" ), // 30 day
structSymbol( time_duration( hours( 90 * 24 ) ), "TB90.X" ), // 90 day
structSymbol( time_duration( hours( 180 * 24 ) ), "TB180.X" ), // 180 day
structSymbol( time_duration( hours( 365 * 24 ) ), "1YCMY.X" ); // 1 year
Can't say this is the right way, but at least it gets me in to the right ball park.
Part of a 'greeks' calculation is the risk free interest rate. What symbol or set of symbols could be used for obtaining these values?
There are some differences in handling between IQFeed and IB.
Symbols in IQFeed are completely textual and obtained through a 'mktsymbols' text file.
For IB, to generate trades and request data through their API, contract numbers are typically required. To request contract numbers for equities traded on the primary exchanges, IQFeed symbols can typically be used directly for the lookup in the IB API. For options and futures, you have to perform lookups through the IB API based upon underlying symbol, currency, expiry dates, strikes, etc... Then use that contract number to make the request through the other portions of the IB API.
If the IQFeed people have these lookup tables as another service, cool.
But for us do-it-yourselfers, code needs to be written. I have written code to parse the IQFeed market symbols text file, pull out the options/futures info, and use that to look up contract details in the IB API.
If you want to wade through a bunch of stuff I've done:
An IQFeed provider:
An IB provider:
Send me a message at email@example.com if you'd like more instructions.
All this is based upon the fact that I start with the mktsymbols file, decode it, and use it to request data from IQFeed, and to generate trades with IB. To go the other way around, if you have IB contract info, I have some other code in the same repository which will build IQFeed symbols from contract info and underlying symbol names. There are some futures and options underlying symbol which require a manually composed lookup table, such as GC in InteractiveBrokers and QGC in IQFeed.
Edited by stargrazer on Mar 21, 2017 at 03:41 AM
A market replay would be best. At minimum, one or more futures (maybe the ES as mentioned, as they run almost 24 hours, and could rotate on 24 hours). Bonus would be one or more equities, maybe a few OPRA options to go along with the chosen equities.
IB runs what appears to be pseudo random values on their edemo account, but at least there is a time varying feed to run basic operational tests.
The following line in the symbols file has an extra \t before the exchange.
CS.17.CB\tCREDIT SUISSE NEW YORK 1.375% 05/26/17\t\tNYSE\tNYSE\tBONDS\t\t\t
Looping through the string looking for commas is the way I do it. I pull the delimited character strings out and process as required.
For converting characters to native values, you can try boost::lexical_cast, which uses in place iterators, so should be robust and fast.
For extra pizzaz you could try boost::spirit, something with which you would design a parser, and parse the whole thing and give you the appropriate converted values. Possibly a bit overkill as it will parse and convert more than just the few fields you might need. Or mix dynamic field sets with boost::spirit.
Two questions regarding options in the Market Symbols file:
1) In the following line:
AGII11418A36.36 AGII JAN 2014 C 36.360 OPRA OPRA IEOPTION
The option base symbol is AGII1. But in the descripion, the underlying shows as AGII. What is the 1 after the symbol, but before the four digit date, represent? There are a number of symbols
referencing the underlying this way.
2) The question is in the third set of symbols:
These I know are regular options:
SPY1304J145 SPY OCT 2013 C 145.000 OPRA OPRA IEOPTION
SPY1319J145 SPY OCT 2013 C 145.000 OPRA OPRA IEOPTION
These I know are mini options:
SPY71319J145 SPY OCT 2013 C 145.000 OPRA OPRA IEOPTION
But what are these options? With symbol SPYJ? The underlying in the description indicates SPY.
SPYJ1304J145 SPY OCT 2013 C 145.000 OPRA OPRA IEOPTION
SPYJ1319J145 SPY OCT 2013 C 145.000 OPRA OPRA IEOPTION
When calculating options parameters, one of the parameters is 'risk free rate of interest'.
Does any one have any suggestions for which symbols to use to obtain that rate for US based symbols? For some non US symbols, I use LIBOR which are symbols like ONLIB.X, 1WLIB.X, 2WLIB.X ....
What would be the USD equiv?
The symbol GLD has options available to it. Option naming doesn't appear to be consistent. For example, for a 2012/02/10 expiry for a GLD call is 'GLD1210B167'. 120210 is a Friday. On the other hand, for GLD option dated 120518, the option actually has a Saturday date: 'GLD1219E86'. Is there a method to this madness? I see IB has similar dating, so I believe it is official, but why?
At the time I wrote the parser for parsing the file, inertia led me to write a text parser for the description. I have subsequently found the decoding ring for decoding the symbol. I'll try that.
Has the XAUUSD.FXCM symbol been changed? I do not see it in the mktsymbols_v2.txt file.
In the mktsymbols_v2.txt file, quite a number of futures symbols have their descriptions truncated. I had been using the description to determine month/year of the future.
One random example:
XNZ13, SOCAL PIPE SYNTHETIC FUTURE DECEMBER 20
Do you know if the description field will be lengthened to accomodate a full description?
You definitely need to register for the developer docs. What you are seeing is the regular time stamp from the client. So, what you are seeing is a good thing... you have a good connection.