Description Usage Arguments Examples
View source: R/Safe_Return.portfolio.R
This provides a safe way to do portfolio return calculations. It ensures the returns and weights are explicitly mapped. It is thus a simple wrapper to PerformanceAnalytics::Return.portfolio making it safer. See the following gist for a discussion on why this safety feature is essential: https://gist.github.com/Nicktz/a24ba1775d41aab85919c505ca1b9a0c
1 | Safe_Return.portfolio(R, weights, lag_weights = TRUE, ...)
|
R |
xts of returns. |
weights |
xts of weights. |
lag_weights |
This function makes weights effective on the day it is given. The Return.Portfolio function defaults to having weights become effective only the following day after its specification. E.g. from the vignette: Rebalancing periods can be thought of as taking effect immediately after the close of the bar. So, a March 31 rebalancing date will actually be in effect for April 1. |
... |
parameter inputs from PerformanceAnalytics::Return.portfolio. |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.