search for: makereturns

Displaying 2 results from an estimated 2 matches for "makereturns".

2012 Apr 20
0
Select interval of time series object by date and time
...an interval of a time series (containing intraday data) > by the data and a certain time frame (e.g. 9 AM to 10 AM). However, I do > not know how to specify the time during the day: > > #load data > library(RTAQ) > data("sample_tdata") > data=sample_tdata > return=makeReturns(data$PRICE) > > #I would like to use some command like this to get only the data between 9 > and 10 > window(return,start=as.Date("2008-01-04"),end=as.Date("2008-01-04")) > > Thank you very much in advance > Florian Walla > University Groningen > I...
2012 Jul 19
1
Switching log(J) to log(J+1) to avoid log(0) in HAR-RVJ model
...NULL, regular=TRUE, header=TRUE, index.column=1, colClasses=c("character", "numeric")) dat <- as.xts(dat) ## cleaned data here to get daylist <- lapply(split(dat, "days"), function(x) { if(NROW(x) >= 10) x }) do.call(rbind, daylist) -> dat makeReturns(dat) -> dat the code I am running to get the HAR regressions (full code for it shown below) is x = harModel(dat, periods = c(1,5,22), periodsJ=c(1), RVest = c("RCov","RBPCov"), type="HARRVJ", h=5, transform="log") ; # Estimate the HAR model...