Back to Community
Millenial money customised algo

This is an algorithm I am using for live trading. It is inspired by Patrick O'Shaughnessy's "Millennial Money" picking strategy. For a base I have used a code already inspired by the strategy [1]

This algorithms features are as follows:
1. Stakeholder yield < 5%. Stakeholder yield = Cash from financing 12m / Market Cap Q1
2. ROIC > 25% | ROIC = operating_income / (invested_capital - cash)
3. CFO > Net Income (Earnings Quality)
4. EV/FCF < 15 (Value)
5. 6M Relative Strength top three-quarters of the market.
6M Relative Strength = 6M Stock Total Return / 6M Total Return S&P500 (Momentum)
6. Positions are kept at least for 2 quarters
7. implemented 15% stop loss; if the stock hits stop loss it cannot be repurchased for a half year
8. market cap > 30m

As quantopian does work only on USA equities, and I can only trade UK stocks (on LSE), I have developed python scripts which automatically download and evaluate fundamentals from Morningstar and ADVFN. I may share these scripts later on

[1] https://www.quantopian.com/posts/patrick-oshaughnessys-millennial-money-value-investing-algorithm-number-fundamentals

Clone Algorithm
62
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: 58af2e29da9c935e3ff40b4e
There was a runtime error.
2 responses

It even performs well during the financial crisis with max drop down -44.9%. I also made the algo slightly faster as I do not cache all previously queried stocks anymore.

Clone Algorithm
62
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: 58affdaaa1a7fc616d51c116
There was a runtime error.

Hi, I've tried to clone the algorithm to do my own backtests, but the get_fundamentals function is not available anymore and I don't know how to use the Pipeline API. Would you be able to provide some assistance on migrating the functions? Thanks!