Back to Community
Algo: Value, Drawdown

Here's an attempt at python/Quantopian. I'm an experienced C# developer but am a bit of a noob at python. My code is not very pythonic at this point, I've just gotten to the point where I can hack out an algo. It would be interesting to see if anyone can upgrade this algo to a more pythonic version. In particular the drawdown screening could be moved to a custom factor.

The strategy itself has promise, IMHO. It beats the market backtesting for the last five years. Results previous to the last five years are underwhelming, so it could use some work. Results in recent time are obviously important as market dynamics are changing.

The basic concepts used are ranking due to low price per earnings and price per book, with further screening based upon selecting stocks that have been exhibiting low drawdown.

It's pretty raw so watch out for bugs. Use at your own risk.

Clone Algorithm
35
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 588982c8f638965e52b1bf80
There was a runtime error.
2 responses

There is a MaxDrawdown built-in factor that I missed somehow. I got it going but didn't get the same returns.

Nice algo, thanks for sharing.

It'd be interesting to see how it performs if it switched to TLT or cash during a downturn in the SPY.