TradingView
Trendoscope
Jun 14, 2021 12:45 PM

Enhanced Magic Formula for fundamental analysis 教学

SBSW+VALE+GOOG+CROX+ENVA+EVR+UTHR+LPX+TER+AMATNYSE

描述

This is an experimental procedure based on fundamentals. Since, there isn't much option to backtest these methodologies, I am trying to create a trade and then measure performance over long period of time.

Magic Formula investing method is invented by Joel Greenblatt. In a nutshell strategy does following:

  • Rank all the stocks based on Return on Capital
  • Rank all the stocks based on Earning Yield
  • Add these ranks to come up with a combined rank.
  • Invest equally in first 10 stoscks of combined. Rebalance yearly.


Concept here is, earnings yield represents value whereas return on capital represents quality. Combining these two to get the stocks which have best of both.

More information on the methodology is present here: https://www.investopedia.com/terms/m/magic-formula-investing.asp

Improved Method :

Since, tradingview does not allow comparing fundamentals or technicals of all stocks, I had to do this in python. Output report can be found here: https://docs.google.com/spreadsheets/d/1_e93TdFtoYi67UHTKrGKgGxc1_BgPeYVYKhKFQz4fmM/edit?usp=sharing

Basic Filtering of Stocks:
Basic filtering of stocks is done based on the methods as mentioned in quality screen indicator: https://www.tradingview.com/script/vdzfb2WA-Quality-Screen/
Since the financial data is taken from yahoo for generating report, some of the quality parameters are not included and there can be slight changes in the fundamental values present in tradingview. No other initial filtering is applied.

Derive ranks on several Value, Profitability, Growth and Cashflow parameters:
  • Value Parameters : P/E, P/S, P/B, P/C, P/FCF, PE-Forwarding, PEG Ratio
  • Profitability Parameters: ROA, ROE, ROI, GrossMargin, OperatingMargin, ProfitMargin
  • Growth and Momentum Parameters : Quarterly, Half Yearly and Yearly Performance, Upside Calculated from analyst valuation
  • Cashflow Parameters : Quick Ratio, Current Ratio, Debt to Equity, Long term Debt to Equity, Debt to Assets, Long term debt to assets.


Derive composite rank for Value, Profitability, Growth and Cashflow based on individual ranks:
For example, Add up all ranks of value parameter to come up with Value Score. And then sort value score in ascending order to get value rank

Derive combination ranks such as value/growth rank, value/profitability rank etc by similar method: Also create combined rank which considers all 4 ranks - value, profitability, growth and cashflow.

Sort the values based on combined rank to get top value/quality stocks - which represents lowest score.

Final stock selection consideration : Instead of picking first 10 stocks, I have picked stocks from different sectors thus sacrificing bit of Magic Formula edge. This is to avoid high concentration on single sector.

Final list of stocks selected:

SBSW - Basic Materials (Gold)
VALE - Basic Materials (Industrial Metals and Mining)
GOOG - Communication Services (Internet and Information)
CROX - Consumer Cyclical (Footwear and Accessories)
ENVA - Financial (Credit Services)
EVR - Financial (Capital Markets)
UTHR - Healthcare (Biotechnology)
LPX - Industrial (Building Products and Equipment)
TER - Technology (Semicondoctor Equipment & Materials)
AMAT - Technology (Semicondoctor Equipment & Materials)

评论

June 11th 2021

Magic Number Strategy Combo: 3343
SPX : 4236

Aug 11th 2021

Magic Number Strategy Combo: 3630 => up 8.6%
SPX : 4425 => up 4.46%

Will keep track of this

评论

Tilll date:

SPX - 4529 - Up 7%
MagicNumber - 3815 - Up 14%

评论

Yill date
SPX - 4698 - Up 10.9%
MagicNumber - 3891 - up 16.39%
评论
eyangzhang
interesting.
ikrasnyanskiy123
Hi! Didn't quite get it how you gave ranks to stocks, and what are those "vpg", "vp", etc. ranks. Can you please explain?
Trendoscope
@ikrasnyanskiy123,

VGP - Value, Growth, Profitability combined rank
VP - Value, Profitability Rank

Ranking is simple. For example, if you want PE rank, sort all companies based on PE and rank them from lowest to highest

Value rank consists of all Value parameters such as PE, PS, PFCF etc.
Profitability rank consists of ranks of Gross Profit, Net Profit etc.

And so on.
ikrasnyanskiy123
@HeWhoMustNotBeNamed, got it, thanks for explanation! Got interested in this post because of crocs and google, as they are my favourites since like march 2021.
JackHertz
Any update to this strategy? Thank you.
Trendoscope
@JackHertz, The scale got changed due to stock split etc. Overall - comparison to SPY, NDX, it is still ahead though, there had been dip.

But, the strategy is that we need to recalculate and rebalance every 6 months to 1 year.
JackHertz
@HeWhoMustNotBeNamed, Thanks for the quick update, mate :) Really appreciate it.
更多