Friday, February 19, 2010

Jump – Diffusion Model

Jump – Diffusion Model 

The famous Black-Scholes model assumes a continuous change in the price of an asset. The prices change continuously to produce a lognormal distribution at any time in future. We know that there is enough evidence to suggest that the well-loved Geometric Brownian motion model for stock price behavior does not work well in practice. In particular, the financial instruments do not follow a lognormal random walk and the jumps can appear at any random time.

A model which has continuous price changes is known as Diffusion Model. When a diffusive model is overlaid with jumps, it becomes a Jump Diffusion Model (J-D from Scrubs!).  


Merton’s Mixed J-D Model does the same combining jumps with continuous changes. It incorporates small day-to-day diffusive movements together with larger randomly occurring jumps. Such an inclusion of jumps allows for more realistic crash scenarios such as what happened on 19th & 20th Oct. 1987. In the J-D model, the stock price St follows the random process – 

        dSt / St  =  m dt  + s dWt + (J-1) dN(t) 

where, m is the drift rate, s is the volatility, dWt gives the random walk (Wiener Process Wt), and ‘J-1’ is a Jump function which produces a jump from S to SJ. E[J-1] gives the expected relative jump size. 
        The last term represents the jumps. J is the jump size; a multiple of the stock price while N(t) is the number of jump events that have occurred upto time t. N(t) is assumed to follow Poisson Process, 
        
       P [N(t) = k] =  (λ t) k e– λt / k!  

Where,  
λ  :  average number of jumps per unit time.
k :  average jump size measured as a % of asset price. It is assumed to be drawn from a probability distribution in the model. 

The probability of a jump in time ∆t = λ ∆t. Therefore, average growth rate in asset price from the jump = λ k. Using this, the differential equation above can be simply rewritten as: 

        dS / S   =  (rfr - λ k)  dt  + s dz + dp


The jump size may follow any distribution, but a common choice is a log-normal distribution. It should be noted that the arrival of a jump is random and through the J-D model, it becomes a part of the stochastic differential equation for S. The uncertainty is now produced by 2 sources : 
  • The already known s dz from the Brownian motion.
  • (J-1) dN(t) corresponds to the exceptional and infrequent events. 
As we can see, when there are no jumps, the J-D model reduces to the Black Scholes Model, in which returns follow the Normal Distribution. A limitation of the J-D model is that it assumes constant volatility in the diffusive component, which results in unrealistic-looking behavior when the jumps are large. Since in reality, s tends to increase dramatically around the time the large jumps occur!


References:
 
D. J. Duffy, Num. Analysis of Jump Diffusion Models using PDE, DataSim

Wolfram Demonstration Projects, Distribution of Returns
Wolfram Demonstration Projects, Option Prices in Merton's J-D Model
J. C. Hull, Options, Futures, & Other Derivatives, Ed. 6th, Chap. 24

Pythagorean Triplets through MATLAB


1. Find Pythagorean Triplets  
                                                                       such that the 3rd number is within a Range

This code was created by me in order to find Pythagorean Triplets such that the Third number of the set lies in the given Range. Interestingly, multiples of 25 - 25, 50, etc are part of more than 1 triplet set and your code should be able to capture the same!
  
(I am taking the range as: 1100 to 1200)

% in MATLAB
% Show all the 3 numbers in the output
% Code created by Madhuresh Rai on Jan. 14th 2010

tic
lowerLimit = 1100 ; % Lower of the given range
upperLimit = 1200 ; % Higher of the given range

tempMat = lowerLimit:upperLimit ; 
% Initialize the matrix with nos. from the given range

initRow = 1 ;
pythTriplets = zeros(10,3) ; % Initializing the answer matrix

for i = 1:1:upperLimit
for j = i:1:upperLimit % Use of 'i' should be noted!
if tempMat ( sqrt(i*i + j*j) == tempMat ) % Logically
pythTriplets(initRow,:) = [i j sqrt(i*i + j*j)] ;
initRow = initRow + 1 ;
end
end
end

disp('The required pair of pythagorean triplets are given below:')
pythTriplets
toc

Followers