ETFs (Exchange traded funds) and Mutual Funds are the most popular investment tool nowadays. If you lurk on various reddit personal finance forums you will hear low cost passive index funds like VOO and VTI being regularly touted. In fact for most people investing everything into a low cost ETF that tracks the S&P 500 (VOO) or the total US market (VTI) is a great option. However I was curious to see what other kinds of index funds are there especially those which offer a good return/risk ratio.
I am going to describe a methdology to screen for ETFs using the following factors –
- < 0.5% expense ratio (Basically the cost of owning the ETF)
- 10 year return in excess of the S&P 500 (in this case VOO)
- High sharpe ratio
- P/E ratio <= P/E of S&P (not overvalued)
- Positive alpha
Terminology
What is Sharpe ratio?
The Sharpe Ratio is a measure used in finance to understand the average return earned in excess of the risk-free rate per unit of volatility or total risk. It provides a tool to assess how well an investment’s returns compensate for the risk taken (with “risk” being represented by the investment’s volatility).
The formula for the Sharpe Ratio is:
Sharpe Ratio= Rp - Rf / σp
Where:
- Rp is the expected portfolio return.
- Rf is the risk-free rate. This represents the return on an investment that is considered “risk-free,” such as a U.S. Treasury bond.
- σp is the standard deviation of the portfolio’s excess return (often considered a proxy for the portfolio’s overall risk).
Here are some other ratios that are useful in case you are screening ETF data –
- Treynor Ratio:
- It’s a performance metric used to determine the returns earned in excess of what could have been earned on a riskless investment per each unit of market risk.
Formula: (PortfolioReturn−RiskFreeRate)/Beta- A higher Treynor ratio indicates that the portfolio is earning more return for the level of systematic risk taken.
- Alpha (α):
- Often called Jensen’s Alpha, it is a measure of the performance of an investment relative to a benchmark, like the market as a whole or another specific benchmark.
- Essentially, it represents the return of an investment after adjusting for the risk (the beta) or the performance that cannot be attributed to broad market moves.
- A positive alpha indicates the investment has performed better than would have been expected given its beta (or risk profile), while a negative alpha suggests underperformance.
- Beta (β):
- Measures the sensitivity or volatility of an investment relative to a benchmark (usually the overall market).
- A beta of 1 means the investment moves with the market. If the beta is greater than 1, the investment is more volatile than the market, and if less than 1, it’s less volatile.
- For instance, if a stock has a beta of 1.5, it’s theoretically 50% more volatile than the market.
- R-Squared (R^2):
- Represents the percentage of a portfolio or security’s movements that can be explained by movements in a benchmark index.
- It provides a measure of how well the variations of returns of the portfolio are explained by the market (benchmark index).
- An R^2 value of 100% means all movements of a security can be explained by movements in the benchmark. A lower R^2 indicates that the security does not act much like the benchmark.
- Mean Annual Return:
- This represents the average amount returned to an investor per year over a specified period of time.
- It is often used to compare the historical returns of different investments over time.
- While it gives a simple average return figure, it doesn’t account for the effects of compounding, which is better represented by the compound annual growth rate (CAGR).
Lets get started –
Step 1 : Get a list of all ETFs on NASDAQ or NYSE
I found this cool link https://financialmodelingprep.com/api/v3/etf/list?apikey=a2f1dc93d8441dbf74158e6c8855e1fd . We just need a quick python code snippet to read this and extract a list of all ETFs
def get_all_etf_list():
url = "https://financialmodelingprep.com/api/v3/etf/list?apikey=a2f1dc93d8441dbf74158e6c8855e1fd"
response = requests.get(url)
response.raise_for_status()
data = response.json()
etfs = []
for x in data:
if x['type'] == "etf" and (x['exchange'] == 'New York Stock Exchange Arca' or x['exchange'] == "NASDAQ Global Market"):
etfs.append(x)
print("size ", len(etfs))
return etfs
Step 2: Apply the screening process
First you will have to write a bunch of complex python code in order to extract all of the needed indicators from the ETFs. I couldnt find a simpler way to do this since the data was all over the place. I have a created a paste here so you can access the code and I will make it available on my github repo as well shortly. For those who are code-shy you can still do this manually since yahoo finance has pretty much all the information you need. Its just gonna be a bit more cumbersome – however I always do my validation by hand even after my algorithm shoots out some tickers because its your money.
Assuming we have a python dictionary containing the values for each of these this is what the screening code looks like –
def get_ticker_score(d):
if d['Expense Ratio (net)'] != 'N/A' and float(d['Expense Ratio (net)']) > 0.5:
return 0.0
if d['Alpha'] != 'N/A' and float(d['Alpha']) < 0.0:
return 0.0
if d['PE Ratio (TTM)'] != 'N/A' and float(d['PE Ratio (TTM)']) > 22:
return 0.0
return float(d['10-Year']) + 3*float(d['Sharpe Ratio'])
Happy investing!
Disclaimer: The information provided here is for general informational purposes only and should not be considered as professional financial or investment advice. Before making any financial decisions, including investments, it is essential to seek advice from a qualified financial advisor or professional.
Leave a comment