• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Decoding Markets

  • Top Posts
  • Courses
  • Resources
    • Books
  • Free Class
  • Blog
You are here: Home / Stocks / Improving Mean Reversion Strategies With PE Ratio

July 24, 2019 By Joe Marwood 4 Comments

Improving Mean Reversion Strategies With PE Ratio

I’ve always wondered whether you can improve a trading strategy by including fundamentals. 

For example, should you trade mean reversion stocks with a low PE or a high PE?

Most mean reversion strategies use technical indicators and the RSI(2) and RSI(3) indicators are particularly popular among traders. 

However, there isn’t much research on combining those indicators with fundamental analysis. 

In this article, I will start with a simple RSI(2) trading strategy and then we will see if it can be improved with the inclusion of price-to-earnings rules. 

Setting Up The Backtest

Before we go any further I’m going to explain the backtest setup because there are some potential issues that we need to be aware of.

To run this test I will be using Norgate data for end of day prices and Intrinio for fundamentals. This process involves pulling in historical fundamental data from Intrinio into Amibroker using their API.

Although Intrinio includes pricing data for delisted stocks, I have not yet been able to match up price-to-earnings data for some of the stocks in the Norgate database.  

To get around this I am going to test our strategies without delisted stocks. We will then compare them to results that includes delisted stocks.  

Although our analysis won’t be perfect, we will hopefully be able to produce something meaningful and see if there is any effect from introducing the price-to-earnings data.

Strategy Rules

We are going to run a simple RSI system on a database of S&P 100 stocks. This system is adapted from one I wrote about previously.

The rules are as follows:

Buy Rules

  • 2-Day Cumulative RSI(2) < 10
  • Average Turnover > $250,000

Sell Rules

  • Sell = RSI(2) > 65

Very simple rules. Next is an example of the trade setup in Johnson and Johnson.

We go long when the 2-day cumulative RSI(2) is less than 10 and we exit when RSI(2) crosses over 65:

Trade example in JNJ. We go long when the 2-day cumulative RSI(2) is less than 10 and we exit when RSI(2) crosses over 65. Chart: Amibroker.

Now we know the rules of this setup we can backtest it on historical data.

For this we will use a fixed position size of $1000 and we are going to test every set up in the S&P 100 between 1/2007 – 7/2019.

We will run five tests as follows: 

  • Test 1 – On S&P 100 including delisted stocks
  • Test 2 – On S&P 100 without delisted stocks
  • Test 3 – On S&P 100 without delisted stocks and P/E < 15
  • Test 4 – On S&P 100 without delisted stocks and P/E => 15
  • Test 5 – On S&P 100 without delisted stocks and Negative P/E

Backtest Results

Backtest results sorted by Sharpe ratio.

As you can see from the table above, we got some mixed results from this analysis.

The best profit per trade came from test three (buying low RSI stocks with a P/E less than 15). 

However, the best win rate and Sharpe ratio came from test four (buying low RSI stocks with a P/E over 15).

There was clearly a negative impact from including delisted stocks in the database because this produced the worst Sharpe ratio.

However, the performance was not as bad as you might expect.

There was also a clear negative impact from including stocks with negative P/E values.

Test Four Produced The Best Sharpe

It has to be said that a Sharpe ratio of 1.32 for test four is quite high and it will be good to test this again on other markets and incorporate delisted securities.

The following graphic shows the equity curve from test four. Remember this is without any real position sizing or portfolio rules:

Hypothetical equity curve for test four. S&P 100 stocks with P/E >= 15. Chart: Amibroker.

Conclusions

In this article we looked at a classic RSI(2) trading strategy and observed the impact of using historical price-to-earnings data pulled from Intrinio.

Although we were not able to include delisted stocks there is some evidence that including price-to-earnings data is useful for mean reversion trading.

The best win rate, CAR/MDD and Sharpe ratio came when trading stocks with a P/E of 15 or higher. Meanwhile, the best profit per trade and RAR came from trading stocks with a P/E under 15. 

The conclusion seems to be that it’s best to avoid stocks with negative P/E ratios. This makes sense because stocks with negative P/E ratios are losing money (they have negative yearly earnings).

So it seems that you can improve your mean reversion trading by ignoring stocks that have negative earnings. These stocks are more likely to fall further while stocks with positive P/E ratios are more likely to bounce back.

Next steps for this strategy would be to do some more stress testing, find a way to incorporate delisted tickers and then turn this into a full portfolio system with real life constraints such as portfolio size and commissions.

Charts and analysis produced with Amibroker with historical data from Norgate and fundamental data from Intrinio.


Thank You For Reading

joe marwood profile pictureJoe Marwood is an independent trader and the founder of Decoding Markets. He worked as a professional futures trader and has a passion for investing and building mechanical trading strategies. If you are interested in more quantitative trading strategies, investing ideas and tutorials make sure to check out our program Marwood Research.


Disclaimer

This post expresses the opinions of the writer and is for information, entertainment purposes only. Joe Marwood is not a registered financial advisor or certified analyst. The reader agrees to assume all risk resulting from the application of any of the information provided. Past performance is not a reliable indicator of future returns and financial trading is full of risk. Margin trading can lead to losses more than in your account. Mistakes in backtesting and presenting of analysis regularly occur. Please read the Full disclaimer.

Filed Under: Stocks, Strategies/ Systems Tagged With: stocks, trading systems

Recommended Educational Resources:


  • Discover New Trading Strategies
  • Learn Japanese Candlesticks (Free)
  • Mental Models For Trading (Free)
  • Indicators For Amibroker (Free)
  • Tools For Options Traders (Free)
  • Historical Data For 8000 Stocks (Free)

Reader Interactions

Comments

  1. Adrian Reid says

    July 24, 2019 at 9:22 pm

    I retesting Analysis – Thank you!
    It would be interesting to perform this analysis on a trend following system to see what the impact of PE is on a longer term trading system.

    Reply
    • Joe Marwood says

      July 24, 2019 at 10:17 pm

      Absolutely. I ran a couple of tests and it was looking like low PE is better for trend following but I’ll definitely look at it more in depth.

      Reply
  2. Tony Roylance says

    July 25, 2019 at 5:18 am

    Excellent post, I have often wanted to test different fundamental measures as well, but could never find accurate historical fundamental data–thanks for the info re: Intrinio.

    Reply
    • Joe Marwood says

      July 25, 2019 at 7:27 am

      Data from intrinio looks pretty good to my eyes, Thanks

      Reply

Leave a Reply Cancel reply

Your email address will not be published.

Primary Sidebar

Access Marwood Research image

Popular

Volatility strategy featured image

Simple Volatility Strategy For VXX

Investing With Intelligent Machines

The more frequently you can trade your edge, the faster you can play out your expectancy and the quicker you can recover from any drawdown.

The Downsides Of Trading Systems

Testing The RSI Model From The Quantitative Technical Analysis Book By Howard Bandy

positions sizing with RSI 2 on spy equity curve

Using The RSI Technical Indicator For Dynamic Position Sizing

does technical analysis work? one in 5 hedge funds use it

Does Technical Analysis Work? Evidence From The Social Sciences

trade example in the us ten year

Shorting The US Ten Year With ATR – A Simple System That Shows A Profitable Edge

best moving average test on s&p 500

Which Is The Best Moving Average? Test Results Reveal The Truth

Search

Recommended Resources

  • Discover New Trading Strategies
  • Learn Japanese Candlesticks (Free)
  • Mental Models For Trading (Free)
  • Indicators For Amibroker (Free)
  • Tools For Options Traders (Free)
  • Hist. Data For 8000 Stocks (Free)

Financial Disclaimer

Financial trading is risky and you can lose money. Joe Marwood is not a registered investment advisor and nothing on this site is to be regarded as personalized investment advice. Past performance is not indicative of future results. Data errors and mistakes do occur. Please see the full disclaimer.

Footer

About The Author

Joe Marwood is an independent trader and investor specialising in financial market analysis and trading systems. He worked as a professional futures trader for a trading firm in London and has a passion for building mechanical trading strategies. He has been in the market since 2008 and working with Amibroker since 2011.

Joe Marwood Profile PIc

Recent Posts

  • Investing With Intelligent Machines
  • Trend Following With ETFs and Large Cap Stocks
  • Should You Trade This Earnings Pullback Strategy?
  • Simple Algo Trading With Alpaca And Streak
  • Is Value Investing Dead? Dissecting The Value Investing Narrative
  • How To Screen For Stocks With Norgate Data
  • Do Stocks Have A Floor?
  • What Trading Signals Work Best For Long-Term Investors?

Search

Privacy policy | Contact | Disclaimer | All Rights reserved. JB Marwood.