I'm relatively new to Mathematica programming, so forgive my rather unsophisticated question: I'm trying to do a Monte Carlo simulation using geometric Brownian motion (GBM). I want to write a indicator function which produces is 1 if my GBM stays within a certain corridor [L, U]
. I found a function which produces the paths of my GBM:
data = RandomFunction[
GeometricBrownianMotionProcess[0.01, .15, 100], {0, 1, .01}, 100]
How can I access data
so that I can write the indicator function?
EDIT: Ive got a follow up question: Let's say one sample path is the following list
pts=data["Paths"]
pts
{{0,100},{0.01,98}...}
How can I select from all my pahts only those values where the x-variable is >=1? I tried Select[pts,#1.0&]
, but this gives me an empty list.
data["Paths"]
. It's explained in the docs. $\endgroup$