Mathematics Asked by Parseval on February 1, 2021
I have a Weiner process ${W(t)}_{tge0}$ with $sigma^2=text{Var}(W(1))=1$. For a real constant $epsilon>0$ consider the differential ratio process $Delta_epsilon={Delta_epsilon(t)}_{r>0}$ given by
begin{equation}
Delta_epsilon(t) = frac{W(t+epsilon)-W(t)}{epsilon}, quad text{for} t>0.
end{equation}
I want to simulate a sample path of ${Delta_epsilon(t)}_{tin(0,1]}$ for small $epsilon>0$ in Rstudio.
Simulating a basic Weinerprocess/Brownian motion is easy in R, one can do it by the function rweiner()
or by plotting the cumulative sum of standard normally distributed variables. The part that confuses me is how to simulate the $W(t+epsilon)$. What I’ve done is used rwiener() and simply passed the end
parameter to $1+epsilon$.
epsilon = 10e-1
weinerEps = rwiener(end = 1+epsilon, frequency = 1000)
weiner = rwiener(end = 1, frequency = 1000)
Delta = (wienerEps - wiener)/epsilon
plot(Delta , type="l")
I’m not sure this is correct though.
Well, if you have a difference of $W(t+epsilon)$ and $W(t)$, don't you want the same realization of $W$ before you take the difference?
I think you should run $texttt{rwiener}()$ once, store the result, and then pull out both $W(t+epsilon)$ and $W(t)$, subtract and then divide by $epsilon$.
library('e1071')
epsilon = 1e-1 # 1/10=1e-1 and not 10e-1=1.
freq = 1000
wiener = rwiener(end = 1+epsilon, frequency = freq)
w = wiener[1:1000];
w_eps = wiener[(1+freq*epsilon):(1000+freq*epsilon)];
Delta = (w_eps - w)/epsilon
plot(Delta , type="l")
Answered by mjw on February 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP