| predict.tsfm {facmodTS} | R Documentation | 
Predicts asset returns based on a fitted time series factor model
Description
S3 predict method for object of class tsfm. It 
calls the predict method for fitted objects of class lm, 
lmRob or lars as appropriate.
Usage
## S3 method for class 'tsfm'
predict(object, newdata = NULL, ...)
Arguments
object | 
 an object of class   | 
newdata | 
 a vector, matrix, data.frame, xts, timeSeries or zoo object containing the variables with which to predict.  | 
... | 
 optional arguments passed to   | 
Value
predict.tsfm produces a matrix of return predictions, if all assets 
have equal history. If not, a list of predicted return vectors of unequal 
length is produced.
Author(s)
Yi-An Chen and Sangeetha Srinivasan
See Also
Examples
# load data from the database
data(managers, package = 'PerformanceAnalytics')
# fit the factor model with LS
fit <- fitTsfm(asset.names = colnames(managers[,(1:6)]),
               factor.names = c("EDHEC LS EQ","SP500 TR"), 
               data = managers)
predict_fit <- predict(fit)
newdata <- data.frame(rnorm(n=NROW(fit$data)), rnorm(n=NROW(fit$data)))
colnames(newdata) <- c("EDHEC LS EQ", "SP500 TR")
rownames(newdata) <- zoo::index(fit$data)
predict_fit_2 <- predict(fit, newdata, interval = "confidence")
[Package facmodTS version 1.0 Index]