New answers tagged

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 ...


0

Challenge with completely randomized yields is that it's hard to ensure the data is arbitrage-free. What you can do is either using the data from another market (say take the UK yield and pretend they are in USD) or use randomized resampling of SETS of data.


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 ...


0

You probably have already figured out. It's very common in computer science that all the primary data types get converted into a string for interfacing. Rcpp simply did the conversion for you. You shouldn't worry about the conversion and just focus only on the algorithm.


0

This should walk you through what you are looking for: https://www.quantstart.com/articles/Generalised-Autoregressive-Conditional-Heteroskedasticity-GARCH-p-q-Models-for-Time-Series-Analysis https://www.quantstart.com/articles/ARIMA-GARCH-Trading-Strategy-on-the-SP500-Stock-Market-Index-Using-R


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 ...


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) ...


0

Just ran into and solved this problem. Convert the timeSeries object into an xts object then change the indexClass to "Date" # returns is a timeSeries object r <- as.xts(returns) indexClass(r) <- "Date" a <- Return.portfolio(r, rebalance_on="quarters", verbose=TRUE) I'm not an R expert or anything so I don't know if changing the indexClass has ...



Top 50 recent answers are included