EVOLUTION-MANAGER
Edit File: specifyModel.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Specify Model Formula For quantmod Process</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for specifyModel {quantmod}"><tr><td>specifyModel {quantmod}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Specify Model Formula For quantmod Process </h2> <h3>Description</h3> <p>Create a single reusable model specification for subsequent buildModel calls. An object of class <code>quantmod</code> is created that can be then be reused with different modelling methods and parameters. No data frame is specified, as data is retrieved from potentially multiple environments, and internal calls to getSymbols. </p> <h3>Usage</h3> <pre> specifyModel(formula, na.rm=TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>formula</code></td> <td> <p>an object of class <code>formula</code> (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specifcation are given under Details.</p> </td></tr> <tr valign="top"><td><code>na.rm</code></td> <td> <p>remove all incomplete rows.</p> </td></tr> </table> <h3>Details</h3> <p>Models are specified through the standard formula mechanism. </p> <p>As financial models may include a variety of financial and economic indicators, each differing in source, frequency, and/or class, a single mechanism to specify sources is included within a call to specifyModel. See <code>getModelData</code> for details of how this process works. </p> <p>Currently, objects of class <code>quantmod.OHLC</code>, <code>zoo</code> and <code>ts</code> are supported within the model formula. </p> <p>All symbols are first retrieved from the global environment, without inheritence. If an object is not found in the global environment, it is added to a list of objects to load through the <code>getSymbols</code> function. getSymbols retrieves each object specified by using information as to its location specified apriori via <code>setDefaults</code> or <code>setSymbolLookup</code>. </p> <p>Internally all data is coerced to <code>zoo</code>,<code>data.frame</code>, or <code>numeric</code> classes. </p> <h3>Value</h3> <p>Returns an object of class <code>quantmod</code>. Use <code>modelData</code> to extract full data set as <code>zoo</code> object. </p> <h3>Note</h3> <p> It is possible to include any supported series in the formula by simply specifying the object's symbol. See *Details* for a list of currently supported classes. </p> <p>Use <code>getSymbols.skeleton</code> to create additional methods of data sourcing, e.g. from a proprietary data format or currently unimplemented source (Bloomberg, Oracle). </p> <p>See <code>getSymbols.MySQL</code> and <code>getSymbols.yahoo</code> for examples of adding additional functionality</p> <h3>Author(s)</h3> <p> Jeffrey Ryan </p> <h3>References</h3> <p>quantmod.com <a href="http://www.quantmod.com">http://www.quantmod.com</a> </p> <h3>See Also</h3> <p><code><a href="getModelData.html">getModelData</a></code>,<code><a href="getSymbols.html">getSymbols</a></code>, <code><a href="buildModel.html">buildModel</a></code>,<code><a href="tradeModel.html">tradeModel</a></code>,<code><a href="../../stats/html/formula.html">formula</a></code> <code><a href="setSymbolLookup.html">setSymbolLookup</a></code></p> <h3>Examples</h3> <pre> ## Not run: # if QQQQ is not in the Global environment, an attempt will be made # to retrieve it from the source specified with getSymbols.Default specifyModel(Next(OpCl(QQQQ)) ~ Lag(OpHi(QQQQ),0:3) + Hi(DIA)) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>quantmod</em> version 0.4.20 <a href="00Index.html">Index</a>]</div> </body></html>