Learn R Programming

fExpressCertificates (version 1.3)

simPricesAndMinimumFromTruncatedGBM: Simulation of the joint finite-dimensional distribution of a restricted Geometric Brownian Motion and its minimum

Description

Simulates from the joint distribution of finite-dimensional distributions \((S(t_1),...,S(t_n))\) and the minimum \(m(t_n)\) of a restricted Geometric Brownian motion by using the truncated multivariate normal distribution of the returns and the conditional distribution of a minimum of a Brownian Bridge given the returns.

Usage

simPricesAndMinimumFromTruncatedGBM(N = 100, S, T, mu, sigma, 
  lowerX = rep(0, length(T)), 
  upperX = rep(+Inf, length(T)), 
  log = FALSE, m=Inf)

Arguments

N

number of samples to draw

S

start value of the Arithmetic/Geometric Brownian Motion, i.e. \(S(0)=S_0\) or \(B(0) = S_0\)

T

Numeric vector of n valuation times \(T = (t_1,...,t_n)'\)

mu

the drift parameter of the Geometric Brownian Motion

sigma

volatility p.a., e.g. 0.2 for 20%

lowerX

Numeric vector of n lower bounds for the Geometric Brownian Motion, zeros are permitted, default is rep(0,length(T))

upperX

Numeric vector of n upper bounds for the Geometric Brownian Motion, +Inf are permitted, default is rep(+Inf,length(T))

log

logical, if true the returns instead of prices are returned

m

Possible prior minimum value.

Value

A \((N \times 2*n)\) matrix with N rows and columns \((S(t_1),\ldots,S(t_n),m(t_1),\ldots,m(t_n))\)

Details

For the \(n\) valuation times given by \(T = (t_1,\dots,t_n)'\) we simulate from the joint distribution \((S(t_1),\ldots,S(t_n),m(t_1),\ldots,m(t_n))\) of the finite-dimensional distribution \((S(t_1),\ldots,S(t_n))\) and the running minimum \(m(t_i) = \min_{0 \le t \le t_i}(S_t)\) of a restricted/truncated Geometric Brownian motion.

The Geometric Brownian Motion is conditioned at the \(n\) valuation dates \((t_1,...,t_n)\) on \(lowerX_i \le S(t_i) \le upperX_i\) for all \(i=1,\dots,n\).

First we simulate \((S(t_1),\ldots,S(t_n))\) from a truncated multivariate normal distribution of the returns with mean vector $$(\mu - \sigma^2/2) * T$$ and covariance matrix $$\Sigma = (\min{(t_i,t_j)}\sigma^2) \\ = \left[ \begin{array}{cccc} \min{(t_1,t_1)} \sigma^2 & \min{(t_1,t_2)} \sigma^2 & \cdots & \min{(t_1,t_n)} \sigma^2 \\ \min{(t_2,t_1)} \sigma^2 & \min{(t_2,t_2)} \sigma^2 & \cdots & \min{(t_2,t_n)} \sigma^2 \\ \vdots & & & \\ \min{(t_n,t_1)} \sigma^2 & \cdots & & \min{(t_n,t_1)} \sigma^2 \end{array} \right] $$ and lower and upper truncation points lower=log(lowerX/S) and upper=log(upperX/S) respectively.

Given the realized prices \((S(t_1),\ldots,S(t_n))\) we simulate the global minimum as the minimum of several Brownian Bridges as described in Beskos (2006):

We simulate the period minimum \(m_{(i-1,i)}\) between two times \(t_{i-1}\) and \(t_i\) for all \(i=1,\dots,n\). This minimum \(m_{(i-1,i)} | S(t_{i-1}),S(t_i)\) is the minimum of a Brownian Bridge between \(t_{i-1}\) and \(t_i\).

The global minimum is the minimum of all period minima given by \(m_n = \min(m_{(0,1)},m_{(1,2)},\dots,m_{(n-1,n)}) = \min(m_{(i-1,i)})\) for all \(i=1,\dots,n\).

See Also

See the similar method simPricesAndMinimumFromGBM for the unrestricted Geometric Brownian Motion (i.e. lowerX=rep(0,n) and upperX=rep(Inf,n)).

Examples

Run this code
# NOT RUN {
# 1. Simulation of restricted GBM prices and minimums m_t
# finite-dimensional distribution and Brownian Bridge
X1 <- simPricesAndMinimumFromTruncatedGBM(N=5000, S=100, T=c(1,2,3), 
  upperX=c(100,100,Inf), mu=0.05, sigma=0.3)
m1 <- X1[,4]
  
# 2. Compare to distribution of unrestricted GBM minimums
X2 <- simPricesAndMinimumFromGBM(N=5000, S=100, T=c(1,2,3), 
  mu=0.05, sigma=0.3)
m2 <- X2[,4]
	
plot(density(m1, to=100), col="black", main="Minimum m_t for Express Certificate 
  price paths at maturity")
lines(density(m2, to=100), col="blue")
legend("topleft", legend=c("Restricted GBM minimum","Unrestricted GBM minimum"),
  col=c("black","blue"), lty=1, bty="n")
# }

Run the code above in your browser using DataLab