
Python for Finance
By :

In this chapter, we will study two topics: loops and implied volatility based on the European options (Black-Scholes-Merton option model) and American options. For the first topic, we have the for
loop and while
loop, the two most used loops. After presenting the definition of the implied volatility and explaining the logic behind it, we discuss three ways for its estimation: based on a for
loop, on a while
loop, and on a binary search. A binary search is the most efficient way to find a solution in such cases. However, the precondition to apply a binary search is that the objective function is monotone increasing or decreasing function of our target estimate. Fortunately, this is true since the value of an option price is an increasing function of the volatility.
In particular, we will cover the following topics:
for
loop, while
loop...Change the font size
Change margin width
Change background colour