Bind views for entropy programming.
Objects of the class
list of the
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.