Return.portfolio    package:PerformanceAnalytics    R Documentation

_C_a_l_c_u_l_a_t_e_s _w_e_i_g_h_t_e_d _r_e_t_u_r_n_s _f_o_r _a _p_o_r_t_f_o_l_i_o _o_f _a_s_s_e_t_s

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

     Calculates weighted returns for a portfolio of assets.  If you
     have a single weighting vector, or want the equal weighted
     portfolio, use 'Return.portfolio'.  If you have a portfolio that
     is periodically rebalanced, and multiple time periods with
     different weights, use 'Return.rebalancing'.  Both functions will
     subset the return series to only include returns for assets for
     which 'weight' is provided.

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

     Return.portfolio(R, weights = NULL, wealth.index = FALSE, contribution = FALSE, method = c("compound", "simple"), ...)
     Return.rebalancing(R, weights, ...)

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

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

 weights: a time series or sinlge-row matrix/vector containing asset
          weights, as percentages

wealth.index: TRUE/FALSE whether to return a wealth index, default
          FALSE

contribution: if contribution is TRUE, add the weighted return
          contributed by the asset in this period

  method: "simple" or "compound"

     ...: any other passthru parameters 

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

     returns a time series of returns weighted by the 'weights'
     parameter, possibly including contribution for each period

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

     Brian G. Peterson

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

     Bacon, C. _Practical Portfolio Performance Measurement and
     Attribution_. Wiley. 2004. Chapter 2

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

     'Return.calculate' 

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

     data(edhec)
     data(weights)

     # calculate an equal weighted portfolio return
     Return.portfolio(edhec)

     # now return the contribution too
     Return.portfolio(edhec,contribution=TRUE)

     # calculate a portfolio return with rebalancing
     Return.rebalancing(edhec,weights)

