Quant Mashup - Alvarez Quant Trading
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Avoiding Trades Before Earnings [Alvarez Quant Trading]
Over my last 16 years of research, one of the most asked questions is should you not take trades before an earnings release. I could never answer this question because I did not have the data. I can easily recall trades were a stock came out with poor earnings and crashed 25%. But without testing
- 5 years ago, 24 Apr 2019, 11:17am -
The 50/50 SPY Strategy [Alvarez Quant Trading]
I was talking to my trading buddy about the annoying part of trend following strategies. They may get you out of the major sell off but then you miss part of the run up. Using a 200-day moving average on the SPY would have got you out in late 2018. This would have been within 10% from the top and
- 5 years ago, 3 Apr 2019, 12:50pm -
How is mean reversion doing? Dead, Shrinking or Doing Just Fine [Alvarez Quant Trading]
A common question I get from readers is “does mean reversion still work?” The last time I wrote about this topic was in 2015, a long time ago, in the post “The Health of Stock Mean Reversion: Dead, Dying or Doing Just Fine” I did not realize it had been so long. Time to look at it again. The
- 5 years ago, 13 Mar 2019, 09:36pm -
ETF Bond Rotation [Alvarez Quant Trading]
In my last post I discussed SPY/TLT rotation strategies. Today, I will be using the same ideas from the post but on a basket of bond ETFs. The Basket The first difficult decision one must make is what ETFs will be in the basket. What we choose here, can have a big impact on the results. I wanted to
- 5 years ago, 20 Feb 2019, 05:46pm -
SPY TLT Rotation [Alvarez Quant Trading]
For my retirement accounts, I like to trade ETF strategies that require little work. One strategy we have all seen is the SPY/TLT strategy. There are many flavors of this concept. Some pick the best one over the last N months. Then there are different ways of allocating a portion of the portfolio to
- 5 years ago, 30 Jan 2019, 03:07pm -
How Bad Was 2018’s Volatility? [Alvarez Quant Trading]
I have a Google Home in my bathroom that I play a morning routine while I shave, brush my teeth and get ready for the day. One step is to play The Indicator podcast from Planet Money. This morning they were talking about how “2018 was one of the most volatile years on record for the stock
- 5 years ago, 9 Jan 2019, 01:23pm -
What to do when you find the Holy Grail [Alvarez Quant Trading]
As I have mentioned in several interviews, I am always looking for new strategies. One area that fascinates me is stock options. Because it is difficult to get good data and to do backtests, I believe that there are good edges here to be found. A few weeks ago, I found myself with lots of time and
- 5 years ago, 20 Dec 2018, 06:49pm -
The Emotional Quant Curve [Alvarez Quant Trading]
While writing my presentation for TradersFest 2018, I wanted to add the trader’s emotional curve. But looking at it closer, it did not capture my feelings as I go through the cycle of up and downs of trading a strategy. Here is my curve. I have been on every part of this curve multiple times.
- 5 years ago, 5 Dec 2018, 12:42pm -
Stiffness Indicator Analysis [Alvarez Quant Trading]
A reader pointed me the November 2018 issue of Technical Analysis of Stocks & Commodities to an article about a trend following indicator on S&P500 stocks. I liked the concept of the indicator and the article had backteted results and AmiBroker code. How could I resist not looking into this?
- 5 years ago, 28 Nov 2018, 09:33pm -
Missing the best or worst market days [Alvarez Quant Trading]
This morning I saw the chart on Ritholz.com of what happens when you miss the best X days of the market. I see a variation of this chart often and is used to argue why someone should not try and time the market. One concept I like to do is to invert. Meaning try the opposite idea and see what you
- 6 years ago, 28 Oct 2018, 08:50pm -
Backtesting a Dividend Strategy [Alvarez Quant Trading]
I was recently at a NWTTA presentation about the “S&P 500 Dividend Aristocrats” and how to trade these stocks. The strategy was part quantitative and part discretionary. It was popular talk with lots of good questions. People always seem interested in dividend stocks but for me they are just
- 6 years ago, 17 Oct 2018, 02:19pm -
StockCharts Technical Rank (SCTR) Rotation Strategy [Alvarez Quant Trading]
My post last week on the analysis of SCTR produced lots of emails and comments with great ideas. One idea that I liked was a simple rotation strategy using SCTR. I mentioned in the post that maybe using SCTR as ranking method would produce different results. Normally I don’t post this quickly but
- 6 years ago, 19 Sep 2018, 12:05pm -
StockCharts Technical Rank (SCTR) Indicator Analysis [Alvarez Quant Trading]
Overall the last few months, I’ve had several consulting client’s strategy use SCTR for either a ranking or a filter. I finally got curious about the predictive ability of SCTR. How good is? I could find no information on how each of the ranking buckets did X days later on StockCharts.com. Maybe
- 6 years ago, 12 Sep 2018, 11:06am -
Pre-inclusion Bias: How to create a false strategy [Alvarez Quant Trading]
In the previous post I described a simple rule to double the returns of a mean reversion strategy. In this post, I show how pre-inclusion bias can take a losing strategy and make it a winning one. Recently I had reader send me the rules for a stock trend following strategy. He knew these are the
- 6 years ago, 22 Aug 2018, 11:05pm -
RSI2 Strategy: Double returns with a simple rule change [Alvarez Quant Trading]
While playing around with a 2 period RSI (Relative Strength Index) mean reversion strategy, I came up with a very simple rule change with a much larger impact on the results than expected. I doubled the compounded annual growth rate and cut the maximum drawdown in half. That never happens. In my
- 6 years ago, 1 Aug 2018, 12:04pm -
Norgate Data Review [Alvarez Quant Trading]
I am frequently asked what data provider I use and recommend for stocks. I have been using Norgate Data for four years and recommend them to anyone looking for data. This review will focus on US Stocks and AmiBroker integration which is what I use daily. Norgate Data has data for the Australian and
- 6 years ago, 27 Jun 2018, 10:48pm -
RSI2 (Relative Strength Index) Analysis [Alvarez Quant Trading]
From my time with working with Larry Connors, I have become known for using the 2-Period RSI (RSI2) (Relative Strength Index) in my trading. I have written lots of blog posts that use it and I often use it in my personal strategies. One thing I like to do with indicators that I use frequently is a
- 6 years ago, 13 Jun 2018, 10:39pm -
Trading the Equity Curve – More Ideas [Alvarez Quant Trading]
A couple posts ago, I looked at Trading the Equity Curve and found interesting results but nothing that made me decide this works for me. Using the equity curve to decide when to stop trading a strategy just sounds like it should work. But for me it is always about testing. I cannot count how often
- 6 years ago, 24 May 2018, 09:51am -
Mean Reversion Entry Timing [Alvarez Quant Trading]
One of the first tests I did when I got AmiBroker twenty years ago was a mean reversion test. It was a classic set up, a stock in an uptrend, followed by a pullback. But the entry differed from what I do now. The entry waited for a confirmation of the trend back up. The trade would enter when the
- 6 years ago, 25 Apr 2018, 01:02pm -
Trading rules that keep you trading [Alvarez Quant Trading]
I have written the difficulty in trading and testing short strategies. I had stopped trading my short strategy because it was too hard to trade psychologically for me. About nine months ago, I revisited my short strategy to see how it had been doing since I stopped and of course it has been doing
- 6 years ago, 29 Mar 2018, 11:25am -
XIV Barbell Strategy [Alvarez Quant Trading]
Well that was fun! I have been telling my trading buddy and anyone else that would listen that I fully expected XIV to open at zero one day. Now I did not expect it to happen so soon or the way it did. I trade a strategy that can be long XIV or long VXX or in cash. Because of the very likely
- 6 years ago, 28 Feb 2018, 10:31pm -
Trading the Equity Curve [Alvarez Quant Trading]
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
- 6 years ago, 14 Feb 2018, 01:38pm -
Equity Curve Monte Carlo Analysis [Alvarez Quant Trading]
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.
- 6 years ago, 24 Jan 2018, 03:01pm -
How to turn a losing strategy to a winning strategy with commissions [Alvarez Quant Trading]
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
- 6 years ago, 10 Jan 2018, 11:15am -
Do you have a plan for your screw ups? [Alvarez Quant Trading]
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
- 6 years ago, 14 Dec 2017, 11:25am -
External Strategy Rule Evaluation. Too many rules? [Alvarez Quant Trading]
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
- 6 years ago, 6 Dec 2017, 01:28pm -
Weekly Mean Reversion Rotation Strategy on S&P500 Stocks [Alvarez Quant Trading]
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
- 7 years ago, 15 Nov 2017, 11:52am -
The ABCs of creating a mean reversion strategy – Part 2 [Alvarez Quant Trading]
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
- 7 years ago, 1 Nov 2017, 01:01pm -
The ABCs of creating a mean reversion strategy – Part 1 [Alvarez Quant Trading]
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.
- 7 years ago, 18 Oct 2017, 02:35pm -
Indicator Comparison: Ehler My Stochastic Indicator, RSI and ConnorsRSI [Alvarez Quant Trading]
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.
- 7 years ago, 4 Oct 2017, 07:42pm -
ETF Sector Trading: The effect of daily, weekly and monthly timeframes [Alvarez Quant Trading]
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
- 7 years ago, 20 Sep 2017, 01:50pm -
Broken Strategy or Market Change: Investigating Underperformance [Alvarez Quant Trading]
I recently had someone email me about the performance of a strategy I created back in late 2005/early 2006 and traded for a few years. I remember the strategy being a daily mean reversion set up with an intraday pullback entry. I figured it probably had not done well over the last decade. I stopped
- 7 years ago, 7 Sep 2017, 12:11am -
Sector trading using the 200-day moving average – Part 2 [Alvarez Quant Trading]
Several readers asked for additional tests to be done on the strategy on Sector trading using the 200-day moving average. We will be testing allocated 11% per ETF instead of 10%, using asymmetric number of days and adding IEF to the SPY MA200 10 day test. SPY MA200 10 day Buy Rule: Buy SPY when it
- 7 years ago, 23 Aug 2017, 11:36pm -
Sector trading using the 200-day moving average [Alvarez Quant Trading]
A user commented on ETF Sector Rotation post about a simple idea for trading the sector ETFs, which I can’t believe I have never tried. I like keeping things simple just like my Brazilian Jiu-Jitsu game. Rules If the Select Sector SPDR ETF (XLY, XLP, XLF, XLE, XLV, XLI, XLB, XLK, XLU) is above its
- 7 years ago, 2 Aug 2017, 02:24pm -
Out-of-sample testing and luck [Alvarez Quant Trading]
Continuing from the last post, I will show how using different definitions of passing our out-of-sample test can change our results. How luck can play a role if you use only one strategy to test in out-of-sample. How you split your in-sample(IS) and out-of-sample(OOS) can change results. The
- 7 years ago, 12 Jul 2017, 12:54pm -
In-Sample and Out-Of-Sample Testing [Alvarez Quant Trading]
I am frequently asked if I do out-of-sample testing. The short answer is not always and when I do, it is not how most people do the test. There are lots of considerations and pitfalls to avoid when doing out-of-sample testing. Out-of-sample testing is not the panacea it is made out to be. There are
- 7 years ago, 21 Jun 2017, 07:36pm -
Can A Simple Market Timing Indicator Be Beat? [Alvarez Quant Trading]
As long time readers of my blog know, I often use a market timing indicator in my strategies. My favorite one, and a simple one, is using the 200 day moving average on either the SPY or S&P 500 Index. I recently ran into these posts, Using Market Breadth To Gauge Market Health (Part 5) and
- 7 years ago, 31 May 2017, 06:30pm -
ConnorsRSI Strategy: Sensitivity Analysis [Alvarez Quant Trading]
In Simple ConnorsRSI Strategy on S&P500 Stocks I showed a ConnorsRSI strategy on S&P500 stocks. In ConnorsRSI Strategy: Optimization Selection, I narrowed down the optimization to three potential variations that one could consider trading. This post will explore Sensitivity Analysis (also
- 7 years ago, 4 May 2017, 04:52am -
ConnorsRSI Strategy: Optimization Selection [Alvarez Quant Trading]
In the previous post, Simple ConnorsRSI Strategy on S&P500 Stocks, I showed a simple strategy which I optimized which gave 1,300 variations. Today, I will cover various methods to choose a strategy to potentially trade. Goals The goals were to find a variation with over 20% CAR and Max Drawdown
- 7 years ago, 12 Apr 2017, 08:35pm -
Simple ConnorsRSI Strategy on S&P500 Stocks [Alvarez Quant Trading]
A frequently asked question is how I pick which variation from an optimization run to trade. This post will cover a ConnorsRSI strategy on S&P500 stocks. We will use a wide range on the parameters to give us lots choices to be used in the next post. I the next post, I will show how I take the
- 7 years ago, 15 Mar 2017, 02:46pm -
Country ETF Rotation – Reader’s Suggestions [Alvarez Quant Trading]
My last post on Country ETF Rotation generated several ideas of what to test to improve the results. See the original post for the list ETFs being traded. One important test I left out from the original post was a baseline case. An idea applied to all the tests was trading more ETFS. For all tests,
- 7 years ago, 22 Feb 2017, 12:00pm -
Country ETF Rotation [Alvarez Quant Trading]
My recent research has been focused on finding strategies that are not highly correlated with the S&P500 index. One of my most popular posts is ETF Sector Rotation. The idea for this post is to apply those concepts to a list of country ETFs. Would this produce decent returns that were not highly
- 7 years ago, 26 Jan 2017, 11:19am -
N-Day exits with Mean Reversion [Alvarez Quant Trading]
My last post on using PercentRank to measure mean reversion proved very popular. A reader looked at the trades and wondered if it would be best to exit after five days because the average trade with longer holds was a loser. I am surprised I have not covered this topic before. Background Early in
- 7 years ago, 4 Jan 2017, 08:29pm -
Using recent returns for Mean Reversion [Alvarez Quant Trading]
In most of my mean reversion posts, I use RSI(2) to determine if a stock has sold off. In this post, I will explore how to use a stock’s recent return to determine if it has sold off. This will be done in way to normalize the return between low and high volatile stocks. This basic strategy has
- 7 years ago, 7 Dec 2016, 06:38pm -
Is synthetic XIV/VXX data safe to use? [Alvarez Quant Trading]
I have done several posts about trading XIV & VXX. In these posts (here, here and here) I refer to using synthetic data before these ETFs started trading. I supported the use of the data due to the very high correlation of daily returns during the overlap period. With a correlation of .97, I
- 8 years ago, 16 Nov 2016, 06:38pm -
VXX & XIV Strategies [Alvarez Quant Trading]
My recent research has been on the volatility Exchange Traded Products. My focus has been on long trades using VXX and XIV. Although VXX has a very strong downtrend, I am not a fan of developing short strategies on it due to the huge upside risk. I wrote about XIV here and expressed some of the
- 8 years ago, 26 Oct 2016, 07:35pm -
Presenting in Dallas and Austin, Texas [Alvarez Quant Trading]
I will be in Texas next week giving presentations. Click the links below for more details. I hope to see some readers there. October 17, 2016 Austin Market Technicians Association For more information see https://www.mta.org/event-registration/austin-chapter-meeting-featuring-cesar-alvarez/ October
- 8 years ago, 10 Oct 2016, 03:06pm -
Ask Me Anything Video for October 5, 2016 [Alvarez Quant Trading]
In this short five minute video I will answer the following questions: Have you used HV10/HV100 ratio? Have you found any value in it? When trading multiple strategies, how do you decide what percentage to allocate to each. What do you think about asset allocation ETF strategies, like Ray Dalio’s
- 8 years ago, 5 Oct 2016, 02:04pm -
Taming High Return and High Risk [Alvarez Quant Trading]
I was at a recent talk of the Northwest Traders and Technical Analysts group where they presented a VXX strategy with some huge return and drawdown numbers. Trading this would be very difficult. This got me thinking. If I had a strategy like this, how could I tame the numbers? Through the years, I
- 8 years ago, 28 Sep 2016, 01:21pm -
Ask Me Anything Video [Alvarez Quant Trading]
In this short five minute video I will answer the following questions: I am interested in knowing a little bit more about your own trading. What types of strategies are you trading? Why do you not manage outside money? What are the trading books you recommend? Do you have a trading or AmiBroker or
- 8 years ago, 12 Sep 2016, 08:10pm -