[R-SIG-Finance] Syntax - symbol problem

Adrian Trapletti adrian at trapletti.org
Thu Mar 2 12:45:49 CET 2017


Christian,

In some old configuration file, I found the following for IB currency futures:

Symbol,Expiry,Exchange,Type
EUR,201206,GLOBEX,FUT

Maybe it helps.

Dr. Adrian Trapletti

Steinstrasse 9b, 8610 Uster, Switzerland
P +41 44 994 56 30  |  M +41 79 103 71 31
adrian at trapletti.org  |  www.trapletti.org

On Thu, Mar 2, 2017 at 12:00 PM, <r-sig-finance-request at r-project.org> wrote:
>
>
> Message: 1
> Date: Wed, 1 Mar 2017 22:26:52 +0100
> From: Christian Lear <cl1 at infomaniak.ch>
> To: Enrico Schumann <es at enricoschumann.net>
> Cc: R-SIG-Finance at r-project.org
> Subject: Re: [R-SIG-Finance] Syntax - symbol problem
> Message-ID: <A64688DB-D091-4E5B-A731-2B77010AF34A at infomaniak.ch>
> Content-Type: text/plain; charset=utf-8
>
> Thank you, Enrico, for your suggestion.
>
> It does not seem to get the data from IB on the currency contracts.  Looking at the database / list closer, the second page defining the moving averages has a default USD input.  So I do have 4 attributes, which may be the reason I am getting data for metals and energies.  If anyone out there is using IB successfully on currency futures contracts, grains and options on all of the above, thanks for letting me know outside of the mailing list to avoid clogging it.
>
> Cheers,
>
> Christian
>
> > On Mar 1, 2017, at 11:13 AM, Enrico Schumann <es at enricoschumann.net> wrote:
> >
> > On Wed, 01 Mar 2017, Christian Lear writes:
> >
> >> Hi,
> >>
> >> I?m using Interactive Brokers (IB) data feed running through R code (R
> >> studio) with moving average filters on futures contracts.
> >>
> >> I have listed the contracts in an excel sheet.  The sheet has 4
> >> columns, contract (or ticker) i.e. ?CLJ7" for April 2007 Crude Oil,
> >> Security Type ?Future?, Exchange ?NYMEX? and Use 1 or 0 to activate
> >> the excel line (contract) or not.
> >>
> >> My program works perfectly for Nymex energy contracts (CL, NG, RB,
> >> HO), Nymex metals (GC, SI, etc.), Globex mini S&P (ES).  However, the
> >> program stops working and has an error when running Globex Euro FX
> >> (6E), Japanese Yen (6J) and the other currencies.  Note that the
> >> currency contracts have the same syntax as the Nymex Energy, and Nymex
> >> metals, namely ?TickerMonthYear" (6EM7, CLJ7, GCJ7 etc.)
> >>
> >> 1.  Does anyone know why the program fails to
> >> recognize the currency futures contracts?  Any
> >> suggestions?
> >>
> >> Grains are also a problem.  IB uses a different symbol structure,
> >> namely Ticker MONth YEar ?ZS MONabbrev YEar? (ZS JUL 17).
> >>
> >> 2.  How would you solve for one code to read both the
> >> CL contracts and the Grains ticker, knowing that the
> >> symbol structure is different?  Any ideas?
> >>
> >> I can send a short code and excel sheet test list to better
> >> demonstrate the issue.
> >>
> >> Thanks for your help.
> >>
> >> Christian
> >>
> >
> > 1) In my experience, you need four attributes to
> >   reliably specify a contract: the local symbol, the
> >   exchange, the currency and the security type. For
> >   6E futures, that would mean
> >
> >   symbol = 6EH7
> >   exchange = GLOBEX
> >   currency = USD
> >   type = FUT
> >
> > 2) An easy and _safe_ way is to keep a list/database of
> >   contracts with the four mentioned attributes, and
> >   then refer to this list when contract information is
> >   needed.
> >
> >
> > --
> > Enrico Schumann
> > Lucerne, Switzerland
> > http://enricoschumann.net
> >



More information about the R-SIG-Finance mailing list