Student Support Forum: 'Manipulate Stochastic Process' topicStudent Support Forum > General > Archives > "Manipulate Stochastic Process"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response Milan 05/01/13 03:23am In Response To 'Re: Manipulate Stochastic Process'---------Hi Bill...thank you a lot. Initialy i got the following stochastic process by keeping all parameters constant: (*Parameters of process*) dt = 1/52; \[Mu] = 2/100; \[Sigma] = 10/100; (*parameters of run*) y = 100;(*time span in years*)n = 52*y;(*time steps*) s[0] = 100;(*initial share price*)t = 0;(*time*)(*calculate time \ development and store in list p*)p = Table[{t = t + dt, s[k] = s[k - 1] + dt*\[Mu]*s[k - 1] + \[Sigma]*s[k - 1]*Sqrt[dt]* Random[NormalDistribution[0, 1]]}, {k, 1, n}]; ListPlot[p] In the next step I want to try to manipulate at least one parameter such as the drift or the volatility in oder to see how the process changes as a result of changed parameters. In order to achieve this i tried the following, which didn't worked out.: (*Parameters of Run*) y = 10; (*Time Span in Years*) n = 52*y ;(*Time Steps*) s[0] = 100; (*Initial Share Price*) t = 0;(*Time*) Manipulate[ Plot[{t = t + dt, s[k] = s[k - 1] + dt*\[Mu]*s[k - 1] + \[Sigma]*s[k - 1]*Sqrt[dt]* Random[NormalDistribution[0, 1]]}, {k, 1, n}, PlotRange -> Automatic], {dt, 1/52, 1/252, Appearance -> "Labeled"}, {\[Mu], 0, 1, Appearance -> "Labeled"}, {\[Sigma], 0, 1, Appearance -> "Labeled"}] And in the third step I would like to add more such processes within a function. Like having 5 of them simultaneously within the same chart. I would be really thankful if you cold help me out. Thanks in advance and best regards from Austria Milan URL: ,

 Subject (listing for 'Manipulate Stochastic Process') Author Date Posted Manipulate Stochastic Process Milan 04/30/13 04:15am Re: Manipulate Stochastic Process Bill Simpson 04/30/13 11:46am Re: Re: Manipulate Stochastic Process Milan 05/01/13 03:23am Re: Re: Re: Manipulate Stochastic Process Bill Simpson 05/01/13 6:53pm Re: Re: Re: Re: Manipulate Stochastic Process Milan 05/02/13 03:21am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic