Backtesting Market Volatility

If you want to predict volatility, you can place a bet on the option market. Just buy an at the money put and call, and at expiry day you will either win or lose, depending on the actual market move since you bought the straddle and the price you paid for the straddle. To put it simple, if the market moves more than you paid for the two options you will win, otherwise you will lose.

The fair price for volatility

When I look at the S&P500 I could buy or short a straddle with 16 business days until expiry right now for around 70$. That’s the implied volatility.

When I look at the standard deviation of 16 day returns, using the last 30 days to calculate it, it shows me a volatility of around 30$. That’s historical volatility.

When I use my own fair bet KVOL Volatility, it gives me a volatility of about 50$

Now I got three measures for volatility, but which one is the best prediction for future market volatility? And how big will the error (=wins and losses) be if we place this bet over and over again?

Backtesting volatility

Placing an perpetual bet on future volatility using the payback profile of a short straddle will give me an idea on how good historical volatility and Kahler’s volatility was able to predict future volatility. In a perfect world this virtual test strategy should be zero sum game; if not, future volatility is either over or underestimated by these 2 indicators.

If I know which indicator gives me the best volatility assumption, I can use this information to find out, if the current implied volatility of the market is too high or too low. Sell high, buy low…

The chart above gives you an idea on how I did the backtest. I place a weekly bet on volatility, based on a short straddle trade. So if I close outside the of the projected volatility, I have a loss. If the market closes inside the projection, I win. The maximum win will be the price of the volatility indicator at the beginning of the bet, the max loss is the point move within the week minus the price I got for volatility at the beginning of the bet.

Historical volatility vs. Kahler’s volatility

Summing up the shown profits I generated a virtual equity line of a virtual straddle. This gives an idea if historical volatility is a good predictor for future volatility.

On the chart above you see a test, using the 30 day one standard deviation as the volatility predictor. As you can see volatility was overestimated by standard deviation, resulting in a 2688$ win over time. The average prediction of historical volatility for the next 5 days volatility has been about 2.6$ too high.

If the same test is done using KVOL instead of historical volatility, the findings would be that KVOL has underestimated future volatility by 0.5$ per week.  So it seems that, in the long run, KVOL is a more precise prediction of future volatility than standard deviation has been.

The importance of data

Both simulations have been done using the last 30 bars of data to calculate KVOL and historical volatility. But one could also use the last 5 or 250 bars of data. Let’s see how this would influence the quality of the prediction.

The table below compares the weekly prediction error for kvol and historical volatility, depending on the number of data points used to calculate the prediction.

Implied volatility, buy or sell?

I started this article when the price for a SPX straddle was around 70, hist-vol around 30 and kvol around 50. Given the above findings, implied volatility right now is way too high. Traders are willing to pay  more for volatility than the fair price, suggested by historic returns, would be.

So I would suggest it is time to sell a straddle and not to buy one.

But this is just todays analysis, last week i have been bullish on volatility, as you could get a straddle for less than kvol would have suggested.

! Be aware of the unlimited loss potential of a short straddle. You could be wiped out tomorrow, regardless what past statistics suggest. This very unpopular risk reward profile is another cause for implied volatility being higher than historical volatility..

Research pays off.

 

 

 

Demystifying the 200 day average

The 200 day average is usually considered as a key indicator to tell if markets are bullish or bearish. But can this be proved statistically, or is it just an urban legend handed down from one generation to the next?

Let’s do some studies and find out.

The 200 day moving average

Looking at the chart of the S&P500 index and it’s 200 day average let’s me think that the 200 day average is actually a useful indicator to separate the bull and bear phases of the market. But the eye tends to see what the brain is looking for, so you might have focused on the crash 2008 and the bull market afterwards, but have ignored all these little breaches below the 200 day moving average which happened in between. As a trader I can`t make any money with knowing that there has been a long period under the 200 day average, i need to make my decision as soon as the market drops below the 200 day average.

Distribution of returns above and below the 200 day moving average

The chart above (on the right side) shows the returns distribution of 10 day returns. The green distribution represents the 10 day returns if S&P500 is trading above it`s 200 day moving average, the red line represents the 10 day returns returns when the market is trading below its 200 day moving average. Data from 1980 up to now has been used.

What are the curves telling us?

The first thing to notice is, that the red line distribution, representing the returns below the 200 day average, is way wider than the distribution of returns above the 200 day moving average.

The second thing to notice is the sum of probabilities lines. As you can see both cross 1 at the same place. This just means, that the distribution above and below the 200 day average has got he same median. You do not have a higher probability for a positive return if you are above or below the 200 day moving average. That’s quite unexpected! The only thing which is different below or above the average is volatility! If the market trades below the 200 day line you will most probably experience bigger equity swings, but the chance or a positive or negative 10 day return stays the same.

Equity vs. Forex markets

As this finding has been quite surprising for me, I tested it with several equity indices and single stock data. It seems that this is an universal characteristic to equities, maybe founded in the strong bullish market data.

A different picture can be seen when testing forex data. The chart above, the one on the right side, shows some quite different behaviour. It is based on EURUSD data since 1980 (FX basket before 2000).

EURUSD shows the behaviour I would have expected. The returns below the 200 day moving average are shifted to the left, like the sum of probabilities is. This means that with forex you actually get more negative returns when under the 200 day average.

Conclusion

Better test, as it can reveal some unexpected results. In Equities the 200 day average seems to be a good indicator for volatility, not for direction. With forex ist seems to predict direction, not volatility.

I used the tradesignal platform to run the tests, a basic code to calculate the returns distribution indicator can be found here 

Link: an article by Ben Carlson about a similar theme

Money for nothing

We already had a post regarding the mean reverting tendency of Volatility, now it`s time to make some money using this information.

Trading Volatility

The VIX volatility index on the chart above looks like an easy to trade instrument, just buy when it is around 10 and sell when it has doubled, tripled, quadrupled…

But unfortunately life is not that easy, VIX is just an index and you will not be able to buy or sell it. You might try to trade volatility using options, but there is a better plan to make money on this wonderful asset class, the VXX, BRCL BK IPTH S&P 500 VIX SH FTRS ETN.

VXX – the perfect money printing machine

The VXX is an ETN which tries to follow the vix on a short timescale buy having exposure to the first 2 VIX futures contracts. But like with commodities, where the further out contracts cost more money (a risk premium), this leads to severe losses in the long run. You buy expensive (far out) and then the premium melts away. This is a general problem of all ETFs which try to follow a physical market, and will be my edge in making money.

Like VXX also USO and UNG (physical Gas and Oil ETFs) are doomed to go to ZERO in the long run. Only reverse splits could hold them from reaching this target by now.

I am not up to track or trade the VIX on a short term basis, I am more interested in making money due to this structural bug build in in the methodology used to track the VIX. So for me VXX (similar to USO and UNG) is a long term short investment.

Having a look at a long term comparison between VIX and VXX will surely give you the same idea:

note the logarithmic scale for VXX!

No risk, no return

The above chart gives you the returns distribution of VXX over 5 -50 -250 trading days. On a yearly basis you hardly had any positive return, and the median loss (=win for shorties) would have been 47%. Even the 2-month 50 day return has got a median of -17%, with only a 20% chance of a positive return over this period of time. So the odds are clearly with you, the longer you hold, the more you gain.

On the other side, things are never that easy as they seem,  it would be suicide just to invest all your money in a VXX short trade.

Even when the odds are on your side, you will get a problem with risk. While VIX has the nasty tendency to quadruple from time to time, it even went from 10 to 90 in 2008, VXX as a short term tracker of VIX could also behave like this. Since 2013 when the instrument came into existence, there has been several incidents when VXX at least doubled on the short term. That would be the incident when your broker gives you a markin call or closes your position at the worst possible moment. To be on the safe side don`t invest more than 25% of your account into a VXX short trade!

VXX, USO, UNG – my short list for short trades

Your edge in trading VXX is not the trend down, but this fundamental problem in tracking the VIX index using the next two months futures contracts. The same problem which brings down the united states oil and gas fund USO und UNG. Like the VXX the returns distribution (50 and 250 days) gives a clear indication to trade these instruments only on the short side.

These returns distributions, caused by the the fundamental tracking problem of a futures market, make VXX, USO and UNG my private money printing machines.

Beware: VXX short means you will lose when the overall market crashes. So be sure that the rest of your portfolio is set up to make money when this happens. Otherwise a markin call will kill your trading career. VXX short is not a beginners trade. USO and UNG might be more suitable from a risk level standpoint.

Research pays off!

 

 

 

KVOL Volatility part 2

How to calculate volatility based on the expected return of a straddle strategy has been shown in part 1 of fair bet volatility KVOL.

Using and Displaying Volatility:

KVOL uses the given amount of historic returns to calculate an expected value of an at the money put and call option. The sum of these prices are the historic fair value for implied volatility. It can be used to compare current market implied volatility to historic fair values.

Beside calculating KVOL for a specific return period it can also be used to show it as a projection indicator on the chart.

The example on the chart gives such an expectation channel for the s&P500 at the beginning of each month. The 250 days before are used to calculate KVOL. The line underneath the chart is running KVOL for 13 trading days.

Simplified trading:

to win, with higher volatility expected: you would have bought a straddle at the beginning of the month, expiring at the end of the month. You should not have paid more than a KVOL for 25 bars (working days to expiry) would have suggested. You win if the chart is outside of the projection at the end of the month.

The shown example uses the 250 daily bars before  the beginning of the month to calculate the returns and the price of KVOL. The projected lines represent the winning boundaries of the straddle at expiry.

Comparing this to actual prices for a straddle you will notice…

… that current KVOL around 50 is higher than the given straddle price of 44.90. This might suggest that a long straddle is a better deal than a short straddle would be…

Statistics of VIX

The CBOE volatility index VIX  measures the market’s expectation of future volatility. It is the gauge of S&P500 equity market volatility.

The spikes to the top and the long phases of relatively low volatility are reflected in a left-leaning distribution diagram and a long tail towards the higher panic levels. The median value is 17%, meaning 50% of the prices are above (below) this level.

The next chart shows the distribution of returns over 25 trading days. The median price movement being slightly shifted to the negative area shows the mean reverting characteristics of volatility.

Analysing the level of VIX and the returns afterwards yields an even more interesting picture:

The green line gives the 25 bar percentage returns of VIX, with VIX noting above 25, the red line gives the returns with VIX below 15. Observe the median of the two lines:

The median 25 bar return with VIX above 25 (green) is around -15%, only 20% of the returns are positive. The return with vix below 15 (red) is above 0% and with a fat tail to positive returns. Data from 2004-2018

 

The above chart suggests that going short on volatility, if VIX is above 25, seems to be a good idea, the next chart shows what will most probably go wrong during the next 25 days. The distribution diagram gives the maximum adverse movement of the VIX.

The green line, VIX above 25, shows a +10% median maximum up movement over 25 days. So do not expect a short vola position to be without risk.

 

On the other side, the distribution of the maximum loss of the VIX during a 25 day period shows a median of below -20%.

 

Best to test for yourself,  returns distribution indicator for tradesignal code

 

Kahler’s fair bet volatility

Volatility is a measure of risk. It describes how far a commodity will most probably move within a given period of time. The most common measure for volatility is historical volatility. But I do not like the complicated formula for standard deviation.

There has to be a better way to explain and calculate volatility….

Implied Volatility

The options market has got a perfect measure for volatility. Done without formulas, just by demand and supply. And as I believe in efficient markets, the option markets fair price for volatility will be my starting point.

To get the price for volatility at the option market you just have to place  a bet. Assume you want to know the (expected) volatility for the next 30 days, then you would just add the price for an at the money put and call with 30 days to expiry. Option traders call this bet a straddle, and you would win if the market moves more than the price you have payed for the (european style) put and call.

The fair price for a volatility bet

Implied volatility and this Straddle bet is the starting point to calculate my own volatility measure.

The fair price for this bet is, when neither the buyer nor the seller of the bet has got an advantage. In the long run it should be a zero sum game game for both of them. Calculating the fair bet price for a straddle is the idea behind my volatility measure.

Think about a simple coin flip game. If you bet on head you can either win 1€ if head is up or nothing if tail comes on top. What would be the fair price for such a bet?

As head and tail got the same probability, the expected return of a bet on head’s up would be 0.5€. If I would sell you a bet on the next coin flip, I would charge you this 0.5€ to make it a fair bet. So you would either lose the 0.5€ if tail’s up, or win 1€ -0.5€ if head’s up. In the long run this would be a zero sum game for both of us. Do the same thing for the tail is up bet. It also got a value of 0.5€.

Historical Volatility vs. Kahler’s Volatility:

Historical volatility uses standard deviation of daily log returns to describe the volatility of the market. The standard deviation of this +1 -1 coin flip experiment would be 1€. The same would be true if you would buy a head’s up and a tail’s up bet; it would also cost you 1€. So for this simple example the fair bet based volatility is the same as the historical volatility.

But the market is not a coin flip. There will be some differences between historical volatility and KVOL fair bet based volatility.

KVOL vs. historical volatility:

The chart shows you a comparison between KVOL (blue) and historical volatility (standard deviation). On the chart shown above both calculate the volatility for 10 day returns, using the previous 30 bars as data sample.

As you can see historical volatility and KVOL are highly correlated.

But there are some major differences:

As an example in the end of 2017/beginning of 2018 KVOL starts to rise as the market is exploding to the upside. This is due to the virtual call used to calculate KVOL gains value. At the same time historical volatility stays low, as the market has got one direction and no setbacks.

Another advantage of KVOL is it`s response to singular events. As you can see on Sept. 3rd on the chart above the singular big red candle leads to a spike in historical volatility. It also raises KVOL, but not as much. As both indicators are calculated over the same period of bars they both got the same speed of change, but when you have a look at the scale you will see the advantage of KVOL: Historical volatility jumps from 0.2 to over 0.5 – it more than doubles just because of a single event. KVOL also raises,but only from 0.2 to 0.3.

For me this mild response to to singular events is the main advantage. Imagine a portfolio based on value at risk – would it really be useful to half the exposure just because historical volatility jumps after a single red candle?

KVOL  – Tradesignal Equilla Code:

The code to calculate KVOL is simple and straightforward.

The inputs:

multi: just a multiplier, like you can display 1 or 2 standard deviations..

datapoints: The number of bars used to calculate KVOL

returnperiod: calculate the volatility for 1,2,3… bars

showresult: show the result as a percentage of the underlying or as an absolute number

show: show either kvol or the rank of  kvol within the last 100 bars. This gives an idea if volatility is high or low

Meta: subchart(true);
Inputs: multi(1.0), Datapoints(30), returnperiod(5), showresult(percent, absolute), show(result,rank);
Variables:Kvol, i, rp,rc, rpsum, rcsum, call, put, hh,ll;

rpsum=0;
rcsum=0;

for i =0 to datapoints-1 begin // loop over last bars
  rc=maxlist((close[i]-close[i+returnperiod])/close[i+returnperiod],0); // % return of call
  rp=maxlist((close[i+returnperiod]-close[i])/close[i+returnperiod],0); // % return of put
  rcsum=rcsum+rc; // sum of all %returns over time
  rpsum=rpsum+rp;
end;
      
call=rcsum/datapoints;
put=rpsum/datapoints;

Kvol=call+put;	
if show=result then drawline(multi*iff(showresult=percent,100*Kvol,Kvol*close),"KVOL");

hh=highest(kvol,100);
ll=lowest(kvol,100);
if show=rank and (hh-ll)>0 then drawline(100-100*(hh-kvol)/(hh-ll),"rank");

 

keep researching…