Hot answers tagged

2

Briefly: Some functions simply are not vectorised. If you want to loop getBars() over a vector of symbols, write another wrapper doing the looping. As our documentation says: startTime: A Datetime object with the start time, defaults to one hour before current time (and ditto for endTime) you need to supply a DateTime object, and as.POSIXct() is one way ...


1

auto.arima has many unresolved issues. see: http://www.stat.pitt.edu/stoffer/tsa3/Rissues.htm


1

You can do it manually. Let x be the data series. The code below considers all moving-average lag orders between 0 and max.q and prints out the BIC-minimizing lag order and the corresponding estimated model: m=list() # I will save estimated ARIMA(1,0,q) models here BIC=c() # I will save the corresponding BIC values here max.q=10 # the maximum MA order you ...


1

Look at the function "lag" and if you want a lag function that does not depend on some time series structure of the object then you can use this one: shift<-function(x,shift_by){ stopifnot(is.numeric(shift_by)) stopifnot(is.numeric(x)) if (length(shift_by)>1) return(sapply(shift_by,shift, x=x)) out<-NULL abs_shift_by=abs(shift_by) ...


1

Johansen test estimates the rank (r) of given matrix of time series with confidence level. In your example you have 2 time series, therefore Johansen tests null hypothesis of r=0 < (no cointegration at all), r<1 (till n-1, where n=2 in your example). If r<=1 test value (6.39) was greater than a confidence level's value (say 10%: 7.52), we would ...



Only top voted, non community-wiki answers of a minimum length are eligible