Professional Documents
Culture Documents
Newtons Algorithm
Newton's algorithm, alternately called the Newton-Raphson method, is a numerical method for solving equations of the type f(x)=0. It has numerous applications in finance, and we will use it to determine the volatility surface for a call option using the Black Scholes VBA function. The method applies when we have a close approximation for a solution to the equation. The method assumes that the tangent to the graph at our approximation intersects the x-axis closer to the solution of the equation, i.e. closer to where the line we are evaluating intersects the x-axis. By solving for where the tangent intersects the xaxis, and repeating the process from that point, we get closer and closer to the actual solution of the equation. Let's say we're at our approximate solution, x0. The value of y-axis at this point is y = f(x0). We know that the tangent has gradient f'(x) - the same gradient as the line, from the definition of a tangent. We also know that a univariate linear function takes the form f(x) = mx + c, where m is the gradient, x is the horizontal displacement from the starting point, and c is the vertical displacement from the starting point. As such, we have y = f'(x0)(x-x0) + f(x0) as the line of the tangent. We solve this for y = 0 in order to get the next guesstimate of the solution to f(x) = 0. The above is the simpler method of interpretation, but the statement f(x) = mx+c is actually derived from the more generalised Taylor's series expansion where a continuous, differentiable function f may be expanded about a point c as follows: f(x) =f(c)+f'(c)(x-c)+f''(c)/2!*(xc)^2+... This is the univariate version of the Taylor expansion, but it will suffice for finding, for example, volatility smiles since we assume that all other variables remain constant. Since the equation is linear, no second order derivatives exist so these fall away, leaving f(x) =f(c)+f'(c)(x-c). In our example, x0=c, giving y = f'(x0)(x-x0) + f(x0) The equation of the intersection of the tangent with the y-axis is given by the following: 0 = f'(x0)(x1-x0) + f(x0) We then solve for x1 x1 = x0 - (f(x0)/f'(x0) From this we can induce (though actual proof is out of scope here), that xn+1 = xn - f(xn)/f'(xn) , which is the formula for Newton's method. The formula for Newton's method works in cases where the function is differentiable, and where the gradient is not equal to zero.