HestonNandiOptions: Option Price for the Heston-Nandi Garch Option Model

Description Usage Arguments Details Value Author(s) References Examples

Description

A collection and description of functions to valuate Heston-Nandi options. Included are functions to compute the option price and the delta and gamma sensitivities for call and put options.

The functions are:

HNGOption Heston-Nandi GARCH(1,1) option price,
HNGGreeks Heston-Nandi GARCH(1,1) option sensitivities,
HNGCharacteristics option prices and sensitivities.

Usage

1
2
3
HNGOption(TypeFlag, model, S, X, Time.inDays, r.daily)
HNGGreeks(Selection, TypeFlag, model, S, X, Time.inDays, r.daily)
HNGCharacteristics(TypeFlag, model, S, X, Time.inDays, r.daily)

Arguments

model

a list of model parameters with the following entries: lambda, omega, alpha, beta, and gamma, numeric values.

r.daily

the daily rate of interest, a numeric value; e.g. 0.25/252 means about 0.001% per day.

S

the asset price, a numeric value.

Selection

sensitivity to be computed, one of "delta", "gamma", "vega", "theta", "rho", or "CoC", a string value.

Time.inDays

the time to maturity measured in days, a numerical value; e.g. 5/252 means 1 business week.

TypeFlag

a character string either "c" for a call option or a "p" for a put option.

X

the exercise price, a numeric value.

Details

Option Values:

HNGOptioncalculates the option price, HNGGreeks allows to compute the option sensitivity Delta or Gamma, and HNGcharacterisitics summarizes both in one function call.

Value

HNGOption
returns a list object of class "option" with $price denoting the option price, a numeric value, and $call a character string which matches the function call.

HNGOGreeks
returns the option sensitivity for the selected Greek, either "delta" or "gamma"; a numeric value.

HNGCharacteristics
returns a list with the following entries:

premium

the option price, a numeric value.

delta

the delta sensitivity, a numeric value.

gamma

the gamma sensitivity, a numeric value.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

References

Heston S.L., Nandi S. (1997); A Closed-Form GARCH Option Pricing Model, Federal Reserve Bank of Atlanta.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## model -
   # Define the Model Parameters for a Heston-Nandi Option:
   model = list(lambda = -0.5, omega = 2.3e-6, alpha = 2.9e-6, 
     beta = 0.85, gamma = 184.25) 
   S = X = 100
   Time.inDays = 252
   r.daily = 0.05/Time.inDays
   sigma.daily = sqrt((model$omega + model$alpha) /
     (1 - model$beta - model$alpha * model$gamma^2))
   data.frame(S, X, r.daily, sigma.daily)

## HNGOption -
   # Compute HNG Call-Put and compare with GBS Call-Put:
   HNG = GBS = Diff = NULL
   for (TypeFlag in c("c", "p")) {
     HNG = c(HNG, HNGOption(TypeFlag, model = model, S = S, X = X, 
       Time.inDays = Time.inDays, r.daily = r.daily)$price )
     GBS = c(GBS, GBSOption(TypeFlag, S = S, X = X, Time = Time.inDays, 
       r = r.daily, b = r.daily, sigma = sigma.daily)@price) }
   Options = cbind(HNG, GBS, Diff = round(100*(HNG-GBS)/GBS, digits=2))
   row.names(Options) <- c("Call", "Put")
   data.frame(Options)
     
## HNGGreeks -
   # Compute HNG Greeks and compare with GBS Greeks:
   Selection = c("Delta", "Gamma")
   HNG = GBS = NULL
   for (i in 1:2){
     HNG = c(HNG, HNGGreeks(Selection[i], TypeFlag = "c", model = model, 
       S = 100, X = 100, Time = Time.inDays, r = r.daily) ) 
     GBS = c(GBS, GBSGreeks(Selection[i], TypeFlag = "c", S = 100, X = 100, 
       Time = Time.inDays, r = r.daily, b = r.daily, sigma = sigma.daily) ) }
   Greeks = cbind(HNG, GBS, Diff = round(100*(HNG-GBS)/GBS, digits = 2))
   row.names(Greeks) <- Selection
   data.frame(Greeks)

Example output

Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fBasics


Rmetrics Package fBasics
Analysing Markets and calculating Basic Statistics
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org


Rmetrics Package fOptions
Pricing and Evaluating Basic Options
Copyright (C) 2005-2014 Rmetrics Association Zurich
Educational Software for Financial Engineering and Computational Science
Rmetrics is free software and comes with ABSOLUTELY NO WARRANTY.
https://www.rmetrics.org --- Mail to: info@rmetrics.org
    S   X      r.daily sigma.daily
1 100 100 0.0001984127  0.01004349
          HNG      GBS Diff
Call 8.992100 8.939049 0.59
Put  4.115042 4.061991 1.31
             HNG        GBS  Diff
Delta 0.67395339 0.65295993  3.22
Gamma 0.02211149 0.02315963 -4.53

fOptions documentation built on May 2, 2019, 2:27 p.m.