contr_to_ret: Asset contribution to portfolio return

Description Usage Arguments Details Value See Also Examples

View source: R/QuantAnalysis.R

Description

Asset contribution to portfolio return

Usage

1
contr_to_ret(p, date_start = NULL, date_end = Sys.Date())

Arguments

p

result of function rebal(), see ?rebal for more details

date_start

starting date for return contribtution, default NULL will use entire portfolio time-series

date_end

ending date for return contribution

Details

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.

Value

data.frame with asset contribution to return

See Also

rebal

Examples

1
2
3
data(ETF)
p <- rebal(ret, 'd')
contr_to_ret(p)

alejandro-sotolongo/InvestmentSuite documentation built on Jan. 19, 2020, 5:20 p.m.