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: finance
See also: american asset bitree european mcmillan optstart IBTcrr IBTbc

Quantlet: GarmanKohlhagen
Description: calculates option prices using the Garman-Kohlhagen formula for European currency options.

Reference(s):

Usage: opc = GarmanKohlhagen(S, K, vol, rd, rf, tau, cp, task)
Input:
S array, the spot FX rate
K array, exercise price
vol array, volatility (annualized)
rd scalar, domestic riskless interest rate (annualized)
rf scalar, foreign riskless interest rate (annualized)
tau scalar, time to expiration (in years)
cp scalar, option type cp=1 for call option cp=-1 for put option
task scalar, if task=0, calculate the option price (default) if task=1, calculate the option delta if task=20, calculate the strike of the option given its delta (as the K paramter)
Output:
opc array, option price, greeks or strike (for task=20) depending on the value of the task parameter

Example:
library("finance")
S=1
K=1
vol=0.1
rd=0.05
rf=0.03
tau=0.25
cp=1
task=0
C=GarmanKohlhagen(S, K, vol, rd, rf, tau, cp, task)
C

Result:
Output is the three month call option price :
Contents of C
[1,]   0.022321



Author: R. Weron, U. Wystup, 20040620 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006