Cesar Alvarez

Author Archives: Cesar Alvarez

February 14, 2018

Trading the Equity Curve

A popular method for determining if a strategy should be kept trading is trading the equity curve. What this means we apply an indicator, say 200-day moving average, to the equity curve. When the equity curve falls below this value we stop trading. We then continue to paper trade the strategy until it gets above the moving average and then trade it live again. The general idea being that you get out when the strategy is doing poorly and get back in when it is doing well. Also once a strategy breaks, this gives you a simple way of getting out of it.

Continue reading

January 24, 2018

Equity Curve Monte Carlo Analysis

Imagine the following. You spent time developing a strategy with a compounded annual return of 24% and max drawdown of 18%. Profitable 10 of the last 11 years. An average 21 day rolling correlation with the SPY of .20.  Passes your out-of-sample testing. Passes your parameter sensitivity testing. Raise your hand if you would trade this? I would be the guy jumping up and down saying “yes!”.

Now you trade the strategy and the first year you lose money. Do you stop trading it or keep going? What about after two years, your average return is only 11%, half the backtested results? Do you stop trading it or keep going?

I would have a hard time trading it after two years. I can say I have done this before with strategies. Here is the issue, the above one year and two year scenarios are quite possible.

Continue reading

How to turn a losing strategy to a winning strategy with commissions

A mean reversion strategy I trade was developed with another researcher. This strategy enters on a further intraday weakness with a limit order and typically exits a few days later when the stock bounces. Recently this researcher sent me and email saying “Try the strategy as a day trade. Enter at the open and exit at the close. Surprisingly good results.”

Continue reading

December 13, 2017

Do you have a plan for your screw ups?

You should have a plan for when you screw things up because I can guarantee it will happen. This is the screw up I did last night and how I handled it this morning. Enjoy this unplanned post.


The Nightly Ritual

Each night for 250 days of the year, I do the following for my trading.

Step 1: In the early evening, log into InteractiveBrokers, get the executions for the day, update my current positions and P&L spreadsheet. This is all done with a push of a couple of buttons. Last, push button in Excel that starts code that waits for data to be updated for the day and then runs my scans in AmiBroker and imports results into Excel. Time to do 2 minutes

Continue reading

External Strategy Rule Evaluation. Too many rules?

A common question I get is where do I find all my research ideas. My main source is Quantocracy. He does a great job of curating posts because the work is manually done. Then there the Better System Trader and Trend Following Radio podcasts. Usually from these sources I get a nugget of an idea to research or a simple strategy. Sometimes the post/podcast will recommend a book.

From one of these sources came the recommendation of the book “Trade Like A Stock Market Wizard” by Mark Minervini. Fortunately for me, my local library carried it. The strategy he covers in the book is a mixed of fundamentals, chart reading and technical analysis. Not something I would normally care about. I really enjoyed the chapters on risk management. In one chapter, he has very specific technical rules that all stocks must follow. On seeing this, I wondered could these rules be a basis for a trend following stock strategy? My second thought was, there are lots of rules there. Are all the rules necessary? The latter question is what I will focus on this post.

Continue reading

Weekly Mean Reversion Rotation Strategy on S&P500 Stocks

A reader emailed me about testing a weekly mean reversion rotation strategy on S&P500 stocks. My first thought was, why had I not done this type of test before? The very first strategy that I worked on with Larry Connors was this type of strategy. The strategy I will be testing today is a simpler version and different universe but how well will it hold up?

Basic Rules

Testing period is from 1/1/2007 to 10/31/2017.


  • Stock is a member of the S&P500 index
  • Stock is trading above its 200-day moving average
  • The SP500 index is trading above its 200-day moving average

Each weekend, take all the stocks that have setup and then rank using one of the mean reversion methods below. Buy top 5 that are most sold off. Hold 1 week and sell. Then buy the ones that are now the most sold off

Continue reading

The ABCs of creating a mean reversion strategy – Part 2

This post is the continuation of the steps for creating a mean reversion strategy from the first part of The ABCs of creating a mean reversion strategy – Part 1. You can also listen to part 2 of my interview on Better System Trader here.

A quick recap of the topics covered in part 1. I covered trading universe, indicators to measure daily mean reversion, combining multiple mean reversion indicators, and last bar mean reversion.

Continue reading

The ABCs of creating a mean reversion strategy – Part 1

I was recently interviewed on Better System Trader, click here for part one of the interview, about the steps for creating a stock mean reversion strategy. I will be covering and expanding on the topics from the interview. These steps, for the most part, would apply to any strategy one is creating. The focus will be a long stock mean reversion strategy using daily bars.

Continue reading

Indicator Comparison: Ehler My Stochastic Indicator, RSI and ConnorsRSI

Like all traders, I am always on the lookout for any new indicators better than the ones I am using. I have been using and promoting RSI2 since 2004 for mean reversion trading. I created the ConnorsRSI in 2012. Am I married to these indicators? No. If I find something ‘better’ I will drop them. I came across this article Battle of the oscillators, I had to try it out.

One thing to understand, is that each situation is different. An indicator that works great on ETFs may work not as well on futures. Also, each person has a different metric on what is ‘better.’

Continue reading

September 20, 2017

ETF Sector Trading: The effect of daily, weekly and monthly timeframes

I recently gave a presentation on Sector trading using the 200-day moving average at the Northwest Traders and Technical Analysts. Some questions asked were:

  • What if we only trade this monthly?
  • What if we used weekly bars to trade only weekly?
  • Wat if we used weekly bars to trade monthly?

The reason for these questions was to reduce the frequency of having to check signals and the total number of trades. My first response was that the results would probably be a little lower and the trade count also would be lower. But that was just a guess. I have been doing this long enough to know that I wrong 40% of the time. Curiosity got the better of me and I tested it out.

Continue reading

1 2 3 12