[R-SIG-Finance] TTR Yang-Zhang volatility bug?

Joshua Ulrich josh.m.ulrich at gmail.com
Sat Mar 16 02:14:27 CET 2013


On Fri, Mar 15, 2013 at 4:53 PM, rex <rex at nosyntax.net> wrote:
> Joshua Ulrich <josh.m.ulrich at gmail.com> [2013-03-15 12:51]:
>
>> What version of TTR are you using?  I may have already fixed this on
>> R-Forge.
>
>
> How do I tell? Trying to reinstall using:
>
>> install.packages("TTR", repos="http://R-Forge.R-project.org",
>> type="source")
>
> package ‘TTR’ is not available (for R version 2.15.3)
>
Look at the output of sessionInfo() after calling library(TTR).

> So, I did:
>
> svn co svn://svn.r-forge.r-project.org/svnroot/ttr/pkg ttr
<snip>
> cd ttr && R CMD INSTALL . && cd ..
<snip>
> R
>
> Now when I run the code it produces:
>>
<snip>
>
> Much better!
>
> However, shouldn't the two start on the same day since they have the same
> window size?
>
No, because "close" is based on close price only and "yang.zhang" (and
others) is based on close and lag(close), which introduces an extra
missing value.

> Thanks!
>
> -rex
> --
>
>

Best,
--
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com

R/Finance 2013: Applied Finance with R  | www.RinFinance.com



More information about the R-SIG-Finance mailing list