Garch FX Call Option Pricing with Monte Carlo Put your data where you see XX..
GARCHCall=zeros(XX,1);%Put number of data set
%Garch parameters
alpha0= XX; %Put your Garch-Model alpha0
alpha1= XX; %Put your Garch-Model alpha1
beta1=0 XX; %Put your Garch-Model beta1
lambda = XX; %Put your Garch-Model lambda
N = XX; % Maturity in days.
T = N/365; % Maturity in years.
variance = alpha0 / (1 - alpha1*(1+lambda^2) - beta1); %Implied variance calculation
sigma = sqrt(variance)*sqrt(365); %Standart deviation
for z=1:XX;
rdif=(ird(z,1))/36500;%Interest rate differential
Spot = spot(z,1); % Spot
K = atmusd(z,1); %Strike price
Nsims = 3000; % Number of simulations
S = zeros(N,Nsims);
S(1,:) = Spot;
e(1) = 0;
h(1) = variance;
% Simulate paths for the stock price, and retain the terminal prices S(T).
for i.html">i=1:Nsims;
for t=2:N
h(t) = alpha0 + alpha1*(e(t-1) - lambda*sqrt(h(t-1)))^2 + beta1*h(t-1);
e(t) = sqrt(h(t))*randn(1);
S(t,i.html">i) = S(t-1,i.html">i)*exp(rdif - 0.5*h(t) + e(t));
end
ST(i.html">i) = S(end,i.html">i);
end
GARCHCall (z,1)= (exp(-(rf (z,1)/100)*T)*mean(max(ST-K,0)))*100; %Garch Call Option Price
end







