Chapter 9. Backtesting
A backtest is a simulation of a model-driven investment strategy's response to historical data. While working on designing and developing a backtest, it would be helpful to think in terms of the concept of creating video games.
In this chapter, we will design and implement an event-driven backtesting system using object-oriented design. We can then plot our resulting profits and losses onto a graph to help us visualize the performance of our trading strategy. Is this sufficient to deduce a good model?
There are many concerns to be addressed in backtesting, for example, the effects of transaction costs, execution latency of orders, access to detailed transactions, and quality of historical data. Notwithstanding these factors, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access