Description Usage Arguments Details Author(s) References See Also Examples
View source: R/to.period.contributions.R
Higher frequency contributions provided as a time series are converted to a lower frequency for a specified calendar period.
1 2 3 4 | to.period.contributions(
Contributions,
period = c("years", "quarters", "months", "weeks", "all")
)
|
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". |
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.
Peter Carl, with thanks to Paolo Cavatore
Morningstar, Total Portfolio Performance Attribution Methodology, p.36. Available at http://corporate.morningstar.com/US/documents/MethodologyDocuments/MethodologyPapers/TotalPortfolioPerformanceAttributionMethodology.pdf
1 2 3 4 5 6 7 8 9 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.