Quant Mashup - Alvarez Quant Trading
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
SPY, SSO and TLT Strategy [Alvarez Quant Trading]
A reader sent a strategy to test which is a basic monthly rotation strategy between stocks and bonds. What caught my attention was the use of SSO, the 2x of S&P 500. The main idea being to use SSO when in a low volatility bull market. Looking over the rules, I could tell this strategy was
- 1 week ago, 13 Nov 2024, 08:41pm -
Bear Markets Through the Decades [Alvarez Quant Trading]
Several months ago, Steven (my trading buddy) and I were talking about bear markets. I felt that bear markets seem shorter and shallower now compared to the past. I thought this would be a quick and easy research project and blog post. Nope. As I generated numbers, more questions and research paths
- 2 months ago, 25 Aug 2024, 10:40pm -
Sell in August and Go Away [Alvarez Quant Trading]
I was going through some old issues of Technical Analysis of Stocks & Commodities looking for some ideas to test. In the November 2019 issue, I came across “Stock Market Seasonality: A Global Phenomenon” by Jay Kaeppel. The basic idea was that global markets share the same “buy in November
- 5 months ago, 13 Jun 2024, 03:45pm -
UPRO/TQQQ Leveraged ETF Strategy [Alvarez Quant Trading]
Recently a reader sent me a leveraged ETF strategy that he wanted tested for the blog. Over the last couple of months, I have been noticing renewed interest in leveraged ETF trading. More clients are coming to me to test out leverage trading ideas. I have been testing my own ideas. What I liked
- 7 months ago, 27 Mar 2024, 11:12pm -
Mean Reversion vs Trend Following Through the Years [Alvarez Quant Trading]
Something I am always thinking about is how the markets are behaving now vs the past few years vs several years ago. My edge on the strategies I trade depends on two main ideas. One, current market behavior is similar to what I tested on which is normally the last 5-10 years. Two, not too many
- 9 months ago, 24 Jan 2024, 08:27pm -
2023 Rally - How Strong Is It? [Alvarez Quant Trading]
This end of year rally which started on October 2023 has been strong. My trading buddy and I started wondering how this compares to the past. Is this a “normal” strong rally or an “abnormally” strong one? Determining this is always tough because it depends on the indicators you use. Because
- 10 months ago, 21 Dec 2023, 11:34pm -
Sector Rotation Strategy: Should Trading Rules Make Sense? [Alvarez Quant Trading]
I was doing my usual reading when I came across a sector rotation strategy. I have seen lots of these strategies but this one had a different twist. The strategy was a momentum strategy but instead of buying the top three, it was buying the middle three. The article gave no reason other than it
- 1 year ago, 15 Nov 2023, 08:37pm -
Reducing Whipsaws When Using 200-day Moving Average for Market Timing [Alvarez Quant Trading]
I was working on testing a market timing indicator that I read about it. It was showing some promise and the next step was to compare it to my benchmark. My benchmark is using the 200-day moving average. But an additional rule removes a lot of the whipsaws that can happen. After doing the
- 1 year ago, 27 Sep 2023, 11:35pm -
Efficiency Ratio and Mean Reversion [Alvarez Quant Trading]
While reading the January 2023 issue of Technical Analysis of Stocks & Commodities, I came across an article about Efficiency Ratio (ER) by Perry Kaufman. In the article, he discusses using ER to decide when to trade mean reversion strategy vs a trend following one. My curiosity on this was
- 1 year ago, 7 Jun 2023, 09:03pm -
Volume and Mean Reversion Part 2 [Alvarez Quant Trading]
From the Volume and Mean Reversion post, a reader sent a suggestion to instead use the ratio of 10 day moving average of the Close times Volume divided by the 63-day moving average of the Close times Volume (CV10/63). I had not tried this before and wanted to see how well it would work. First Steps
- 1 year ago, 23 Mar 2023, 02:16am -
Volume and Mean Reversion [Alvarez Quant Trading]
Overall, I have had very little success integrating volume into any of my strategies. Either volume would have no predictive value or if it did, using it reduced the number of trades too much to be worthwhile. It has been a long while since I have looked into this and I had some new ideas. The Rules
- 1 year ago, 7 Dec 2022, 10:27pm -
Mean Reversion Check Up 2022 [Alvarez Quant Trading]
A common question I get is whether mean reversion is still working. My response is I am still trading a mean reversion strategy but the edges seem to get smaller. Over the year I have investigated this. I was asked again recently and wanted to investigate again. Here are the results of my 2022
- 2 years ago, 25 Oct 2022, 01:01am -
Three Factor ETF Rotation Strategy [Alvarez Quant Trading]
I am drawn to ETF rotation strategies. What likely draws me to them is that in general, these are simple strategies that do not trade that often. My goal with these strategies is to match buy and hold with less drawdown. What follows is a strategy I have known about for a while and tested but never
- 2 years ago, 16 Sep 2022, 07:07am -
Avoiding Volatile Trades [Alvarez Quant Trading]
In my last blog post, Using Historical Volatility for Parameter Adjustment, I tested using historical volatility to determine trade rules. While reading the July 2022 Technical Analysis of Stocks & Commodities, I came across an article, “Is It Too Volatile To Trade?” by Perry Kaufman. I
- 2 years ago, 3 Aug 2022, 08:56pm -
Using Historical Volatility for Parameter Adjustment [Alvarez Quant Trading]
The AllocateSmartly website often has interesting posts. Recently I was reading the article Trending Fast and Slow and thought about other ideas to test. The article is based on research on trading the SPX and depending on the current historical volatility one would either use a 12-month or a
- 2 years ago, 23 Jun 2022, 10:36pm -
SPX and Gold Momentum Portfolio [Alvarez Quant Trading]
Given the current rise in inflation, there has been a lot more interest in assets that do well during these times. Gold is one asset that is frequently brought up as an inflation hedge. I have also seen more lately about combining these two into a portfolio. Testing Notes The test range is from 1970
- 2 years ago, 18 May 2022, 12:46pm -
Benford’s Law and Strategy Selection [Alvarez Quant Trading]
While talking to a trader, he mentioned an article in the December 2021 issue of Technical Analysis of Stocks & Commodities about Benford’s Law. I had read the same article and was wondering how it could be applied to my trading. Benford’s Law is often used to look for fraud. I am sure I am
- 2 years ago, 6 Apr 2022, 09:17pm -
Internal Bar Strength for Mean Reversion [Alvarez Quant Trading]
I’ve been writing this blog for nine years now. Sometimes I am amazed about topics I have not covered and this is one of them. When developing a new strategy, these are the indicators I likely test: RSI, Historical Volatility and Internal Bar Strength (IBS). I had a reader send me an email
- 2 years ago, 16 Feb 2022, 06:03pm -
SP-500 Seasonality [Alvarez Quant Trading]
I’ve been seeing lots of seasonality type charts on the S&P500 where they take the average return for each day of the year and then create a return curve for the year. The chart often ‘shows’ the sell in May and buy in November flatness of the returns. And then the holiday end of the year
- 2 years ago, 14 Jan 2022, 09:15am -
January Effect on Stocks [Alvarez Quant Trading]
A member of The Crew recently asked me about the January Effect and if had I done any research on it. I had not. I have tested the December effect, which is buying the worst stocks of the year on December 1st, Should You Buy the Best or Worst YTD Stocks. From Investopedia, ‘The January Effect is a
- 2 years ago, 23 Dec 2021, 11:37am -
Rolling Returns for the SP-500 [Alvarez Quant Trading]
I just got back from a long vacation in Iceland (highly recommend visiting). As usual, when people discover what I do, they ask me about the markets. Several people were worried that the markets are too high. Then I read that the 20-year return of the SPX from 2001 to 2020 was way below the average
- 3 years ago, 11 Nov 2021, 09:46am -
Multi-day Limits for Mean Reversion [Alvarez Quant Trading]
A reader recently suggested leaving the limit orders for a mean reversion trade on for a couple of days. Typically, these orders are good only for one day unless the stock sets up again. I did not think that this would help but as I always tell my consulting clients when they ask me if an idea will
- 3 years ago, 29 Sep 2021, 09:34pm -
Mean Reversion Entry: At Open vs. Intraday Pullback vs Confirmation [Alvarez Quant Trading]
For the mean reversion strategies that I have created in the past and are trading now, they typically enter at the next day’s open or wait for a further pullback intraday before entering. My current mean reversion strategy, which enters on a limit down, was doing great until a few months ago when
- 3 years ago, 25 Aug 2021, 12:49pm -
Volume Positive Negative Indicator for Breakouts [Alvarez Quant Trading]
Probably like a lot of you, I am an indicator junkie. Whenever I read about an indicator I have not tested and makes some sense, I got to try it out. Now, most of the time they turn out to not be useful for my strategies. While reading the April 2021 Technical Analysis of Stocks & Commodities, I
- 3 years ago, 14 Jul 2021, 09:56pm -
More ideas for ranking methods on a monthly S&P500 Stock Rotation Strategy [Alvarez Quant Trading]
My last post on Different ranking methods for a monthly S&P500 Stock Rotation Strategy generated lots of emails on other ideas to try. Below are the results of these ideas Base Rules Backtest from 1/1/2007-12/31/2020. Buy It is the last trading day of the month Stock is a member of the
- 3 years ago, 16 Jun 2021, 10:28pm -
Different ranking methods for a monthly S&P500 Stock Rotation Strategy [Alvarez Quant Trading]
Recently for my own trading, I have been researching rotational strategies on both the weekly and monthly timeframes. The most common indicator that I use for ranking stocks is Rate of Change (ROC) of the closing price. I read about using Rate of Change on the EMA to rank stocks. I liked a small
- 3 years ago, 12 May 2021, 12:49pm -
Adding candlesticks to mean reversion setup in a portfolio [Alvarez Quant Trading]
In my previous post, Adding candlesticks to mean reversion setup, we looked at how various candle patterns could help individual trades. Now we will see how those results translate to a portfolio. And why I usually only do portfolio level testing. The Strategy Setup Rules Stock is a member or was a
- 3 years ago, 7 Apr 2021, 09:04pm -
Adding candlesticks to mean reversion setup [Alvarez Quant Trading]
My preferred chart style is a candlestick chart but I have never investigated candlestick formations to see if they can help provide an edge in my trading. I recently ran into this blog post, Do Candlesticks Work? A Quantitative Test Of 23 Candlestick Formations, where he did his own investigation.
- 3 years ago, 4 Mar 2021, 09:39am -
Avoiding Gap Trades [Alvarez Quant Trading]
Should you avoid trades that have recently gapped? What if you are trading a mean reversion strategy and a stock has recently had a large gap? Is that a good trade to take? Avoid? Does it depend on the direction of the gap? I did research on this about 15 years ago. Let’s see what the current
- 3 years ago, 20 Jan 2021, 07:45pm -
Using Probability Cones to Test for Strategy Death [Alvarez Quant Trading]
The most common question I get is how do you determine that a strategy is no longer working. It is also the question that I don’t have a good answer for. I have written several posts about this: Trading the Equity Curve, How to turn off a strategy using historical volatility, Broken Strategy or
- 3 years ago, 11 Dec 2020, 11:44pm -
Slippage and low liquidity stocks [Alvarez Quant Trading]
Recently, I have been working on a strategy that trades stocks with low dollar turnover. The initial performance was attractive and I was liking the strategy. But there were two issues that I needed to deal with in the backtesting. How much slippage to add to these stocks. The strategy enters and
- 4 years ago, 29 Oct 2020, 10:57am -
Using strength to exit a mean reversion trade [Alvarez Quant Trading]
I had a long-time reader, Cristian Franchi, send me a mean-reversion strategy that he wanted me to test and write about. What caught my attention was the rules differing from what I typically see and use. Different ways of measuring strength of a sell-off and volatility expansion. Along with a
- 4 years ago, 30 Sep 2020, 08:43pm -
The importance of testing different exits [Alvarez Quant Trading]
When developing a strategy, exits are often not given a second thought. If you are creating a mean reversion, you may default to using Close greater than the 2-period RSI. If you are trading a trend strategy, you may default to trailing exit using 14-day ATR. You try a bunch of entry filters but
- 4 years ago, 22 Jul 2020, 12:47pm -
How to turn off a strategy using historical volatility [Alvarez Quant Trading]
A very common question I get, is “when should I turn off a strategy?” Given the very volatile markets we have had the last few months, I can relate. Some strategies can thrive in these high volatility markets. While others can suffer. In the June 2020 issue of Technical Analysis of Stocks and
- 4 years ago, 24 Jun 2020, 01:02pm -
S&P 500 Dividend Aristocrats [Alvarez Quant Trading]
Back in 2018, I wrote a post, Backtesting a Dividend Strategy, which was conceptually based on the S&P 500 Dividend Aristocrats. Just recently, Norgate Data started offering historical constituent data for the S&P 500 Dividend Aristocrats index. This would be a much ‘cleaner’ version
- 4 years ago, 28 May 2020, 10:30am -
Market Cap vs. Crash Severity [Alvarez Quant Trading]
Has the market sell-off and subsequent bounce treated all stocks the same? A good portion of the bull market move from 2009 to 2019 has been led by the big-cap stocks. Did they hold up better during the March sell-off? What about with the bounce? Did the smaller-cap stocks have a bigger bounce? The
- 4 years ago, 22 Apr 2020, 12:21pm -
Correlations go to One [Alvarez Quant Trading]
There is a saying: “in bear markets correlations go to one.” I wanted to see how true that is for both stocks and a basket of ETFs. Now they don’t go to exactly one, not that I expected that, but they take some large steps towards one. Definitions When calculating correlation, I am using the
- 4 years ago, 26 Mar 2020, 09:55am -
Trading Multiple Strategies [Alvarez Quant Trading]
Using strategy diversification is one of the easiest ways to improve the performance and reduce risk of your overall portfolio. Trading one strategy is risky because you never know when it may stop working or simply go into a period of under-performance. Given two strategies to trade, the questions
- 4 years ago, 11 Mar 2020, 01:05pm -
Market will be up 9.7% in 3 months! [Alvarez Quant Trading]
When this sell-off indicator triggers, it is correct 100% of the time! On average the market is up only 2.6% in 3 months. OR NOT! After big moves in the market, we often see “research” saying that “when the market has done X it will move Y%.” I had a reader send me such research asking for
- 4 years ago, 26 Feb 2020, 07:20pm -
Inverse Volatility Sizing Index [Alvarez Quant Trading]
In my last post, Inverse Volatility Position Sizing, I tested inverse volatility sizing on a monthly rotation strategy. I saw very little difference in the rest results versus equal position sizing. I was talking to a trading friend about the research and how I was surprised at how there was not any
- 4 years ago, 5 Feb 2020, 01:31pm -
Inverse Volatility Position Sizing [Alvarez Quant Trading]
Recently I’ve had several of my consulting clients come with a strategy that uses Inverse Volatility Position Sizing. The basic idea is that the more volatile positions have smaller size while the less volatile ones get a larger size. I have always been a fan of equal position sizing for several
- 4 years ago, 9 Jan 2020, 01:55pm -
Trend-Following Plus Momentum in ETFs [Alvarez Quant Trading]
In a previous post, Trend-following vs. Momentum in ETFs, I compared trend-following and momentum to see which produced better results on a basket of ETFs. In the post, I mentioned combining trend-following and momentum into one strategy to see if combined they can beat buy and hold more often.
- 4 years ago, 13 Dec 2019, 08:21am -
Trend-following vs. Momentum in ETFs [Alvarez Quant Trading]
In Tactical Asset Allocation (TAA) or Dual Momentum (DM) strategies, they often will use trend-following or momentum to decide whether to invest in asset or not. I have two questions. One, how often does either trend-following or momentum they beat buy and hold? Two, of the two which one beats the
- 5 years ago, 13 Nov 2019, 08:19pm -
Exiting using limit orders [Alvarez Quant Trading]
Most of us focus our research time looking to find better entries. We don’t spend enough time thinking about our exits. I am definitely guilty of this. A popular way to enter a mean reversion trade is by using a limit order. I use that on the strategy on RSI2 Strategy: Double returns with a simple
- 5 years ago, 16 Oct 2019, 07:04pm -
The Simplest Momentum Indicator [Alvarez Quant Trading]
We all have our favorite momentum indicators. One of mine is percent off 1 year high. This requires 252 data points and comparisons, plus a division. Another one is the 200-day moving average. This requires 200 closing prices, 199 additions and a division. A simple momentum indicator is Rate of
- 5 years ago, 25 Sep 2019, 06:47pm -
Monthly Rotation – Closeness to $10 [Alvarez Quant Trading]
It is funny that my last post, Brazilian Jiu-Jitsu & Trading – Shiny New Toy, because this post is definitely chasing a shiny toy. I was reading the August 2019 Technical Analysis of Stocks & Commodities issue and came across the article “Swing Trading 10-Point Breakouts.” The basic
- 5 years ago, 28 Aug 2019, 12:30pm -
Market Timing and Bond ETFs [Alvarez Quant Trading]
In my last two posts, Market Timing with a Canary, Gold, Copper, LQD, IEF and much more and Day of Month and Market Timing, I assumed that we earned no interest in cash. Most methods did a good job of telling us when to be in the SPY and when to be in cash. How much could we boost returns by
- 5 years ago, 7 Aug 2019, 01:06pm -
Day of Month and Market Timing [Alvarez Quant Trading]
In my previous post, Market Timing with a Canary, Gold, Copper, LQD, IEF and much more, I tested several market timing methods. The signal was checked on the last day of the month. Now the question is what happens if we check on a different day? How different will the results be? The Test The
- 5 years ago, 10 Jul 2019, 11:54am -
Market Timing with a Canary, Gold, Copper, LQD, IEF and much more [Alvarez Quant Trading]
One commonality in my strategies is the inclusion of a market timing component. This could be a signal to go into cash or reduce position size or enter a ‘safe’ ETF. This applies to my swing trading strategies, my monthly rotation strategies and my Tactical Assert Allocation strategies. As a
- 5 years ago, 12 Jun 2019, 07:13pm -
Quantopian Review and Comparison to AmiBroker [Alvarez Quant Trading]
In my last post, Avoiding Trades Before Earnings, I mentioned that I used Quantopian to do the research. Several readers asked about my thoughts about Quantopian and how it compares to AmiBroker. Some asked if I had left AmiBroker for Quantopian. What follows are my impressions after using
- 5 years ago, 22 May 2019, 01:47pm -