tactical_ivy | R Documentation |
tactical_ivy
determines asset allocations for a strategy according to
the Ivy Portfolio rule of Faber (2013, ISBN:978-1118008850).
tactical_ivy(strat, reb_date, P, R, risk_free = NULL)
strat |
A list representing an asset allocation strategy. |
reb_date |
A date on which the allocation rule is applied. |
P |
An xts object with daily prices of the tickers in strat. |
R |
An xts object with daily returns of the tickers in strat. |
risk_free |
Either an xts object with daily returns of the risk-free |
The function compares prices at the end of a month to their moving averages.
If the price of an asset is below its moving average, the corresponding
allocation in strat$default_weights
is set to zero.
A numeric vector of weights after applying the rule.
ivy <- asset_allocations$tactical$ivy
reb_date <- as.Date("2022-03-31")
tactical_ivy(ivy, reb_date, ETFs$Prices[, ivy$tickers], ETFs$Returns[, ivy$tickers])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.