apply.fromstart     package:PerformanceAnalytics     R Documentation

_c_a_l_c_u_l_a_t_e _a _f_u_n_c_t_i_o_n _o_v_e_r _a_n _e_x_p_a_n_d_i_n_g _w_i_n_d_o_w _a_l_w_a_y_s _s_t_a_r_t_i_n_g _f_r_o_m _t_h_e _b_e_g_i_n_n_i_n_g _o_f _t_h_e _s_e_r_i_e_s

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

     A function to calculate a function over an expanding window from
     the start of the timeseries.  This wrapper allows easy calculation
     of "from inception" statistics.

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

     apply.fromstart(R, FUN = "mean" , gap = 1, ...)

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

       R: an xts, vector, matrix, data frame, timeSeries or zoo object
          of asset returns 

     FUN: any function that can be evaluated using a single set of
          returns (e.g., rolling beta won't work, but
          'Return.annualized' will)

     gap: the number of data points from the beginning of the series
          required to "train" the calculation

     ...: any other passthru parameters 

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

     A timeseries in a zoo object of the calculation results

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

     Peter Carl

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

     'apply'

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

     data(managers)
     apply.fromstart(managers[,1,drop=FALSE], FUN="mean", width=36)

