Description Usage Arguments Details Value See Also Examples
View source: R/QuantAnalysis.R
Asset contribution to portfolio return
1 | contr_to_ret(p, date_start = NULL, date_end = Sys.Date())
|
p |
result of function |
date_start |
starting date for return contribtution, default |
date_end |
ending date for return contribution |
p
is the output of a rebal function which returns a list of
portfolio returns, asset returns, and historical weights. These time-series
are used to calculate each asset's contribution to the total portfolio
return over a given time-period. The resulting data.frame with the asset's
contribution to return will have a residual value as well which is the result
of compounding effects and transaction costs.
data.frame with asset contribution to return
rebal
1 2 3 | data(ETF)
p <- rebal(ret, 'd')
contr_to_ret(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.