[ts-gen] currency crosses now work [was: adding new-expiry ...]

Bill Pippin pippin at owlriver.net
Fri Mar 20 19:40:47 EDT 2009


Nils,

You may recall your question from a couple of months ago:

> ... is there a product id for cash orders like EURUSD, EURJPY,
> USDJPY and so forth? 

and my answer at that time to the effect that currencies were not
yet supported.

They now work properly.  In particular, once the symbols data from
the newest data tarball is used to repopulate your database, the
quote currency for crosses is well defined, and so the shim can use
that information to describe the products correctly in requests to
the IB tws.

There are examples of currency expressions in exs/tick .  For the
examples you give, of EUR.USD, EUR.JPY, and USD.JPY, possible
contract expressions include:

    CASH:IDEALPRO:EUR:USD
    CASH:IDEALPRO:EUR:JPY
    CASH:IDEALPRO:USD:JPY

The ibc form of contract expression is supported as well.

Although there are many more currency crosses in the Product table,
with attribute values listed in sql/syms.txt, about half of these
are no longer recognized by IB. You may use contract info queries
such as those in exs/cash to determine what cash products are
currently known to the IB tws.

Since the left hand and right hand sides of crosses are unambiguous,
due to ISO standardization, currency pairs are arguably universal in
meaning, and in any case are not disambiguated by the locality.  All
currency products have "n/a" as the value of their region, and there's
no need for you to reset the Locality in your .shimrc file to that
value in order to work with currencies.  Instead the shim ignores your
Locality setting when interpreting CASH expressions, since it already
knows to use n/a.  It follows that you can use currencies along with
other product symbols within the same session, even though the regional
context is not the same.

If I may come back to futures, the original trigger for this thread,
the futures symbols are getting long in the tooth, and in particular
the FUT:ECBOT:YM::090320 just expired.  So, it's a known problem that
the scripts in the exs directory referring to that product now fail
to work properly.  Hopefully I'll be able to get a thoroughly updated
symbols tarball out in the near future.  Please feel free to inquire
on the list if stale symbols data causes you problems in the meantime.

Thanks,

Bill
_______________________________________________

Direct messages to my personal email may still
gate to the list.  For those desiring privacy,
please use our commercial support email address,
support at trading-shim.com .



More information about the ts-general mailing list