6 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
source | link

I have been playing with some stochastic questions and specially the problem herehere.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

5 deleted 41 characters in body
source | link

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?Followings, please test it for two paths.How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?Followings, please test it for two paths.How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

4 added 747 characters in body
source | link

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?Followings, please test it for two paths.How can we correct the algorithm here?

timstep = 20;5;
win = BinomialProcess[.5];99];
samplepaths=2;samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, InterpolationOrderFrame -> 0False, Frame
AxesLabel -> True{Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?Followings, please test it for two paths.How can we correct the algorithm here?

timstep = 20;
win = BinomialProcess[.5];
samplepaths=2;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, InterpolationOrder -> 0, Frame -> True,
PlotStyle -> {{Dashed, Opacity[.9]}}]

enter image description here enter image description here

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?Followings, please test it for two paths.How can we correct the algorithm here?

timstep = 5;
win = BinomialProcess[.99];
samplepaths = 1;
process = RandomFunction[Evaluate[win], {0, timstep - 1}, samplepaths];
ListLinePlot[process, Frame -> False, 
AxesLabel -> {Style["Time Step", Bold], Style["Number", Bold]}, 
PlotStyle -> {{Dashed, Black, Opacity[.9]}}, ImageSize -> 600]

x1 = 100;
alpha = 0.5;(*assume some value for alpha*)WinEvents = 
process["States"];
ST[WinEvents_?ListQ, x1_, alpha_, SimTime_] := 
Module[{}, 
FoldList[Max[If[#2 == 1, (1 + alpha) #1, (1 - alpha) #1], 0.] &, 
x1, Prepend[Differences@WinEvents, First@WinEvents]]];
simdat = ST[#, x1, alpha, timstep] & /@ WinEvents; Show[
ListLinePlot[Legended[Mean[simdat], ""], PlotRange -> All, 
PlotStyle -> {{AbsoluteThickness[3.5], Opacity[.9], Red}}, 
ImageSize -> 600], 
ListLinePlot[simdat, PlotRange -> All, 
PlotStyle -> {{Dashed, Black, Opacity[.7]}}], 
ListPlot[simdat, PlotRange -> All], Frame -> True]

enter image description here enter image description here

3 added 188 characters in body
source | link
2 added 11 characters in body; edited title
source | link
1
source | link