Scanning for Support and Resistance Probabilities

I have been in search for a signal I could use for a short vertical spread or naked short option strategy. So my main concern has been to find a level, which will most probably not be penetrated over the next few bars.

This is what I came up with.

Algorithmic RSI Support and Resistance Levels

We are all familiar with oscillators like the RSI indicator. It gives an idea if the market is oversold or overbought.

The chart gives a basic idea of the signal I am looking for. Once the indicator is leaving the overbought / oversold area, there should be a good chance that the market actually stays above or below it’s previous high or low. If this probability is high enough, it would be a great signal for a short vertical spread or to sell a naked put / call option. (be aware of the unlimited risk in the naked short trade!) Both strategies win, if the selected level is not penetrated at expiry.

What is manually drawn on the chart above can also be done automatically. The following chart shows how it looks like if you use the code given at the end of the article.

Every time the RSI leaves the extreme zones the indicator will draw the previous high or low for a given prognosis interval. To enhance the chances and not to get too many signals in a trending market I also made use use of the ADX indicator. So to see a signal on the chart, RSI has to leave the extreme level while ADX signals a sideway market. This should give the best signal quality.

The three signals shown would have resulted in a winning trade as the market did not cross the shown support / Resistance levels. But how does it work out in the long term?

Continue reading

Weekend Reading Recommendation

The markets will go up and down, and usually it’s not my business why they do it, I am just interested in making  my luck with a position on the right side of the trade.

But of course markets don’t move just because of  fear and greed, but because of demand and supply. And these two factors are deeply founded in the “real” world.

Michael Roberts, a London based economist with lots of markets experience, is doing an fantastic blog which explains the foundation of the markets with a lot of nicely prepared data and based on a sound economic theory – Marxism.  Don’t let us start a political discussion over here, but have a look at his blog, see the data, read his arguments and get a broader view of the market than you would get by just watching the charts and reading the daily news.

 

 

 

 

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. This article is about a back test of volatility.

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.

Continue reading

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?

Continue reading

Google EOD csv stock price data download

Sometimes my data provider has not got the data I am looking for. Searching for downloadable csv data I recently came across google spreadsheets. It provides an easy way to get historical stock price data. Save it as csv and use it with your Tradesignal.

The only thing you will have to do is to open a google spreadsheet in your browser, add a formula as shown in one cell and the data will be pulled. Copy&Paste the data to another spreadsheet and save it as csv.

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.

Continue reading

Seasonal trouble ahead

If a bitchy prime minister and a crazy president weren’t enough, for the upcoming months the seasonal chart is also indicating further price setbacks.

Seasonality of DAX

Analyzing the average monthly performance of the German DAX index a distinct pattern of seasonality can be observed. On average June has been down 0.6%, but the big trouble is yet to come.

 

The chart shows the average monthly performance of the DAX index, using data since 1999.

Each bar of the histogram represents a specific months percent performance. Starting with the dark blue bar in January, the green bar right now represents the average June performance.

Seasonal  and Volatility Prognosis:

As you can see on the above chart June always has had a bearish prognosis over the last years. July might bring some relief (the positive magenta bar behind June), but therefore August and September surely got a strong bearish setup. Although the markets have been bullish over the last 20 years, the average combined performance of August and September is -4%.

The average performance of a month is not a good indication for the actual magnitude of the upcoming market move, it just is an indication for its direction.

Continue reading

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 K-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.

Continue reading

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.

Statistics of VIX

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%.

 

 

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…