Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far a runtime performance goes, my backtesting framework would run slightly slower using intraday price history than it does with EOD data.

There are two reasons why:

1. There would be more data to load into memory, and that process of loading the price history from a CSV file into memory would take a little longer simply because there is more data to deal with.

2. The data structure I'm using to index the historic price information by timestamp is the Java 6 implementation of TreeMap. The TreeMap class is an implementation of a Red-Black tree, and provides a guarantee that lookup operations (even when the key is not present in the collection) are O(log n). Since the time to find a key in the collection is O(log n), there would be a small performance hit when adding more data to the collection.

I actually began using intraday price history that I had downloaded from TradeStation, but I ran into the problem that I only had intraday price history over a 1-year period. I needed to be able to run 1-year trials over the course of a much larger period of time, so I switched to EOD data. Switching to EOD data had the nice side effect of speeding up my program (mainly due to the fact that loading all that intraday price history into memory took several seconds - up to 30 seconds or so).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: