Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelData

Extract Dataset Created by specifyModel


Description

Extract from a quantmod object the dataset created for use in modelling.

specifyModel creates a zoo object for use in subsequent workflow stages ( buildModel,tradeModel) that combines all model inputs, from a variety of sources, into one model frame.

modelData returns this object.

Usage

modelData(x, data.window = NULL, exclude.training = FALSE)

Arguments

x

a quantmod object

data.window

a character vector of subset start and end dates to return

exclude.training

remove training period

Details

When a model is created by specifyModel, it is attached to the returned object. One of the slots of this S4 class is model.data.

Value

an object of class zoo containing all transformations to data specified in specifyModel.

Author(s)

Jeffrey A. Ryan

See Also

Examples

## Not run: 
m <- specifyModel(Next(OpCl(SPY)) ~ Cl(SPY) + OpHi(SPY) + Lag(Cl(SPY)))
modelData(m) 

## End(Not run)

quantmod

Quantitative Financial Modelling Framework

v0.4.18
GPL-3
Authors
Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Wouter Thielen [ctb], Paul Teetor [ctb], Steve Bronder [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.