Student Support Forum: 'Stopping- threshold and stopping- time of stoch...' topicStudent Support Forum > General > Archives > "Stopping- threshold and stopping- time of stoch..."

 Next Comment > Help | Reply To Topic
 Author Comment/Response Milan 06/06/13 08:18am Hi, My intention is to use the threshold (the green line) as boundary in the following way: as soon as the process hits the threshold (watermark) it stops and is also excluded from the calculation of the mean function. So all processes which equal or fall beneath the threshold should stop and all processes that remain beyond the threshold should continue and the mean should only be calculated from the processes that remain beyond the threshold. Is this or something similar even possible? Thank you. my code: Manipulate[SeedRandom[seed]; meanvector := Mean[assets]; assets = Table[ RandomFunction[ GeometricBrownianMotionProcess[\[Mu], \[Sigma], S0], {0, time, 0.1}]["Path"], {P}]; G1 := ListLogPlot[assets, GridLines -> {{}, {threshold}}, GridLinesStyle -> Directive[Green, Thick], ImageSize -> 500, Joined -> True, AxesLabel -> {"Time", "Asset Value"}, PlotLabel -> Style["Forecasted Asset Value\n (Brownian Motion)", Bold], PlotRange -> All, PlotStyle -> Directive[{Thin, Lighter@Gray}]]; G2 := ListLogPlot[Mean[assets], Joined -> True, PlotStyle -> Directive[{Thick, Darker@Red}]]; Show[G1, G2], {{S0, 30, "Initial Asset Value"}, 1, 500, 0.5, Appearance -> "Labeled"}, {{\[Mu], 0.08, "Drift \[Mu]"}, 0.01, 0.2, 0.01, Appearance -> "Labeled"}, {{\[Sigma], 0.2, "Standard Deviation \[Sigma]"}, 0.01, 1, 0.05, Appearance -> "Labeled"}, {{P, 6, "Paths"}, 1, 20, 1, Appearance -> "Labeled"}, {{time, 10, "Time t"}, 1, 20, 1, Appearance -> "Labeled"}, {{threshold, 25, "Debt Level"}, 1, 500, Appearance -> "Labeled"}, {{seed, 1, "New Random Case"}, 1, 100, 1}, Button["Set Initial Values", {S0 = 30, \[Mu] = 0.08, \[Sigma] = 0.20, P = 6, time = 10, threshold = 25}, ImageSize -> 150], ControlPlacement -> Left] Attachment: MT6.nb, URL: ,

 Subject (listing for 'Stopping- threshold and stopping- time of stoch...') Author Date Posted Stopping- threshold and stopping- time of stoch... Milan 06/06/13 08:18am Re: Stopping- threshold and stopping- time of s... Bill Simpson 06/13/13 1:55pm Re: Stopping- threshold and stopping- time of s... Bill Simpson 06/13/13 10:59pm Re: Re: Stopping- threshold and stopping- time ... Milan 06/15/13 10:35am
 Next Comment > Help | Reply To Topic