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: GarmanKohlhagen ImplVola

Quantlet: ImplVolaFX
Description: determines the implied volatilities assuming the Garman-Kohlhagen model for a vector of European style currency options. Uses the bisection method.

Reference(s):

Usage: vol = ImplVolaFX(X, S, K, rd, rf, tau, cp{, a0{, b0{, xtol{, maxiter}}}})
Input:
X scalar, option price
S scalar, spot FX rate
K scalar, exercise price
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
a0 optional scalar, distinct initial points bracketing a root, default a0 = 0.001
b0 optional scalar, distinct initial points bracketing a root, default b0 = 1
xtol optional scalar, tolerance - absolute precision of the minimum, default xtol = 1e-8
maxiter optional scalar, maximal number of iterations, default maxiter = 100
Output:
vol scalar, implied volatility

Example:
library("finance")
S=1
K=1
vol=0.1
rd=0.05
rf=0.03
tau=.25
cp=1
task=0
C=GarmanKohlhagen(S, K, vol, rd, rf, tau, cp, task)
ImplVolaFX(C, S, K, rd, rf, tau, cp);, a0, b0, xtol, maxiter)

Result:
Contents of vol
[1,]      0.1



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