0
$\begingroup$

I want to generate a geometric brownian motion A with mean $MuA$, variance $SA$ and starting value 0.05. I do the following:

A = RandomFunction[GeometricBrownianMotionProcess[MuA, SA,0.05], {0,12,1}]

I also have a time series $X$ generated as follows:

x[t_] = 0.1*E^((t - 0)*0.9)
xData = Table[x[t], {t, 0, 10, 1}]
ListLinePlot[xData]

enter image description here

I want to create a third time series as follows (the code is wrong):

y[t_]:=x[t]*A[t]

In other words, I would like to use the elements of the discrete-time brownian motion in the function y[t]. How can I do this?

$\endgroup$

1 Answer 1

0
$\begingroup$

One way to do it is the following:

1- Generate the brownian motion with mean 𝑀𝑢𝐴, variance 𝑆𝐴 and starting value 0.05. Time goes from 0 to 5 at intervals of 0.1:

ARandom = RandomFunction[GeometricBrownianMotionProcess[MuA,SA,0.05],{0,5,0.01}];

Extract only the values (Not the time index) of the GBM:

A = Normal[ARandom][[1]][[All, 2]];

Use the extracted values of the GBM to do other calculations:

Y = A*Table[e^x[t], {t, 0, 5, 0.01}];
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.