.. _backtest_example: Backtest Example ================ This example executes a backtest of the :ref:`MACD_example` against BTC data. For details regarding how figures were generated see the :ref:`plot_backtest` routine. **Python source code:** :download:`../../examples/backtest.py` .. literalinclude:: ../../examples/backtest.py .. image:: images/backtest/aum.png :align: center .. image:: images/backtest/asset_fraction.png :align: center .. image:: images/backtest/close.png :align: center .. image:: images/backtest/trigger.png :align: center