specifyModel            package:quantmod            R Documentation

_S_p_e_c_i_f_y _M_o_d_e_l _F_o_r_m_u_l_a _F_o_r _q_u_a_n_t_m_o_d _P_r_o_c_e_s_s

_D_e_s_c_r_i_p_t_i_o_n:

     Create a single reusable model specification for subsequent
     buildModel calls.  An object of class 'quantmod' 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.

_U_s_a_g_e:

     specifyModel(formula, na.rm=TRUE)

_A_r_g_u_m_e_n_t_s:

 formula: an object of class 'formula' (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.

   na.rm: remove all incomplete rows.

_D_e_t_a_i_l_s:

     Models are specified through the standard formula mechanism.

     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 'getModelData' for details of how this
     process works.

     Currently, objects of class 'quantmod.OHLC', 'zoo', 'ts' and 'its'
     are supported within the model formula.

     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
     'getSymbols' function. getSymbols retrieves each object specified
     by using information as to its location specified apriori  via
     'setDefaults' or 'setSymbolLookup'.

     Internally all data is coerced to 'zoo','data.frame', or 'numeric'
     classes.

_V_a_l_u_e:

     Returns an object of class 'quantmod'. Use 'modelData' to extract
     full data set as 'zoo' object.

_N_o_t_e:

     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.

     Use 'getSymbols.skeleton' to create additional  methods of data
     sourcing, e.g. from a proprietary data format or currently
     unimplemented source (Bloomberg, Oracle).

     See 'getSymbols.MySQL' and 'getSymbols.yahoo' for examples of
     adding additional functionality

_A_u_t_h_o_r(_s):

     Jeffrey Ryan

_R_e_f_e_r_e_n_c_e_s:

     quantmod.com <URL: http://www.quantmod.com>

_S_e_e _A_l_s_o:

     'getModelData','getSymbols', 'buildModel','tradeModel','formula'
     'setSymbolLookup'

_E_x_a_m_p_l_e_s:

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

