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: optstart greeks

Quantlet: influence
Description: displays graphically the influence of the parameters entering the Black and Scholes formula on the option price.

Usage: dat=influence() or dat=influence(S,K,r,sigma,tau,carry,opt{,v1,ub1{,v2,ub2}})
Input:
S price of the underlying asset. See the notes for further information about the dimension of all parameters.
K exercise price
r domestic interest rate which can be found in the following interval: [0%,100%]
sigma volatility per year in the interval (0%,100%)
tau time to expiration (in years)
carry cost of carry in percent of the value of the underlying object (0%,100%)
opt type of the option: 1 for call, 0 for put
v1 scalar, numerical values determining the explanatory variable for a 2- or 3-dimensional plot: 1 for S, 2 for K , 3 for r, 4 for sigma, 5 for tau, 6 for carry. If not specified, no plot will be displayed.
ub1 upper bound for the chosen explanatory variable v1. Lower bound is the already specified value (S,K,r,sigma,tau or carry).
v2 scalar, second explanatory variable for the 3-dimensional plot.
ub2 upper bound for the second explanatory variable v2.
Output:
dat the computed option prices at the specified points

Note:

Example:
library("finance")
dat = influence()

Result:
Opens several interactive menus where you are asked
to specify the option features and your variables
of interest. According to your choice a two or three
dimensional graph displays the option price as a
function of the chosen variable(s).
Example:
library("finance")
S   = 230       ;(spot) price of the underlying
K   = 210       ; exercise price
r   = 5         ; interest rate
sigma = 25      ; volatility
tau = 0.5       ; days to maturity
carry = 5       ; cost of carry
opt  = 1        ; call
v1 = 1          ; spot price
ub1 = 250
v2 = 4          ; volatility
ub2 = 30
i2=influence(S,K,r,sigma,tau,carry,opt,v1,ub1,v2,ub2)
i2[1:10]

Result:
Contents of _tmp
[ 1,]      230     0.25   26.834
[ 2,]   230.67     0.25   27.308
[ 3,]   231.33     0.25   27.786
[ 4,]      232     0.25   28.268
[ 5,]   232.67     0.25   28.753
[ 6,]   233.33     0.25   29.241
[ 7,]      234     0.25   29.733
[ 8,]   234.67     0.25   30.228
[ 9,]   235.33     0.25   30.726
[10,]      236     0.25   31.227

The first column represents the prices of the underlying, the
second column consists of one value only - which is the
volatility of 25% (the other volatilities are contained in the
following rows) and the third column contains the corresponding
option prices. A three-dimensional plot, the suface of European
call option prices depending on spot price and volatility,
is depicted as well.
Example:
library("finance")
S = aseq(150,6,10)
K = aseq(150,6,15)
r = 10
sigma = aseq(5,6,2)
tau   = 5:10
carry = 10
opt  = 0|0|1|0|1|1
influence(S,K,r,sigma,tau,carry,opt)

Result:
Contents of dat
[1,]      150      150       10        5        5       10        0   4.1522
[2,]      160      165       10        7        6       10        0   7.7786
[3,]      170      180       10        9        7       10        1    6.188
[4,]      180      195       10       11        8       10        0   14.665
[5,]      190      210       10       13        9       10        1   9.2967
[6,]      200      225       10       15       10       10        1   11.002



Author: K. Komorad, W. Haerdle, 20020106 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006