Using a Smaller Amibroker Database for Efficiency
By Dave Mabe
Following up on yesterday's email on how to split up data across multiple databases, here's another reason you might want to make your backtesting database smaller.
One quirk about Amibroker - even when you use the From-To dates in the Range field for a backtest, it still parses through all bars in the entire database.
(There's a good technical reason for this, I'm sure.)
This means that even if you specify just a single day for your backtest, it will take almost as long as if you specified All quotes in the Range field.
So if you have 25 years of minute bars in your database but only backtest on 10 years, you're essentially wasting resources and could reduce the time your backtest takes.
Once you have the data, it's trivial to create another database with the optimal number of bars.
Remember, you should always create a new database rather than change the number of bars in an existing database in Amibroker.
-Dave
P.S. "The process of becoming a more systematic trader honestly mirrors the journey of becoming a trader at all—lots of ups and downs, frustration, second-guessing, and moments where you want to quit. And then every once in a while, there’s a real moment of clarity and forward progress. Using the AFL code generator in MabeKit feels like one of those moments." - Mike A.