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:

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:

Basic Filtering of Stocks:
Basic filtering of stocks is done based on the methods as mentioned in quality screen indicator: 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)
Comment: 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
Comment: Tilll date:

SPX - 4529 - Up 7%
MagicNumber - 3815 - Up 14%
Please PM me if you need access to any invite only scripts.

Join tradingview: