You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that this version is faster than the one using a Python loop.
641
649
642
650
Now let's try with larger $M$ to get a more accurate calculation.
@@ -646,13 +654,20 @@ Now let's try with larger $M$ to get a more accurate calculation.
646
654
compute_call_price(M=10_000_000)
647
655
```
648
656
657
+
658
+
649
659
```{solution-end}
650
660
```
651
661
652
662
```{exercise}
653
663
:label: monte_carlo_ex2
654
664
655
-
Consider that a European call option may be written on an underlying with spot price of \$100 and a knockout barrier of \$120. This option behaves in every way like a vanilla European call, except if the spot price ever moves above \$120, the option "knocks out" and the contract is null and void. Note that the option does not reactivate if the spot price falls below \$120 again.
665
+
Consider that a European call option may be written on an underlying with spot price of \$100 and a knockout barrier of \$120.
666
+
667
+
This option behaves in every way like a vanilla European call, except if the spot price ever moves above \$120, the option "knocks out" and the contract is null and void.
668
+
669
+
Note that the option does not reactivate if the spot price falls below \$120 again.
670
+
656
671
Use the dynamics defined in {eq}`s_mc_dyms` to price the European call option.
0 commit comments