cumulated             package:timeSeries             R Documentation

_C_u_m_u_l_a_t_e_d _T_i_m_e _S_e_r_i_e_s _f_r_o_m _R_e_t_u_r_n_s

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

     Compute cumulated financial series, e.g. prices  or indexes, from
     financial returns.

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

     cumulated(x, ...)

     ## Default S3 method:
     cumulated(x, method = c("continuous", "discrete", 
         "compound", "simple"), percentage = FALSE, ...)

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

  method: a character string naming the method how the returns were
          computed. 

percentage: a logical value. By default 'FALSE', if 'TRUE' the  series
          will be expressed in percentage changes. 

       x: an object of class 'timeSeries'. 

     ...: arguments to be passed. 

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

     all functions return a time series object of the same class as the
     input argument 'x'.

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

     ## data -  
        # Microsoft Data:
        setRmetricsOptions(myFinCenter = "GMT")
        MSFT = as.timeSeries(data(msft.dat))[1:10, "Close"]
        MSFT

     ## cumulated -  
        # Index series to 100:
        MSFT = 100 * MSFT/as.numeric(MSFT[1,1])
        MSFT
        MSFT.RET = returns(MSFT, method = "discrete")
        cumulated(MSFT.RET, method = "discrete")  

