Author: Jerry Xia
Date: 2018/06/19
Note: The advanced Marckdown features such as math expression may not be compatible in GitHub, please see README.pdf instead if you want more details
Please feel free to see the Monte Carlo engine: MonteCarlo.py
- regular Monte Carlo simulation
- optimal hedged Monte Carlo simulation
- delta-based Monte Carlo simulation
- Monte Carlo with antithetic variates
- Least square method of Longstaff and Schiwatz (LSM)
- Hedeged Least Square method (HLSM)
- geometric Brownian motion
- CIR model
- Heston model
- absorption
- reflection
- Higham and Mao
- partial truncation
- full truncation
Model Inventors: Marc Potters, Jean-Philippe Bouchaud, Dragan Sestovic
-
This is a Python Notebook about variance reduction Monte Carlo simulations. In this script, I implemented the following variance reduction methods as well as their antithetic variates' version:
- regular Monte Carlo
- Monte Carlo with delta-based control variates
- optimal hedged Monte Carlo
Due to the significance and robustness, I mainly focus on the optimal hedged Monte Carlo (OHMC) in option pricing. We invoke this method to price European options and make comparison with other methods.
- The option price is not simply the average value of the discounted future pay-off over the objective (or historical) probability distribution
- The requirement of absence of arbitrage opportunities is equivalent to the existence of "risk-neutral measure", such that the price is indeed its average discounted future pay-off.
- Risk in option trading cannot be eliminated
- It would be satisfactory to have an option theory where the objective stochastic process of the underlying is used to calculate the option price, the hedge strategy and the residual risk.
- It is a versatile methods to price complicated path-dependent options.
- Considerable variance reduction scheme for Monte Carlo
- It provide not only a numerical estimate of the option price, but also of the optimal hedge strategy and of the residual risk.
- This method does not rely on the notion of risk-neutral measure, and can be used to any model of the true dynamics of the underlying
The basic Heston model assumes that
Option price always requires to work backward. That is because the option price is known exactly at the maturity. As with other schemes, we determine the option price step by step from the maturity
The optimal hedged algorithm can be interpreted as the following optimal problem $$ \begin{align} \mbox{minimize}\quad & \quad Var[\Delta W_k]\ \mbox{subject to}\quad & \quad E[\Delta W_k]=0 \end{align} $$ It means we should try to minimize the realized volatility of hedged portfolio while maintaining the expected value of portfolio unchanged.
The original optimization is very difficult to solve. Thus we assume a set of basis function and solved it in such subspace. We use $N_C$and
Denote the discounted forward underlying price change at time
Define
$$
\begin{align}
Q_k &= \begin{bmatrix}
-A_{k,1}(S_k^{(1)}) & \cdots & -A_{k,N_C}(S_k^{(1)}) & B_{k,1}(S_k^{(1)})\Delta S_k^{(1)}& \cdots & B_{k,N_H}(S_k^{(1)})\Delta S_k^{(1)} \
-A_{k,1}(S_k^{(2)}) & \cdots & -A_{k,N_C}(S_k^{(2)}) & B_{k,1}(S_k^{(2)})\Delta S_k^{(2)}& \cdots & B_{k,N_H}(S_k^{(1)})\Delta S_k^{(2)} \
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots\
-A_{k,1}(S_k^{(N)}) & \cdots & -A_{k,N_C}(S_k^{(N)}) & B_{k,1}(S_k^{(N)})\Delta S_k^{(N)}& \cdots & B_{k,N_H}(S_k^{(N)})\Delta S_k^{(N)}
\end{bmatrix}\\
c_k &= (a_{k,1}, \cdots a_{k,N_C}, b_{k,1}, \cdots, b_{k,N_H})^T\\
v_{k} &= df(k,k+1) C_{k+1}(S_{k+1}^{})
\end{align}
$$
As for
Let us first review the standard form of linear constrained quadratic programming problem:
$$ \min_{x} \quad \frac{1}{2} x^T P x + q^T x\
\mbox{subject to} \quad G x \preceq h\\
A x = b
$$
Note that
Recall that the constrained optimization problem:
$$ \arg\min{c_k}\quad \quad v{k}^T Q_k c_k + \frac{1}{2}c_k^T Q_k^T Q_k c_k\
\mbox{subject to}\quad \quad 1{[N\times1]}^T v{k} + 1_{[N\times1]}^T Q_k c_k=0 $$ Correspondingly, we make the connection by letting
$$ x = c_k\
P = Q_k^T Q_k\\
q = Q_k^T v_k\\
A = 1_{[N\times1]}^T Q_k\\
b = -1{[N\times1]}^T v{k}
$$ The hard work is almost over right now. As you would always find, formulating the problem is usually the hard step. Invoking a solver is straightforward.
Note that when
$$ Q_0 = \begin{bmatrix}
-1 & \Delta S_0^{(1)}\\
\vdots & \vdots\\
-1 & \Delta S_0^{(N)}
\end{bmatrix}\\
P = Q_0^T Q_0\\
q = Q_0^T v_0\\
A = 1_{[N \times 1]}^T Q_0\\
b = -1_{[N \times 1]}^T v_0
$$
The rate of convergence of the Monte Carlo simulation is
- Control Variates
- Antithetic Variates
- Moment Matching
In this part we selected antithetic variates and delta-based control variates methods as a supplement to optimal hedged monte carlo simulation.
The main idea of this technique is to look at the asset equation that you aretrying to simulate:
Delta hedging can be summarized succinctly in the following way: Suppose that at time
In conclusion, OHMC is just a control variates method with an optimization on top and it is more practical because we do not have an analytical formula for the hedge sensitivity (i.e. delta, gamma, etc.)
In order to price Amrican type options, we need to consider the problem of optimal exercise. LSM is a well-defined method to tackle this problem. In contrast, here we only utilize the information of exercise points along each simulation path using cross-sectional regression. Different from the original LSM, here we equipe basis functions to approximate price and hedge at each step similar to OHMC. And discuss independently at the inception.
This combination create a magic reaction. Now we can not only price the American options but also hedge it! Moreover, it's model independent, model parameters or construction, dimension doesn't matter at all! We use Black-Scholes and Heston model as examples. What only matters is the underlying price trials. With it, we can calculate the following stuffs.
- American options price
- American options Greeks
- American options optimal exercise boundary
Here, Bouchard and Warin concluded two main dynamic strategy in American options pricing, A1 and A2. Besides, I equiped them with a hedging strategy:
- Initialization:
$\tau(t_J) = T$ - Backward induction:
- $\tau(t_j) = t_j \mathbf{1}{{g(t_j)\geq C(t_j)}} + \tau(t{j+1})\mathbf{1}_{{Z(t_j)<C(t_j)}}$
- Price estimator at 0:$P_0 = E[g(\tau(t_0),X_{\tau(t_0)})]$
- Initialization:
$P_T = g(T,X_T)$ - Backward induction:
$P_{t_j} = max{g(t_j,X_{t_j}),E[P_{t_{j+1}}]}$ - Price estimator at 0:
$P_0$
- Initialization:
$\tau(t_J) = T$ - Backward induction:
- $\tau(t_j) = t_j \mathbf{1}{{g(t_j)\geq C(t_j)}} + \tau(t{j+1})\mathbf{1}_{{Z(t_j)<C(t_j)}}$
- Price estimator at j:$P_j = E[g(\tau(t_j),X_{\tau(t_j)})]$ for
$j=J,J-1,\cdots,1$
- Price estimator at 0 (one-step hedged MC):
${arg,min}_{P_0,H_0} E[(\Delta W_0)^2]$
Black-Scholes model: HLSM-BlackScholes-American.ipynb Heston model: HLSM-Heston-American.ipynb
In this document, we take Black-Scholes model as an example
risk_free_rate = 0.06
dividend = 0.0
time_to_maturity = 1
volatility = 0.3
strike = 1.1
stock_price = 1
n_trials = 4000
n_steps = 20
func_list = [lambda x: x**0, lambda x: x] # basis for OHMC part
option_type = 'p'
American Options
Algorithm | Price | Delta |
---|---|---|
A1 | 0.1499 | N/A |
A2 | 0.1590 | 0.585 |
A2b | 0.1500 | 0.491 |
European Options
- BS Formula: 0.1401
- BS Binomial Tree: 0.1410
- Regular MC: 0.1453
- OHMC: 0.1426