historical volatility = StDev(log(C / Ref(C, -1), period) * sqrt(251) * 100

----- Original Message ----- 
From: "cstrader" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 13, 2007 8:05 AM
Subject: Re: [amibroker] Re: Volatility vs. STD?


> Formula attached...
> 
> ----- Original Message ----- 
> From: "cstrader" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, July 13, 2007 7:47 AM
> Subject: Re: [amibroker] Re: Volatility vs. STD?
> 
> 
>> OK, digging deeper I found a can of worms (http://www.sitmo.com/eqcat/4)
>>
>> Below is a simple formula, although there are others (for instance some 
>> that
>> ignore overnight gaps)
>> Anyone might have already coded this in AFL?, or feel like doing it? (my
>> patience is too thin today)
>>
>> However, I found that if I use the the STD divided by the square-root of 
>> the
>> #bars for the year, then I get a figure that seems to mesh with other
>> sources.  For instance, the 30 and 200 day volatilies of QQQQ using these
>> formulas:
>>
>> VOl200a = StDev(C, 200) / sqrt(265);
>>
>> Vol30a = StDev(C, 30) / sqrt(265);
>>
>> turn out to be about .22 and .11 respectively.
>>
>> Maybe that is close enough?
>>
>> List of symbols
>>
>>
>>     Volatility
>>
>>
>>     The closing price on the ith day
>>
>>      n
>>     Number of historical days used in the volatility estimate
>>
>>
>>     Log return on the ith day
>>
>>      Z
>>     The number of closing prices in a year
>>
>>
>>
>>
>>
>>
>>
>>
>> Historical Close-to-Close Volatility
>>
>>
>>
>>
>>
>>
>>
>> Historical volatility calculation using close-to-close prices.
>>
>>
>>
>>
>> ----- Original Message ----- 
>> From: "vlanschot" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Friday, July 13, 2007 5:33 AM
>> Subject: [amibroker] Re: Volatility vs. STD?
>>
>>
>>> Several points:
>>>
>>> 1) Usually people use the returns to calculate volatility, not Price,
>>> i.e. ROC (C,1) or LN(C/Ref(C,-1)).
>>> 2)Strictly speaking, one needs to make a distinction between full
>>> population or sample. As far as I know, afl's StDev assumes full
>>> population.
>>> 3) Volty is usually quoted indeed on an annualised basis. Therefore
>>> multiply your calc by the square-root of the #bars for the year, i.e.
>>> sqrt (12) if you've calculated in monthly mode, sqrt (256) or sqrt
>>> (365) in daily, etc.
>>>
>>> PS
>>>
>>> --- In [email protected], "cstrader" <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Sorry, but what's the difference?  Is the annualized volatility of a
>>> stock
>>>> about the same as STDev(C, 200)?
>>>>
>>>> Thanks!
>>>>
>>>
>>>
>>>
>>>
>>> Please note that this group is for discussion between users only.
>>>
>>> To get support from AmiBroker please send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> For other support material please check also:
>>> http://www.amibroker.com/support.html
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>>
>> Please note that this group is for discussion between users only.
>>
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>>
>> Yahoo! Groups Links
>>
>>
>>
>> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> Yahoo! Groups Links
> 
> 
> 
>


--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/898 - Release Date: 7/12/2007 4:08 
PM

Reply via email to