Listed Volatility and Variance Derivatives: A Python-based Guide
()
About this ebook
Leverage Python for expert-level volatility and variance derivative trading
Listed Volatility and Variance Derivatives is a comprehensive treatment of all aspects of these increasingly popular derivatives products, and has the distinction of being both the first to cover European volatility and variance products provided by Eurex and the first to offer Python code for implementing comprehensive quantitative analyses of these financial products. For those who want to get started right away, the book is accompanied by a dedicated Web page and a Github repository that includes all the code from the book for easy replication and use, as well as a hosted version of all the code for immediate execution.
Python is fast making inroads into financial modelling and derivatives analytics, and recent developments allow Python to be as fast as pure C++ or C while consisting generally of only 10% of the code lines associated with the compiled languages. This complete guide offers rare insight into the use of Python to undertake complex quantitative analyses of listed volatility and variance derivatives.
- Learn how to use Python for data and financial analysis, and reproduce stylised facts on volatility and variance markets
- Gain an understanding of the fundamental techniques of modelling volatility and variance and the model-free replication of variance
- Familiarise yourself with micro structure elements of the markets for listed volatility and variance derivatives
- Reproduce all results and graphics with IPython/Jupyter Notebooks and Python codes that accompany the book
Listed Volatility and Variance Derivatives is the complete guide to Python-based quantitative analysis of these Eurex derivatives products.
Yves Hilpisch
Dr. Yves J. Hilpisch is the founder and CEO of The Python Quants (http://home.tpq.io), a group focusing on the use of open source technologies for financial data science, artificial intelligence, algorithmic trading, and computational finance. He is also the founder and CEO of The AI Machine (http://aimachine.io), a company focused on AI-powered algorithmic trading based on a proprietary strategy execution platform. Yves has a Diploma in Business Administration, a Ph.D. in Mathematical Finance, and is Adjunct Professor for Computational Finance. Yves is the author of five books (https://home.tpq.io/books): Artificial Intelligence in Finance (O’Reilly, forthcoming)Python for Algorithmic Trading (O’Reilly, forthcoming)Python for Finance (2018, 2nd ed., O’Reilly)Listed Volatility and Variance Derivatives (2017, Wiley Finance)Derivatives Analytics with Python (2015, Wiley Finance) Yves is the director of the first online training program leading to University Certificates in Python for Algorithmic Trading (https://home.tpq.io/certificates/pyalgo) and Computational Finance (https://home.tpq.io/certificates/compfin). He also lectures on computational finance, machine learning, and algorithmic trading at the CQF Program (http://cqf.com). Yves is the originator of the financial analytics library DX Analytics (http://dx-analytics.com) and organizes Meetup group events, conferences, and bootcamps about Python, artificial intelligence, and algorithmic trading in London (http://pqf.tpq.io), New York (http://aifat.tpq.io), Frankfurt, Berlin, and Paris. He has given keynote speeches at technology conferences in the United States, Europe, and Asia.
Read more from Yves Hilpisch
Wiley Finance
Related to Listed Volatility and Variance Derivatives
Titles in the series (100)
Convertible Arbitrage: Insights and Techniques for Successful Hedging Rating: 4 out of 5 stars4/5Salomon Smith Barney Guide to Mortgage-Backed and Asset-Backed Securities Rating: 0 out of 5 stars0 ratingsPrivate Equity: History, Governance, and Operations Rating: 0 out of 5 stars0 ratingsMergers: What Can Go Wrong and How to Prevent It Rating: 0 out of 5 stars0 ratingsRisk Budgeting: Portfolio Problem Solving with Value-at-Risk Rating: 0 out of 5 stars0 ratingsThe Risk Management Process: Business Strategy and Tactics Rating: 4 out of 5 stars4/5Environmental Finance: A Guide to Environmental Risk Assessment and Financial Products Rating: 1 out of 5 stars1/5The Mechanics of Securitization: A Practical Guide to Structuring and Closing Asset-Backed Security Transactions Rating: 0 out of 5 stars0 ratingsInvestor's Guide to Loss Recovery: Rights, Mediation, Arbitration, and other Strategies Rating: 0 out of 5 stars0 ratingsThe Business of Options: Time-Tested Principles and Practices Rating: 0 out of 5 stars0 ratingsQuantitative Methods in Derivatives Pricing: An Introduction to Computational Finance Rating: 2 out of 5 stars2/5Financial Simulation Modeling in Excel: A Step-by-Step Guide Rating: 3 out of 5 stars3/5How to Create and Manage a Hedge Fund: A Professional's Guide Rating: 4 out of 5 stars4/5Asian Financial Statement Analysis: Detecting Financial Irregularities Rating: 0 out of 5 stars0 ratingsEquity Derivatives: Theory and Applications Rating: 0 out of 5 stars0 ratingsPrivate Equity: Transforming Public Stock to Create Value Rating: 0 out of 5 stars0 ratingsTrimTabs Investing: Using Liquidity Theory to Beat the Stock Market Rating: 0 out of 5 stars0 ratingsStrategic Corporate Tax Planning Rating: 0 out of 5 stars0 ratingsThe Securitization Markets Handbook: Structures and Dynamics of Mortgage- and Asset-backed Securities Rating: 0 out of 5 stars0 ratingsCredit Risk Measurement: New Approaches to Value at Risk and Other Paradigms Rating: 0 out of 5 stars0 ratingsMiddle Market M & A: Handbook for Investment Banking and Business Consulting Rating: 4 out of 5 stars4/5Investment Manager Analysis: A Comprehensive Guide to Portfolio Selection, Monitoring and Optimization Rating: 4 out of 5 stars4/5Financial Modeling Using Excel and VBA Rating: 0 out of 5 stars0 ratingsInternational Applications of U.S. Income Tax Law: Inbound and Outbound Transactions Rating: 0 out of 5 stars0 ratingsHedge Fund Course Rating: 1 out of 5 stars1/5Risk Transfer: Derivatives in Theory and Practice Rating: 0 out of 5 stars0 ratingsBusiness Exit Planning: Options, Value Enhancement, and Transaction Management for Business Owners Rating: 5 out of 5 stars5/5The Exchange-Traded Funds Manual Rating: 0 out of 5 stars0 ratingsManaging Global Financial and Foreign Exchange Rate Risk Rating: 0 out of 5 stars0 ratingsEnergy and Power Risk Management: New Developments in Modeling, Pricing, and Hedging Rating: 1 out of 5 stars1/5
Related ebooks
Financial Engineering and Arbitrage in the Financial Markets Rating: 0 out of 5 stars0 ratingsExtreme Events: Robust Portfolio Construction in the Presence of Fat Tails Rating: 0 out of 5 stars0 ratingsFinancial Simulation Modeling in Excel: A Step-by-Step Guide Rating: 3 out of 5 stars3/5Foreign Exchange Option Pricing: A Practitioner's Guide Rating: 0 out of 5 stars0 ratingsActiveBeta Indexes: Capturing Systematic Sources of Active Equity Returns Rating: 0 out of 5 stars0 ratingsThe Money Formula: Dodgy Finance, Pseudo Science, and How Mathematicians Took Over the Markets Rating: 5 out of 5 stars5/5Practical Portfolio Performance Measurement and Attribution Rating: 3 out of 5 stars3/5Tactical Portfolios: Strategies and Tactics for Investing in Hedge Funds and Liquid Alternatives Rating: 0 out of 5 stars0 ratingsMeasuring and Managing Liquidity Risk Rating: 0 out of 5 stars0 ratingsQuantitative Investment Analysis Rating: 0 out of 5 stars0 ratingsHedge Fund Course Rating: 1 out of 5 stars1/5Visual Guide to Hedge Funds Rating: 0 out of 5 stars0 ratingsFixed Income Markets: Management, Trading and Hedging Rating: 0 out of 5 stars0 ratingsManaged Futures for Institutional Investors: Analysis and Portfolio Construction Rating: 0 out of 5 stars0 ratingsApplied Portfolio Management: How University of Kansas Students Generate Alpha to Beat the Street Rating: 3 out of 5 stars3/5Modern Computational Finance: AAD and Parallel Simulations Rating: 0 out of 5 stars0 ratingsQuantitative Equity Investing: Techniques and Strategies Rating: 4 out of 5 stars4/5Fourier Transform Methods in Finance Rating: 0 out of 5 stars0 ratingsFixed Income Securities: Tools for Today's Markets Rating: 0 out of 5 stars0 ratingsThe Mathematics of Derivatives Securities with Applications in MATLAB Rating: 0 out of 5 stars0 ratingsFinite Difference Methods in Financial Engineering: A Partial Differential Equation Approach Rating: 0 out of 5 stars0 ratingsPaul Wilmott on Quantitative Finance Rating: 3 out of 5 stars3/5Derivatives Demystified: A Step-by-Step Guide to Forwards, Futures, Swaps and Options Rating: 3 out of 5 stars3/5Market Risk Analysis, Quantitative Methods in Finance Rating: 5 out of 5 stars5/5The Volatility Smile Rating: 0 out of 5 stars0 ratingsAdvanced Bond Portfolio Management: Best Practices in Modeling and Strategies Rating: 0 out of 5 stars0 ratingsHandbook of Market Risk Rating: 4 out of 5 stars4/5Hedge Fund Modelling and Analysis Using Excel and VBA Rating: 0 out of 5 stars0 ratings
Finance & Money Management For You
How to Make Money in Stocks: A Winning System in Good Times and Bad, Fourth Edition Rating: 5 out of 5 stars5/5The Intelligent Investor, Rev. Ed: The Definitive Book on Value Investing Rating: 4 out of 5 stars4/5The Richest Man in Babylon Rating: 4 out of 5 stars4/5The Book on Advanced Tax Strategies: Cracking the Code for Savvy Real Estate Investors Rating: 4 out of 5 stars4/5The Psychology of Money: Timeless lessons on wealth, greed, and happiness Rating: 5 out of 5 stars5/5Financial Words You Should Know: Over 1,000 Essential Investment, Accounting, Real Estate, and Tax Words Rating: 4 out of 5 stars4/5Quiet Leadership: Six Steps to Transforming Performance at Work Rating: 4 out of 5 stars4/5Strategy Skills: Techniques to Sharpen the Mind of the Strategist Rating: 4 out of 5 stars4/5Principles: Life and Work Rating: 4 out of 5 stars4/5The 7 Habits of Highly Effective People: 15th Anniversary Infographics Edition Rating: 5 out of 5 stars5/5Good to Great: Why Some Companies Make the Leap...And Others Don't Rating: 4 out of 5 stars4/5Buy, Rehab, Rent, Refinance, Repeat: The BRRRR Rental Property Investment Strategy Made Simple Rating: 5 out of 5 stars5/5The Total Money Makeover by Dave Ramsey: Summary and Analysis Rating: 4 out of 5 stars4/5The Great Reset: And the War for the World Rating: 4 out of 5 stars4/5Set for Life: An All-Out Approach to Early Financial Freedom Rating: 4 out of 5 stars4/5The Great Awakening: Defeating the Globalists and Launching the Next Great Renaissance Rating: 4 out of 5 stars4/5Alchemy: The Dark Art and Curious Science of Creating Magic in Brands, Business, and Life Rating: 4 out of 5 stars4/5The Price of Tomorrow: Why Deflation is the Key to an Abundant Future Rating: 5 out of 5 stars5/5Built to Last: Successful Habits of Visionary Companies Rating: 4 out of 5 stars4/5Just Keep Buying: Proven ways to save money and build your wealth Rating: 5 out of 5 stars5/5You Can Be a Stock Market Genius: Uncover the Secret Hiding Places of Stock Market P Rating: 4 out of 5 stars4/5The Tax and Legal Playbook: Game-Changing Solutions To Your Small Business Questions Rating: 3 out of 5 stars3/5Capitalism and Freedom Rating: 4 out of 5 stars4/5
Reviews for Listed Volatility and Variance Derivatives
0 ratings0 reviews
Book preview
Listed Volatility and Variance Derivatives - Yves Hilpisch
Preface
Volatility and variance trading has evolved from something opaque to a standard tool in today’s financial markets. The motives for trading volatility and variance as an asset class of its own are numerous. Among others, it allows for effective option and equity portfolio hedging and risk management as well as straight out speculation on future volatility (index) movements. The potential benefits of volatility- and variance-based strategies are widely accepted by researchers and practitioners alike.
With regard to products it mainly started out around 1993 with over-the-counter (OTC) variance swaps. At about the same time, the Chicago Board Options Exchange introduced the VIX volatility index. This index still serves today – after a significant change in its methodology – as the underlying risk factor for some of the most liquidly traded listed derivatives in this area. The listing of such derivatives allows for a more standardized, cost efficient and transparent approach to volatility and variance trading.
This book covers some of the most important listed volatility and variance derivatives with a focus on products provided by Eurex. Larger parts of the content are based on the Eurex Advanced Services tutorial series which use Python to illustrate the main concepts of volatility and variance products. I am grateful that Eurex allowed me to use the contents of the tutorial series freely for this book.
Python has become not only one of the most widely used programming languages but also one of the major technology platforms in the financial industry. It is more like a platform since the Python ecosystem provides a wealth of powerful libraries and packages useful for financial analytics and application building. It also integrates well with many other technologies, like the statistical programming language R, used in the financial industry. You can find links to all Python resources under http://lvvd.tpq.io.
I thank Michael Schwed for providing parts of the Python code. I also thank my family for all their love and support over the years, especially my wife Sandra and our children Lilli and Henry. I dedicate this book to my beloved dog Jil. I miss you.
YVES
Voelklingen, Saarland, April 2016
Part One
Introduction to Volatility and Variance
CHAPTER 1
Derivatives, Volatility and Variance
The first chapter provides some background information for the rest of the book. It mainly covers concepts and notions of importance for later chapters. In particular, it shows how the delta hedging of options is connected with variance swaps and futures. It also discusses different notions of volatility and variance, the history of traded volatility and variance derivatives as well as why Python is a good choice for the analysis of such instruments.
1.1 Option Pricing and Hedging
In the Black-Scholes-Merton (1973) benchmark model for option pricing, uncertainty with regard to the single underlying risk factor S (stock price, index level, etc.) is driven by a geometric Brownian motion with stochastic differential equation (SDE)
numbered Display EquationThroughout we may think of the risk factor as being a stock index paying no dividends. St is then the level of the index at time t, μ the constant drift, σ the instantaneous volatility and Zt is a standard Brownian motion. In a risk-neutral setting, the drift μ is replaced by the (constant) risk-less short rate r
numbered Display EquationIn addition to the index which is assumed to be directly tradable, there is also a risk-less bond B available for trading. It satisfies the differential equation
numbered Display EquationIn this model, it is possible to derive a closed pricing formula for a vanilla European call option C maturing at some future date T with payoff max [ST − K, 0], K being the fixed strike price. It is
numbered Display Equationwhere
numbered Display EquationThe price of a vanilla European put option P with payoff max [K − ST, 0] is determined by put-call parity as
numbered Display EquationThere are multiple ways to derive this famous Black-Scholes-Merton formula. One way relies on the construction of a portfolio comprised of the index and the risk-less bond that perfectly replicates the option payoff at maturity. To avoid risk-less arbitrage, the value of the option must equal the payoff of the replicating portfolio. Another method relies on calculating the risk-neutral expectation of the option payoff at maturity and discounting it back to the present by the risk-neutral short rate. For detailed explanations of these approaches refer, for example, to Björk (2009).
Yet another way, which we want to look at in a bit more detail, is to perfectly hedge the risk resulting from an option (e.g. from the point of view of a seller of the option) by dynamically trading the index and the risk-less bond. This approach is usually called delta hedging (see Sinclair (2008), ch. 1). The delta of a European call option is given by the first partial derivative of the pricing formula with respect to the value of the risk factor, i.e. . More specifically, we get
numbered Display EquationWhen trading takes place continuously, the European call option position hedged by δt index units short is risk-less:
numbered Display EquationThis is due to the fact that the only (instantaneous) risk results from changes in the index level and all such (marginal) changes are compensated for by the delta short index position.
Continuous models and trading are a mathematically convenient description of the real world. However, in practice trading and therefore hedging can only take place at discrete points in time. This does not lead to a complete breakdown of the delta hedging approach, but it introduces hedge errors. If hedging takes place at every discrete time interval of length Δt, the Profit-Loss (PL) for such a time interval is roughly (see Bossu (2014), p. 59)
numbered Display EquationΓ is the gamma of the option and measures how the delta (marginally) changes with the changing index level. ΔS is the change in the index level over the time interval Δt. It is given by
numbered Display EquationΘ is the theta of the option and measures how the option value changes with the passage of time. It is given approximately by (see Bossu (2014), p. 60)
numbered Display EquationWith this we get
numbered Display EquationThe quantity is called the dollar gamma of the option and gives the second order change in the option price induced by a (marginal) change in the index level. is the squared realized return over the time interval Δt – it might be interpreted as the (instantaneously) realized variance if the time interval is short enough and the drift is close to zero. Finally, is the fixed, theoretical
variance in the model for the time interval.
The above reasoning illustrates that the PL of a discretely delta hedged option position is determined by the difference between the realized variance during the discrete hedge interval and the theoretically expected variance given the model parameter for the volatility. The total hedge error over intervals is given by
(1.1)
numbered Display EquationThis little exercise in option hedging leads us to a result which is already quite close to a product intensively discussed in this book: listed variance futures. Variance futures, and their Over-the-Counter (OTC) relatives variance swaps, pay to the holder the difference between realized variance over a certain period of time and a fixed variance strike.
1.2 Notions of Volatility and Variance
The previous section already touches on different notions of volatility and variance. This section provides formal definitions for these and other quantities of importance. For a more detailed exposition refer to Sinclair (2008). In what follows we assume that a time series is given with quotes Sn, n ∈ {0, …, N} (see Hilpisch (2015, ch. 3)). We do not assume any specific model that might generate the time series data. The log return for n > 0 is defined by
numbered Display Equationrealized or historical volatility: this refers to the standard deviation of the log returns of a financial time series; suppose we observe N (past) log returns Rn, n ∈ {1, …, N}, with mean return ; the realized or historical volatility is then given by
numbered Display Equationinstantaneous volatility: this refers to the volatility factor of a diffusion process; for example, in the Black-Scholes-Merton model the instantaneous volatility σ is found in the respective (risk-neutral) stochastic differential equation (SDE)
numbered Display Equationimplied volatility: this is the volatility that, if put into the Black-Scholes-Merton option pricing formula, gives the market-observed price of an option; suppose we observe today a price of C*0 for a European call option; the implied volatility σimp is the quantity that solves ceteris paribus the implicit equation
numbered Display EquationThese volatilities all have squared counterparts which are then named variance, such as realized variance, instantenous variance or implied variance. We have already encountered realized variance in the previous section. Let us revisit this quantity for a moment. Simply applying the above definition of realized volatility and squaring it we get
numbered Display EquationIn practice, however, this definition usually gets adjusted to
numbered Display EquationThe drift of the process is assumed to be zero and only the log return terms get squared. It is also common practice to use the definition for the uncorrected (biased) standard deviation with factor instead of the definition for the corrected (unbiased) standard deviation with factor . This explains why we call the term from the delta hedge PL in the previous section realized variance over the time interval Δt. In that case, however, the return is the simple return instead of the log return.
Other adjustments in practice are to scale the value to an annual quantity by multiplying it by 252 (trading days) and to introduce an additional scaling term (to get percent values instead of decimal ones). One then usually ends up with (see chapter 9, Realized Variance and Variance Swaps)
numbered Display EquationLater on we will also drop the hat notation when there is no ambiguity.
1.3 Listed Volatility and Variance Derivatives
Volatility is one of the most important notions and concepts in derivatives pricing and analytics. Early research and financial practice considered volatility as a major input for pricing and hedging. It is not that long ago that the market started thinking of volatility as an asset class of its own and designed products to make it directly tradable.
The idea for a volatility index was conceived by Brenner and Galai in 1987 and published in the note Brenner and Galai (1989) in the Financial Analysts Journal. They write in their note:
‘‘While there are efficient tools for hedging against general changes in overall market directions, so far there are no effective tools available for hedging against changes in volatility. … We therefore propose the construction of three volatility indexes on which cash-settled options and futures can be traded."
In what follows, we focus on the US and European markets.
1.3.1 The US History
The Chicago Board Options Exchange (CBOE) introduced an equity volatility index, called VIX, in 1993. It was based on a methodology developed by Fleming, Ostdiek and Whaley (1995) – a working paper version of which was circulated in 1993 – and data from S&P 100 index options. The methodology was changed in 2003 to the now standard practice which uses the robust, model free replication results for variance (see chapter 3 Model-Free Replication of Variance) and data from S&P 500 index options (see CBOE (2003)). While the first version represented a proxy for the 30 day at-the-money implied volatility, the current version is a proxy for the 30 day variance swap rate, i.e. the fixed variance strike which gives a zero value for a respective swap at inception.
Carr and Lee (2009) provide a brief history of both OTC and listed volatility and variance products. They claim that the first OTC variance swap has been engineered and offered by Union Bank of Switzerland (UBS) in 1993, at about the same time the CBOE announced the VIX. These were also the first traded contracts to attract some liquidity in contrast to volatility swaps which were also introduced shortly afterwards. One reason for this