Learn R Programming

fExpressCertificates (version 1.3)

calcBMProbability: Calculates probabilities for the Arithmetic Brownian Motion

Description

This method is a compilation of formulas for some (joint) probabilities for the Arithmetic Brownian Motion \(B_t=B(t)\) with drift parameter \(\mu\) and volatility \(\sigma\) and its minimum \(m_t=m(t)\) or maximum \(M_t=M(t)\).

Usage

calcBMProbability(
  Type = c(
    "P(M_t >= a)",
    "P(M_t <= a)",="" "p(m_t="" <="a)",">= a)",
    "P(M_t >= a, B_t <= z)",="" "p(m_t="" <="a," b_t="">= z)",
    "P(a <= m_t,="" m_t="" <="b)"," "p(m_s="">= a, B_t <= z="" |="" s="" <="" t)",="" "p(m_s="" b_t="">= z | s < t)",
    "P(M_s >= a, B_t <= z="" |="" s=""> t)",
    "P(m_s <= a,="" b_t="">= z | s > t)"), 
  a, z=0, t = 1, mu = 0, sigma = 1, s = 0)

Arguments

Type

Type of probability to be calculated, see details.

a

level

z

level

t

point in time, \(t > 0\)

mu

Brownian Motion drift term \(\mu\)

sigma

Brownian Motion volatility \(\sigma\)

s

Second point in time, used by some probabilities like P(M_s >= a, B_t <= z | s < t)

Value

The method returns a vector of probabilities, if used with vector inputs.

Details

Let \( M_t = \max(B_t)\) and \( m_t = \min(B_t)\) for \(t > 0\) be the running maximum/minimum of the Brownian Motion up to time \(t\) respectively.

  • \(P(M_t \ge a)\) (\(P(M_t \le a)\)) is the probability of the maximum \(M_t\) exceeding (staying below) a level \(a\) up to time \(t\). See Chuang (1996), equation (2.3).

  • \(P(m_t \le a)\) (\(P(m_t \ge a)\)) is the probability of the minimum \(m_t\) to fall below (rise above) a level \(a\) up to time \(t\).

  • \(P(M_t \ge a, B_t \le z)\) is the joint probability of the maximum, exceeding level \(a\), while the Brownian Motion is below level \(z\) at time \(t\). See Chuang (1996), equation (2.1), p.82.

  • \(P(m_t \le a, B_t \ge z)\) is the joint probability of the minimum to be below level \(a\), while the Brownian Motion is above level z at time t.

  • \(P(M_s \ge a, B_t \le z | s < t)\) See Chuang (1996), equation (2.7), p.84 for the joint probability \((M_s,B_t)\) of the maximum \(M_s\) and the Brownian Motion \(B_t\) at different times \(s < t\)

  • \(P(m_s \le a, B_t \ge z | s < t)\) See Chuang (1996), equation (2.7), p.84 for the joint probability of \((M_s,B_t)\) \(s < t\). Changed formula to work for the minimum.

  • \(P(M_s \ge a, B_t \le z | s > t)\) See Chuang (1996), equation (2.9), p.85 for the joint probability \((M_s,B_t)\) of the maximum \(M_s\) and the Brownian Motion \(B_t\) at different times \(s > t\)

  • \(P(m_s \le a, B_t \ge z | s > t)\) See Chuang (1996), equation (2.9), p.85 for the joint probability \((M_s,B_t)\) of the maximum \(M_s\) and the Brownian Motion \(B_t\) at different times \(s > t\). Adapted this formula for the minimum \((m_s,B_t)\) by \(P(M_s \ge a, B_t \le z) = P(m_s \le -a, B^{*}_t \ge -z)\).

Some identities: For \(s < t\): $$P(M_s \le a , M_t \ge a , B_t \le z ) = P(M_t \ge a , B_t \le z) - P(M_s \ge a , B_t \le z)$$

$$P(M_s \ge a, B_t \le z) = P(M_s \ge a)- P(M_s \ge a, B_t \ge z)$$

$$P(X \le -x,Y \le -y) = P(-X \ge x, -Y \ge y) = 1 - P(-X \le x) - P(-Y \le y) + P(-X \le x, - Y \le y)$$

Changing from maximum \(M_t\) of \(B_t\) to minimum \(m^{*}_t\) of \(B^{*}_t = -B_t\): \(P(M_t \ge z)\) becomes \(P(m^{*}_t \le -z)\).

References

Chuang (1996). Joint distribution of Brownian motion and its maximum, with a generalization to correlated BM and applications to barrier options Statistics & Probability Letters 28, 81--90

Examples

Run this code
# NOT RUN {
################################################################################
#
# Example 1: Maximum M_t of Brownian motion
#
################################################################################

# simulate 1000 discretized paths from Brownian Motion B_t
B <- matrix(NA,1000,101)
for (i in 1:1000) {
  B[i,] <- BrownianMotion(S0=100, mu=0.05, sigma=1, T=1, N=100)
}

# get empirical Maximum M_t
M_t <- apply(B, 1, max, na.rm=TRUE)
plot(density(M_t, from=100))

# empirical CDF of M_t
plot(ecdf(M_t))
a <- seq(100, 103, by=0.1)
# P(M_t <= a)
# 1-cdf.M_t(a-100, t=1, mu=0.05, sigma=1)
p <- calcBMProbability(Type = "P(M_t <= a)", a-100, t = 1, 
    mu = 0.05, sigma = 1)
lines(a, p, col="red")

################################################################################
#
# Example 2: Minimum m_t of Brownian motion
#
################################################################################

# Minimum m_t : Drift <e4>ndern von 0.05 auf -0.05
m_t <- apply(B, 1, min, na.rm=TRUE)

a <- seq(97, 100, by=0.1)
# cdf.m_t(a-100, t=1, mu=0.05, sigma=1)
p <- calcBMProbability(Type = "P(m_t <= a)", a-100, t = 1, mu = 0.05, sigma = 1)

plot(ecdf(m_t))
lines(a, p, col="blue")
# }

Run the code above in your browser using DataLab