Comp_Fin_HW7 - Jaime Frade Computational Finance: Dr....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Jaime Frade Computational Finance: Dr. Kopriva Homework #6 0. Executive Summary In this assignment, there was a need to setup a program that calculated the value of an option using the Black Scholes differential equation. The method will be based on the Crank-Nicolson scheme which will be demostrated is stable and coverengent, unlike other explict methods. This finite difference method is provides the stability of an implicit scheme, yet still is explicit in its values because it is average of the both explict and implicit methods. Using the provided test case with a forcing term, the program solved the partial differential equation, where the exact solution was provided. A comparsion was made between the numerical and exact solutions which will be found to be the same. The expected error behavior will be also shown. As each time step was divided by a factor of two, the error ratio increased by a factor of four. The method is based on second order and the error illusrated this coverengence behavior in space and in time. After illustrating the program and the methods used are acceptable and expected error behavior, the program will calculate the value of a Euporean Put. From lecture, there valuation has an exact solution so a comparsion using similar methods as in previous task. From Willmott, the program will also calculate the Greeks, the variables measuring the equation’s senstivity to stock price, Δ, and interest rate, ρ . In conclusion, my numerical values over an closed interval of stock prices, [0,20], were the same values as calculated from the exact solution. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Statement of Problem 1. Problem one Using a finite difference method solve the following partial differential equation with forcing term, where the exact solution is known. Before solving the problem numerically, I will verify that the adding the given forcing term to the right hand side and adding the intial conditions so that the exact solution is e x + e - τ . v ( x, τ ) = e x + e - τ (1) ∂v ∂τ = - e - τ (2) ∂v ∂x = e x (3) 2 v ∂x 2 = e x (4) Suppose σ = r = 1, Subsitituting (1)-(4) into the following and simplifying will obtain: ∂v ∂τ - rx ∂v ∂x = 1 R σ 2 x 2 2 v ∂x 2 - rv (5) - e - τ - xe x = 1 R x 2 e x - e x - e - τ - xe x = 1 R x 2 e x - e x e x ± 1 - x - 1 R ² = 0 (6) From above, (1) is not an exact soution to (5). However, by adding the following forcing term to the right hand side of (5), (1) will become an exact solution. ∂v ∂τ - rx ∂v ∂x = 1 R σ 2 x 2 2 v ∂x 2 - rv + e x ± 1 - x - 1 R ² | {z } FORCING TERM (7) e x ± 1 - x - 1 R ² = e x ± 1 - x - 1 R ² 0 = 0 Approximation. To approximate equation (5), I will use the Crank-Nicolson approximation listed below: δ + τ u n j = u n +1 j - u n j Δ τ = ± 1 R σ 2 j x 2 j δ + x δ - x + r j x j δ 0 x - r j ² [ u n +1 j + u n j ] 2 (8) Error behavior Verfiy that (8) has a local truncation error of O x 2 , Δ τ 2 ) Numerical problem Solve the equation on the interval [0 , 1] with teh exact solution as the intial condition. Integrate to time
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

Comp_Fin_HW7 - Jaime Frade Computational Finance: Dr....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online