View source: R/effective_bets.R
effective_bets | R Documentation |
Computes the diversification probability distribution and the effective number of bets of an allocation.
effective_bets(b, sigma, t)
b |
A vector of exposures (allocations). |
sigma |
A |
t |
A |
A list
of length 2 with:
p
: the diversification probability distribution;
enb
: the effective number of bets.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.