# extract the invariants from the data
set.seed(123)
log_ret <- matrix(rnorm(400), ncol = 4) / 10
# compute the covariance matrix
sigma <- stats::cov(log_ret)
# torsion
torsion_cov <- torsion(sigma = sigma, model = 'minimum-torsion', method ='exact')
# 1/N reference
b <- rep(1 / ncol(log_ret), ncol(log_ret))
# ENB
effective_bets(b = b, sigma = sigma, t = torsion_cov)
Run the code above in your browser using DataLab