SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Dec 12, 2019 8:23 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jan 03, 2012 6:06 am 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
hi, in building a custom market data provider, I could not find a way to send Open Interest data to OQ. Neither EmitNewBar nor EmitNewTrade has an OpenInt parameter. Also, in data import-CSV or Text files feature, only bar data contains OpenInt field, that makes it difficult to keep track of the change in Open Interest with every trade.

My suggestion is to add OpenInt parameter to EmitNewTrade/EmitNewBar, and to add an OpenInt field to Trade class, so the change in open interst could be recorded on every trade. Thanks!


Top
 Profile  
 
PostPosted: Tue Jan 03, 2012 3:30 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Hi,

a Trade object doesn't have OpenInt field, but it's possible to add it to EmitNewBar function.

Cheers,
Anton


Top
 Profile  
 
PostPosted: Wed Jan 04, 2012 10:16 am 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Thanks for the reply, Anton.

It's true that Trade object doesn't contain OpenInt field, but we know that in futures trading, Open Interest changes with every trade, right? So it would be reasonable to add the OpenInt field to Trade class, especially for high-frequency trading. Moreover, in CompressBars method, Bar.OpenInt could be generated from Trade.OpenInt just like O/H/L/C from trade.Price.

To sum up, the advantages of storing OpenInt in Trades:

1. Precise tracking Open Interest changes in high-frequecy trading.
2. If we can only store OpenInt in Bar objects, when we use CompressBars method to generate a BarSeries with durations different from the existing ones, it's difficult to get the new BarSeries's OpenInt values. But if we store OpenInt in Trades, it's easy to generate Bar.OpenInt from Trade.OpenInt.
3. If we can only use EmitBars to send OpenInt, when multiple BarSeries are added to a strategy, we need to generate different BarSeries and emit multiple bars in custom providers.

I understand that doing this needs much more consideration since Trade class is a basis for many other classes. So it's just a little wish :D


Top
 Profile  
 
PostPosted: Wed Jan 04, 2012 5:06 pm 
Offline

Joined: Tue May 03, 2005 9:36 pm
Posts: 136
Location: Sydney
open interest represents the total outstanding contracts open from one session to the next, so adding it to trade data makes no sense - it is always reported with a day's lag.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group