Consider a Wiener Process (https://en.wikipedia.org/wiki/Wiener_process):
A Wiener process $W(t)$, $t \in [0, \infty)$, is a real-valued continuous-time stochastic process that satisfies the following properties:
- $W_0 = 0$
- $W$ has independent increments: for every $t > 0$, the future increments $W_{t+u} - W_t$, $u \geq 0$, are independent of the past values $W_s$, $s < t$.
- $W$ has Gaussian increments: $W_{t+u} - W_t$ is normally distributed with mean 0 and variance $u$, i.e., $W_{t+u} - W_t \sim \mathcal{N}(0, u)$.
Thus, in general:
$$W(t) = \sum_{i=1}^{t-1} (W_i - W_{i-1})$$ $$(W_i - W_{i-1}) \sim \mathcal{N}(0, dt)$$
Here is my attempt to simulate a Wiener Process in the R programming language:
library(ggplot2)
n <- 1000 # Number of steps
dt <- 1/n # Time step
dW <- rnorm(n, mean = 0, sd = sqrt(dt))
W <- cumsum(dW)
df <- data.frame(time = seq(0, 1000, length.out = n), Wiener = W)
p <- ggplot(df, aes(x = time, y = Wiener)) +
geom_line() +
labs(title = "Wiener Process", x = "Time", y = "Value") + theme_bw()
print(p)
My Question: I am interested in learning if it is possible to mathematically define the Wiener Process such that the range can only be between two numbers $a$ and $b$?
For example, imagine a coin where the probability of success itself evolves as a stochastic process. That is, the probability of getting heads on the $n_{th}$ turn depends on the history of the previous flips according to a Wiener Process. In this case, I would have to define a Wiener Process between $0$ and $1$.
From a programming perspective, I think this might be possible: Every time the Wiener Process takes a value of $0$ or $1$, you can "force" it to take a value of 0.01 or 0.99 and resume the simulation:
n <- 1000 # Number of steps
dt <- 1/n # Time step
dW <- rnorm(n, mean = 0, sd = sqrt(dt))
W <- numeric(n)
W[1] <- 0.5 # Start in the middle of the interval [0, 1]
Generate the Wiener process
for (i in 2:n) {
W[i] <- W[i-1] + dW[i]
If the process hits 0 or 1, reset to 0.01 or 0.99 respectively
if (W[i] <= 0) {
W[i] <- 0.01
} else if (W[i] >= 1) {
W[i] <- 0.99
}
}
df <- data.frame(time = seq(0, 1, length.out = n), Wiener = W)
p <- ggplot(df, aes(x = time, y = Wiener)) +
geom_line() +
labs(title = "Bounded Wiener Process", x = "Time", y = "Value") +
theme_bw()
print(p)
But is it possible to mathematically define the Wiener Process according to these constraints? I am interested in mathematically defining a Wiener Process like this so I can infer well-known theoretical properties from it. In the way I have done it (Bounded), I am not sure if theoretical properties can be inferred from this.
I am aware that there is something called a Geometric Brownian Motion in which the Logarithm of the process is analyzed such that negative values can not be taken - but I am not sure if there are any formulations which allow the process to naturally lie within two values (Probability of a Brownian motion staying within double linear barriers).
Is this possible?
Thanks!
Note: Here are multiple simulations:
n <- 1000 # Number of steps
dt <- 1/n # Time step
df <- data.frame()
for (j in 1:100) {
dW <- rnorm(n, mean = 0, sd = sqrt(dt))
W <- cumsum(dW)
temp_df <- data.frame(time = seq(0, 1, length.out = n), Wiener = W, process = j)
df <- rbind(df, temp_df)
}
color_gradient <- scale_color_gradient(low = "red", high = "blue")
p <- ggplot(df, aes(x = time, y = Wiener, color = process)) +
geom_line() +
labs(title = "Multiple Wiener Processes", x = "Time", y = "Value") +
theme_bw() +
color_gradient
print(p)


