13.08.2022 Views

advanced-algorithmic-trading

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

494

In order to use the annualised rolling Sharpe in a strategy backtest it remains to turn on the

flag in a strategy backtest file where the tearsheet is instiated:

..

..

# Use the Tearsheet Statistics

title = ["Example Systematic Trading Strategy"]

statistics = TearsheetStatistics(

config, portfolio_handler, title,

benchmark="SPY", rolling_sharpe=True

)

..

..

In the next section a selection of updated tearsheets will be generated for various strategies

that have been presented in the book so far.

32.3 Strategy Results

All of the strategies displayed here are found within previous chapters of the book. The results

will simply be redisplayed with the addition of the annualised rolling Sharpe ratio tearsheet

visualisation.

32.3.1 Kalman Filter Pairs Trade

Figure 32.1 displays the performance of the Kalman Filter Pairs Trade strategy.

The rolling annualised Sharpe ratio calculation for the strategy begins just over midway into

2010, after 252 trading periods. The Sharpe ratio initially trends up in excess of 2.0 through

mid-2011 but a period of large returns volatility, culminating in flat and subsequently dwindling

performance through 2012 reduces the Sharpe ratio heavily in this period to negative territory.

After the strategy picks up again in mid-2013 the annualised Sharpe slowly recovers back

towards 2.0. Although by the end of 2016 it is unclear if the strategy is beginning to decay once

again.

Note how difficult it would have been at the end of 2012, in a live implementation, to determine

if the strategy would need retiring due to the long downward trend in annualised Sharpe. This

highlights how important it is to have a solid understanding of the statistical behaviour of the

returns distribution in a backtest.

32.3.2 Aluminum Smelting Cointegration Strategy

Figure 32.2 displays the performance of the Aluminum Smelting Cointegration strategy.

Since this strategy is carried out over a relatively short time frame (just under two years) the

rolling annualised Sharpe is only calculated for a short period.

Initially the Sharpe ratio is high at approximately 2.25. This is a consequence of the rapid

increase in performance in early 2015, which soon flattens out. Once these high return periods

have "fallen out" of the rolling calculation the Sharpe ratio rapidly decreases to -0.5 during the

early half of 2016, which it remains at through to the end of 2016.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!