SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Dec 13, 2017 6:41 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Nov 23, 2015 10:32 pm 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Hi Anton,

I guess I misunderstood what you said earlier in this thread. Anyway, I set the FillAtLimitPrice option to False in the Execution Simulator properties and it now works fine!

However, it only works when I ALSO have the FillOntrade option set to false in the Execution Simulator. Why is this exactly?

PS.
Attached is a screenshot of the current settings I have the Execution Simulator on.
Will these settings get my Backtest results to correspond to my historical tick data as accurately as possible? Or are there changes to these settings you suggest?

Thanks


Attachments:
1.JPG
1.JPG [ 34.62 KiB | Viewed 1518 times ]
Top
 Profile  
 
PostPosted: Mon Nov 23, 2015 11:33 pm 
Offline

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

I thought this is obvious but it looks like there is no chapter discussing execution simulator options in OQ2014 docs and we should add it indeed.

FillOnTrade simply tells that the execution simulator should use trades (not only bids and asks) to simulate instrument prices/fills. If you set it to true it might happen that some of your orders will be filled with trade prices.

Some people don't have access to historical quotes, just to trades. Others don't have access to ticks at all, just to bar data. FillOnTrade/FillOnBar options help them to run backtests with data they have.

Regards,
Anton


Top
 Profile  
 
PostPosted: Tue Nov 24, 2015 10:23 am 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Cool. Thanks for the info everyone.


Top
 Profile  
 
PostPosted: Wed Nov 25, 2015 3:56 pm 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Hey Anton,

Just to confirm, are the OQ 2014 "Execution Simulator" settings in the screenshot I posted above what I should use to get as accurate backtesting results as possible? Or should I change these settings?

This is assuming the historical Tick data I'm using contains all available data (such as every single Trade, Quote Change, Volume change, Market depth change and so on).

Thanks.


Top
 Profile  
 
PostPosted: Tue Dec 01, 2015 2:10 pm 
Offline

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

I think you should set FillOnQuote to true and all other FillOnXXX to false. Built-in executiom simulator doesn't use Level2/order book. This is reserved for custom user simulators (note that you can plug your own execution simulator) and matching engines.

You should also note this information (can be found in FAQ)

How to use ExecutionSimulator.Queued property

What potentially may happen if you do something “too fast”, like sending an order and then replacing/cancelling it in the same OnBar or OnReminder, is that you send an order to the Execution Simulator, the simulator accepts the order, fills it, and places execution report into the Event Bus queue. This execution report is in the queue, but not in the Order Manager yet, so that the order still has New status although it has already been filled in the Execution Simulator. Then you can try to replace/cancel the order in your strategy but the Execution Simulator rejects your request sending out cancel/replace reject report.

This is pretty normal and reflects real life. Your order can already be filled on the broker server but you don’t know about it yet and ask broker to cancel it. Indeed your cancel request will be rejected.

You can control this scenario using ExecutionSimulator.Queued = false. Then your order will be executed directly without sending reports via EventBus queue.



Regards,
Anton


Top
 Profile  
 
PostPosted: Wed Dec 02, 2015 10:05 am 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Hi Anton,


1. Aside from the two settings underlined in red (which I'll address in items 2 and 3 below), does the attached screenshot show the settings your saying I should have the Execution Simulator on in order to achieve what I'm trying to do?

2. Is there anywhere in OQ2014's documentation that explains how to build custom simulators and/or custom matching engines? I’d like to build them in order to be able to backtest Level2/order book strategies.

3. I don’t see anywhere in in OQ 2014 FAQs or other documentation (including the API documentions) that explains what the ExecutionSimulator.Queued property does exactly. Is the only thing it does is control whether or not orders will be “executed directly without sending reports via EventBus queue.”?

Thanks

P.S. apologies for the huge size of the attached screenshot, not sure why it is showing up so big:)


Attachments:
1.jpg
1.jpg [ 110.75 KiB | Viewed 1494 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC + 3 hours


Who is online

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