[R-SIG-Finance] Length of a curve?
R. Michael Weylandt
michael.weylandt at gmail.com
Wed Apr 24 17:32:35 CEST 2013
On Wed, Apr 24, 2013 at 12:26 PM, wlblount <bill at easterngrain.com> wrote:
> how would i calculate the length of this plot for a trading day? i am using
> ibrokers data for stocks in 3 min. bars
>
> library(quantmod)
> load("~/R/UVXY") #3 min xts stock data
>
> reg10 <- rollSFM(Cl(pricedata),seq(nrow(pricedata)),10)
> rma10 <- reg10$alpha + reg10$beta*seq(nrow(pricedata))
>
>
>
> i am looking for the length of the rma10 plot for one trading day (ie. if it
> were a piece of string, the measurement once straightened out) . i would
> like to compare this measurement to the same measurement for previous days
> (regular trading hours 9:30am-4:00pm).
>
> sorry for the non-technical language. Bill
>
>
I'd assume that, for regular data, you'd just add up the absolute
values of the differences between observations.
MW
More information about the R-SIG-Finance
mailing list