[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Trying to plot historical volatility with AFL



PureBytes Links

Trading Reference Links



and then, as someone else posted here some time ago, there is Parkinsons Historical Volatility
    Periods=Param( "Periods" , 10, 5, 252, 1);
    Rt = log( H / L );
    R2 = sqrt( Sum( Rt ^ 2 * ( 1 / ( 4 * log( 2 ) ) ), Periods) / Periods) * 100;

which produced results similar in shape (but different values) to Anthony's initial code
 
Best Regards
Rick Osborn



From: woodshedder_blogspot <woodshedder_blogspot@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sat, November 14, 2009 7:40:08 PM
Subject: [amibroker] Re: Trying to plot historical volatility with AFL

 

Here is my take on it. I've enjoyed seeing how others are approaching this.

Periods=Param( "Periods" , 10, 5, 252, 1);
DailyChg=ROC( C,1);
STD = StDev(DailyChg, Periods );
HV = STD*sqrt(252) ;

--- In amibroker@xxxxxxxxx ps.com, Potato Soup <potatosoupz@ ...> wrote:
>
> I'm trying to plot the 30 day historical volatility of the S&P 500, using the following AFL on a daily chart with around 2 years of end of day prices for the S&P 500:
>
> Plot(StDev(Close, 30),"Historical Volatility", colorOrange, styleLine) ;
>
> However when I look at the values, they appear to be a bit off to what I see when I look online here:
>
> http://www.ivolatil ity..com/options. j?ticker= SPX:CBOE& R=1&period= 12&chart= 2&vct=
>
> For today they have 18.99, where as my chart shows 19.348. All my other values going back further don't match their chart either. Any ideas, are they calculating it differently than just a simple standard deviation?
>



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___