Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: VaR
See also: VaRestMC VaRest

Quantlet: CornishFisher
Description: Implements the Cornish-Fisher expansion for arbitrary orders. The algorithm is related, but not identical to, the algorithm "AS269" published in "Applied Statistics".

Reference(s):

Usage: x = CornishFisher(z,n,cum)
Input:
z scalar, the standard normal quantile
n scalar, order of expansion; uses n+2 cumulants
cum n x 1 vector of cumulants; cum[1] = mean, cum[2] = variance, ...
Output:
x the approximation to the cdfn(z)-quantile

Note:

Example:
library("VaR")
proc() = CFexample()
  z = 2.3
  N = 8
  cum = 1:(N+2)
  i = 2
  r = matrix(N-1,2)
  while(i <= N)
    r[i-1,1] = i
    r[i-1,2] = CornishFisher(z,i,cum)
    i = i+1
  endo
  r
endp
CFexample()

Result:
Contents of r

[1,]        2   4.2527
 [2,]        3   5.3252
[3,]        4   5.0684
[4,]        5   5.2169
[5,]        6   5.1299
[6,]        7   5.1415
[7,]        8    5.255



Author: S. Jaschke, 20010921 license GNU LGPL (www.gnu.org/licenses/lgpl.txt)
(C) MD*TECH Method and Data Technologies, 05.02.2006