top of page

WU SP500 Margin Risk Indicator

Our proprietary S&P 500 Margin Risk Indicator has been designed to highlight periods in the stock market that we think carry less risk for us to use leverage.

Before we talk further about this indicator, since it is a question of leverage or taking more risk, let me remind you that margin, although being a wonderful tool when used properly, can be financially very risky when used badly. In fact, when looking at history, one of the main reasons that led to the 1929 stock market crash and made it so abysmal was margin trading. Sure, there are better regulations now that surround margin loans, but being fully leveraged is still incredibly scary and can decimate an investment account in a matter of a few days. There are also leveraged ETFs that don't require margin to get market amplification. But note that their compounding effect, although very positive during uptrends, can lead to the same portfolio decimation. Read our section on Inverse and Leveraged ETFs to understand them more, and we recommend you to read this post for a better understanding of the positive and negative aspects of using margin in an investment account

Difference with our hedging signal

Our main hedging strategy has been designed using several different datasets in order to maximize our time in the market and the associated return while minimizing the amount of trades, with a special emphasis on bad trades. The result is a signal that triggered 40 times from April 2003 to April 2023 (20 years), with 72.5% (75% if we just go out of the market instead of going net short) successful trades and a very asymmetrical win-to-loss ratio of 8.3. If WealthUmbrella had been around at that time and had invested $1,000 in the SPY, this investment would have become 42,613$ today if we had flipped our position when the signal triggered and 15,474$ if we had simply jumped out of the market during the hedge signal. Although these results are impressive, and it would be tempting for us to play this signal on margin, the ride would actually be scary since it is designed to ignore small dips.

Our S&P 500 margin signal is the result of our research on the part of a bull market where the uptrend is at its most constant and quiet. It uses 6 underlying indicators that were combined into a strategy that was optimized to have a perfect percentage of successful trades while minimizing the maximum drawdown that we would have lived through had we been onboard in the market. During the April 2003 to April 2023 period, it generated 9 trades, all successful, and saw a maximum drawdown of only 7.2% (compare to 11.43% for the hedge signal) and other drawdown of 4% or less. Even if we had been at maximum margin, it would have seen no margin call at anytime. Over the last 20 years, this signal would have keep us 70% of the time on margin.

This indicator gives us two different pieces of information. The first signal is a binary signal that will tell us when we think the environment carries less risk to be on margin. It’s our margin on or off signal. The other part of this indicator is given by the color of the line, and this one tells us what the current associated risk is based on our indicator. A blue signal is our underlying indicators telling us that the associated market risk for a deep crash is low, while colors going toward yellow or red show considerable risk. This level of risk is the direct result of the aggregation of our six underlying metrics that we monitor. Although, WealthUmbrella should use leverage when we get the binary signal, the level of margin will be variable as a function of the perceived risk. We might even be chicken and go out of margin and raise cash when this indicator will be in red.

Note that you may see that the phase where the line colors are red are usually the most financially rewarding ones (fast uptrend), and this may look unintuitive for you to see WealthUmbrella deleveraging, but we want to reemphasize that we believe first in capital preservation, even if sometimes this means missing some upside. In other words, we just hate losing money more than we love making some, which seems to be a normal human behavior, according to Daniel Kahneman and Amos Tversky, who worked on the Loss Aversion theory.

To help you understand a bit more about what this signal is based on, the next section will explain the 6 underlying indicators on which our main margin strategy is based.

Underlying indicators:

1. Risk from the option market related to the SP500

Looking at all the bets that people in the options world take can tell us a lot about the current market condition. More precisely, there is a lot to learn by looking at the distribution curve of the puts and calls related to the S&P 500. If you are familiar with the VIX and the SKEW, you already know that these CBOE indicators both capture important information regarding the distribution curves of these bets on the market. While the VIX tells us what the current standard deviation is from the current price in all the 30 days at the money option, the SKEW, like its name suggests, captures how skewed the distribution curve is (via out of the money options). This curve has always been skewed since 1987 when people realized during the flash crash that the market had a higher risk to the downside than the upside. In other words, an elevated SKEW value means that many people are currently subscribing to downside insurance.

If all this is confusing for you, we encourage you to read the chapter 8.1 of the SP500 eBook (at the bottom of your member access page) that explains in more detail the SKEW and the VIX (Scoop: it's not really a fear indicator), how they are related, and what they are telling us.

In any case, analyzing the positioning in the S&P 500 related option market can help us identify the current level of risk in the market. This indicator uses different variables from this world to give us hindsight about the current risk to see a major correction in the market. An elevated VIX is risky, an elevated SKEW signals that we could have a big move. A very low VIX with a high SKEW also historically signals that a potential reversal is coming.

2. Phase Angle standard deviation

You maybe already familiar with our Phase Angle indicator that we designed as a replacement for a slow and fast EMA strategy to capture market impulse. If not it will be covered in chapter 7 of the SP500 eBook. During a regular market, the phase angle will usually be mostly over zero, going up or down in reaction to each daily candle. When we analyze statistically this behavior, we see that when the standard deviation of the phase angle (the typical distance of the phase angle from its average) is extremely low, this usually corresponds to a slow but steady uptrend of the market.

3. Trend angle

One of the great correlations we found with market risk is the average slope of climbing (in the logarithmic space) of the market. When the slope is relatively flat or negative, this means that we are in a choppy market, and it’s not the best time to be leveraged. When the slope is at an extreme positive level, this also usually means that we are in the last overbought euphoria that will inevitably end in a correction. A market that carries less will usually go higher at a reasonable but constant pace.

4. Mean Square tracking error of a logarithmic trend.

Closely tied to the previous metrics, we found that the easiest market to invest in is characterized by a very constant rise of the market around a consistent trend with very minimal candle body and wick.

For the math lover, this indicator is computed as the mean square tracking error between the last 10 days' candle middle points and the 10-day fitted trendline (in the log space). This mean square error is also weighted by dividing by the sum of the last 10 days' candle wick and body. For those to whom math make them sick, see it as a market that carries low risk is a predictable market, and there is nothing more predictable than a slowly and linearly rising market with low volatility

5. The current price volatility

Speaking of volatility, the last thing we are considering to evaluate the risk is actually the direct volatility of the price over the last 10 days. This one is probably the most simple to understand. Very low volatility in the price action equals no anxiety when looking into our account, even if we are on margin. It’s not purely linear, since a record low volatility usually signal that thing can only get worse from this point.

6. Market breadth and Bear market signal

Our margin indicator also uses our proprietary BearMarket signal as well as our own version of a market breadth signal that we compute from many data sources. The first one is obvious as we don’t want to be on margin when we are in a bear market but could be tempted when we are just out of a bear. For the market breadth, most of the deep corrections that come from a poor macroeconomic environment unfold in the same way when it comes to market breadth. As this environment starts to degrade, people exit more and more from the riskier plays of the stock market to concentrate their investments in what are seen as stable and well-established companies. This usually creates a divergence between the index price that makes new highs and the breadth that deteriorates to levels that haven't been seen for a while. This relation is taken into account in our margin risk indicator as a big signal to deleverage.

This post is part of the SP500 eBook.


Related Posts

See All


Hey Vincent ,

I was reviewing the margin risk indicator and noticed the green dot that appears occasionally over a bar. Would you be able to explain what this part of the indicator represents? Thank you!

Vincent D.
Vincent D.
May 03
Replying to

Hi Ben,

This dot was not supposed to be displayed; it's an internal flag that I was using to monitor the behavior of an internal component of the code. That being said, now that you have made me realize that I left it there, let me explain what it means, as this will have an impact if we have an unhedged signal today or Monday. When you see this dot appearing, it means that the 'WU SP500 margin risk indicator - internal signal' (see this other indicator) has dropped below 0 and as long as we are below zero, we can't have a margin buy signal even if we receive an unhedged signal. The impact for now, is that it…


Hi @Vincent D. , Can margin signal used on QQQ?

Vincent D.
Vincent D.
Jul 11, 2023
Replying to

Hi Michael,

I just finished adapting the code and backtesting it on the QQQ. The margin strategy still maintains a 100% hit rate on the QQQ, which was a very strict requirement when I designed this algorithm for SPY. This value was actually very hard to reach with SPY, so I am happy that I achieved similar results with QQQ. That being said, there is one thing that I don't like: the maximum drawdown that someone would have seen on the QQQ would have been 8.64%, which is not negligible when using high margin. I have a friend who always uses his margin close to the point of a margin call, and I know that 8.64% could be hard t…

bottom of page