Quantitative Finance Collector is a blog on Quantitative finance analysis, methods in mathematical finance focusing on derivative pricing, quantitative trading and quantitative risk management.
Sep
12
Quotation
To price and hedge derivative securities, it is crucial to have a good model of the probability distribution of the underlying product. The most famous continuous-time model is the celebrated Black Scholes model, which uses the Normal distribution to fit the log returns of the underlying.
As we know from empirical research, one of the main problems with the Black–Scholes model is that the data suggest that the log returns of stocks/indices are not Normally distributed as in the Black–Scholes model. The log returns of most financial assets do not follow a Normal law. They are skewed and have an actual kurtosis higher than that of the Normal distribution. Other more flexible distributions are needed.
Moreover, not only do we need a more flexible static distribution, but in order to model the behaviour through time we need more flexible stochastic processes (which generalize Brownian motion). Looking at the definition of Brownian motion, we would like to have a similar,i.e. with independent and stationary increments, process, based on a more general distribution than the normal. However, in order to define such a stochastic process with independent and stationary increments, the distribution has to be infinitely divisible, such processes are called Lévy processes, one example of such process is normal inverse gaussian (NIG).
As we know from empirical research, one of the main problems with the Black–Scholes model is that the data suggest that the log returns of stocks/indices are not Normally distributed as in the Black–Scholes model. The log returns of most financial assets do not follow a Normal law. They are skewed and have an actual kurtosis higher than that of the Normal distribution. Other more flexible distributions are needed.
Moreover, not only do we need a more flexible static distribution, but in order to model the behaviour through time we need more flexible stochastic processes (which generalize Brownian motion). Looking at the definition of Brownian motion, we would like to have a similar,i.e. with independent and stationary increments, process, based on a more general distribution than the normal. However, in order to define such a stochastic process with independent and stationary increments, the distribution has to be infinitely divisible, such processes are called Lévy processes, one example of such process is normal inverse gaussian (NIG).
Sep
9
American options can be computed by several ways, to name a few: binomial tree, Least square Monte Carlo simulation, numerically solving PDE. Previously I share a PSOR code to calculate Linear Complementarity Formulation problem when applying finite difference or finite element for american option, here is a file including:
* GUI for pricing through CRR binormial tree
* Script for pricing with Finitie differences
* GUI for pricing via the Monte Carlo method of Longstaff and Schwartz
* Functions to implement all three methods
you'll have a clear picture in mind how to deal with American-type options, enjoy.
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16476&objectType=file.
* GUI for pricing through CRR binormial tree
* Script for pricing with Finitie differences
* GUI for pricing via the Monte Carlo method of Longstaff and Schwartz
* Functions to implement all three methods
you'll have a clear picture in mind how to deal with American-type options, enjoy.
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16476&objectType=file.
Aug
30
Options to exchange one asset for another arise in various contexts. An option to buy yen with Australian dollars is, from the point of view of a US investor, an option to exchange one foreign currency asset for another foreign currency asset. A stock lender offer is an option to exchange shares in one stock for shares in another stock.
Consider a European option to give up an asset worth ST at time T and receive in return an asset worth VT, the payoff from the option is
max(VT-ST,0)
A formula for valuing this option was first produced by Margrabe at his paper “The value of an option to exchange one asset for another”, Journal of Finance, a sample Matlab file can be downloaded here
Consider a European option to give up an asset worth ST at time T and receive in return an asset worth VT, the payoff from the option is
max(VT-ST,0)
A formula for valuing this option was first produced by Margrabe at his paper “The value of an option to exchange one asset for another”, Journal of Finance, a sample Matlab file can be downloaded here
Aug
24
We often have to price the American Option with Linear Complementarity Formulation when using finite difference method. One of methods for solving linear complementarity problem is Projected Successive Over Relaxation (PSOR), which is iterative and tries to solve the following formulation:
x'(Ax - b) = 0
x >= 0
Ax - b >= 0
using the projected SOR algorithm. Here is a sample Matlab code showing the basic algorithem of PSOR,
function [x] = psor(A,b,x0)
omega = 1.5;
tol = 1e-9;
jmax = 1e+3;
n = length(b); x = x0; j = 1;
for i = 1:n
x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));
end
while (norm(x-x0) > tol) && (j < jmax)
j = j + 1; x0 = x;
for i = 1:n
x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));
end
end
return
A problem with this sample code is slow computation speed, Should you are happy with C++, the following C++ code which can be called directly in Matlab.
x'(Ax - b) = 0
x >= 0
Ax - b >= 0
using the projected SOR algorithm. Here is a sample Matlab code showing the basic algorithem of PSOR,
function [x] = psor(A,b,x0)
omega = 1.5;
tol = 1e-9;
jmax = 1e+3;
n = length(b); x = x0; j = 1;
for i = 1:n
x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));
end
while (norm(x-x0) > tol) && (j < jmax)
j = j + 1; x0 = x;
for i = 1:n
x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));
end
end
return
A problem with this sample code is slow computation speed, Should you are happy with C++, the following C++ code which can be called directly in Matlab.
Aug
22
The payoffs from lookback options depend on the maximum or minimum asset price reached during the life of the option. The payoff from a European-style lookback call is the amount that the final asset price exceeds the minimum asset price achieved during the life of the option. The payoff from a European-style lookback put is the amount by which the maximumasset price achieved during the life of the option exceeds the final asset price.
Floating Strike Lookback Options means the strike is given as the optimal(maximum or minimum) value of the underlying asset. Matlab code for pricing it is here:
http://www.global-derivatives.com/code/matlab/Lookback-FloatingStrike.m
Floating Strike Lookback Options means the strike is given as the optimal(maximum or minimum) value of the underlying asset. Matlab code for pricing it is here:
http://www.global-derivatives.com/code/matlab/Lookback-FloatingStrike.m





