SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Dec 12, 2017 7:39 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Aug 06, 2015 10:33 am 
Offline

Joined: Wed Mar 17, 2010 4:55 pm
Posts: 19
Dear Support

I did not find any documentation of the ordering of timer and event execution.

After some investigation I found out that the timer event is executed before a onBar or onQuote event is fired.
This may be not want you want.

Imagine that you want to calibrate parameters based on the market data up to say 4pm every Monday. We can set up a timer event to do this. However, if a quote comes in at exactly 4pm the standard OQ approach would be to process it in an onQuote event and possibly add it to a list of market data, which is then used by the calibration routine.

However, because the onQuote comes after the timer, the timer set at 4pm does not get that quote, which is not what you want.

I can solve this artificially by adding 1 sec to the timer event, so that I get the quote at 4pm. This however does not work anymore with tick data.

I suggest that somewhere one can set the execution order of the events and the timer. Would you please consider to add this feature in a next release as it would resolve the arbitrariness of event scheduling and adds much more transparency.

Thanks, Daniel


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 12:34 pm 
Offline

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

are you talking about OQ 3.x or 2014? I think it's possible to experiment with OQ 2014 framework and add an option to the EventBus but I don't think it's possible to change OQ 3.x framework to address this issue.

Regards,
Anton


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 1:04 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6783
Also, why can't you add a millisecond or so to timer datetime to get 4 pm quote and then timer event one millisecond later? You say adding one second doesn't work with tick data. Why so? You don't have data events at all after 4 pm?

Regards,
Anton


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 3:12 pm 
Offline

Joined: Wed Mar 17, 2010 4:55 pm
Posts: 19
Hi Anton

I tried to solve this with OQ 3.x. I think it is ok to add 1ms delay.

Good to know that these things should be possible with OQ 2014. Could you be a bit more specific how it works there because I could not find out without documentation purely from the API calls.

Many thanks

Daniel


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 4:55 pm 
Offline

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

we've just added this feature to OQ 2014, it will be available in the next release.

Framework.EventBus.ReminderOrder = ReminderOrder.Before / After;

Regards,
Anton


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: Google [Bot] and 2 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