View source: R/tactical_TrendFriend.R
| tactical_TrendFriend | R Documentation | 
tactical_TrendFriend determines asset allocations for a strategy
according to the strategy in Clare et al (2016,
<https://doi.org/10.1016/j.jbef.2016.01.002)>.
tactical_TrendFriend(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 allocation strategy proposed in the paper is based on using a a time
series momentum rule to select assets from a universe, and an allocation
rule which gives weights proportional to the inverse volatility of the assets.
The time-series (trend) momentum rule is based on whether the price of the
asset on the rebalancing date is above its 10-month moving average. If not,
the corresponding allocation in strat$default_weights is set to zero (
and is therefore allocated to the risk-free asset).
A numeric vector of weights after applying the rule.
trend_friend  <- asset_allocations$tactical$trend_friend
reb_date <- as.Date("2022-03-31")
tactical_TrendFriend(trend_friend,
                     reb_date,
                     ETFs$Prices[, trend_friend$tickers],
                     ETFs$Returns[, trend_friend$tickers]
                    )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.