to.period.contributions {PerformanceAnalytics} | R Documentation |
Aggregate contributions through time
Description
Higher frequency contributions provided as a time series are converted to a lower frequency for a specified calendar period.
Usage
to.period.contributions(
Contributions,
period = c("years", "quarters", "months", "weeks", "all")
)
Arguments
Contributions |
a time series of the per period contribution to portfolio return of each asset |
period |
period to convert to. See details. "weeks", "months", "quarters", "years", or "all". |
Details
From the portfolio contributions of individual assets, such as those of a particular asset class or manager, the multiperiod contribution is neither summable from nor the geometric compounding of single-period contributions. Because the weights of the individual assets change through time as transactions occur, the capital base for the asset changes.
Instead, the asset's multiperiod contribution is the sum of the asset's dollar contributions from each period, as calculated from the wealth index of the total portfolio. Once contributions are expressed in cumulative terms, asset contributions then sum to the returns of the total portfolio for the period.
Valid period character strings for period include: "weeks", "months", "quarters", "years", or "all".
These are calculated internally via endpoints
. See that function's help page for further details.
For the special period "all", the contribution is calculated over all rows, giving a single contribution across all observations.
Author(s)
Peter Carl, with thanks to Paolo Cavatore
References
Morningstar, Total Portfolio Performance Attribution Methodology, p.36. Available at http://corporate.morningstar.com/US/documents/MethodologyDocuments/MethodologyPapers/TotalPortfolioPerformanceAttributionMethodology.pdf
See Also
Examples
data(managers, package="PerformanceAnalytics")
res_qtr_rebal = Return.portfolio( managers["2002::",1:5]
, weights=c(.05,.1,.3,.4,.15)
, rebalance_on = "quarters"
, verbose=TRUE)
to.period.contributions(res_qtr_rebal$contribution, period="years")
to.yearly.contributions(res_qtr_rebal$contribution)