max_effective_bets: Risk-Diversification powered by the Minimum Torsion Algorithm

Description Usage Arguments Value See Also Examples

View source: R/max_effective_bets.R

Description

Finds the allocation that maximizes the effective_bets.

Usage

1
max_effective_bets(x0, sigma, t, tol = 1e-20, maxeval = 5000L, maxiter = 5000L)

Arguments

x0

A numeric vector for the search starting point. Usually the "one over n" allocation.

sigma

A n x n covariance matrix.

t

A n x n torsion matrix.

tol

An interger with the convergence tolerance.

maxeval

An integer with the maximum number of evaluations of the objective function.

maxiter

An integer with the maximum number of iterations.

Value

A list with the following components:

See Also

solnl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# extract the invariants from the data
set.seed(123)
log_ret <- matrix(stats::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))

max_effective_bets(x0 = b, sigma = sigma, t = torsion_cov)

uncorbets documentation built on Sept. 24, 2021, 9:07 a.m.