In her book "The Relaxed Way to Wealth" - which surprisingly was never translated into English - Susanne Levermann published her very succesful investment strategy, which is based on 13 fundamental factors:
Each equity in the universe is scored based on this table and once a month the portfolio is rebalanced by exchanging equities with a score smaller than 4 by equities with a score greater than 4.
Since portfolios that are based on this strategy still seem to be doing well, I tried to replicate it on Quantconnect and ran into the following problems:
- Including the analyst opinions would require some of the latest NLP provided by google or other cloud services
- Equity Ratio doesn't seem to be available in Fundamentals, so I took 1/FinancialLeverage, because leverage seems to be the inverse of equity ratio
- Reaction to quarter numbers does not seem to be available in Fundamentals
def Score(self):
score = 0
#1 One year RoE >20%: +1 ; <10%: -1
if self.symbol.Fundamentals.OperationRatios.ROE.OneYear > 0.2:
score = score + 1
elif self.symbol.Fundamentals.OperationRatios.ROE.OneYear < 0.1:
score = score - 1
#2 EBIT One Year >12%: +1 ; <6%: -1
if self.symbol.Fundamentals.OperationRatios.EBITMargin.OneYear > 0.12:
score = score + 1
elif self.symbol.Fundamentals.OperationRatios.EBITMargin.OneYear < 0.06:
score = score - 1
#3 Equity Ratio one year >25%: +1 ; <15%: -1
if 1/self.symbol.Fundamentals.OperationRatios.FinancialLeverage.OneYear>0.25:
score = score + 1
elif 1/self.symbol.Fundamentals.OperationRatios.FinancialLeverage.OneYear<0.15:
score = score - 1
#4 P/E one Year <12: +1 ; >16: -1
if self.symbol.Fundamentals.ValuationRatios.PERatio.OneYear<12:
score = score +1
elif self.symbol.Fundamentals.ValuationRatios.PERatio.OneYear>16:
score = score - 1
#5 P/E five years <13: +1 ; >17: -1
if self.symbol.Fundamentals.ValuationRatios.PERatio.FiveYear<13:
score = score +1
elif self.symbol.Fundamentals.ValuationRatios.PERatio.FiveYear>17:
score = score - 1
#6 Analyst Opinions
#7 Real price reaction in % on quarterly EPS report >1%: +1 ; <-1%: -1
#8 Current FQ Est EPS% change >5%: +1 ; <-5%: -1
if self.symbol.FundamentalsValuationRatios.ForwardEarningYield > 0.05:
score = score+1
if self.symbol.FundamentalsValuationRatios.ForwardEarningYield < -0.05:
score = score-1
#9 6 months price change >5%: +1 ; <-5%: -1
if self.Return(self.sixMonthsInDays) > 0.05:
score = score+1
elif self.Return(self.sixMonthsInDays)<-0.05:
score = score-1
#10 12 months price change >5%: +1 ; <-5%: -1
if self.Return(self.twelveMonthsInDays) > 0.05:
score = score+1
elif self.Return(self.twelveMonthsInDays)<-0.05:
score = score-1
#11 EPS growth: Change of current to next FY Est EPS >5%: +1; <-5%: -1
if self.symbol.Fundamentals.ValuationRatios.SecondYearEstimatedEPSGrowth > 0.05:
score = score+1
elif elf.symbol.Fundamentals.ValuationRatios.SecondYearEstimatedEPSGrowth < -0.05:
score = score-1
#12 Momentum: if 6 months price change > 5% and 12 month price change < -5%: 1
# if 6 months price change < -5% and 12 month price change > 5%: -1
if self.Return(self.sixMonthsInDays) > 0.05 and self.Return(self.twelveMonthsInDays)<-0.05:
score = score+1
elif self.Return(self.sixMonthsInDays) <0.05 and self.Return(self.twelveMonthsInDays)>0.05:
score = score+1
#13 Reversal: if better than benachmark: 1 ; if worse than benchmark -1
I'd appreciate any help in fixing the issues.
Filib Uster
Here comes an improved version, with real trades.
The following factors are still missing:
Any ideas on how to implement the missing factors or on improving the code?
Filib Uster
Great news! Once the analyst opinions are available, we can start experimenting with the latest NLP-magic.
If I remember right, the Wall Street Journal offers comprehensive data feeds for research purposes. I have used parts of it for the following paper:
https://arxiv.org/abs/1508.01993
Is it possible to use Tensorflow/Keras in the research/algorithmLab environments?
Jack Simonson
Yes, both libraries are supported! You can find the list of all libraries that QC supports here.
Filib Uster
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!