calcBMProbability: Calculates probabilities for the Arithmetic Brownian Motion

Description Usage Arguments Details Value Author(s) References Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 calcBMProbability(
  Type = c(
    "P(M_t >= a)",
    "P(M_t <= a)",
    "P(m_t <= a)",
    "P(m_t >= 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 <= a, 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 μ

sigma

Brownian Motion volatility σ

s

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

Details

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

Some identities:
For s < t:

P(M_s <= a , M_t >= a , B_t <= z ) = P(M_t >= a , B_t <= z) - P(M_s >= a , B_t <= z)

P(M_s >= a, B_t <= z) = P(M_s >= a)- P(M_s >= a, B_t >= z)

P(X <= -x,Y <= -y) = P(-X >= x, -Y >= y) = 1 - P(-X <= x) - P(-Y <= y) + P(-X <= x, - Y <= y)

Changing from maximum M_t of B_t to minimum m^*_t of B^*_t = -B_t:
P(M_t >= z) becomes P(m^*_t <= -z).

Value

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

Author(s)

Stefan Wilhelm wilhelm@financial.com

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
################################################################################
#
# 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 ä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")

Example output

Loading required package: tmvtnorm
Loading required package: mvtnorm
Loading required package: Matrix
Loading required package: stats4
Loading required package: gmm
Loading required package: sandwich
Loading required package: fCertificates
Loading required package: fBasics
Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fOptions
Loading required package: fExoticOptions

fExpressCertificates documentation built on May 2, 2019, 11:02 a.m.