Book Image

Mastering Python for Finance

Book Image

Mastering Python for Finance

Overview of this book

Table of Contents (17 chapters)
Mastering Python for Finance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Newton's method


Newton's method, also known as the Newton-Raphson method, uses an iterative procedure to solve for a root using information about the derivative of a function. The derivative is treated as a linear problem to be solved. The first-order derivation of the function represents the tangent line. The approximation to the next value of , given as , is as follows:

Here, the tangent line intersects the axis at , which produces . This also represents the first-order Taylor expansion about such that that the new point solves the following equation:

This process is repeated with taking the value of until the maximum number of iterations is reached, or the absolute difference between and is within an acceptable accuracy level.

An initial guess value is required to compute the values of and . The rate of convergence is quadratic, which is considered to be extremely fast in obtaining the solution with high levels of accuracy.

The drawback to Newton's method is that it does not guarantee...