Back to Community
EV/EBITDA Value, then momentum

I would like to present one of my projects based on the paper On the Performance of Cyclically Adjusted Valuation Measures by Gray and Vogel.

Most of the variables that one would change is right at the top.

First lets look at the fundamental screen that selects lowest positive 10 ev/ebitda ratios. Not bad.

Here is a summary of how the algorithm works.
Every x number of months, pick the stocks with a non-negative ev/ebitda and sort them from lowest to highest
Select only the lowest ev/ebitda
Then sort your resulting screen according to return of past days (I set it to 200) ignoring the last month
Pick the top momentum stock, and rescreen and rebalance every x number of months

Clone Algorithm
517
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: 5564685037a0bc105f6cb438
There was a runtime error.
26 responses

Next, we select for low momentum stocks from an initial fundamental screen of 100 stocks.

Surprisingly, it's slightly better... probably because it selects stocks with higher beta?

Clone Algorithm
517
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: 5564697859dc6a1068d5c38d
There was a runtime error.

Lastly, we have the high momentum version

Returns are much better. A lot more volatility though, which is typical of momentum strategies.

You may be wondering why I chose such a short and odd interval from 2003-2007... That's because all 3 backtests stop working after 2011! From 2011-2015, neither value nor momentum outperforms the SP500!

Any thoughts?

Clone Algorithm
517
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: 55646a2059dc6a1068d5c397
There was a runtime error.

Here is a backtest with the same parameters as post #3 (high momentum), with the date range from 2003 to 2015 and I also turned on a moving average market exit towards long term treasuries (TLT).

Clone Algorithm
517
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: 55647a63999a6010946c1eb0
There was a runtime error.

why it cannot have out performance backtest from 2010 to 2015

hahah that is an exercise left to the reader.

I have a feeling it is partly due to bad or inconsistent data. It doesn't explain why 2003-2007 returns are higher than 2011-2015 but it might explain the poor performance in the latter series.

I am currently writing code to excise stocks with bad data. For instance, stocks with negative ev or negative ebitda. EV/EBITDA as reported by morningstar does not equal EV divided by EBITDA as reported by morningstar on the same day. Strange huh.

Johnny,

I'll reach out to Morningstar to figure out how the EV/EBITDA ratio is calculated. I suspect the EBITDA values they use for the calculation might be some sort of difference in the value of EBITDA they're using (either a 12 month value or some other variant different from "the most recent reported quarter")

Josh

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

Hi,

I heard back from Morningstar. The EV/EBITDA metric is calculated with a value of enterprise value that is updated daily and a trailing twelve month value of EBITDA which is updated quarterly. That trailing-twelve month value of EBITDA is not surfaced directly by our fundamental API today. The EBITDA value you have direct access to is the most recent quarter.

Hope that helps.

Thanks
Josh

Sorry, I don't quite understand. What do you mean by "That trailing-twelve month value of EBITDA is not surfaced directly by our fundamental API today"? By the most recent quarter, I assume that means most recent as of the datetime in simulation?

very often, the ebit and ebitda are nan, when ev/ebitda is a number. Did morningstar give any reason for that?

From what I remember there was a bug where ev-to-ebitda was not calculated daily but quarterly for a stock. If I plotted it to a graph u would find that it does vary with the daily changes in stock price. It should, if it was indeed being updated every day.

Trading IAU might be better than TLT, it tends to trend better in down times. Also it might be worth it to use a stop order.

Thanks Stian! I didn't think of using stop loss orders!

Found a paper that shows it works well with momentum
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2407199

Here is the exact same code as post #3, but with a stop loss order of 10%. Once the stop loss is executed, the proceeds remain in cash for the rest of the month, just like in the paper outlined above.

In short, it doesn't work. In April 2004, it lost about 33%. It looks like at some point, the code shorts stocks. The stop order code is:
order_target_percent(stock, 0, style=StopOrder(data[stock].price*0.9))
Since it's target_percent 0%, why would it ever short stocks? It could be that an order remains unfilled due to poor liquidity, but the stock HUM is pretty liquid, and the offending shorts are 2 weeks after the portfolio is 0 (my strategy is long only).

I feel like the problem is due to my lack of understanding of how orders work in the API. I will keep working on this.

Clone Algorithm
517
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: 5569ac68643dda10a3bb3fb8
There was a runtime error.

I found a piece of code here:
https://www.quantopian.com/posts/how-to-cancel-all-open-orders. (many thanks to John Ricklefs)

I put the code cancel_everything() at the start of rebalance day. I'm not sure if this is an improvement. The drawdowns are roughly equivalent, and the Sharpe ratio is worse.

Clone Algorithm
517
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: 5569bccb91ec6b1093230ed5
There was a runtime error.

Amazing work Johnny , thanks for sharing this. I'm working a momentum strategy using country ETFs, will publish soon .

Thanks Lionel! Country ETF using momentum was going to be my next project. Did you watch the presentation by Meb Faber in Quantcom too?

I look forward to see what you came up with.

Thanks for sharing Johnny.
I see that you are filtering out Business Services and Media sectors when screening stocks. Any particular reason in doing so?

If I did, it was unintentional.
Based on this code:
context.sector_mappings = {101.0: "Basic Materials",
102.0: "Consumer Cyclical",
103.0: "Financial Services",
104.0: "Real Estate",
205.0: "Consumer Defensive",
206.0: "Healthcare",
207.0: "Utilites",
308.0: "Communication Services",
309.0: "Energy",
310.0: "Industrials",
311.0: "Technology"}

The ev/ebitda ratio works better than p/e ratio due to the fact that it allows for a fair comparison between companies. In greenblatt's book, he excludes finances and utilities because their bookkeeping is complex and hence their ev/ebitda cannot directly be compared in a simple mechanical way to companies outside their sector.

To be honest, I don't know any other details of why this should be.

Maybe someone more knowledgeable can chime and in explain it in greater detail

        .filter(fundamentals.asset_classification.morningstar_sector_code != 103)  
        .filter(fundamentals.asset_classification.morningstar_sector_code != 207)  

It's a different table than the one I found on Morningstars' web site.
Then the selection is excluding Financial services and Utilities.

Could you please link me to the morningstar web site that has a different table?

Morningstar Global Equity Classification Structure

The sector classification is shown on page 2, the document is from 2009 though.
Perhaps the classification changed.

This is the reason why I love the community. I wouldn't have thought to doublecheck the accuracy of my morningstar sector codes!

I did a quick marketcap sort of 103. According to my references, it should be finances, but according to your link it should be media.

It returns such names as AIG, BRK, ING etc... pretty big finance firms.

207 should be utilities according to my reference but business services in yours. A quick marketcap sort returns DYN, EON, DUK, SO etc..

From my search, I'm pretty confident that my list is most accurate for the purpose of the Quantopian API. Again, thanks for the diligence.

There was a problem a few months ago that I reported about ev_to_ebitda value not being calculated every day.
I plotted the ev_to_ebitda value for stocks and they show updates once quarter and then flattening out till the next quarter.

And some one from quantopian confirm this was the case.

Is this still the case? Has this been fixed?
that would affect this algorithm

Saravanan: I have an unpublished piece of code that manually re-calculates based on the reported ebit and ev. It performs quite a bit better, so I suspect that this is still the case.

Sarvi,
For data prior to May 2014, metrics were only provided to us with a monthly frequency. So even metrics that change daily (like ev_to_ebitda) are only updated monthly in our data set in the timeframe 2002 - May 2014. This is an unfortunate fact of life for us with respect to the Morningstar data set. We deliver as much data as they've provided to us.

Subsequent to May 2014, we have daily updates for our metrics. This magic date in May 2014 is when we began our relationship with Morningstar. We subscribe to Morningstar's daily updates so this (and other metrics like market cap) update daily in our data set from May 2014 - present.

Unfortunately, I've found no way to fix this with what we get from Morningstar today.

I just wanted to add some information links related to this topic that I found useful. This post was the first time I had heard of the "Enterprise Multiple" ratio, so this might be useful for others:

The Single-Best Metric: EV/EBITDA

A Superior Metric for Value Investors

Get_fundamentals method is no longer working, so I updated the code accordingly. At first glance it provides a fantastic return (and indeed it does for the backtest period), but the algorithm underperforms this decade. It makes sense given that the performance of value factor has been progressively worsening for close to a decade. Sorting by high EV/EBITDA actually seems to give a slight edge.

Clone Algorithm
47
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: 5a1bacbf17595f419d6e2bca
There was a runtime error.