Skip to Content
Mastering Python for Finance - Second Edition
book

Mastering Python for Finance - Second Edition

by James Ma Weiming
April 2019
Intermediate to advanced
426 pages
11h 13m
English
Packt Publishing
Content preview from Mastering Python for Finance - Second Edition

Determining strike price boundaries

When selecting options used in the VIX Index calculation, calls and puts with bid prices of zero are ignored. For far out-of-the-money (OTM) put options where strike prices are lower than k0, the lower price boundary terminates when two consecutive zero bid prices are encountered. Similarly, for far OTM call options with strike prices more than k0, the upper price boundary terminates when two consecutive zero bid prices are encountered.

The following function, find_lower_and_upper_bounds(), illustrates the process of finding the lower and upper boundaries in Python code:

In [ ]:    def find_lower_and_upper_bounds(df, k0):        """        Find the lower and upper boundary strike prices. :param df: the pandas DataFrame ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python for Finance - Second Edition

Python for Finance - Second Edition

Yuxing Yan
Python for Finance

Python for Finance

Yves Hilpisch

Publisher Resources

ISBN: 9781789346466Supplemental Content