Examples.Hedging
Class CallHedgeVariance

java.lang.Object
  extended byExamples.Hedging.CallHedgeVariance

public class CallHedgeVariance
extends java.lang.Object

Disregard. Contains methods to compute various functionals and expectations connected with the analysis of the variance of the outcome of delta hedging the European call. The hedge is rebalanced at regular time intervals (at each time step). For details see the document Variance.tex.

Console program, no user interaction. All parameters fixed in source code.


Field Summary
 double f
           
 double F
           
 double L
           
 double sg2dt
           
 
Constructor Summary
CallHedgeVariance(double S_0, double sigma, double r, int T, double dt, double K)
          Creates a new instance of CallHedgeVariance
 
Method Summary
 double callDeltaHedgeAnalyticVariance()
          The analytic approximation to the variance of the call delta hedge.
 double callDeltaHedgeMonteCarloVariance(int nPaths)
          The analytic approximation to the variance of the call delta hedge.
 double d_minus(int t)
           
 double d_plus(int t)
          Some Asset Path Functionals
 RandomVariable F1(int t)
          F_1(t) , see VarTemp.tex.
 RandomVariable F2(int t)
          F_1(t) , see VarTemp.tex.
 RandomVariable F3(int t)
          F_3(t) , see VarTemp.tex.
 double H(int t)
          The function H(t).
static void main(java.lang.String[] args)
          Test program
 double meanF1(int t)
          Analytic mean of F1.
 double meanF2(int t)
          Analytic mean of F2.
 double meanF3(int t)
          Analytic mean of F3.
 double oldCallDeltaHedgeAnalyticVariance()
          The old formula for the analytic approximation to the variance of the call delta hedge.
 double Q(int t)
          The function Q(t).
static void testFactors()
          Some Unit Tests
static void testFmeans()
          Tests the analytic formula for the mean meanF1(int),
static void varianceTest()
          Tests the the old and new analytic formulas for the call hedge variance against the Monte Carlo sample variance.
static void weightTest()
          Tests the analytic formulas for quotient and minimum variance deltas against the respective Monte Carlo quantities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sg2dt

public double sg2dt

f

public double f

F

public double F

L

public double L
Constructor Detail

CallHedgeVariance

public CallHedgeVariance(double S_0,
                         double sigma,
                         double r,
                         int T,
                         double dt,
                         double K)
Creates a new instance of CallHedgeVariance

Method Detail

d_plus

public double d_plus(int t)
Some Asset Path Functionals


d_minus

public double d_minus(int t)

F1

public RandomVariable F1(int t)
F_1(t) , see VarTemp.tex.


F2

public RandomVariable F2(int t)
F_1(t) , see VarTemp.tex.


F3

public RandomVariable F3(int t)
F_3(t) , see VarTemp.tex.


meanF1

public double meanF1(int t)
Analytic mean of F1.


meanF2

public double meanF2(int t)
Analytic mean of F2.


meanF3

public double meanF3(int t)
Analytic mean of F3.


Q

public double Q(int t)
The function Q(t). , see VarTemp.tex.


H

public double H(int t)
The function H(t). , see VarTemp.tex.


callDeltaHedgeAnalyticVariance

public double callDeltaHedgeAnalyticVariance()
The analytic approximation to the variance of the call delta hedge. The hedge is rebalanced at each time step. See Variance.tex


oldCallDeltaHedgeAnalyticVariance

public double oldCallDeltaHedgeAnalyticVariance()
The old formula for the analytic approximation to the variance of the call delta hedge. The hedge is rebalanced at each time step. See Variance.tex


callDeltaHedgeMonteCarloVariance

public double callDeltaHedgeMonteCarloVariance(int nPaths)
The analytic approximation to the variance of the call delta hedge. The hedge is rebalanced at each time step. See Variance.tex


testFactors

public static void testFactors()
Some Unit Tests


testFmeans

public static void testFmeans()
Tests the analytic formula for the mean meanF1(int),


weightTest

public static void weightTest()
                       throws java.io.IOException
Tests the analytic formulas for quotient and minimum variance deltas against the respective Monte Carlo quantities.

Throws:
java.io.IOException

varianceTest

public static void varianceTest()
                         throws java.io.IOException
Tests the the old and new analytic formulas for the call hedge variance against the Monte Carlo sample variance.

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Test program

Throws:
java.io.IOException