powered by
risk_parity determines asset allocations using a risk parity rule. It obtains the weights such that all assets provide the same risk contribution to the risk of the portfolio.
risk_parity
risk_parity(strat, reb_date, P, R, risk_free = NULL)
A numeric vector of weights after applying the rule.
A list representing an asset allocation strategy.
A date on which the allocation rule is applied.
An xts object with daily prices of the tickers in strat.
An xts object with daily returns of the tickers in strat.
Either an xts object with daily returns of the risk-free asset, or a scalar numeric with the annual risk-free rate in decimals.
The function calculates the covariance matrix of returns using the last two years (or minimum of one year) of daily returns.
ivy <- asset_allocations$tactical$ivy reb_date <- as.Date("2022-03-31") risk_parity(ivy, reb_date, ETFs$Prices[, ivy$tickers], ETFs$Returns[, ivy$tickers])
Run the code above in your browser using DataLab