bind_views function

Stack Different Views

Stack Different Views

Bind views for entropy programming.

bind_views(...)

Arguments

  • ...: Objects of the class ffp_views to combine.

Returns

A list of the view class.

Examples

library(ggplot2) # Invariant ret <- diff(log(EuStockMarkets)) n <- nrow(ret) # Prior probabilities (usually equal weight scheme) prior <- rep(1 / n, n) # Prior belief for expected returns (here is 0% for each asset) view_mean <- view_on_mean(x = ret, mean = rep(0, 4)) #' view on volatility vol <- apply(ret, 2, stats::sd) * 1.1 # volatility 10% higher than average view_volatility <- view_on_volatility(x = ret, vol = vol) views_comb <- bind_views(view_mean, view_volatility) views_comb ep <- entropy_pooling(p = prior, Aeq = views_comb$Aeq, beq = views_comb$beq, A = views_comb$A, b = views_comb$b, solver = "nlminb") autoplot(ep)
  • Maintainer: Bernardo Reckziegel
  • License: MIT + file LICENSE
  • Last published: 2022-09-29