Back-testing our strategy – Programming for Finance with Python – part 5

In this tutorial, we cover actually executing our strategy against historical prices and historical fundamental data in a backtest. Here, we see how we did, compared to a benchmark, like the S&P 500 ETF, $SPY.

We use Quantopian to back test our strategy, since Quantopian automatically comes with a plethora of statistics and options for back-testing trading strategies.

sample code:



Do NOT follow this link or you will be banned from the site!