On Tue, May 29, 2012 at 10:08 PM, Joshua Ulrich <josh.m.ulr...@gmail.com> wrote: >> Sorry, to get that to work, it should actually be: >> >> s2o <- N * runVar(log(OHLC[, 1] / Cl1), n = n) >> s2c <- N * runVar(log(OHLC[, 4] / OHLC[, 1]), n = n) >> >> It needs to be "n = n", otherwise runVar confuses n for y. >> > Thank you for another very helpful patch. From looking at the svn > log, it looks like I got more things wrong than right with this > calculation. :) > > I also added the ability for users to specify alpha via '...' (the > default value is 1.34). > > Best, > -- > Joshua Ulrich | FOSS Trading: www.fosstrading.com
Joshua, Thanks for taking a look at that. I know you were joking about getting "more things wrong than right", but I think I partially melted my brain thinking through the vectorization. One stand-alone calculation may be fairly easy, but then vectorizing the whole thing can be tricky. I think the patches all look good on r-forge. Thanks again. Best, James _______________________________________________ R-SIG-Finance@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.