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
where
The basic Heston model assumes that
where
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 to the present time . The unit of time being , for example, one day. We simulate trajectories. In trajectory , the price of the underlying asset at time is denoted as . The price of the derivative at time is denoted as , and the hedge function is . We define an optimal hedged portfolio as
The one-step change of our portfolio is
Where is the discounted factor from time to , is the discounted factor considering dividend
The optimal hedged algorithm can be interpreted as the following optimal problem
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 and to denote the number of basis functions for price and hedge.
The basis functions and are priori determined and need not to be identical. The coefficients and can be calibrated by solving the optimal problem.
Denote the discounted forward underlying price change at time as
As for , note that we know the exact value at maturity, which means there is no need to approximate price in terms of basis functions, that is
Then, the optimization problem can be expressed as
In step k, since we already know the information (
Let us first review the standard form of linear constrained quadratic programming problem:
Note that means the transpose of vector x, and denotes the inequality is taken element-wise over the vectors and . The objective function is convex if and only if the matrix is positive-semidefinite(Hermitian matrix all of whose eigenvalues are nonnegative), which is the realm we concern with.
Recall that the constrained optimization problem:
Correspondingly, we make the connection by letting
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
The rate of convergence of the Monte Carlo simulation is . The variance reduction techniques are used to reduce the constant factor corresponding to the Monte Carlo approximation . Some of the most used variance reduction techniques are:
- 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: and recognize that sinceztis a standard Brownian motion so will be−ztandthey will have the same exact distribution. This means that the equation: will also generate paths of the same asset. The variance depends on the sign of the covariance of and . It can increase the eventual variance or decrease it, both case do arise. One sufficient condition to insure variance reduction is the monotony of the payoff function. Then, when using both in the calculation of the final Monte Carlo value the variance of the estimate will be reduced.
Delta hedging can be summarized succinctly in the following way: Suppose that at time , we receive the price of an option that pays at time T. The price of this option at any time is a function . Then, if we hold at any moment in time units of stock, then we will be able to replicate the payout of this option at time T. This is in theory since of course we cannot trade continuously. So in practice we perform a partial hedge where we only rebalance at some discrete moments in time say . The replicating strategy can be expressed as follow: which is similar to the strategy in the optimal hedged Monte Carlo simulation where the only difference is that in OHMC, we use option and delta hedging to replicate the cash flow and here we do the opposite operation. But when implementing the delta-based control variates, we should move the hedging term to the right hand side which make it identical to the OHMC strategy. Note that here we are assumed to know the delta hedging function. It explains a lot why OHMC can reduce the variance.
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 American 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:
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