SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Aug 15, 2020 1:44 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Nov 16, 2011 9:15 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
Hi,

I have a strategy with a logic based on 1h bars (generated from the "Compress" feature, from 1 mn bars), meaning that my indicators (for example a SMA) should use 1h bars as input.
Backtesting is fine for the moment (ie Market Data section of the solution contains only 1h bars), except sometimes when more than 1 order can be triggered during the same 1h bar (stop + new entry for example).
In such cases, OQ assumes that OHLC data came in a specific order and triggers trades according to that hypothesis.

Instead of having probabilistic fills, I would like to force OQ to "look inside" 1h bars in these specific cases and adjust execution accordingly.
From what I understand reading the forum, I should add 1mn bars to my solution (ie have 1h AND 1mn bars in the Market Data section of the solution), add a BarFilter and enable it.
To be clear, I won't be using 1mn bars in the logic of the strategy so OnBar() should only be triggered when a new 1h bar is available, not when a 1mn bar is available.

So what I did was to add a BarFilter Time(60) to the Simulator(execution) provider.
A few points:
First, OnBar() is called even for 1mn bars.
Second, the backtest takes far more time (several minutes instead of a few seconds) and memory usage keeps increasing. For example after the backtest is complete over 8 years, memory usage of OpenQuant.exe reaches more than 1 GB (it started below 200 MB). This is big considering that my 1mn data is less than 180MB in OQ's binary data store (size of the .data file).
Finally, my backtest doesn't look like the one on 1h bars.

I guess this is all because I don't understand the usage of BarFilter. The strategy certainly keeps indicators for both bar types (1h & 1mn) when it should just work with 1h bars; which would explain why memory usage shoots up.
I couldn't find clear details about BarFilter in the documentation.

Thanks for your help.


Top
 Profile  
 
PostPosted: Wed Nov 16, 2011 9:41 pm 
Offline

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

I suggest you start with looking through FAQ (there is a compiled pdf doc in OQ installation).

http://smartquant.com/introduction/openquant_faq.pdf

Particularly this FAQ doc discusses multiple time frames, memory management and other issues relevent to your post.

Regards,
Anton


Top
 Profile  
 
PostPosted: Wed Nov 23, 2011 4:31 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
For those interested in this issue and backtesting performance, I suggest this thread.

Thank you Anton.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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