fSeries-package          package:timeSeries          R Documentation

_U_t_i_l_i_t_i_e_s _a_n_d _T_o_o_l_s _P_a_c_k_a_g_e

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

     Package of time series tools and utilities.

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


       Package:    fSeries
       Type:       Package
       Version:    270.73.1
       Date:       2008
       License:    GPL Version 2 or later
       Copyright:  (c) 1999-2008 Diethelm Wuertz and Rmetrics Foundation
       URL:        <URL: http://www.rmetrics.org>

_O_v_e_r_v_i_e_w _o_f _T_o_p_i_c_s::

     1. S4 timeSeries Class Definition
      2. Creating timeSeries Objects
      3. Printing and Plotting timeSeries Objects
      4. Modifying 'timeSeries' Objects

_1. _S_4 _t_i_m_e_S_e_r_i_e_s _C_l_a_s_s:

     _timeSeries Class Definition_

     'timeSeries' ...

     _Extracting Information from a timeSeries object:_

     isUnivariate
      isMultivariate

_2. _C_r_e_a_t_i_n_g _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     'timeSeries' objects can be created in several ways. One can
     create  them from scratch, or one can read them from a file. If we
     have a file it is assumed that the first column holds a character
     string with the date/time positions, named "charvec", and the
     remaining column(s), depending if we consider the univariate or
     multivariate case the  numeric time series records named "data".

     _Create a 'timeSeries' object from scratch:_

     'timeSeries'

     _Read a time Series from a file:_

     'readSeries'

     _Attach a 'timeSeries' object to the search path:_

     List of Functions:

       'timeSeries'  Creates a 'timeSeries' from scratuch,
       'readSeries'  reads a time series from a file,
       'attach'      attaches a 'timeSeries' object,
       'detach'      detaches a 'timeSeries' object [see base package].

_3. _P_r_i_n_t_i_n_g _a_n_d _P_l_o_t_t_i_n_g '_t_i_m_e_S_e_r_i_e_s' _O_b_j_e_c_t_s:

     List of Functions:

       'print'   ...,
       'plot'    ...,
       'points'  ...,
       'lines'   ... .

_4. _M_o_d_i_f_y_i_n_g '_t_i_m_e_S_e_r_i_e_s' _O_b_j_e_c_t_s:

     If we have a price/index series or a return series, it is often
     required taht we have to convert from one to the other
     representation. So Rmetrics makes functions available which
     compute 'returns' from  price/index series or the 'cumulated'
     series from returns. Further modifications are concerned with
     drawdowns, durations, spreads and  midquotes.

     List of Functions:

       'returns'    Compute returns from prices or indexes,
       'cumulated'  compute cumulated series from a returns,
       'drawdowns'  compute series of drawdowns from financial returns,
       'durations'  compute durations from a financial time series,
       'spreads'    compute spreads from a price/index stream,
       'miquotes'   compute mid quotes from a price/index stream.

_S_u_b_s_e_t_t_i_n_g _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     'timeSeries' objects can subsetted in several ways. The method
     'window' (and the deprecated function 'cut') extracts  the subset
     of a 'timeSeries' observed between the times 'from'  and  'to'.
     The methods 'head' and 'tail' return the first or last part of a
     time series for a specified length. The method 'outlier' can be
     used to remove huge "outliers" which may appear for example
     through the redefinition of an index (it should not be used for
     outlier detection).

     There are other functions provided which can be considered in
     broader sense as subset functions. For example the function 


             fapply(x, from, to, FUN, ...) 


     can be used to subset a time series with very complex rules, e.g.
     subset Mondays from a series, subset the last Thursdays in every
     Month, subset from a daily series open (first), high, low, close
     (last) prices to a end-of-month time series, etc.

     As another example, we mention the function 'aggreagte' which  can
     data records subset to monthly or quarterly information with 
     information specified by the function 'FUN'


              aggregate(x, by = c("monthly", "quarterly"), FUN =
     colMeans, 
                 units = NULL, ...) 


     List of Functions:

       '"["'        ...,
       '"[<-"'      ...,
       'window'     ...,
       'head'       ...,
       'tail'       ...,
       'outlier'    ...,
       'fapply'     ...,
       'aggreagte'  ... .

_M_e_r_g_i_n_g _a_n_d _B_i_n_d_i_n_g _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     List of Functions:

       'merge'  merges ...,
       'rbind'  binds ...,
       'lag'    lags ... .

_R_e_o_r_d_e_r_i_n_g _t_h_e _c_o_l_u_m_n_s _o_f _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     List of Functions:

       'orderColnames'   ...,
       'sortColname'     ...,
       'sampleColnames'  ...,
       'statsColnames'   ...,
       'pcaColnames'     ...,
       'hclustColnames'  ... .

_R_e_n_a_m_i_n_g _c_o_l_u_m_n _a_n_d _r_o_w_s _o_f _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     List of Functions:

       'dim'         ...,
       'dimnames'    ...,
       'colnames<-'  ...,
       'rownames<-'  ...,
       'is.array'    ...

_M_a_t_h_e_m_a_t_i_c_a_l _O_p_e_r_a_t_i_o_n_s:

     List of Functions:

       'Ops.timeSeries'  S3: Arith method for a 'timeSeries' object,
       'abs'             Returns absolute values of a 'timeSeries' object,
       'sqrt'            Returns square root of a 'timeSeries' object,
       'exp'             Returns the exponential values of a 'timeSeries' object,
       'log'             Returns the logarithm of  a 'timeSeries' object,
       'sign'            Returns the signs of a 'timeSeries' object,
       'diff'            Differences a 'timeSeries' object,
       'scale'           Centers and/or scales a 'timeSeries' object,
       'quantile'        Returns quantiles of an univariate 'timeSeries'.

_H_a_n_d_l_i_n_g _M_i_s_s_i_n_g _D_a_t_a:

     List of Functions:

       'na.omit'       Handles NAs in a timeSeries object,
       'removeNA'      removes NAs from a matrix object,
       'substituteNA'  substitutes NAs by zero, the column mean or median,
       'interpNA'      interpolates NAs using R's "approx" function.

_S_p_e_c_i_a_l _D_a_i_l_y _a_n_d _M_o_n_t_h_l_y _O_p_e_r_a_t_i_o_n_s:

     Note, a daily time series is not necessarily a series which has
     only  position dates, rather it should mean that we have not more
     than one  record per day. The availability of daily data, e.g. end
     of day data,  is in real time usually at the same local time every
     working day, but  this may be influenced due to holidays or due to
     the fact that you  get the data from a financial center located in
     another time zone than  your own.

     If all all these facts can be neglected and only date positions
     without time information is relevant and we speak losely of
     "daily" data records. It is also worth to note, that Rmetrics uses
     in this case by default  the ISO-8601 format "%Y-%m-%d".

     In the case of monthly data, it is important to note that Rmetrics
      always expects the full date for the position vector and not only
     the years ans monhts. ...

     List of Functions:

       'dummyDailySeries'     Creates a dummy daily 'timeSeries' object,
       'alignDailySeries'     Aligns a daily 'timeSeries' to new positions,
       'rollDailySeries'      Rolls daily a 'timeSeries' on a given period,
       'ohlcDailyPlot'        Plots open high low close bar chart,
       'countMonthlyRecords'  Returns a series with monthly counts of records,
       'isMonthly'            Decides if the series consists of monthly records,
       'rollMonthlyWindows'   Returns start and end dates for rolling time windows,
       'rollMonthlySeries'    Rolls monthly a 'timeSeries' on a given period.

_C_o_l_u_m_n _a_n_d _R_o_w _S_t_a_t_i_s_t_i_c_s:

     List of Functions:

       'colStats'  ...,
       'rowStats'  ... .

_C_o_e_r_c_i_o_n _o_f _t_i_m_e_S_e_r_i_e_s _O_b_j_e_c_t_s:

     List of Functions:

     as
      is.timeSeries

     as.timeSeries
      as.timeSeries.default
      as.timeSeries.numeric
      as.timeSeries.data.frame
       as.timeSeries.matrix
      as.timeSeries.ts
      as.timeSeries.character
      as.timeSeries.zoo 

     as.vector.timeSeries
      as.matrix.timeSeries
      as.data.frame.timeSeries
      as.ts.timeSeries

