StockFetcher Forums · Filter Exchange · Trading Price Volatility<< 1 2 >>Post Follow-up
1 posts
msg #98218
Ignore sharlinmd
12/26/2010 11:22:05 AM

Trading Price Volatility

Price volatility is a mathematical construct for profiling price change behavior. It is
calculated, using a sliding window, so that it can be visualized in price spike charts1.
Each spike is measured in standard deviations against current volatility. Price spikes
are displayed in a histogram that corresponds to the magnitude of price change.
Like the Auction Market Volume Profile, price volatility is portrayed in a price change
distribution curve. This means that 99.8% of prices will fall within 3 standard deviations
above/below the mean. Thus, in a Gaussian distribution, 3 standard deviation price
spikes occur only 0.2% of the time. Generally speaking, price volatility is itself a
stochastic process that oscillates around a constant value. It is mean-reverting. When
current price volatility is extremely low, it tends to rise, and vice-versa.

The basic approach is to trade against inflated volatility. As soon as price volatility
deflates, the market usually declares its direction. It is important to monitor the
frequency and size of the spikes, as well as to view up and down price spike excursions
separately. For example, when upward spikes are more frequent and larger than
downward spikes, bulls have greater control over direction. Alternatively, the frequency
and size of up and down price changes could be similar, with a small number of very
large exceptions on one side. As the distribution of up and down price volatility spikes
change, so does the balance of power.

Taken together, price volatility spikes indicate:
a potential shift in the balance of power
an potential entry/exit point trigger
an accurate divergence signal, when present

Reference: Augen, J. (2008). The Volatility Edge in Options Trading. Upper Saddle River, New
Jersey: Pearson Education, Inc.

- - - - -

I took Augen's formula and wrote a thinkorswim study that converts the spikes into an oscillator. Its ability to identify buying and selling exhaustion points is uncanny.

Is there anyone capable of converting the following thinkorswim code to a StockFetcher filter?

input length = 20;
input cumlength = 13;
input smooth = 5;
def closeLog = log(close[1] / close[2]);
def SDev = stdev(closeLog, length) * Sqrt(length / (length - 1));
def m = SDev * close[1];
def spike = (close[0] - close[1]) / m;

Def upside = if spike > 0 then spike else 0;
def up = sum(upside, cumlength);
Def downside = if spike <= 0 then spike else 0;
def down = sum(AbsValue(downside), cumlength);
def raw_cd = up - down;
def offset_cd = raw_cd + AbsValue(LowestAll(raw_cd));
def norm_value = HighestAll(offset_cd)/100;
plot compare = offset_cd/norm_value;

650 posts
msg #98221
Ignore mystiq
12/26/2010 7:25:51 PM


747 posts
msg #98223
Ignore klynn55
12/27/2010 12:50:25 AM

i loaded the code into TOS, could you give us an example of how you use this, you wrote "uncanny" etc?

103 posts
msg #98226
Ignore bkhurana43
12/27/2010 8:10:08 AM

Hi Klynn

Would you mind listing the procedure adopted to load the code into TOS? If you like I can give you my email address/


747 posts
msg #98229
Ignore klynn55
12/27/2010 10:46:40 AM

i had a problem trying to load the code using PROPHET chart tab, use CHARTS tab ,then upper right , click on STUDIES,
then click on EDIT, a box will appear, click on NEW bottom left, paste the code in, click OK, i then think click OK again, it should load,

next problem is how to intrepret without buying the guys book on amazon, is it worth the time and money?

103 posts
msg #98232
Ignore bkhurana43
12/27/2010 12:12:11 PM

Hi Klynn,
Thanks for your prompt response. I managed to load the code successfully into TOS as instructed. Your comments on the subject matter are very valid. Unless some notes are made available to interpret the study results, it's usefulness cann't be realised.

To me it appears that you have been using the TOS platform for quite sometime and hence you must have mastered the art of picking PUTs and CALLs buy using unique options scanners of your own design. Since I am just starting out in this trade, I would need your mentoring if possible. Here is my email address for future contacts.

With regards,

747 posts
msg #98234
Ignore klynn55
12/27/2010 12:31:25 PM

bob nah just learning the charts , try loading tos scripts from others sites, google tos , youll get a lot of blogs, sites with tos codes! is it worth your time, i cant answer that! beats the bars i guess.

4 posts
msg #98236
Ignore swimtrader
12/27/2010 2:04:12 PM

Below is the original thinkscript for this study. The study posted earlier simply presents the information as a line plot, rather than spikes. Jeff Augen's work was with spikes.

I use the price volatility lows and highs as a last step filter. In other words - I use price volatility to keep me from buying high or selling low. That's easier to do, on the right side of the chart, than most would admit.

So I'm looking for entries and exits at the extremes. I use Auction Market principles to identify the key locations traders will be doing their business. I use Volume Spread Analysis to see when hedge funds, syndicate traders ...the high volume "commercials" are doing their business. I clear the trade using Kelly Formula to ensure an "edge" greater than 100% and an worthwhile ROI. Kelly position sizes the trade. All that a go? I filter with Price Volatility. If volatility is high - I wait until it deflates. Vice versa for a short.

So the sequence is ...look at location (Auction Market) ...look for "tells" (VSA) ...make sure the trade is worth allocating risk capital for (Kelly Formula) ...if all those systems are a go, I buy on price volatility troughs and sell price volatility peaks. It's a filter.

For you thinkorswim traders, here's the thinkscript for the original Jeff Augen study. You can play with it, color spikes over 2 standard deviations ...whatever. But the line plot allows a quick and easy way to keep track of price volatility.

Finally, I figured out the StockFetcher code to screen for Price Volatility. I'll place that in the next message.

# Aggression
# Adapted from Tom Utley 3-17-2009
# Thanks to Jeff Augen
# Price Spikes in Standard Deviations
# Updated 6 August 2010 by Steve Harlin, MD

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];
def spike = (close[0] - close[1]) / m;
plot spike_limit = if spike > 3 then 3 else if spike < -3 then -3 else spike;
spike_limit.AssignValueColor(if spike > 3.0 then Color.GREEN else if spike > 0 then CreateColor(0,102,255) else if spike < -3 then Color.RED else if spike < 0 then CreateColor(128,128,128) else Color.YELLOW);
plot high = 2;
plot low = -2;

4 posts
msg #98237
Ignore swimtrader
12/27/2010 2:09:36 PM

Here ya go. Here is Jeff Augen's work translated into a StockFetcher screen. Enjoy.

set{closeLog, close 1 day ago / close 2 days ago}
set{SDev, cstddev(closeLog,20)}
set{lengthval, 20/19}
set{rootcanal, pow(lengthval,0.5)}
set{multiplexer, SDev*rootcanal}
set{mval, SDev * close 1 day ago}
set{closeSet, close - close 1 day ago}
set{pvol, closeSet / mval}
add column pvol

show stocks where close > 5
Volume > 500000

sort column 4 descending

4 posts
msg #98238
Ignore swimtrader
12/27/2010 2:29:14 PM

Someone above asking how this is used. If you run the screen, you'll see GOLD selling off on > 3 standard deviations it approaches a level it had previously tested, broke out from, re-tested (structural support stop or role reversal level). But the sell-off is on low volume. These are market conditions that can favor a long position in the near-term. With price volatility so low, initiating a fresh GOLD short would be unnecessarily risky. That's how this works (in brief).

StockFetcher Forums · Filter Exchange · Trading Price Volatility<< 1 2 >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.