SmartQuant Discussion

Adding spreads to instruments
Page 1 of 2

Author:  bfq3000 [ Thu Jun 12, 2008 5:57 pm ]
Post subject:  Adding spreads to instruments

How do I add spreads to Instruments? For example, if I want to add the spread for the July and August Crude contracts (the spread contract itself, not the two underlying contracts), the symbol in TT is "Calendar: 1xCL JUL08:-1xAUG08". I've tried inputting the actual symbol but that doesn't work. Thanks in advance.

Author:  bfq3000 [ Thu Jun 12, 2008 9:49 pm ]
Post subject: 

Just to clarify, the spread example I gave in the previous post has the following attributes:

Product = CL
Prod Type = SPREAD
Contract = Calendar: 1xCL Jul08:-1xCL Aug08

Author:  bfq3000 [ Tue Jul 22, 2008 4:31 pm ]
Post subject: 

I posted this awhile ago but never got a response and still have not been able to get this product (the NYMEX on Globex exchange traded Crude Oil Calendar Spreads) into my Instruments list on OpenQuant, despite numerous attempts. I can get quotes easily in Excel so this definitely has nothing to do with the TT API. Anyway, now I'm actually about ready to go live with a strategy I've been working on, so I'd really like to be able to get it up and running. The following is a list of about every potentially relevant property I can think of for the September/October Calendar Spread, according to TT...

CONTRACT = Calendar: 1xCL Sep08:-1xCL Oct08
CONTRACTALIAS = Calendar: 1xCL Sep08:-1xCL Oct08
INSTR = Calendar: 1xCL Sep08:-1xCL Oct08
KEY = 00CCL100A0II00CLZ1200A0JI00CLZ1
MMMYY = Calendar: 1xCL Sep08:-1xCL Oct08
NAME = Calendar: 1xCL Sep08:-1xCL Oct08
TEXT = Calendar: 1xCL Sep08:-1xCL Oct08

Anyway, could someone please tell me if there is any way to get this product into my Instruments list? I would really appreciate it.

Author:  bfq3000 [ Tue Jul 29, 2008 5:42 am ]
Post subject: 

Anton? Sergei? Alexei? Anyone?

Author:  Letharion [ Tue Jul 29, 2008 11:50 am ]
Post subject: 

Well, if I had any ideas I'd love to give em to you :)
Maybe you could elaborate on what exactly the problem is, cause I can't see where you get stuck from your posts :)

Author:  bfq3000 [ Tue Jul 29, 2008 4:17 pm ]
Post subject: 


Thanks for the reply.

Typically, to add a futures contract to the Instruments list all that needs to be done is to use "Add New Instrument" dialog box using the underlying as the symbol, "Futures" as the type, as well as the correct exchange, currency and maturity date. For example, if I wanted to add the Crude Oil Sep 08 contract I would input the following parameters into Add New Instrument...

Symbol = CL
Type = Futures
Exchange = CME-M
Currency = USD
Maturity = 9/1/2008 (even though the contract stops trading on 8/20/2008)

For the NYMEX on Globex Crude Calendar Spreads, I have not been able to get any contracts listed in the Instruments window that actually generate quotes, despite having tried numerous combinations of the properties for the contract given by TT (listed in the previous post) in the Add New Instruments dialog box.

Perhaps this has something to do with the fact that the product type is "Spread" and not "Future". I'm not really sure. But the bottom line is that I am able to get the quotes from XTAPI (like I said before, it is quite easy to get them into Excel) and I can't get them into OpenQuant.

Author:  Letharion [ Fri Aug 01, 2008 12:25 am ]
Post subject: 

This may not be the easiest way, but perhaps you'll have to open up the provider, and see if you can figure out where things are going wrong?

Author:  Alexei Kurov [ Thu Aug 07, 2008 6:59 pm ]
Post subject: 

Hi bfg3000,

We have added new instrument type(MultiLeg) into the latest version of OQ. Unfortunately, but there is no such instrument(product) type in TT Demo suite, so we cannot check the changes. Could you request the security definitions from TT FIX adapter and try to import the appropriate instruments?


Author:  bfq3000 [ Fri Aug 08, 2008 4:44 pm ]
Post subject: 


Thanks for the response. I sent an email to TT yesterday but they haven't responded back yet. When they do I'll post their response.

I tried a bunch of combinations for the symbol using MultiLeg instead of Future as the product type. Every time I do that I get the following provider error though...

System.Runtime.InteropServices.COMException (0x80020009): Invalid Product Type
at XTAPI.TTInstrObjClass.set_ProdType(String pVal)
at SmartQuant.TT.TTAPI.HFgDxRZZj()

Author:  Alexei Kurov [ Fri Aug 08, 2008 5:02 pm ]
Post subject: 


I will check it.


Author:  bfq3000 [ Tue Aug 12, 2008 10:16 pm ]
Post subject: 

I was able to get quotes for this product using eSignal through Quotetracker (which doesn't solve my problem since my trading is done through X_TRADER). It was actually quite simple since Symbol is the only property that is relevant to generating a quote. This made it just like inputting a symbol into a chart or quote board in eSignal (although AltSymbol doesn't seem to work). Anyway, this is what I inputted into the Add New Instrument window...

Symbol = CL U8:CLV8
Type = Futures (also works using MultiLeg or anything else)
Exchange = NYME
Currency = USD
Maturity = 9/1/2008

Why is it that you guys designed the Instruments in OQ to connect with the TT API in such an unnecessarily complex way? Wouldn't it be easier if the only two properties that were used to generate a symbol's quote were Symbol and Exchange (and the others were optional)? Then I could just input "CME-M" and "CL U8" or "Calendar: 1xCL Sep08:-1xCL Oct08" and get my quotes. Or am I missing something here?

Author:  Alexei Kurov [ Wed Aug 13, 2008 11:12 am ]
Post subject: 


We do not establish rules in this game :)
For the quote request eSignal needs the symbol only, but TT API requires more instrument fields to determine the correct contract.


Author:  bfq3000 [ Thu Aug 14, 2008 4:02 pm ]
Post subject: 

Which instrument fields does TT require?

Author:  Alexei Kurov [ Thu Aug 14, 2008 4:12 pm ]
Post subject: 

Symbol, Exchange, SecurityType(ProductType), Maturity

Our framework is based on FIX protocol and so the symbol is symbol, not the string representation of fields above.

Author:  bfq3000 [ Fri Sep 19, 2008 8:05 pm ]
Post subject: 

This works now as of version 2.6.1. Thanks!

This is what I inputted into the Add New Instrument dialog to get the October Crude one month spread...

Symbol = CL Calendar: 1xCL OCT08:-1xCL NOV08
Type = MultiLeg
Exchange = CME-M

Page 1 of 2 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group