MSc in Financial Mathematics, FM50/2021–2022
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
MSc in Financial Mathematics, FM50/2021–2022
Deep Pricing in the CEV Model
This document describes one of the available topics for the MSc-project in Financial Mathematics. It should be read in conjunction with the overall FM50 Financial Maths Project guide.
Rapidly computing option prices is an important task in financial mathemat- ics. Rapid computations of prices are essential to calibrate option price models, to compute the risk of option portfolios and simply to make it possible to make more rapid trading decisions.
In this project you will investigate how machine learning can be used to enable the rapid computation of option prices in the Constant Elasticity of Volatilty (CEV) model. This model has been chosen because it is a relatively simple model where one can compute option prices using classical methods rea- sonably quickly but where there is still scope for improvement by using machine learning techniques. This makes it a good test-case for machine learning ap- proaches.
The compulsory parts of the project require you to:
Part 1 Write a literature review highlighting the aspects of the development of pricing or hedging in the setting you choose to focus on.
Part 2 Conduct numerical experiments for pricing financial derivatives in the Heston model.
After completing Part 2, use the insights gained in the previous parts to develop these techniques further in a direction of your choice in Part 3.
Part 1: Literature Review
Give a literature review of aspects of the theory and available techniques for pricing that you consider to be of particular interest. The theory is too large for it to be realistic to review the entire theory, so it is important to focus on those aspects of the theory that will be important in Parts 2 and Part 3 of your project and those aspects which you think are most important to understanding the importance of the machine learning approach in general. You should also explain why rapid pricing is important which may lead you to discuss topics such as calibration, hedging and risk management.
Keep in mind when writing your literature review that the CEV model has been chosen for this project as simple test-case and the industry interest in machine learning comes from the fact it can also be applied to much more complex models too.
Some references that may help get you started are:
(i) The paper of Black and Scholes [3] which describes the basic theory of pricing for European options
(ii) The papers of Merton [6] and Heston [4] which illustrate the classical
approach of developing models where analytic and semi-analytic formulae are available. The Interest Rates course 7CCMFM07 also contains many interesting examples of such models which you might consider if you are interested in models beyond stock price models.
(iii) The paper [1] explains why there is an interest in rough volatility models (iv) The papers [2, 5] discuss how machine learning can be used for pricing.
You should be proactive in researching the literature, which involves pub- lished journal papers and books. Working papers should be used mostly for orientation, given that their content has not been peer reviewed.
It is particularly important that you synthesize the information gathered from these sources and presents it as a flowing story that is consistent both in terms of notation and mathematical and financial content.
Part 2: Numerical Computation
Implementing a finite difference method
In the CEV market model there are two assets. The first is a risk-free asset which grows with a constant interest rate r . The second is a stock whose price St at time t is determined by the stochastic differential equation
dSt = µSt dt + σSt(y)dWt
where Wt is a Brownian motion, µ and σ are real-valued constants and γ e [0, 1]. Note that the volatility of the stock at time t is given by σS The stock is assumed to follow this stochastic differential equation up to the first time τ that it hits the value 0. The stock is assumed to take the value 0 at all subsequent times.
You should write a function to price an American put option with strike K and maturity T in this market model using a finite difference method. The theory of pricing in the CEV model is very similar to the classical theory of the Black and Scholes model and you should be able to adapt existing algorithms to this case.
The code needed to price a European call option was given in the course 7CCMFM06 in Topic 8 and this code can be used as a starting point for pricing
an American put option. A good discussion of the pricing of American options using finite difference methods can be found in [7]. You may adapt the code from 7CCMFM06 to solve the problem, but should clearly reference the course and provide your own description of how the algorithm works. You should also be sure to explain how you have tested that your answer is correct.
Training a neural network
Once you have written the code to price an American put option, you should train a neural network to learn the how to price these options.
Let us write
PA (So , K, T, r, σ, γ)
for the function that computes the price of an American put option in the CEV model with the given parameter values.
You should produce a data file containing a large number of option prices for different values of the parameters. You should describe yourself how large a data file you chose and which parameter values you considered when generating this file. The data you use to train your network will have a considerable influence on the ultimate quality of your network.
Two observations may make it easier to produce a suitable data file.
Firstly, notice that when you compute a price by a finite difference method, you actually compute the price at a range of intermediate stock prices and times too. This means that you can use a single finite difference computation to generate training data with a range of values for So and the time to maturity.
Secondly, by considering the change of variables = αt and = λS it is possible to prove that
PA (So , K, T, r, σ, γ) = λ − 1 PA (λSo , λK, αT, , λ 1 −y α − σ, γ).
As a result you may choose a fixed strike K and a fixed value σ and, if you can compute PA (So , K, T, r, σ , γ) for arbitrary choices of So , T, r and γ, you will then be able to compute PA for arbitrary combinations of all 6 parameters. This means that without any loss of generality you can use the fixed values K and σ when generating your data set.
Once you have generated your data set, you should use a neural network to write a function that computes the mapping from parameter values to option prices in the CEV model.
You should explain how you designed and trained your neural network. You should explain carefully how you determined whether you neural network gave adequate results, which will require you to consider how accurate answers need to be useful, and over for what parameter values you expect your function to give accurate answers. Determining the answer to this question requires you to consider what parameter values might be plausible based on existing market data and to consider how accurate prices need to be for real applications.
Notice in particular that you will want to make sure that you can compute prices with reasonable accuracy when the stock price is close to the strike price.
So |
K |
T |
r |
σ |
γ |
FD |
NN |
e% |
1.1 |
1 |
1 |
0.05 |
0.1 |
0.9 |
|
|
|
1.0 |
1 |
1 |
0.05 |
0.1 |
0.9 |
|
|
|
0.9 |
1 |
0.5 |
0.02 |
0.1 |
0.5 |
|
|
|
2.6 |
2 |
1 |
0.10 |
0.2 |
0.8 |
|
|
|
Table 1: Summary of numerical results - FD denotes the price computed by the finite difference method, NN the price computed by the neural network and e% = I x 100I
If you are not careful you may train your network so that it is good at estimating the price of an option only when the stock price is far from the strike price. In this case, however, it is easy to estimate that the price will be approximately max{K - S, 0} so your results will not be particularly interesting if that is all your network can achieve. For this reason, we define the “time value” to be the difference between the price of the option and the immediate exercise value. You should make sure that your network estimates the time value well.
You must provide plots that illustrate the effectiveness of your neural net- work together with any weaknesses. We do not expect you to be able to develop a neural network that gives accurate answers for all possible parameter values.
To assist with marking you must complete a copy of Table 1.
You must also plot two charts side by side showing the time value obtained using the finite difference method (which should be shown on the left) and your neural network (which should be shown on the right) when r = 0.02, σ = 0.1, T = 1, K = 1 and as So varies between 0.8 and 1.5. Each chart should contain three lines, one for the case γ = 0.0, one for the case γ = 0.5 and one for the case γ = 1.0.
The paper [5] performs a similar task of getting a neural network to learn the implied volatility from model parameters for a variety of stochastic volatility models. The code used to train the neural network is available at https:// github.com/amuguruza/NN-StochVol-Calibrations and you may use this is a basis for your answer (with appropriate citations).
The problem has been set to ensure that you do not need a powerful com- puter to solve the problem and can do everything using CoCalc if required. However, if you do have your own more powerful computer you might find it convenient to install Python and Jupyter on your computer. If you have an NVIDIA graphics card on your computer and you are using the tensorflow pack- age to fit your neural network, it is possible to install CUDA libraries that will make tensorflow run considerably faster. We will not provide technical support on installing packages on your computer.
Part 3: Advanced issues
Some possible suggestions of topics you might consider in this section are
● More sophisticated stock price models such as stochastic volatility, rough volatility and multi-factor models;
● Interest rate models;
● Calibration of stock price models;
● Deep hedging;
● Applications to risk management;
● Other applications of machine learning in finance.
Remember that the dissertation is expected to take you the entirety of the summer working full time and we expect your dissertation to show a level of sophistication that reflects this.
[1] C Bayer, P Friz, and J Gatheral. Pricing under rough volatility. Quantitative
Finance, 16(6):887–904, 2016.
[2] C Bayer, B Horvath, A Muguruza, B Stemper, and M Tomas. On deep
pricing and calibration of (rough) stochastic volatility models. Preprint.
[3] F Black and M Scholes. The pricing of options and corporate liabilities,
1973. Journal of Political Economy, 81(3).
[4] S L Heston. A closed-form solution for options with stochastic volatility with
applications to bond and currency options. The review of financial studies, 6(2):327–343, 1993.
[5] B Horvath, A Muguruza, and M Tomas. Deep learning volatility. Available
[6] Robert C Merton. Option pricing when underlying stock returns are discon-
tinuous. Journal of financial economics, 3(1-2):125– 144, 1976.
[7] P Wilmott, S Howson, S Howison, J Dewynne, et al. The mathematics of
financial derivatives: a student introduction. Cambridge university press, 1995.
2022-08-11
Deep Pricing in the CEV Model