Description Usage Arguments Value
Periodically rebalances a portfolio to a set of weights according to a weight vector.
1 |
prices |
An xts of asset prices from which to build the equity curve using periodic rebalancing. |
weights |
A list or vector of asset symbols with their associated weights. This vector should normally sum up to one. However, what matters is the relative ratios between each weight, not the absolute values. The list or vector must be named, and each name must have a corresponding column in the prices xts matrix. |
on |
Period on which to rebalance using function endpoints. Valid values are: 'weeks', 'months', 'quarters', 'years' . |
rebal_offset |
Number of days from which to offset the rebalance. Default is one, which corresponds to the day after the period endpoints. Can only be zero or a positive number (which rebalances later than the endpoint). |
An xts matrix of the portfolio equity curve, rebalanced at the end of the specified trading day by argument on. The first column contains the prices equity curve while the second column contains the daily returns of the equity curve.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.