effective_bets: Effective Number of Bets

View source: R/effective_bets.R

effective_betsR Documentation

Effective Number of Bets

Description

Computes the diversification probability distribution and the effective number of bets of an allocation.

Usage

effective_bets(b, sigma, t)

Arguments

b

A vector of exposures (allocations).

sigma

A n x n covariance matrix.

t

A n x n torsion matrix.

Value

A list of length 2 with:

  • p: the diversification probability distribution;

  • enb: the effective number of bets.

Examples

# 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)

uncorbets documentation built on May 29, 2024, 1:45 a.m.