[ts-gen] Options issue
Bill Pippin
pippin at owlriver.net
Thu Jan 15 14:26:37 EST 2009
Sam,
About your option question in particular:
> ... what do we have to do to included an option contract,
> let's say the FEB 20 '09 6.0 CALL on C, ib id 56710904 ?
Thank you for asking about option derivatives. The short answer is
that the shim doesn't yet support them. Please read on; adding such
support is the next stage in expanding the command language, our
current milestone, so you will see option-related features showing
up in the next release, and those to follow.
As currently implemented, all products must previously exist in the
database, and are read in at startup by the shim, which would be
awkward given the number of possible options.
Options will be treated differently. Although the database may have
some large number of option products, according to the design plans
we've worked out, the shim will not read them in. Instead, an added
command, "load <sym>;", will allow for demand loading of option
products.
In more detail, here are some of the stages in adding support for
options to the shim that I see ahead:
* fix contract info for options;
* add OptSrc table to the database;
* add fill.rb script, to collect option contract info via
the IB tws, and create load files for the OptSrc table;
* add (user-controlled) shim load command, and store the
results of option load queries in the option map;
* fix Product input for the shim to ignore option products,
lest it be overwhelmed;
* add OPT:<ROUTE>:<SYM> expressions to the command language;
* fix symbol lookup to dispatch on security type, so that while
non-option products are looked up in the (vector-based)
Product table, option products are looked up in the option
symbol map;
* add (automatic) demand loading of option products that occur
in the command side of the journal, to allow the shim to read
open order messages for options that need to be written into
the message side of the journal.
There are a number of design issues you should be aware of; they
are:
1. missing description or symbol definition for options;
2. user responsibility for using fill.rb and its output; and
3. product uid stability for database version change load/reload.
(1) All products currently have related description records in the
database. In the absence of a good source for the automated download
of option product information, and if we depend instead on contract
info obtained via the IB tws api, such symbol descriptions will not
be available.
(2) Since we can't distribute info obtained from the api, if we rely
on data obtained via the contract info request of the api, each user
will need to collect the option product info themselves --- as noted
above, via a script to be named "fill.rb" --- and then load it into
the database. In addition, it will also be necessary to send the
appropriate load commands to the shim at the beginning of each
session; otherwise option symbol expressions, whether of the form
OPT:... or ibc:<conid>, would give read errors.
(3) The product record uid values for such option products will
naturally vary from site to site, and users will need to take care
to ensure that history bar data, when unloaded from the database
and reloaded to a higher-version db, will still be related to
the proper Product records.
Thanks for your interest. I'll keep the list posted on progress,
and once given support for options, I'll look forward to reports
from users on their experience with this feature.
Thanks,
Bill
More information about the ts-general
mailing list