Description Usage Arguments Details Value
View source: R/QuantAnalysis.R
Portfolio rebalance
1 2 3 4 5 6 7 8 9 |
ret |
data.frame containing return time-series |
ret_freq |
character to represent frequency of |
wgt |
rebalance weights, see details |
reb_freq |
rebalance frequency, see detials |
date_start |
starting date to truncate portfolio returns |
date_end |
ending date to truncate portfolio returns |
t_cost |
optional numeric vector to specify transaction costs, see details |
The rebalance weight parameter wgt
can be entered as a
numeric vector of weights that correspond to each asset in ret
or
a data.frame containing a time-series of weights with dates in the first
column similar to ret
. If a numeric vector is entered reb_freq
will specify how often the portfolio is rebalanced back to the target weights.
If reb_freq
is left as NA
then a buy-and-hold strategy is assumed
with no rebalances. If t_cost
is a single value then it's assumed all
assets have the same transaction cost. Otherwise a numeric vector that
corresponds to each asset can be specified. Finally, note that if wgt
is left as NA
an equal weight portfolio will be assumed.
list containing portfolio returns, asset returns, and asset weights
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.