Tag Info

New answers tagged

1

As noted in my comment, you can use much more efficient built-ins to accomplish this, e.g. data = RandomFunction[GeometricBrownianMotionProcess[0.3693, 0.16689, 78.55], {0, .5, 0.001}, 50]; ListPlot[data["Paths"], Joined -> True] Should be orders of magnitude faster generating your random data...


0

As glance as answered you could just create a table with multiplicity of desired runs. I may have miscoded your intentions but I think you could also do as follows: bm[x_, m_, s_, t_, h_] := Module[{d = Sqrt@h, n = t/h, g, sm, gm}, g = RandomVariate[NormalDistribution[0, d], n]; sm = Accumulate[Prepend[g, 0]]; gm = MapIndexed[ x Exp[(m - s^2/2) ...


0

What about this? Brownian[x0_, \[Mu]_, \[Sigma]_, t_, h_] := Module[{d = Sqrt[h], m = t/h,g,sums,X}, g = Table[Random@NormalDistribution[0, d], {m}]; sums = FoldList[Plus, 0, g]; Do[X[i] = sums[[i + 1]], {i, 0, m}]; Table[x0*E^((\[Mu] - \[Sigma]^2/2)*i*h + \[Sigma]*X[i]), {i, 0, m}] ] m = 500; h = .001; gList = Table[ geometric = ...


2

Yes, your assumption is correct: QuantilePlot will plot quantiles of the reference distribution (i.e. theoretical quantiles) on the horizontal axis; and empirical (i.e. sample) quantiles on the vertical axis. To convince yourself that Mathematica respects that common convention, you can find an example buried deep in the documentation page for QuantilePlot ...



Top 50 recent answers are included