qdpmc
is a Python package for pricing path-dependent options
and structured products via Monte Carlo simulation. It utilizes
vectorization to boost algorithm speed. It offers a simple, intuitive ,
and flexible API to its users. This simple example demonstrates how it works:
In [1]: import qdpmc as qm
In [2]: import numpy as np
# Specify an up-and-out call option
In [3]: up_out_call = qm.UpOut(
...: spot=100,
...: barrier=150,
...: rebate=0,
...: ob_days=np.linspace(1, 252, 252),
...: payoff=qm.Payoff(
...: qm.plain_vanilla,
...: strike=100,
...: option_type="call"
...: )
...: )
...:
# Simulation parameters
In [4]: mc = qm.MonteCarlo(batch_size=125, num_iter=1000)
# Black-Scholes dynamics
In [5]: bs = qm.BlackScholes(r=0.03, q=0, v=0.25, day_counter=252)
# PV and Greek letters
In [6]: up_out_call.calc_value(mc, bs)
Out[6]: 6.371477718062621
Checkout Usage for further information.
Contents¶
- Usage
- API References
- Structures
- qdpmc.structures.barrier_options.UpOut
- qdpmc.structures.barrier_options.UpIn
- qdpmc.structures.barrier_options.DownOut
- qdpmc.structures.barrier_options.DownIn
- qdpmc.structures.barrier_options.DoubleOut
- qdpmc.structures.barrier_options.DoubleIn
- qdpmc.structures.autocalls.StandardSnowball
- qdpmc.structures.autocalls.UpOutDownIn
- Payoffs
- Products
- Market Models
- Engines
- Date Utilities
- Structures