Library: | VaR |
See also: | VaRDGdecompG DGdecompS |
Quantlet: | VaRDGdecomp | |
Description: | uses a generalized eigenvalue decomposition to do a suitable coordinate change. The new risk factors are independently standard normal distributed and the new Hessian matrix (Gamma) is diagonal. |
Usage: | r = VaRDGdecomp(l) | |
Input: | ||
l | a list with components: Delta - (m x 1) vector of first derivatives Gamma - (m x m) Hessian matrix Sigma - (m x m) covariance matrix | |
Output: | ||
r | a list with the additional components: B - (m x m) BB' = Sigma delta - (m x 1) first derivatives w.r.t. new coordinates lambda - (m x 1) diagonal of the Hessian matrix w.r.t. new coordinates |
library("VaR") library("xplore") Delta = #(1,2,3) Gamma = matrix(3,3) + 9*unit(3) Sigma = unit(3) l = list(Delta,Gamma,Sigma) VaRDGdecomp(l)
Contents of r.Delta [1,] 1 [2,] 2 [3,] 3 Contents of r.Gamma [1,] 10 1 1 [2,] 1 10 1 [3,] 1 1 10 Contents of r.Sigma [1,] 1 0 0 [2,] 0 1 0 [3,] 0 0 1 Contents of r.B [1,] 1 0 0 [2,] 0 1 0 [3,] 0 0 1 Contents of r.lambda [1,] 9 [2,] 12 [3,] 9 Contents of r.delta [1,] -1.2247 [2,] 3.4641 [3,] -0.70711