WARNING: this is a somewhat experimental problem given for the first time the Autumn of 2020. Only a very minimal theoretical background is given in this text. Feel free to write to Sebastian for more information.
A financial derivative is a contract that derives its value from the performance of an underlying asset. Perhaps the most common financial derivative is the option. Such contracts are incredibly old, the first mention of options contracts in history is by greek philosopher Thales from the sixth century.
An option is a right, but not an obligation, to buy or sell and underlying asset at a predetermined price \( E \) at or before an expiration time \( T \). Having such an option is valuable, but determining the fair price of an option is a difficult problem.
1: We focus on stocks, but it can be anything.
Options to buy (sell) are commonly referred to as call (put) options. An option that only allows one to excercise this right at the maturity date is called a European option, while an option that can be exercise at any date prior to the maturity date is called an American option. There are many other varieties.
In 1997, the (pseudo-)Nobel prize in economics was awarded to Robert C. Merton and Myron S. Scholes "for a new method to determine the value of derivatives", the Black-Scholes-Merton model.
The Black-Scholes equation is a partial differential equation, which describes the price of an option over time. The key insight behind the equation is that one can perfectly hedge the option by buying and selling the underlying asses and the "bank account asset" (cash) in just the right way to eliminate risk. $$ \begin{equation} \frac{\partial V}{\partial t} + \frac{1}{2}S^2\sigma^2\frac{\partial^2 V}{\partial S^2} + (r - D)S\frac{\partial V}{\partial S} - r V = 0 \tag{1} \end{equation} $$
Here \( V(S, T) \) is the value of the options, \( S \) is the price of the underlying asset, \( \sigma \) is the volatility of the underlying asset, \( r \) is the "risk-free" interest rate, and \( D \) is the yield (dividend paying rate) of the underlying stock.
The volatility \( \sigma \) stems from an underlying assumption that the stock moves like a geometric Brownian motion, $$ \begin{equation} \frac{dS}{S} = \mu dt + \sigma dW. \tag{2} \end{equation} $$
Explicit solutions for the Black-Scholes equation, called The Black-Scholes formulae, are known only for European call and put options. For other derivatives, such a formula doest not have to exist. However, a numerical solution is always possible.
Instead of an initial value problem, we have a terminal value problem at time \( T \), i.e. the expiration date or the maturity date. We change to an initial value problem by substituting \( \tau = T - t \). This new variable can be interpreted as time remaining to expiration.
The transformed spatial variable is \( x = \ln(S/E) \), where \( E \) is the exercise price of the option. Now, values of \( x \) close to zero correspond to stock prices that are close to the exercise price of the option. Negative values of \( x \) correspond to stock prices lower than the exercise price and positive values of \( x \) correspond to prices higher than the exercise price.
Just substituting for the variables above leads to a parabolic equation, with constant coefficients. Show that by making a final substitution; $$ \begin{equation} u(x, \tau) = e^{\alpha x + \beta \tau} V(S, t) \tag{3} \end{equation} $$ we get the heat (diffusion) equation $$ \begin{equation} \frac{\partial u}{\partial \tau} = \frac{\sigma^2}{2}\frac{\partial^2 u}{\partial x^2} \tag{4} \end{equation} $$
What are the correct parameters for \( \alpha \) and \( \beta \)?
You can implement a solver for the diffusion equation inspiration from the project on the diffusion equation. Another very good resource is Langtangen and Linge's book "Finite Difference Computing with PDEs".
It is highly recommended to start with an explicit scheme, and then move to a more sophisticated implicit scheme. You should make up your own mind regarding what scheme is robust enough. Gauss-Seidel (successive over-relaxation) and Crank-Nicholson are some suggestions.
After creating a general diffusion equation solver, you can adapt the program to solve the Black-Scholes equation. Plot \( V \) vs \( S \) at different values for \( t \) (\( \tau \)).
Special considerations The variable \( x \) is unbounded, i,e. \( x\in[-\infty, \infty] \). Numerically, we have to pick a bounded interval \( [-L, L] \), where \( L \) is a sufficiently large number. This interval remain unchanged when considering an option with a different strike price.
You need to impose special boundary conditions for \( x=-L \) and \( x=L \), corresponding to stock prices that are close to zero and very high, approaching infinity.
You need to pick som values for \( E \), \( r \), \( D \) and \( \sigma \) some starting choices can \( 50 \), \( 0.04 \), \( 0.12 \) and \( 0.4 \), respectively. Discuss what values would be reasonable - in the present market situation the values suggested are absolutely not!
In order to make reasonable plots, you need to transform the solution of the diffusion equation into the solution for the Black-Scholes equation.
You should compare to the analytic solution, i.e. the Black-Scholes Formula: $$ \begin{equation} C(S_t, t) = N(d_1) S_t - N(d_2) PV(E), \tag{5} \end{equation} $$ where the present value of the exercise price is given by $$ \begin{equation} PV(E) = Ee^{-r(T - t)}, \tag{6} \end{equation} $$ furthermore we have parameters \( d_1 \), $$ \begin{equation} d_1 = \frac{1}{\sigma \sqrt{T - t}} \left[ \ln \left(\frac{S_t}{E} \right) + \left(r + \frac{\sigma^2}{2} \right) (T - t), \right] \tag{7} \end{equation} $$ and \( d_2 \), $$ \begin{equation} d_2 = d_1 - \sigma \sqrt{T - t}, \tag{8} \end{equation} $$ while \( N \) is the cumulative normal distribution function.
The "Greeks" measure sensitivity of the value of the derivative of a portfolio to changes in parameter value while holding other parameters fixed. There are different ways of hedging a portfolio agains risk by eliminating the movement in one or several of these parameters.
Delta: \( \Delta = \frac{\partial V}{\partial S} \)
Gamma: \( \gamma = \frac{\partial^2 V}{\partial V} \)
Vega : \( \nu = \frac{\partial V}{\partial \sigma} \)
2: Notice that this is not really a greek letter.
Theta: \( \Theta = -\frac{\partial V}{\partial \tau} \)
Rho: \( \rho = \frac{\partial V}{\partial r} \)
Make a representation of how these parameters move over time. Why are the Greeks interesting? Is your computed results reasonable?
There are several market-traded standardised options. On the Oslo Stock Exchange (OSE) there are standardised options for several of the larger listed companies such as Equinor, Norsk Hydro, Telenor, Mowi, Orkla etc. See for instance https://www.oslobors.no/markedsaktivitet/#/list/derivatives/quotelist/false
Since there the market already prices the options, one can use these options prices to derive the value of implicit variables. A common practice is to use the market-given prices of options to derive the implied volatility of the option.
To do this; pick a large company with a high turnover of stock, and whose stock has seen several actual option trades on OSE lately. Find a reasonable estimate for the risk-free interest rate \( r \). This would typically be given by short-term government bonds of the same currency as the stock. In NOK, you can find "Statskassaveksler" - these are bonds issued by the Norwegian Government with a shorter maturity than 12 months. Find the effective, real, annualised interest of these and use that as an estimate for \( r \) (these days it would be very close to zero). Norges Bank publishes data on this. You can also find quotes on OSE. The dividend yield \( D \) of the stock can be computed by taking the sum of all dividends paid py the company per stock for the year and dividing by the stock price. Then you should be able to tune the volatility in your solver to fit the call prices given by the market. You can do this by trial and error, but also use a root-finder like Newton's method or Brent's method.
Here follows a brief recipe and recommendation on how to write a report for each project.
The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008 or Python. The following prescription should be followed when preparing the report: