Monday, March 26, 2018

How Does Statistical Arbitrage Work?

 


Statistical arbitrage is the term usually involving both long and short hedged positions or paired trades that tend to revert to the mean historically. You are using anything with a statistical edge and usually using mean reversion strategies. This works well when there is a volatile trading environment and lower correlation among assets. THe period from 1997 to 1999 tended to trend more and mean revert less as everyone was selling everything to buy dot com stocks and capital kept flowing into internet stocks. As the crowd began to participate the smart money then began to sell early and buy stuff that had been down so from 1999 to 2000 and beyond you saw statistical arbitrage begin to outperform, despite the rotation and sell offs being sharp and continuing as the market entered bear market.

There are several narratives for why statistical arbitrage occurs, but one example I like also displays the potential for a variation of statistical arbitrage involving cash vs a long or short position provided you are able to totally mitigate margin risks. As that is not practical without using very small position size a hedge is needed and then you end up with more of a standard statistical arbitrage. So instead let's only use a long only position vs cash to illustrate.

Let's assume a totally random market. How would you gain? Some may say it's impossible, but they must not have read or heard about Claude Shannon in detail because he was a brilliant man accomplished for a lot of reasons that also constructed a model for beating a random market. Modern day game theory would come to the same conclusion which is identifying what is called "nash equilibrium". Positioning yourself in "nash equilibrium" in some conditions (this is one of them) allows gains to the degree which opponent makes mistakes. In other situations like a game of rock paper scissors it only mitigates chances for opponent to exploit patterns by going equal parts rock, paper and scissors and using some random generation method.

In this case, with no directional bias and only two assets, equilibrium would be 50% cash and 50% stock. As cash becomes more valuable vs the stock position (stock goes down, you add enough stock to create a new equilibrium. As stock rises you sell enough or buy cash position using stock to maintain this equilibrium. Given enough volatility and enough time for prices to normalize your net worth would rise over time. If you wanted to simply recover to new highs faster but with less gain and less volatility to total net worth, you could trade more capital to the less volatile position (cash) and maintain that allocation. The allocation of say 25% stock, 75% cash would still work, it would just produce less gains.

Nash equilibrium isn't necessarily the best possible strategy for maximizing gains vs all other strategies as it assumes oppponents are all of equal and perfect skill and the moment participants begin to switch strategies, a new strategy becomes dominant and players would adjust until no one have an advantage. If for example market participants were dramatically under positioned or over positioned and you had reason to believe it had reached an extreme, you could go 100% long or more. If they were over positioned and you could go 100% cash or even go short. In between the extremes, it's possible you can identify trends towards extreme and not adjust your strategy until the extremes are reached. The point is not that you should seek this strategy out if it isn't right for you, but to explain that even though equilibrium may not make money as fast as another strategy, it can still profit regardless of what others do over enough time and enough volatility

While mentioning this it's important to keep in mind that statistical arbitrage is NOT necessarily an equilibrium strategy itself as calculating that would be too difficult but it in general benefits for similar reasons in that capital flows as people move away from equilibrium and it eventually finds its way back and away again in whatever direction it does for whatever reasons that are only obvious in hindsight.

It's possible because of how many variables influence strategy of actual participants that there is no actual equilibrium and instead it's something that always changes. Equilibrium for a more complicated market is difficult to identify, but you can create something that functions in a similar way.

This sort of illustrates why statistical arbitrage works. Anyone who is aware of the possibility would generally be able to buy a basket of stocks vs an equal amount cash position, and so if market was out of equilibrium after a sell off in any given stock, the risk is to the upside. RSI measures buying and selling pressure so you are buying positions that have become underowned relative to the time frame at a fast enough rate for long enough time.

When the selling pressure cannot continue as people have already sold that wanted to, the least amount of buying pressure can produce the fastest amount of gain.

Statistical arbitrage is a little bit of contrarian strategy only the RSI 5 only refers to 5 day period so this is only contrarian on the short term time horizon and some stocks could be in an uptrend for years while others could be trading near their lows so it isn't a contrarian strategy on any other time frame but the given time period of the strategy.

Another explanation is emotion. People tend to emotionally overreact and sell now and ask questions later. when stops get triggered it can trigger more stops and soon people find themselves out of the position. Once emotions normalize, they realize they didn't need to sell everything and these previous holders may become buyers at higher prices



 
Above you will see a statistical arbitrage strategy that goes long when the RSI 5 is below 20 and takes profit and sells the full position when it is above 50 and sells short any stock above an RSI of 90 and takes profit when it is below 50. It uses any stock in the Russel 3000 that meets the condition and doesn't adjust the number of positions to maintain some kind of balance and instead relies on what the market offers. While this is a little different than typical statistical arbitrage that usually does create balance, it's close enough for you to understand the effectiveness.



Shorting stocks is a little more dangerous because stocks can go up more than 100% requiring you to come up with more than double the capital you started with. If you are only short you are at significant risk of this happening. Nevertheless, you can see it does well in bear markets and even was able to find some trades that worked


We can isolate how it did from May 2007 to June 2010 to get an idea for how it performs just before and just after a bear market.


Above is a long only strategy which produces a greater compounded rate of return but does so at greater volatility and has a lower sharp ratio as a result. Theoretically leveraging up a hedged strategy or reducing down the position sizes of the long only portfolio so that they have equal levels of volatility would make the long AND short portfolio superior for return and it produces a greater return on risk.

However, market timers may instead select a strategy right for market environment, or at least
position 60/40 long or 40/60 short depending on predicted market conditions.

While not everyone will be a statistical arbitrage trader nor should they be, we can learn some important lessons from it. If you are trading a particular strategy that does NOT work in almost all market environments, you should be sure to have some means to measure what environment your trading strategy works in. If you trade momentum breakouts, look for growth periods and anticipate trending markets. If you trade price patterns, you may wish to consider buying dips in anticipation of breakouts or post breakout moves to retest if that strategy works for you. And if you decide to trade a particular strategy, understand that it may not work in all market environments and be willing to do some work identifying the reasons why or the conditions in which the strategy works.

Another important understanding is that you may wish to do a periodic review to determine if what was working is still working. Below in green shows buying falling wedge breakouts and holding for 3 months. It worked well from 2011 to 2014 but since then at least until July 2017 it no longer has worked. That may be because the conditions for buying or selling have changed, (buying the breach of the low and selling into the breakout may still work) or the pattern itself has become less effective vs alternatives. You would have to backtest a number of variables to decide and even then it only works in hindsight, so be mindful of the conditions we are in, what made that strategy work in the past, and what made it not work and what you expect moving forward if you are going to use that strategy.
 

Historically growth has not spent a ton of time outperforming value, but when it does it can make some really strong moves near market highs like in 1999-2000. Lately Growth has outperformed around the time period shortly before falling wedge breakouts with 3 month holding period began failing.
Some things in market are related and others are not, and conditions can quickly change so in order to remain a leg up on the competition you have to determine what role volatility has in the strategy and what the volatility is (measured by the VIX for example).
Notice whether we are in trending or mean reverting markets and bull or bear conditions and if there are any anticipatory signals for conditions changing. Notice how long trends are lasting and what correlations are.

Just a bit of information can give you a great overview if you track them, or you can track market internals looking at individual stocks, industries, sectors, etc. which perhaps is more  complicated but when the market doesn't always move with stocks (correlation is low) then using the broad market as your only indicator may miss opportunities to identify sectors and industries that work according to your system or what you are most comfortable with and what fits your psychological make up.

Even a winning system doesn't mean much if you have poor execution so you had better find out what works for you personally and always manage risk. Statistical arbitrage can work for some if they align the time frame and market conditions and risk management appropriately but it may not be best for everyone nor may any other strategy mentioned, but hopefully this sort of detailed analysis as to what works and why will give you a thin slice of things you can look at to determine what works best for you.

Even passive investing can look at changes that lasts from months to years and have 3 types of changes they can make and look for longer term extremes to shift allocations from a "green light" to "yellow light" or "red light" type of strategy going from conservative allocation to stocks and preferring slower moving stocks and bond markets can be looked at separately and aggressive small cap or growth stocks and greater allocations from extreme lows or a monthly signal that momentum has shifted from down to up and another signal when things get extreme and markets may stop trending may shift them to neutral. There are different ways to every approach that can work, but regardless of what works for you, be aware that there are conditions in which changes to that strategy may be preferable. Additionally there are a few strategies that may work in any conditions, but even so volatility and account drawdown may increase or decrease requiring adjustments in position size or potential hedging in certain time periods if you want to reduce the potential drawdowns to a range you are comfortable with.  Even day traders can be away of both the long and short term conditions in which their edge may change. If they wait for movement to scalp a trade or look for some kind of daily breakout then higher volatility markets may require adjustments CHanges to margin rates and volatility may impact speed of moves and changes to algorithmic high frequency trading may also change your edge. There are always things changing and even legislation may pass that change the rules of business and taxes and investment and cause reactions and behavior and paradigm shifts. The market isn't like blackjack or poker where the odds are always the same, it's like being blindfolded and spun around in circles and sitting down at a different table with a different game and different rules. Fortunately everyone else is too and you have a lot of time to monitor the conditions and determine the rules that fit the conditions best.

No comments:

Post a Comment