We thoroughly enjoyed The Alpha Formula, the latest publication from Chris Cain and Larry Connors. We wrote a lengthy book report here. In this post, we’d like to take a brief look at the source code.
- Chart courtesy of www.TuringTrader.com
This is a straightforward momentum strategy with an inverse-volatility weighting of the top-ranked assets. The strategy rebalances on a monthly basis. We are using the new NextSimTime feature here, to determine the last trading day of the month.
Weekly Mean Reversion
This is a mean-reversion strategy, similar to others published in previous Connors’ books. Unlike other strategies, this one runs on weekly bars. As our data source delivers daily bars, we create the weekly bars on the fly by pushing values into TimeSeries objects. Further, the strategy makes use of the Universe feature, to determine current and historic S&P 500 constituents.
This is another momentum strategy, this time aiming to adjust the maturity of U.S. Treasuries. The implementation is straightforward.
This strategy aims to profit from shorting assets during market meltdowns. To do so, it combines aspects from momentum and mean-reversion strategies.
Once again, TuringTrader makes implementation of complex algorithms very simple, resulting in code that is concise and easy to understand. Check out the source code in our repository.