torsion {uncorbets} | R Documentation |
Computes the Minimum Torsion Matrix
Description
Computes the Principal Components Torsion and the Minimum Torsion for diversification analysis.
Usage
torsion(sigma, model = "minimum-torsion", method = "exact", max_niter = 10000L)
Arguments
sigma |
A |
model |
One of: "pca" or "minimum-torsion". |
method |
One of: "approximate" or "exact". Only used when |
max_niter |
An |
Value
A n x n
torsion matrix.
Examples
# extract the invariants from the data
set.seed(123)
log_ret <- matrix(rnorm(400), ncol = 4) / 10
# calculate the covariance matrix
sigma <- stats::cov(log_ret)
# torsion
torsion(sigma = sigma, model = 'minimum-torsion', method ='exact')
[Package uncorbets version 0.1.2 Index]