SteadyOptions is an options trading forum where you can find solutions from top options traders. Join Us!

We’ve all been there… researching options strategies and unable to find the answers we’re looking for. SteadyOptions has your solution.

Mikael

Jeff Augen's StandardDEV study for ToS (thinkscript)

82 posts in this topic

Recommended Posts

Background

 

In Jeff Augen's Volatility edge, he often used a standard deviation plot to look for spikes. He also discussed it in managing basic option positions and using price spikes as triggers to enter. (it starts on page 113 of the actual book if you are interested in reading it). I post a brief synopsis below (straight from his book, because i have the eBook version).

 

post-1016-0-05860300-1375918959_thumb.jp

post-1016-0-47307600-1375918977_thumb.jp

 

The Mechanics of the Std Dev Study

 

The following is directly from the book, to give a better idea on how he came up with the idea of this study.

 

post-1016-0-10571400-1375919281_thumb.jppost-1016-0-79347900-1375919297_thumb.jppost-1016-0-60747900-1375919312_thumb.jp

 

 

The ToS Script

 

To turn on this study you have to go to ToS program > Charts > Studies >  Edit Studies > New > thinkscript editor and paste the following code in. Then just save it as whatever you want to call it and add it to studies on lower subgraph. 

 

Credit to this guy who wrote the script:

 

http://www.thinkscripter.com/indicator/standard-deviation-price-change

 

# Tom Utley 3-17-2009

# Thanks to Jeff Augen
# Price Spikes in Standard Deviations

declare lower;
input length = 20;
def closeLog = Log(close[1] / close[2]);
def SDev = stdev(closeLog, length)* Sqrt(length / (length – 1));
def m= SDev * close[1];
plot spike = (close[0] – close[1]) / m;
spike.setPaintingStrategy(PaintingStrategy.HISTOGRAM);
spike.AssignValueColor(if close > close[1] then Color.UPTICK else if close < close[1] then Color.DOWNTICK else GetColor(1));

 

This is how it looks like in ToS live

post-1016-0-74673800-1375918631_thumb.jp

 

Example with AAPL Aug monthly 470 Call 

 

Possible Entry on greater than 2 STD downspike

post-1016-0-86126700-1375919854_thumb.jp

 

Possible Exit on spike 25 minutes later (or set your own p/l% with a limit order)

post-1016-0-05174200-1375919934_thumb.jp

Edited by Mikael
  • Upvote 2

Share this post


Link to post
Share on other sites

Hi, 

 

Length = The number of bars on which the standard deviation is defined.

 

So I think what happens is depending on the bar setting you have on ToS (minute, day, hour), this line: 

 

def closeLog = Log(close[1] / close[2]);

 

generates a data series of the logarithmic ratio of previous bar's option price compared to the next one, so if it was based on hour on a day, it would be a series of [9am to 10am, 10am to 11am ... 3pm to 4pm]. 

 

this line: 

 

def SDev = stdev(closeLog, length)* Sqrt(length / (length – 1));

 

Calculates the standard deviation of this logarithmic ratio of that bar-by-bar price over the last 20 bars (again, minute, day or hour, whatever you had it set on) and divides that by squart root of (20/20-1), or 1.025. Not sure what this derives, someone who's more well versed in statistics can pipe-in, but this is basically some derivative of the standard deviation of the last 20 bars of the price ratio. 

 

These two lines: 

 

def m= SDev * close[1];
plot spike = (close[0] – close[1]) / m;

 

M defines what is the expected move from the previous bar that's one standard deviation away. spike in terms represents a data series of the historical difference of the price bar changes from one to the next vs. the theoretical or expected price bar change at the time (you can think of it as comparing HV vs. IV except in the same sense of comparing the real option pricing change vs. the theoretical expected pricing change defined as being inside 1 std. deviation). 

 

Then spike is plotted in such a way that if the historical price change is greater than the 1 std-dev price change, it's marked as green or less than 1 std-dev, it's marked as red. 

 

So basically the Jeff Augen entry method signals you to enter a option order when the current option pricing spikes above 1 std-dev calculated off the last 20 bars of price ratio's depending on what bar-setting you have it on, 

 

Best,

PC

 

P.S

You can refer to the ToS thinkscript reference to parse any of these scripts. 

http://demo.thinkorswim.com/manual/dark/thinkscript/reference/Functions/Statistical/StDev.html

Edited by PaulCao

Share this post


Link to post
Share on other sites

Thanks Paul! I thought the length=20 was the same as the SMA or EMA length (which is usually in days). i'm usually using the hourly charts so 20 bars is just over 3 trading days. that's not a good enough sample size. i'm going to change the length to 70 which would work out to be about 10 trading days on the hourly bars. 

 

Paul do you know of a way to put it in the script where ToS would alert you with a sound (or pop-up) whenever the price hits a certain Standard deviation up or down (like 2.5 or 3 for instance). 

Edited by Mikael

Share this post


Link to post
Share on other sites

Hi, 

 

Looks there's a way to do it: 

http://demo.thinkorswim.com/manual/dark/thinkscript/reference/Functions/Others/Alert.html

 

I actually have to load the script and play around with it to figure out the exact line to do it but the condition is something along the line of at the end of the script,  

 

def currentSpike = (close – close[1]) / m;

Alert(currentSpike >= 2.5, "Spike >= 2.5!", Alert.TICK, Sound.Chimes);

 

The problem is I'm not sure if that's the way to represent the last close with the last last close in the previous bar; I haven't really played around too much thinkscript, but at least that's the idea, 

 

Best,

PC

Share this post


Link to post
Share on other sites

Hi Paul,

 

Thanks alot for the code. I put it into thinkscript and now these options appeared!

 

Just a couple of questions:

 

1. Would it make more sense to set the alert for each tick or bar? I think it should be for the bar right? (we're trying to get alerts for reach time a bar on the study goes above or below 2.0

 

2. Not sure if thinkscript knows to do this but would it only alert for positive values right now? do we have to explicitly write in alert for both <+2.0 and >-2.0?

 

thanks again!

 

Mike

 

 

post-1016-0-55950000-1375663353_thumb.jp

Share this post


Link to post
Share on other sites

Hi, 

 

 

 

1. Would it make more sense to set the alert for each tick or bar? I think it should be for the bar right? (we're trying to get alerts for reach time a bar on the study goes above or below 2.0

 

 

 

 

I think each tick is when every time the option price changes and each bar is when every minute, hour passes? Since the script is calculated based on the bars, I think it should be every bar. But not sure if even each tick would be different. 

 

 

 

2. Not sure if thinkscript knows to do this but would it only alert for positive values right now? do we have to explicitly write in alert for both <+2.0 and >-2.0?

 

Yea, it would be positive value. If it's negative, it'd be price drop. Not sure what Jeff Augen's price spike dictates, but if you want the price drop, you can modify the line where it calculates the currentSpike to be the absolute value difference, 

 

def currentSpike = (AbsValue(close – close[1])) / m;

 

Best,

PC

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi, 

 

 

 

 

I think each tick is when every time the option price changes and each bar is when every minute, hour passes? Since the script is calculated based on the bars, I think it should be every bar. But not sure if even each tick would be different. 

 

 

 

Yea, it would be positive value. If it's negative, it'd be price drop. Not sure what Jeff Augen's price spike dictates, but if you want the price drop, you can modify the line where it calculates the currentSpike to be the absolute value difference, 

 

def currentSpike = (AbsValue(close – close[1])) / m;

 

Best,

PC

 

Thanks Paul.

 

The idea behind Jeff Augen's "Using Price Spikes as Triggers" is actually a pretty simple. He plots prices according to # of standard deviations away from the average prices for the past X peroids (you define the length in the study). So basically he's saying it's a good idea to use big up or down ticks to open or close positions.

 

What i have been doing with this system is looking at volatile stocks like AAPL. 

 

1. You still need to assess a direction. Obviously for the past months or so AAPL is on a very clear uptrend. 

2. For entry: on a downtick greater than 2 std deviations, open ratio call backspread on AAPL using 1 short ITM call, 2 long ATM calls to make net delta around +25-35.

3. For exit: on a uptick greater than 2 std deviations or around 50% gains. 

 

it's been working pretty well on paper trading. (obviously since i'm getting the direction right). 

 

sometimes on a really big downtick days, if you buy the calls at the bottom, you can often make about 40-50% in a day. 

 

Obviously the big risk is if the trend reverses and also the negative theta.

 

To mitigate the theta i have been buying 60 day outs.

 

To mitigate the downside risk i have been doing what Chris been doing with the GLD and SPY ratio trades. I bought a Jan. 450 put and been selling weeklies 2 week out to pay back the "hedge".

 

It's been working okay for the past 3 weeks on paper, but there's so many parts going on in this trade it gets confusing sometimes lol. 

 

So basically you are making short term bets based on the trend. (since the trend is up right now i'm betting up)

As a hedge against a catastrophic stock collapse like last september, using Chris ratio diagonal/calendar spread setup. 

Edited by Mikael

Share this post


Link to post
Share on other sites

Hi Mikael, 

 

Thanks for your explanation about Jeff Augen's strategy and your implementation of it on AAPL. 

 

I skimmed some of his books at the bookstore a long moon ago. However, I couldn't get sense of his strategy. Plus, he had a bunch of books, so it wasn't clear to me what is his core tenet of his trading strategy. It seems a lot of people follow his style, so I think I might go back and revisit one of his books. 

 

Which one would you recommend and is there a core tenet to his ideas or is it a mix-bag of techniques he lists,  

 

Best,

PC

Share this post


Link to post
Share on other sites

Haha you are using some of his strategy without knowing it. SO earning trades is one of his strategies. (tho Kim could have came up with it himself too lol)

Definitely recommend you to read this book by him.

http://www.amazon.ca/The-Volatility-Edge-Options-Trading/dp/0132354691

Overall his a very mathematical and statistically driven trader. But he has a mix match of trading strategies so I don't see a central tenet really.

Share this post


Link to post
Share on other sites

decided to try with just straight calls and be a little more conservative on the profit targets (calls are all 1 strike OTM). 

 

enter on downticks greater than 2 STD.

exit on upticks greater than 2 STD or when 20% profit has been reached.

 

For instance this morning i entered around 9:40 at 4.8 debit for the Aug monthly 470 call option because the downtick of 2.5 STD 60 minutes before market open, followed up 7 upticks all the way until market open. this is telling me there's going to be a strong uptrend right after market opens.

 

so i bought that call as soon as it opened and it was priced at around 4.6 but couldn't get filled so i moved it up until 4.8 and it got filled. around 9:40 there was 3 consecutive upticks with 2 of them greater than 2.0 STD and AAPL. this is strong exit signal. AAPL ended up around 478ish (from 476ish @ open) and the called was priced around 5.7 so i exited my position.

 

in hindsight it was probably better to buy the option with a bit more time in case AAPL is rangebound for the next few days. although if you look at the price spikes on AAPL, you are going to get some movement no matter what. since it's in a pretty strong uptrend recently i decided to be bullish along with the rest market and do it with calls.

Edited by Mikael

Share this post


Link to post
Share on other sites

for anyone that's wondering, i'm using the 5 minute, 5 day charts with the study set at 1950 periods (which corresponds to exactly 5 trading days). So i'm measuring the standard deviation on the price spikes based on the prices of the previous 1950 ticks (5 min per tick x 12 x 6.5 hours in a trading day x 5 days). 

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks so much Mikael for this topic and information you are sharing. I'm new to the forum here and just really reading/watching what others are doing. I recently skimmed/read Augen's "Trading Options at Expiration" but haven't read his other books. I note from TOAE that he relies upon 2008 data. I was trading options in 2008 (new to it in 2007) and it was pretty easy to make money TOAE that year because of the high volatility in the market premiums were huge and declined like lightening in the last day (or two) before expiration. Some of the TOAE strategies that worked in that market environment wouldn't necessarily work today though.  

Share this post


Link to post
Share on other sites

Hi Red, i haven't read that book yet but i did read his the volatility edge in options trading. (he actually discuss pre-earnings straddles/strangles which is also relevant to SO trades). 

 

he also discussed about the trading options on expiration day in this book. not sure if he talked about the samething in TOAE, but i suspect it might be similar.

 

basically, options lose the most value on the thursday evening and expiration friday. and many stocks exhibit a "pinning" effect on Friday. (he said it's because of institutional traders unwinding large complex positions or something), anyway not too sure of the exact reasoning behind it but he gave an example using google and said basically stocks tend to exhibit a pinning effect on the higher option strike on expiration fridays. (so for ex. if goog is trading at 912 friday morning, it is likely to trade at around 915 for the entire day.) so in this case, he's saying on friday it's good to short the expiring option to extract the last remaining value in it. so you'd short a OTM option on this day. Obviously if the IV is higher the more premium you are going to get so this strat would work better in the high IV environment, but i think it would still work in low IV environment you just won't get alot of premium.

 

the std bar thing is just the way he looks at price spikes and he describes a system to use it as an entry and exit signal. i think this kind of signal can work in any market type. the basic premise is since options are priced according to STD of the underlying price, whenever your underlying spikes up or down (2+ STD) you should use it as a entry or exit signal. most short term price ticks tend to be mean reverting, if you have an especially large down or up tick, it should revert back to the mean price. (not always but that's the idea). 2STD is quite a big spike (think about it, if the prices are normally distributed a 2 std spike only should happen about 4.5% of the times). obviously most stock prices are not normally distributed. the point is that is a pretty big up down tick and you can take advantage of the mean reverting trend. (you also need to assess not only based on this study but your other technical indicators, like MACD RSI etc.) since you have to pick a direction otherwise you can't use the spikes as signal. the downside is it's very hard to guess medium to long term direction, and i'm usually wrong on market predictions so i'm kinda of adapting this system to be way shorter term. thus using the 5m charts and trying to close trades within 1-3 days and keep position size small). 

 

btw this system is very directional so it's not at all similar to the SO strategies. it's basically the same thing as trading stocks. if you have a big account you can use 1.0 delta options, but for expensive stocks that's too expensive for me so i'm using 30 delta otm options instead. 

 

as a example i have been using AAPL aug 17 470 call option. 

 

you can see the price of the contract ranged to 3 - 7 today. that's a huge latitude you have to work with. 

then look at the jeff augen study. the entry signal would be the down tick around 10 today. it was more than 2 std downtick. 

your exit signal is up to you. you can take profit at a certain p/l% or exit at 1 STD deviation uptick around 3:40. 

 

 

post-1016-0-93918700-1375834887_thumb.jp

post-1016-0-08305300-1375834924_thumb.jp

Edited by Mikael
  • Upvote 1

Share this post


Link to post
Share on other sites

by the way if you want to try paper trading this way make sure you pick a stock that 

 

1. very liquid, otherwise slippage will be way too high. 

2. kinda of volatile (otherwise you will never get any good price spikes to work with on the short term, otherwise you have to go longer term and then time decay etc. all become problems, so i don't want to deal with that)

 

so far i only tried with AAPL (best choice) because of the number of price spikes and the options are very liquid.

also GOOG would work.

 

the index options like SPY etc. don't work too well because they trade fairly flat. 

 

also you need really tough stop-losses in place (just like if you are trading stock should always have stop losses in place). 

and need to have a profit taking strategy. i just use 20-25% as a guideline, don't really look for uptick price spikes as much. 

Edited by Mikael

Share this post


Link to post
Share on other sites

Mikael,

 

I am blown away by yours post.  Its great.  I'd like to adjust your Jeff Augen and your strategy to test at larger bar intervals (maybe 1 day even) because I can't really day trade because I'm not in front of my broker's software most of the day. 

 

What really blows me away though is that I never new thinkorswim had a scripting language.  That is AWESOME!  Do you have any more information on this scripting language?  Does ToS let you export any data?

 

you could be non-directional by trading the strangle/straddle or Reverse Iron Condor.

 

I am sure Chris Welsh will find this tool VERY useful too.

Share this post


Link to post
Share on other sites

I am on my second reading of Jeff Augens, "Volatility Edge in Options Trading" I highly recommend it because it will some great insight to our SO stategy. I am also beginning to anticipate what Kim is thinking and use the information to check my reasoning. Still have long ways to go. Does anyone suggest Augens other titles or books by other authors.

 

Thanks

Share this post


Link to post
Share on other sites

Mikael,

 

I am blown away by yours post.  Its great.  I'd like to adjust your Jeff Augen and your strategy to test at larger bar intervals (maybe 1 day even) because I can't really day trade because I'm not in front of my broker's software most of the day. 

 

What really blows me away though is that I never new thinkorswim had a scripting language.  That is AWESOME!  Do you have any more information on this scripting language?  Does ToS let you export any data?

 

you could be non-directional by trading the strangle/straddle or Reverse Iron Condor.

 

I am sure Chris Welsh will find this tool VERY useful too.

 

Hi Richard,

 

Glad you found it useful. 

 

Yes, you can adapt the system to any length of time. Obviously your strategy will be different but the general idea is the same. In his book, he used the spikes as entry indicators for GS on a 1 day / 1 year graph. 

 

I don't know much about the scripting language but i found some resources which may help you if you want to write some scripts:

 

http://www.thinkscripter.com/ <- writes custom scripts, some for sale other for free. they also have a forum you can check out

https://www.thinkorswim.com/tos/thinkScriptHelp.jsp?laf=bright (ToS offical guide)

http://steadyoptions.com/forum/topic/1130-discussion-vxx-put-trade/page-4 (we made another script for the VXX and XIV trades, check it out if you are interested)

Share this post


Link to post
Share on other sites

I reorganized the first post with additional information and screenshots for those who are interested. The first time i was just typing out loud so hopefully this makes grasping the idea easier. 

Share this post


Link to post
Share on other sites

Awesome post Mikael thanks for sharing. I want to read all of Augen's books and it drives me crazy not having the time ...

 

PaulCao I'll take a stab at the math question:

 

this line: 

 

def SDev = stdev(closeLog, length)* Sqrt(length / (length – 1));

 

Calculates the standard deviation of this logarithmic ratio of that bar-by-bar price over the last 20 bars (again, minute, day or hour, whatever you had it set on) and divides that by squart root of (20/20-1), or 1.025. Not sure what this derives, someone who's more well versed in statistics can pipe-in, but this is basically some derivative of the standard deviation of the last 20 bars of the price ratio. 

 

 

It looks like what this is doing is converting a population stdev to a sample stdev. When you calculate the stdev of a population you take the sum of the squared differences from the mean, divide by "length", and take the square root. However, if you are inferring the population stdev from a sample, you have to divide by "length - 1" to get an "unbiased estimator" of the population stdev. The reason for this is to adjust for a fairly esoteric mathematical concept known as the "degree of freedom" taken up by using the sample mean as an estimator for the population mean before computing the sample stdev.

 

I did a google on ToS's stdev function and it does appear to be using the population version, so this adjustment appears to be correct. Here's a link to the formula for the ToS version: http://demo.thinkorswim.com/manual/dark/thinkscript/reference/Functions/Statistical/StDev.html.

 

Note that in Excel, the "default" stdev function is the sample version, and you have to use stdevp to get the population version.

  • Upvote 2

Share this post


Link to post
Share on other sites

This is interesting timing. 

 

I was planning in trying to integrate augen's price spikes into my reports for earning trades (I already use them loosely with some non-earnings trades). I was thinking that they may be useful in determining whether its best to go with a gamma positive or gamma negative trade. I haven't quite got my thoughts together on this though. I'm not sure if the past spikes near earnings should be discounted in the current analysis or not. In other words, if a stock has movement in previous earnings, but not so far with the current one, what does that tell you...

Share this post


Link to post
Share on other sites

I think one way to use this tool for earnings could be to measure the STD spikes as we get closer to earnings. If for example stock XYZ has many spikes greater than 2 STD (more than the expected 5% of the time based on prices being normally distributed, ) in some # of days leading up to earnings for the past 4 cycles, it's reasonable to assume in the days leading up to earnings for the next cycle, we can expect the stock to move around a bit. (eg. many 2+ STD spikes again). So in this case, maybe we can enter the straddle using weekly options that expires right after earnings (or close to it) to maximize possible gamma gains from rolling. I haven't done the math but i suspect AAPL might be a good candidate. Also maybe we can put on the straddle earlier if it's possible to realize substantial gamma gains. but we have to develop some kind of system where it calculates the average # of spikes up and down (based on some STD dev criteria, like 2STD spikes on hourly charts or something). it's my understanding that the BS option pricing models assumes the lognormal distribution. so prices should fall within -1.75 and +2 spikes 95.5% of the time. so maybe we can program is according to this parameters (look for price spikes greater than -1.75 and +2 sigmas). 

 

in terms of discounting past spikes near earnings, why do that? the price spikes are random anyway, i don't see why you would take on a contrarian view. if based on past earnings, the price spikes are increasing as we get closer to earnings, it's reasonable to expect the same to happen as we get closer to earnings this cycle as well. we can just use it the same way we look at IM right? 

Share this post


Link to post
Share on other sites

Hi Richard,

 

Glad you found it useful. 

 

Yes, you can adapt the system to any length of time. Obviously your strategy will be different but the general idea is the same. In his book, he used the spikes as entry indicators for GS on a 1 day / 1 year graph. 

 

I don't know much about the scripting language but i found some resources which may help you if you want to write some scripts:

 

http://www.thinkscripter.com/ <- writes custom scripts, some for sale other for free. they also have a forum you can check out

https://www.thinkorswim.com/tos/thinkScriptHelp.jsp?laf=bright (ToS offical guide)

http://steadyoptions.com/forum/topic/1130-discussion-vxx-put-trade/page-4 (we made another script for the VXX and XIV trades, check it out if you are interested)

Thanks Mikael!

 

Too much to do, too little time!

Share this post


Link to post
Share on other sites

I'v done an analysis with 96 earnings on AMZN, CSCO, GMCR, WYNN, QCOM, NFLX, BIDU, YUM. (All these stocks have a high ratio of >3StDev moves to 1&2StDev moves as Augen suggests, in other words they have big price earnings spikes).

 

I've been finding a high correlation between profitability of a monthly straddle held for 5-days and the volatility premium divided by the stock move on the day after last earnings cycle:

 

(IV-HV20) / LM

- where IV is IV of the straddle

- HV20 is the 20 day historical volatility of the stock.

- LM is the % move of the stock the day after earnings are announce.

 

The relationships is not linear, if you plot profits vs indicator you don't get a straight line.

However, if I group the results into quartiles, and take the median number,  the correlation is striking.

 

Quartile: 1 2 3 4

P/L: -8.4% -1.8% 3.5% 11.7%

Indicator: 2.1x 1.9x 1.7x 1.4x

 

In backtesting, if you only enter a straddle when the (IV-HV)/LM ratio is under 1.7x, the indicator gets you into profitable trades 70% of the time in the 96 earnings trades. I'm further encouraged by the fact that in all but 1 case, it gets you out of situations with greater that a 7% loss, and into 85% of trades with profits above 5% (i.e. it is no so restrictive an indicator that you miss out on a lot of good trades).

 

I will caveat all this by saying that it's only tested on a few stocks, but it cost $ to download historical option data (using ivolatility downloads).

 

Interestingly using the last earnings move is slightly more accurate than the average move for the last 7 earnings cycles, which intuitively makes sense as one would assume that the "market" weights recent performance more.

 

My working rationale for this, and I would be interested in people's views, is that the IV-HV gives the volatility premium over the base volatility (there is a better correlation than when just using IV) and tells you how expensive the straddle is relative to expected or implied move, and is a slight refinement of the %IM we use at SO.

 

(PS not sure what happened but this seems to have posted three times, sorry about that).

Edited by samerh

Share this post


Link to post
Share on other sites

I'v done an analysis with 96 earnings on AMZN, CSCO, GMCR, WYNN, QCOM, NFLX, BIDU, YUM. (All these stocks have a high ratio of >3StDev moves to 1&2StDev moves as Augen suggests, in other words they have big price earnings spikes).

 

I've been finding a high correlation between profitability of a monthly straddle held for 5-days and the volatility premium divided by the stock move on the day after last earnings cycle:

 

(IV-HV20) / LM

- where IV is IV of the straddle

- HV20 is the 20 day historical volatility of the stock.

- LM is the % move of the stock the day after earnings are announce.

 

The relationships is not linear, if you plot profits vs indicator you don't get a straight line.

However, if I group the results into quartiles, and take the median number,  the correlation is striking.

 

Quartile:

Straddle P/L: -

In backtesting this is accurate 70% of the time in 100 earnings trades using

 

What I like about this indicator is that in all but 1 case, it gets you out of situations with greater that a 7% loss, and 85% of trades with profits above 5%.

  • Upvote 3

Share this post


Link to post
Share on other sites

hi Samerh, thanks for sharing. Just to clarify do you mean entering into ATM straddle positions 5 days before earnings and holding it until day of earning on the stocks you listed? Or are you talking about a signal or ratio based on (IV-HV20) / LM?

 

 

Share this post


Link to post
Share on other sites

hi Samerh, thanks for sharing. Just to clarify do you mean entering into ATM straddle positions 5 days before earnings and holding it until day of earning on the stocks you listed? Or are you talking about a signal or ratio based on (IV-HV20) / LM?

yes entering into ATM straddle 5 days before and exiting on the eve of the announcement when the indicator is less than 1.7x

And it works well for stock with big standard deviation prices spikes on earnings, as per Augen's book.

Share this post


Link to post
Share on other sites

what time frame do you have the chart set on? so entry on the 5th day before earning if spike (either way) < 1.7 STD

Nope: enter trade 5 days before earnings if (IV-HV)/LM indicators is <1.7,  don't enter if >1.7

 

tested on a range of stocks with good price spike behavior (lots of >3stdev spikes around earnings)

Edited by samerh

Share this post


Link to post
Share on other sites

okay i see it now, i didn't see the first post before. this is very interesting and can directly affect our earning plays, maybe Kim can chip in if he gets around to reading this. 

Share this post


Link to post
Share on other sites

Nope: enter trade 5 days before earnings if (IV-HV)/LM indicators is <1.7,  don't enter if >1.7

 

tested on a range of stocks with good price spike behavior (lots of >3stdev spikes around earnings)

Do you average the past n earnings cycle to get your indicator, or just look at the last cycle for LM?

Share this post


Link to post
Share on other sites

I'v done an analysis with 96 earnings on AMZN, CSCO, GMCR, WYNN, QCOM, NFLX, BIDU, YUM. (All these stocks have a high ratio of >3StDev moves to 1&2StDev moves as Augen suggests, in other words they have big price earnings spikes).

 

I've been finding a high correlation between profitability of a monthly straddle held for 5-days and the volatility premium divided by the stock move on the day after last earnings cycle:

 

(IV-HV20) / LM

- where IV is IV of the straddle

- HV20 is the 20 day historical volatility of the stock.

- LM is the % move of the stock the day after earnings are announce.

 

The relationships is not linear, if you plot profits vs indicator you don't get a straight line.

However, if I group the results into quartiles, and take the median number,  the correlation is striking.

 

Quartile: 1 2 3 4

P/L: -8.4% -1.8% 3.5% 11.7%

Indicator: 2.1x 1.9x 1.7x 1.4x

 

In backtesting, if you only enter a straddle when the (IV-HV)/LM ratio is under 1.7x, the indicator gets you into profitable trades 70% of the time in the 96 earnings trades. I'm further encouraged by the fact that in all but 1 case, it gets you out of situations with greater that a 7% loss, and into 85% of trades with profits above 5% (i.e. it is no so restrictive an indicator that you miss out on a lot of good trades).

 

I will caveat all this by saying that it's only tested on a few stocks, but it cost $ to download historical option data (using ivolatility downloads).

 

Interestingly using the last earnings move is slightly more accurate than the average move for the last 7 earnings cycles, which intuitively makes sense as one would assume that the "market" weights recent performance more.

 

My working rationale for this, and I would be interested in people's views, is that the IV-HV gives the volatility premium over the base volatility (there is a better correlation than when just using IV) and tells you how expensive the straddle is relative to expected or implied move, and is a slight refinement of the %IM we use at SO.

 

(PS not sure what happened but this seems to have posted three times, sorry about that).

 

Samerh,

 

What name do you go by?  Sam?

 

Mikael and you are rockin' on these scripts!  Did you do this analysis somewhat automated through thinkscript?  Would you mind sharing your code?  I am going to try and learn this language and platform over the next month.

 

Richard

Share this post


Link to post
Share on other sites

Do you average the past n earnings cycle to get your indicator, or just look at the last cycle for LM?

 

I did both. results slightly better for last move than for average move. My hypothesis would be that the "market" weights most recent earnings more.
 
This was the sort of analysis I was suggesting when I commented on your  "tools to analyze earnings trades" post, as I think that looking at the last few cycle's performance is a great start but dissecting reasons behind when the strategy worked and didn't is the next step.
 
Like I say, this is not too different from the SO strategy of looking at implied move vs historical move, but adds a slight refinement of taking the IV premium over base volatility.
 
Would love for Kim, Marco etc to tell me if this analysis holds water of if i'm force fitting the data to a preconceived theory :)
Edited by samerh

Share this post


Link to post
Share on other sites

tj - Sam is fine 

this wasn't a script, it was a filemaker database I put together and paid a few $100 for the data to sort pick out end of day options prices for straddles during last 7 earnings cycles.

Share this post


Link to post
Share on other sites

 

I did both. results slightly better for last move than for average move. My hypothesis would be that the "market" weights most recent earnings more.
 
This was the sort of analysis I was suggesting when I commented on your  "tools to analyze earnings trades" post, as I think that looking at the last few cycle's performance is a great start but dissecting reasons behind when the strategy worked and didn't is the next step.
 
Like I say, this is not too different from the SO strategy of looking at implied move vs historical move, but adds a slight refinement of taking the IV premium over base volatility.
 
Would love for Kim, Marco etc to tell me if this analysis holds water of if i'm force fitting the data to a preconceived theory :)

 

 

This is similar to something I was starting to build in already. I wanted to use IV-HV to decided whether to choose long gamma or short gamma. I never thought of also looking at the last move. I might trying backtesting this in a couple weeks (going on vacation) to see if I get similar results.

Share this post


Link to post
Share on other sites

Samer, how did you perform the analysis? Was it manual? Could you give some examples, maybe from last cycles?

Share this post


Link to post
Share on other sites

Question on the IV values you use in your calculation - are you using the IV of the option series set to expire first (probably weeklies in most of these cases) or some average of IV similar to what is shown on www.ivolatility.com???   I'm just wondering because the IV of the series set to expire in a few days will rise a lot in the last couple of days before the earning announcement to keep up with the theta decay so that the ATM straddle price does not decrease drastically.   Just wondering because my thought is that the front series IV changing so much day to day could cause your numbers to vary greatly as well, and comparing the IV for a given stock from one earning cycle to the next could vary based on the number of days to expiration for the front series.

Share this post


Link to post
Share on other sites

Samer, how did you perform the analysis? Was it manual? Could you give some examples, maybe from last cycles?

Here is my results table. I got the data for closing prices for straddles 5 days before and 1 day before announcement, and used the ATM straddle in each case in order to account for IV gain and not gamma gain. I then organized into quartiles (losers, slight negative, slight positive and winners) and found the median statistics for each group.

 

In the attached the table at the top left gives the quartiles summary results, with bar charts showing the same results graphically to the right.

Below is a larger table with each of the 96 trades, and to the right of that is a backtest.

Workbook1.zip

Share this post


Link to post
Share on other sites

Question on the IV values you use in your calculation - are you using the IV of the option series set to expire first (probably weeklies in most of these cases) or some average of IV similar to what is shown on www.ivolatility.com???   I'm just wondering because the IV of the series set to expire in a few days will rise a lot in the last couple of days before the earning announcement to keep up with the theta decay so that the ATM straddle price does not decrease drastically.   Just wondering because my thought is that the front series IV changing so much day to day could cause your numbers to vary greatly as well, and comparing the IV for a given stock from one earning cycle to the next could vary based on the number of days to expiration for the front series.

I see what you mean, but I used monthlies and so I hope the results are less affected by the number of days to expiration.

Share this post


Link to post
Share on other sites

tj - Sam is fine 

this wasn't a script, it was a filemaker database I put together and paid a few $100 for the data to sort pick out end of day options prices for straddles during last 7 earnings cycles.

thanks samerh.  if you don't mind me asking, where did you purchase the data and was it only end of day?

Share this post


Link to post
Share on other sites

I read briefly through the thinkscript documentation.  I see there are alerts, but does anyone know you can you can have your script screen a set of stocks by looping through a set of stocks given a set of rules like, price > X, avg daily volume > x, . . .  Then do deep analysis in the script based on the results of that that initial screen?

 

Thanks.

Share this post


Link to post
Share on other sites

Samer - let me first say thank you for sharing your analysis. I have learned a lot by studying it.

 

You have taken the ratio (IV - HV) / IM (I will refer to this as SQ - Samer Quotient) and regressed this measure against median returns for 4 categories of trades ranging from losers to winners. The R-squared was 98% (pretty amazing). The SQ sure seems to be telling us something important.

 

This was certainly exciting to see but something strange happened when trying to translate these categorical medians into concrete trading rules. It turns out the median of the "worst" category (median SQ 2.08) seems to be the close to the best trading rule (average 3.5% return vs. 2.06 best of 3.8% return), and the median of the best category (median SQ 1.42) seems to be a relatively poor trading rule (average 2.4% return). By trading rule I mean "if the SQ is less than X, then do the trade, otherwise skip the trade." Of course I understand that average return is not the end of the story (you have to take capital availability into account) but it is informative nonetheless.

 

See the attached spreadsheet for details. The "trading rule" sheet builds on your analysis. I used excel "data tables" to test the effects of numerous trading rule thresholds. You can see that the numbers jump around a lot (suggesting a sample size too small to infer from) until you get to a SQ of 2.0-2.5. 2.06 is the optimal threshold (from an AVERAGE return perspective) for this sample. If you look at the numbers further (see the "profitable" column) the trades seem profitable enough to be worthwhile all the way up to SQ's of 3.5 - 4.0.

 

Long story short, this is what IMHO I think we can infer from this analysis of this sample:

  1. We should be leery of trades with SQ's in excess of 3.5 - 4.0
  2. The SQ is clearly a powerful metric that warrants further study as our sample dataset grows

Thanks again Samer for sharing your knowledge with us! This is just my opinion... looking forward to hearing what others think.

 

p.s. Kim - is there a way to configure the site so we can upload *.xlsx files. Currently we have to zip the file before the site will let us upload it.

 

Gary

SO Samer Analysis.zip

Edited by Gary
  • Upvote 1

Share this post


Link to post
Share on other sites

Could you please share how do you calculate the data and what is the source (TOS?) How about doing it on some of the next week candidates (TIF, CRM, OVTI, JOY)?

Share this post


Link to post
Share on other sites

Source is Ivolatility. I download their RAWIV data which gives option values, IV and greeks. I have a filemaker database which simply finds the straddle price, greeks and IV 5 days before earnings and day of earnings. I then put into a spreadsheet to calculate the results table which I posted above.

Costs me about $30 per stock for 2.5 years worth of data.

Share this post


Link to post
Share on other sites

Garry - I think your analysis is great, thanks for taking the time! I think that small sample size could indeed be an issue, because better returns were also generated at 0.8 and 1.1 quotients, but that restricts the number of trades and leads to a lot of missed opportunities. Like you I feel it's interesting but needs some refinement.

Share this post


Link to post
Share on other sites

Samerh - might be able to help you out on backtesting on a larger data set. If you were given all stocks, how would you filter what to run the test on? (i.e. S&P500 stocks, stocks over $20, etc)? 

Share this post


Link to post
Share on other sites

Samerh - might be able to help you out on backtesting on a larger data set. If you were given all stocks, how would you filter what to run the test on? (i.e. S&P500 stocks, stocks over $20, etc)? 

That would be fantastic.

 

I think to start with the ones Kim mentions above. then one could probably expand to the SO hit list (I can't find the link in the forums).

Attached is a sample of input data with the column headings. I can do that and put up the results for the community to see.

 

Untitled.xlsx

Edited by samerh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account. It's easy and free!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • By Azov
      Just wondering if anyone has ever had success negotiating with TOS to reduce/remove the $19.95 fee that TOS charges for assignment and exercise. If so, what kind of arguments worked best?
       
      I agree with Kim that we shouldn’t have to negotiate to get the best rates. However, I greatly prefer TOS’s platform to anything else out there. I’ve been using tastyworks for a while now too, and their platform is only ok, but it’s still a work in progress, and they still charge $5 for assignment/exercise. 
       
      The reason I’m asking - and not considering IB’s $0 assignments- is because I’m evaluating a couple of candidates for wheel trades (sell puts, get assigned, sell covered calls, get assigned, rinse/repeat). Since the cycle involves two assignments, the $40-ish total fees at TOS is cost prohibitive. And I refuse to use IB because of their auto-liquidation algorithm - I don’t want to have my account blown up if I get assigned on a couple of different positions one night and don’t have a chance to close things out within 10 minutes of the market opening. 
       
      So if I could get TOS to come down or eliminate their assignment fee, that would be great. Otherwise I’m stuck with TW - I suppose I’ll get more used to their platform over time, but everything about their apps makes me feel like I’m playing an arcade game from the 80s. And not in a good way....
       
      Any input is greatly appreciated!
       
    • By Kim
      The impact of commissions on your results can be astonishing.
       
      This excellent article by Business Insider is asking the right questions (and also answering some of them):
       
      When you pay commission fees for online stock trades, where does that money go? Do you get better execution by paying $9.99 to TD Ameritrade than by paying $1 to Interactive Brokers? How much better? Enough to justify the difference in price?
       
      Their conclusions:
      At least 17 million investors overpaying for online brokerage Only 12% of commission fee is used for trade execution at top brokerages Over $1.8 billion per year wasted on unused premium services Lets analyze one specific month, January 2015, and see how different commissions structure can impact the returns of our SteadyOptions model portfolio.
       
      SteadyOptions $10k model portfolio traded 228 contracts in January. If you paid $0.75/contract with no ticket fee, you spent $171 on commissions, which is 1.7% of your portfolio value. While not cheap, but considering the fact that we produced 20.7% ROI in January (12.4% return on the whole account assuming 10% allocation), it is completely reasonable.
       
      However, if you had a ticket fee of $8, in addition to $0.75/contract, you would pay $427 in commissions, more than double. In this case, your returns will be reduced by 4.3%.
       
      This will make HUGE difference in the long term. To see how huge, I went to pro-trading-profits.com, a third party website that tracks performance of 400+ newsletters. I clicked on SteadyOptions performance report and played with different parameters. Using the $0.75/contract with no ticket fee, a $10,000 portfolio would produce $35,693 gains since inception. Adding $8 ticket fee to each trade would reduce the gains to $23,869.
       
      The impact of the ticket fee is especially significant if you have relatively small account.
       
      Of course commissions is only part of the whole package. Other factors include tools, platform, customer service etc. Barron's publishes a comprehensive brokers review every year. Here is the last one. Interactive Brokers (IB) was ranked #1 by Barron's third year in a row. This is the broker I personally have been using for the last 7 years and I'm very happy.
       
      Barron's mention that "IB offers a lot more support to new clients, including individuals, especially those with larger accounts. Yes, using the word "support" in the same sentence as Interactive Brokers (without the modifier "dismal") is a change for us, but the firm has clearly made this a point of focus."
       
      Their conclusion:
       
      "Interactive Brokers continues to have extremely competitive pricing, and the lowest margin fees of any broker in our survey. You may incur some data fees, but the firm takes care of any options-exercise costs, which can generate unexpected fees at many other brokers."
       
      On the open section of our forum, we have couple very useful discussions about brokers:
       
      Brokers and commissions
      Interactive Brokers tips, tricks, webtrader etc.
       
      There is a consensus among our members that IB and TOS by TD Ameritrade offer the best combination of commissions, platform, and execution. If you decide to go with TOS, I highly recommend that you negotiate a commissions structure that does not include a ticket fee.
       
      Here are couple more good articles worth reading:
       
      The Truth Behind Broker Commissions - Learning Markets
      Comparison of online brokerages in the United States
      Relative Importance Of Options Brokerage Fees
       
      For Canadian traders, here is an excellent study on the commissions schemas offered by Canadian discount Brokers.
    • By asteroids
      I am wondering if anyone ever used or still uses the spread hacker in Thinkorswim. When they say this particular vertical spread or calendar has 70% chance of winning for example, how accurate is that and can I trust it?
    • By Kim
      Hello all,

      I just spent few hours chatting with Kenny Griffin, Manager of the Trade Desk at TOS, trying to get a discounted rate for SO members.

      He offered us an initial rate of 1.50 per contract, with an option to negotiate lower on customer by customer basis. I realize that this might not do any good for many members who are already paying less. However, I believe that some members are still paying more and this deal might be attractive to them.

      Remember: this is an initial rate, you can always try to negotiate less, and your starting point is still better than the general public. I personally still believe that unless you can get 1.00 or lower, IB presents better value, but some people just cannot stand IB, and for them TOS is probably the best option.

      Thanks to Jesse for his help, if any of you will take advantage of this offer, please mention him.
       
      To get this rate, contact the Trade Desk and ask to talk to Kenny Griffin or email him at kenny.griffin@tdameritrade.com
       
      March 2013 Update:
      Had another session with Kenny. He offered further discount for those on "standard" commissions structure: instead of 9.99+0.75, it is $8.00 ticket + $0.75 per contract for SO members.
       
      In addition, TOS will conduct a one on one platform demo for every new customer who is SteadyOptions subscriber. The demo is done by an experienced trade desk rep and typically last about 30 minutes. 
       
      Please note that Anchor Trades members who select to auto-trade those products enjoy 0.75/contract with TDAmeritrade Institutional platform.
    • By Kim
      Options Trading is a business. As in any business, there are costs. One of the major costs is commissions that we pay to our broker (other costs are slippage, market data etc.)
      While commissions is a cost of doing business, we have to do everything we can to minimize that cost. This is especially true if you are an active trader. The impact of commissions on your results can be astonishing.
      This excellent article by Business Insider is asking the right questions (and also answering some of them):
      Click here to view the article
    • By tjlocke99
      Hello. I have a few questions/comments about backtesting in TOS.

      1. If you select that you entered a trade in TOS using the thinkback tool, is the price you enter supposed to be based on the opening price for legs in the options spread for that day?

      2. When you close the trade does thinkback assume you are getting the mid of closing price for the legs in the options spread that date?

      3. Is it the closing price for the underlying that day?

      I always assumed it was based on closing prices, but I just wanted to check.

      Also, I see this as a major issue with backtesting in TOS, you can only base it on whatever open/close condition it uses.

      Thank you!

      Richard
    • By tjlocke99
      I keep thinking I am missing something but I think TOS thinkback may have some major defects.
      Take a look at ABT (Abbott Labs) "Last" price on 7/10/2012: 65.67
      Then TOS thinkback says for 7/11/12 "Last" 65.18, Net Chng, +.02
      This VERY wrong. 65.67 to 65.18 represents a decrease in price NOT a +.02.
      Am I missing something?
      Thanks!
  • Recently Browsing   0 members

    No registered users viewing this page.