[R-SIG-Finance] Syntax - symbol problem

Christian Lear cl1 at infomaniak.ch
Wed Mar 1 10:46:51 CET 2017


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



More information about the R-SIG-Finance mailing list