SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Fri Sep 21, 2018 9:32 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Oct 18, 2014 5:46 pm 
Offline

Joined: Thu Sep 18, 2014 5:32 pm
Posts: 28
Hi there -

I have contract data for a certain futures contract spanning back 10yrs of time.
This contract continuously rolls each month over a several day time span.
I also have contract data for the calendar spreads for the 1st to 2nd month of that contract.

Say I load 10*12 contracts into OpenQuant Instruments and the contract calendar spread for each roll.

I need to simulate as part of the strategy rolling the position if it is held during the calendar roll period in OQ2013.

Please advise since each strategy right now is hosted as just on 1 symbol.

My thoughts right now is I can use onBarSlice() for daily data, and then for each individual symbol infer if its that contracts particular month to roll.

Thoughts and advice? I would use OQ2014 but I need to use software that is production ready with zero probability of bugs.

Thanks
Peek


Top
 Profile  
 
PostPosted: Sun Oct 19, 2014 11:05 am 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi Peek,

I would suggest to do the following:

1) create 3 insruments for each symbol your system trades, for example:
- COFFEE (that always contains data of the "active" ticker)
- COFFEE_New (used by the roll strategy, contains data of the "next" future, to which you need to roll your position)
- COFFEE_Old (used by the roll strategy, contains data of the "current" future, from which you need to roll your position)

2) create 2 strategies:
- your main trading strategy, subscribe COFFEE. Note, that this strategy doesn't know actually that it trades some contract that needs to be rolled.
- roll strategy, subscribe COFFEE_New and COFFEE_Old, put some code that "enables" this strategy when you need to roll your position.

3) create a script that fills all 3 instruments with data correspondingly.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Mon Oct 20, 2014 9:00 pm 
Offline

Joined: Thu Sep 18, 2014 5:32 pm
Posts: 28
Hi Baraz,

Thanks for the reply.

Does anyone have a sample solution with this?

Thanks,
Peek


Top
 Profile  
 
PostPosted: Mon Oct 20, 2014 10:14 pm 
Offline

Joined: Thu Sep 18, 2014 5:32 pm
Posts: 28
Does that solution work in OpenQuant 2014 or OpenQuant 2013?


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 3 guests


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