Profile Picture

How to specify market open/close times for bar data?

Posted By trin4096 7 Years Ago
Posted Saturday December 03 2011
I downloaded 1minute bars using IQFeed and ran the simulation on them.

However, it runs them starting at 4:30AM to 7:30PM, since IQFeed includes ticks that are outside of normal market trading hours.

How to I strip the data of this extraneous information? I only want the trading hours. Otherwise it messes up all the indicators and the trading system itself.

Posted Monday December 05 2011
Okay, so I ended up writing my own FrequencyPlugin to clip out the bars/ticks that are outside of market hours.

However, I'm not really satisfied with this solution, since back-testing is slow since it has to filter out the bad data at each run. Additionally, there's a lot of complex code necessary to accomplish this, so I'm not 100% confident everything is working properly.
Posted Monday December 05 2011
Did you base your frequency plugin off of the FilteredDailyFrequency class from here? If not you might want to take a look and compare it to yours.

Using a frequency plugin to do the filtering may not be the best option for you. You can modify either the IQFeed plugin to filter the data when it downloads it, or modify the data store plugin to filter the data as it is saved to the store. Let us know if you need any help with this.


Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems