2
$\begingroup$

I am currently working on the comparison of the constructed portfolios using out-of-sample variance criteria. I am going to use rolling window procedure for the comparison. First, I choose a window over which to perform estimation. Length of estimation window let say t is smaller than N, where N is the total number of returns. I use estimation window of t=60 data points which correspond to 5 years for monthly data. Second, using the return data over the estimation window, t, I compute various portfolios. I repeat this rolling window procedure for the next month and dropping the data for the earliest month. I continue this until the end of the dataset is reached. At the end of the this process, I will have generated T-t portfolio weight vectors for each strategy. Does anyone know which package I can use for rolling window algorithm in R or matlab? Thank you for any help.

$\endgroup$
2
$\begingroup$

R package TTR has rolling window algorithms and understands day counting etc. It stands on the shoulders of xts (which extends zoo) and quantmod

$\endgroup$
  • $\begingroup$ Thank you very much. I think rollSFM takes single-factor model parameters over a n-period moving window such as 'rollSFM(Ra, Rb, n = 60)' in the TTR package. I will not use factor model or need market returns. I only have asset returns. I will compute covariance matrix to get the asset weights. $\endgroup$ – active Apr 17 '15 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.