Tag Info

Hot answers tagged

1

With[{t0 = 0, tend = 1, σ = 0.8, r = .01, S0 = 100, Κ = 110}, data = RandomFunction[GeometricBrownianMotionProcess[0, σ, S0], {t0, tend, 1/12}, 5000]; Exp[-r (tend - t0)] Mean[Max[#, 0] & /@ (data["LastValues"] - Κ)]] (* 27.5607 *) ListLinePlot[data, PlotRange -> All, PlotStyle -> Opacity[0.2]] Comparing this with Black-Scholes: d1[s_, x_, ...


1

After removing the superfluous θ[0] == 0 from bc, the key to the solution is a subtle change in the use of Piecewise in the definition of Cd: Cd[x_] := Piecewise[{{Cj/Sqrt[1 - x/ϕ], x < 0}}, Cs*Exp[x/ϕ]] eqn = {V'[t] == (j[t] - Id[V[t]])/Cd[V[t]], j'[t] == (V0[t] - Rt*j[t] - V[t])/L}; bc = {V[0] == A, j[0] == 0 (*, \[Theta][0] == 0*)}; pl = ...



Only top voted, non community-wiki answers of a minimum length are eligible