-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAsianGreeksLevy.m
36 lines (28 loc) · 1.29 KB
/
AsianGreeksLevy.m
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
36
function [CallDelta,PutDelta,Gamma,CallTheta,PutTheta,Vega,CallRho,PutRho] ...
= AsianGreeksLevy(AssetPrice,Strike,Sigma,Rates,Settle,ExerciseDates)
% if nargin == 5
% Settle = today;
% end
% Create RateSpec from the interest rate term structure
StartDates = '12-March-2016';
EndDates = '12-March-2017';
%Rates = 0.0405;
Compounding = -1;
Basis = 1;
RateSpec = intenvset('ValuationDate', StartDates, 'StartDates', StartDates, ...
'EndDates', EndDates, 'Rates', Rates, 'Compounding', ...
Compounding, 'Basis', Basis);
StockSpec = stockspec(Sigma, AssetPrice);
OptSpec = 'call';
OutSpec = {'Delta';'Gamma';'Theta';'Vega';'Rho'};
% Asian option using Levy model
[CallDelta,Gamma,CallTheta,Vega,CallRho] = asiansensbylevy(RateSpec, StockSpec, OptSpec, Strike, Settle,...
ExerciseDates,'OutSpec',OutSpec);
% Asian option using Kemna-Vorst method
% [DeltaLKV,s] = asiansensbykv(RateSpec, StockSpec, OptSpec, Strike, Settle,...
% ExerciseDates, 'OutSpec', OutSpec)
OptSpec = 'put';
OutSpec = {'Delta';'Theta';'Rho'};
[PutDelta,PutTheta,PutRho] = asiansensbylevy(RateSpec, StockSpec, OptSpec, Strike, Settle,...
ExerciseDates,'OutSpec',OutSpec);
end