aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShivesh Mandalia <shivesh.mandalia@outlook.com>2020-03-22 17:02:29 +0000
committerShivesh Mandalia <shivesh.mandalia@outlook.com>2020-03-22 17:02:29 +0000
commit92375e2d232538c72e9dfe7d6f067dfcc7e5979f (patch)
tree4bea2694d7dc509b4f85c323639683f4734a0b37
parent954f69610607a06d5b2c9c5a7719260a26d7cf44 (diff)
downloadMCOptionPricing-92375e2d232538c72e9dfe7d6f067dfcc7e5979f.tar.gz
MCOptionPricing-92375e2d232538c72e9dfe7d6f067dfcc7e5979f.zip
update examples
-rw-r--r--utils/engine.py2
-rw-r--r--utils/path.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/utils/engine.py b/utils/engine.py
index e8d2b1f..e64d599 100644
--- a/utils/engine.py
+++ b/utils/engine.py
@@ -51,7 +51,7 @@ class PricingEngine:
>>> payoff = AsianArithmeticPayOff(option_right='Call', K=110)
>>> engine = PricingEngine(payoff=payoff, path=path)
>>> print(engine.price(T=range(4)))
- 2.1462567745518335
+ MCResult(price=12.003704847790525, stderr=0.2327352760696234)
"""
payoff: BasePayoff
diff --git a/utils/path.py b/utils/path.py
index 6855b7f..2fbb48f 100644
--- a/utils/path.py
+++ b/utils/path.py
@@ -43,9 +43,9 @@ class PathGenerator:
>>> from utils.path import PathGenerator
>>> path = PathGenerator(S=100., r=0.1, div=0.01, vol=0.3)
>>> print(path.generate(T=range(4)))
- [100.0, 91.11981160354563, 94.87596210593794, 117.44132223235353]
+ [100.0, 100.33539853588853, 122.76017088387074, 142.29540684005462]
>>> print(path.generate(T=range(4)))
- [100.0, 68.73668230722738, 71.43490333826567, 70.70833180133955]
+ [100.0, 73.03094019139712, 77.37310245438943, 66.54240939439934]
"""
S: float