Numerical Analysis -Applications to SIR epidemic model and Computational Finance - with MATLAB Jaepil LEE
Table of Contents SIR epidemic model Terminology Assumptions Model Formulation Differential Equations Threshold for SIR epidemic MATLAB code Example #1 Example #2 Computational Finance Derivatives Definition Motivation Options Option Pricing Monte Carlo simulation Black-Scholes PDE Closed form Finite difference method Implied Volatility Motivation Methods Volatility Smile MATLAB Simulation Greeks Motivation Delta Vega
SIR epidemic model
Terminology N : Population The total number of individuals. S(τ) : Susceptible The number of individuals who are not yet infected with the disease at time t. I(τ) : Infected The number of individuals who are infected with the disease. Capable of spreading the disease to people in the susceptible group. R(τ) : Removed The number of individuals who have been infected and then removed from the disease, either due to immunization or due to death. Assumed that they are unable to be infected again or to transmit the infection to others.
Assumptions Duration of the epidemic is short, compared to the lifetime of its hosts. → We neglect birth and disease-unrelated death → The population is closed at the constant size N. Once an individual is immune or dead, he or she does not return to the Susceptible group. → Susceptible is monotonically decreasing → Removed is monotonically increasing An individual must be considered as having an equal probability as every other individual of contracting the disease at a rate of β, the infection rate of the disease.
Model Formulation – Differential Equations
(1,0)
Model Formulation – Differential Equations
Model Formulation – Threshold for SIR epidemic
It is important to find the size of the epidemic, the total umber who will suffer from the disease. This is equal to the number who are eventually in the removed class. We can find this by recalling from the fact that is separable in (u,v,w)-space. This can be rewritten as
Model Formulation – Threshold for SIR epidemic Trajectories in the simplex S2 in (u,v,w)-space are found by integrating these equations. We want to know where the trajectory T that starts at the disease-free state (1,0,0) ends up. Integrate and apply the condition that (1,0,0) is on T. Then, This equation is satisfied everywhere on T.
Model Formulation – Threshold for SIR epidemic
MATLAB code – Example #1
MATLAB code – Example #2
Computational Finance
Derivatives – Definition and Motivation Definition A financial instrument whose value derives from the value of an underlying asset. ex) a future, option, warrant Motivation Hedge Avoid the risk of the volatility of the price change. Ex. Firms using futures to avoid currency change Arbitrage Law of one price If the law breaks, then one take profit from sell high, buy low. Speculation Anticipating the change in price and seek profit from derivatives. High return, but high risk.
Derivatives - Options Options The right to buy/sell underlying assets at the exercise price on or before its expiration date. Call : Gives the buyer the right to buy the underlying assets for a specified price(E) at a specified date(T). Put : Gives the buyer the right to sell the underlying assets for a specified price(E) at a specified date(T). American options endorse the holder to exercise the option before the maturity, whereas the European options do not.
Derivatives - Options
Option Pricing - Monte Carlo Simulation
Black-Scholes Partial Differential Equations Assumptions Investors are permitted to short sell stock There are no transaction costs or taxes There are no arbitrage opportunities → Impossible to make risk-free investments at higher return than risk-free rate The underlying stock does not pay dividends Stock can be purchased in any real quantity The daily price change follows the lognormal distribution The transaction is continuously made → The price persistently changes The risk-free interest rate is constant European Option → The options can be exercised only at their maturity
Black-Scholes Partial Differential Equations Stock returns are composed of two components Drift rate : The value of a stock will increase with time at a rate μ Volatility : the value of the stock is subject to random variability Ζ Drift rate is based on the expectation that a company will generate a return for investors, so that the stock’s value will necessarily increase over time The price change of a risk-free stock in a time interval Δt could be modeled as follows: ΔS = Sμ Δt
Black-Scholes Partial Differential Equations
Finite Difference Method Heat equation is one of a few PDEs to have a closed solution However, the solution is applicable for European options. For numerical solutions of other derivatives, such as American options, the following methods are commonly used. Explicit method Implicit method Crank-Nicolson method Here, we can omit the assumption on constant volatility and interest rate.
Finite Difference Method The explicit method uses 3 known payoff data to compute 1 unknown payoff at one time step before. (Forward difference) The implicit method uses 1 known payoff data to compute 3 unknown payoffs at one time step before. (Backward difference) Crank-Nicolson method uses 3 known payoff data to compute 3 unknown payoff one time step before.
Finite Difference Method
Finite Difference Method – Explicit method
Finite Difference Method – Implicit method
Finite Difference Method – Crank- Nicolson
Finite Difference Method – Explicit method
Finite Difference Method – Implicit method
Finite Difference Method – Crank- Nicolson
Finite Difference Method - Comparison
Implied Volatility - Motivation
Implied Volatility - Methods
Implied Volatility – Methods : Trial and Error
Implied Volatility – Methods : Newton Method
Implied Volatility – Volatility Smile Empirically speaking, the implied volatility and exercise price show a convex curve. This anomaly supports the assumption of the constant volatility and lognormal distributions of the underlying asset returns in the standard Black-Scholes option pricing model.
Implied Volatility – MATLAB Simulation 12/04/2015 Closing Price of the Underlying Asset :1,269,000 Company, Maturity, Exercise PriceCurrent PriceUp & DownMarket Price SEC C ,000( 10) SEC C ,000( 10) SEC C ,000( 10) SEC C ,000( 10) SEC C ,000,000( 10) SEC C ,050,000( 10) SEC C ,100,000( 10) SEC C ,150,000( 10) SEC C ,200,000( 10)79, , SEC C ,250,000( 10)28, , SEC C ,300,000( 10)7, , SEC C ,350,000( 10)1, , SEC C ,400,000( 10) SEC C ,450,000( 10) SEC C ,500,000( 10) SEC C ,550,000( 10) SEC C ,600,000( 10) SEC C ,700,000( 10) SEC C ,800,000( 10) SEC C ,900,000( 10)
Implied Volatility – MATLAB Simulation Exercise PriceImplied Volatility 880, , , , ,000, ,050, ,100, ,150, ,200, ,250, ,300, ,350, ,400, ,450, ,500, ,550, ,600, ,700, ,800, ,900,
Implied Volatility – MATLAB Simulation Volatility Smile
Greeks Motivation The price of derivatives are determined by many variables → If we can derive the sensitivity of the price of derivatives to the change of those variables, we can control the sensitivity to our favor. → The Greeks are vital tools in risk management. Some of the sensitivity are so popular and thus named after Greek letters.
Delta (Δ)
Thank you - Reference - N. Britton, 12/06/2012, Springer Science & Business Media, ‘Essential Mathematical Biology’ D. Hackmann, 12/02/2009 ‘Solving the Black Scholes Equation using a Finite Difference Method’, retrieved from Kim, et al., Korea University Science Computing Lab, 08/27/2015, ‘Korea University Applied Mathematics’ Kim, et al., Korea University Numerical Analysis Lecture Notes, retrieved from menuType=T&uId=7&sortChar=A&menuFrame=left&linkUrl=7_7.html&mainFrame=ri ght&dum=dum&boardId=845139&page=1&command=view&boardSeq= menuType=T&uId=7&sortChar=A&menuFrame=left&linkUrl=7_7.html&mainFrame=ri ght&dum=dum&boardId=845139&page=1&command=view&boardSeq= Deltaquants, Revision sheet for Equity Derivatives, retrieved from