Derivatives Analytics with Python
eBook - ePub

Derivatives Analytics with Python

Data Analysis, Models, Simulation, Calibration and Hedging

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Derivatives Analytics with Python

Data Analysis, Models, Simulation, Calibration and Hedging

About this book

Supercharge options analytics and hedging using the power of Python

Derivatives Analytics with Python shows you how to implement market-consistent valuation and hedging approaches using advanced financial models, efficient numerical techniques, and the powerful capabilities of the Python programming language. This unique guide offers detailed explanations of all theory, methods, and processes, giving you the background and tools necessary to value stock index options from a sound foundation. You'll find and use self-contained Python scripts and modules and learn how to apply Python to advanced data and derivatives analytics as you benefit from the 5,000+ lines of code that are provided to help you reproduce the results and graphics presented. Coverage includes market data analysis, risk-neutral valuation, Monte Carlo simulation, model calibration, valuation, and dynamic hedging, with models that exhibit stochastic volatility, jump components, stochastic short rates, and more. The companion website features all code and IPython Notebooks for immediate execution and automation.

Python is gaining ground in the derivatives analytics space, allowing institutions to quickly and efficiently deliver portfolio, trading, and risk management results. This book is the finance professional's guide to exploiting Python's capabilities for efficient and performing derivatives analytics.

  • Reproduce major stylized facts of equity and options markets yourself
  • Apply Fourier transform techniques and advanced Monte Carlo pricing
  • Calibrate advanced option pricing models to market data
  • Integrate advanced models and numeric methods to dynamically hedge options

Recent developments in the Python ecosystem enable analysts to implement analytics tasks as performing as with C or C++, but using only about one-tenth of the code or even less. Derivatives Analytics with Python — Data Analysis, Models, Simulation, Calibration and Hedging shows you what you need to know to supercharge your derivatives and risk analytics efforts.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Derivatives Analytics with Python by Yves Hilpisch in PDF and/or ePUB format, as well as other popular books in Business & Investments & Securities. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2015
Print ISBN
9781119037996
eBook ISBN
9781119038009

CHAPTER 1
A Quick Tour

1.1 Market-Based Valuation

This book is about the market-based valuation of (stock) index options. In the domain of derivatives analytics this is an important task which every major investment bank and buy-side decision maker in the financial market is concerned with on a daily basis. While theoretical valuation approaches develop a model, parametrize it and then derive values for options, the market-based approach works the other way round. Prices from liquidly traded options are taken as given (i.e. they are inputs instead of outputs) and one tries to parametrize a market model in a way that replicates the observed option prices as well as possible. This activity is generally referred to as model calibration. Being equipped with a calibrated model, one then proceeds with the task at hand, be it valuation, trading, investing, hedging or risk management. A bit more specifically, one might be interested in pricing and hedging an exotic derivative instrument with such a model—hoping that the results are in line with the overall market (i.e. arbitrage-free and even ā€œfairā€) due to the previous calibration to more simple, vanilla instruments.
To accomplish a market-based valuation, four areas have to be covered:
  1. market: knowledge about market realities is a conditio sine qua non for any sincere attempt to develop market-consistent models and to accomplish market-based valuation
  2. theory: every valuation must be grounded on a sound market model, ensuring, for example, the absence of arbitrage opportunities and providing means to derive option values from observed quantities
  3. numerics: one cannot hope to work with analytical results only; numerical techniques, like Monte Carlo simulation, are generally required in different steps of a market-based valuation process
  4. technology: to implement numerical techniques efficiently, one is dependent on appropriate technology (hard- and software)
This book covers all of these areas in an integrated manner. It uses equity index options as the prime example for derivative instruments throughout. This, among others, allows to abstract from dividend related issues.

1.2 Structure of the Book

The book is divided into three parts. The first part is concerned with market-based valuation as a process and empirical findings about market realities. The second part covers a number of topics for the theoretical valuation of options and derivatives. It also develops tools much needed during a market-based valuation. The third part finally covers the major aspects related to a market-based valuation and also hedging strategies in such a context.
Part I ā€œThe Marketā€ comprises two chapters:
  • Chapter 2: this chapter contains a discussion of topics related to market-based valuation, like risks affecting the value of equity index options
  • Chapter 3: this chapter documents empirical and anecdotal facts about stocks, stock indices and in particular volatility (e.g. stochasticity, clustering, smiles) as well as about interest rates
Part II ā€œTheoretical Valuationā€ comprises four chapters:
  • Chapter 4: this chapter covers arbitrage pricing theory and risk-neutral valuation in discrete time (in some detail) and continuous time (on a higher level) according to the Harrison-Kreps-Pliska paradigm (cf. Harrison and Kreps (1979) and Harrison and Pliska (1981))
  • Chapter 5: the topic of this chapter is the complete market models of Black-Scholes-Merton (BSM, cf. Black and Scholes (1973), Merton (1973)) and Cox-Ross-Rubinstein (CRR, cf. Cox et al. (1979)) that are generally considered benchmarks for option valuation
  • Chapter 6: Fourier-based approaches allow us to derive semi-analytical valuation formulas for European options in market models more complex and realistic than the BSM/CRR models; this chapter introduces the two popular methods of Carr-Madan (cf. Carr and Madan (1999)) and Lewis (cf. Lewis (2001))
  • Chapter 7: the valuation of American options is more involved than with European options; this chapter analyzes the respective problem and introduces algorithms for American option valution via binomial trees and Monte Carlo simulation; at the center stands the Least-Squares Monte Carlo algorithm of Longstaff-Schwartz (cf. Longstaff and Schwartz (2001))
Finally, Part III ā€œMarket-Based Valuationā€ has seven chapters:
  • Chapter 8: before going into details, this chapter illustrates the whole process of a market-based valuation effort in the simple, but nevertheless still useful, setting of Merton’s jump-diffusion model (cf. Merton (1976))
  • Chapter 9: this chapter introduces the general market model used henceforth, which is from Bakshi-Cao-Chen (cf. Bakshi et al. (1997)) and which accounts for stochastic volatility, jumps and stochastic short rates
  • Chapter 10: Monte Carlo simulation is generally the method of choice for the valuation of exotic/complex index options and derivatives; this chapter therefore discusses in some detail the discretization and simulation of the stochastic volatility model by Heston (cf. Heston (1993)) with constant as well as stochastic short rates according to Cox-Ingersoll-Ross (cf. Cox et al. (1985))
  • Chapter 11: model calibration stays at the center of market-based valuation; the chapter considers several general aspects associated with this topic and then proceeds with the numerical calibration of the general market model to real market data
  • Chapter 12: this chapter combines the results from the previous two to value European and American index options via Monte Carlo simulation in the calibrated general market model
  • Chapter 13: this chapter analyzes dynamic delta hedging strategies for American options by Monte Carlo simulation in different settings, from a simple one to the calibrated market model
  • Chapter 14: this brief chapter provides a concise summary of central aspects related to the market-based valuation of index options
In addition, the book has an Appendix with one chapter:
  • Appendix A: the appendix introduces some of the most important Python concepts and libraries in a nutshell; the selection of topics is clearly influenced by the requirements of the rest of the book; those not familiar with Python or looking for details should consult the more comprehensive treatment of all relevant topics by the same author (cf. Hilpisch (2014))

1.3 Why Python?

Although Python has established itself in the financial industry as a powerful programming language with an elaborate ecosystem of tools and libraries, it is still not often used for financial, derivatives or risk analytics purposes. Languages like C++, C, C#, VBA or Java and toolboxes like Matlab or domain-specific languages like R often dominate this area. However, we see a number of good reasons to choose Python even for computationally demanding analytics tasks; the following are the most important ones we want to mention, in no particular order, (see also chapter 1 in Hilpisch (2014)):
  • open source: Python and the majority of available libraries are completely open source; this allows an entry to this technology at no cost, something particularly important for students, academics or other individuals
  • syntax: Python programming is easy to learn, the code is quite compact and in general highly readable; at universities it is increasingly used as an introduction to programming in general; when it comes to numerical or financial algorithm implementation, the syntax is pretty close to the mathematics in general (e.g. due to code vectorization approaches)
  • multi-paradigm: Python is as good for procedural programming (which suffices for the purposes of this book) as well as at object-oriented programming (which is necessary in more complex/professional contexts); it also has some functional programming features to offer
  • interpreted: Python is an interpreted language which makes rapid prototyping and development in general a bit more convenient, especially for beginners; tools like IPython Notebook and libraries like pandas for time series analysis allow for efficient and productive interactive analytics workflows
  • libraries: nowadays, there is a wealth of powerful libraries available and the supply grows steadily; there is hardly a problem that cannot be easily tackled with an existing library, be it a numerical problem, a graphical one or a data-related problem
  • speed: a common prejudice with regard to interpreted languages—compared to compiled ones like C++ or C—is the slow speed of code execution; however, financial applications are more or less all about matrix and array manipulations and operations which can be done at the speed of C code with the essential Python library NumPy for array-based computing; other performance libraries, like Numba for dynamic code compiling, can also be used to improve performance
  • market: in the London area (mainly financial services) the number of Python developer contract offerings was 485 in the t...

Table of contents

  1. Cover
  2. Series
  3. Title page
  4. Copyright
  5. Preface
  6. Chapter 1: A Quick Tour
  7. Part One: The Market
  8. Part Two: Theoretical Valuation
  9. Part Three: Market-Based Valuation
  10. Appendix A: Python in a Nutshell
  11. Bibliography
  12. Index
  13. EULA