ebook img

Listed Volatility and Variance Derivatives: A Python-based Guide PDF

357 Pages·2016·9.527 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Listed Volatility and Variance Derivatives: A Python-based Guide

Listed Volatility and Variance Derivatives Foundedin1807,JohnWiley&Sonsistheoldestindependentpublishingcompanyinthe UnitedStates.WithofficesinNorthAmerica,Europe,AustraliaandAsia,Wileyisglob- allycommittedtodevelopingandmarketingprintandelectronicproductsandservicesfor ourcustomers’professionalandpersonalknowledgeandunderstanding. TheWileyFinanceseriescontainsbookswrittenspecificallyforfinanceandinvest- ment professionals as well as sophisticated individual investors and their financial advi- sors. Book topics range from portfolio management to e-commerce, risk management, financialengineering,valuationandfinancialinstrumentanalysis,aswellasmuchmore. Foralistofavailabletitles,visitourWebsiteatwww.WileyFinance.com. Listed Volatility and Variance Derivatives A Python-based Guide DR. YVES J. HILPISCH Thiseditionfirstpublished2017 ©2017YvesHilpisch Registeredoffice JohnWiley&SonsLtd,TheAtrium,SouthernGate,Chichester,WestSussex,PO198SQ,United Kingdom Fordetailsofourglobaleditorialoffices,forcustomerservicesandforinformationabouthowtoapply forpermissiontoreusethecopyrightmaterialinthisbookpleasevisitourwebsiteatwww.wiley.com. Therightoftheauthortobeidentifiedastheauthorofthisworkhasbeenassertedinaccordancewith theCopyright,DesignsandPatentsAct1988. Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,or transmitted,inanyformorbyanymeans,electronic,mechanical,photocopying,recordingor otherwise,exceptaspermittedbytheUKCopyright,DesignsandPatentsAct1988,withouttheprior permissionofthepublisher. Wileypublishesinavarietyofprintandelectronicformatsandbyprint-on-demand.Somematerial includedwithstandardprintversionsofthisbookmaynotbeincludedine-booksorin print-on-demand.IfthisbookreferstomediasuchasaCDorDVDthatisnotincludedintheversion youpurchased,youmaydownloadthismaterialathttp://booksupport.wiley.com.Formoreinformation aboutWileyproducts,visitwww.wiley.com. Designationsusedbycompaniestodistinguishtheirproductsareoftenclaimedastrademarks.All brandnamesandproductnamesusedinthisbookaretradenames,servicemarks,trademarksor registeredtrademarksoftheirrespectiveowners.Thepublisherisnotassociatedwithanyproductor vendormentionedinthisbook. LimitofLiability/DisclaimerofWarranty:Whilethepublisherandauthorhaveusedtheirbestefforts inpreparingthisbook,theymakenorepresentationsorwarrantieswithrespecttotheaccuracyor completenessofthecontentsofthisbookandspecificallydisclaimanyimpliedwarrantiesof merchantabilityorfitnessforaparticularpurpose.Itissoldontheunderstandingthatthepublisheris notengagedinrenderingprofessionalservicesandneitherthepublishernortheauthorshallbeliable fordamagesarisingherefrom.Ifprofessionaladviceorotherexpertassistanceisrequired,theservices ofacompetentprofessionalshouldbesought. LibraryofCongressCataloging-in-PublicationDataisavailable AcataloguerecordforthisbookisavailablefromtheBritishLibrary. ISBN978-1-119-16791-4(hbk)ISBN978-1-119-16792-1(ebk) ISBN978-1-119-16793-8(ebk)ISBN978-1-119-16794-5(ebk) CoverDesign:Wiley TopImage:©grapestock/Shutterstock BottomImage:©stocksnapper/iStock Setin10/12ptTimesbyAptaraInc.,NewDelhi,India PrintedinGreatBritainbyTJInternationalLtd,Padstow,Cornwall,UK Contents Preface xi PARTONE IntroductiontoVolatilityandVariance CHAPTER1 Derivatives,VolatilityandVariance 3 1.1 OptionPricingandHedging 3 1.2 NotionsofVolatilityandVariance 6 1.3 ListedVolatilityandVarianceDerivatives 7 1.3.1 TheUSHistory 7 1.3.2 TheEuropeanHistory 8 1.3.3 VolatilityofVolatilityIndexes 9 1.3.4 ProductsCoveredinthisBook 10 1.4 VolatilityandVarianceTrading 11 1.4.1 VolatilityTrading 11 1.4.2 VarianceTrading 13 1.5 PythonasOurToolofChoice 14 1.6 QuickGuideThroughtheRestoftheBook 14 CHAPTER2 IntroductiontoPython 17 2.1 PythonBasics 17 2.1.1 DataTypes 17 2.1.2 DataStructures 20 2.1.3 ControlStructures 22 2.1.4 SpecialPythonIdioms 23 2.2 NumPy 28 2.3 matplotlib 34 2.4 pandas 38 2.4.1 pandasDataFrameclass 39 2.4.2 Input-OutputOperations 45 2.4.3 FinancialAnalyticsExamples 47 2.5 Conclusions 53 v vi CONTENTS CHAPTER3 Model-FreeReplicationofVariance 55 3.1 Introduction 55 3.2 SpanningwithOptions 56 3.3 LogContracts 57 3.4 StaticReplicationofRealizedVarianceandVarianceSwaps 57 3.5 ConstantDollarGammaDerivativesandPortfolios 58 3.6 PracticalReplicationofRealizedVariance 59 3.7 VSTOXXasVolatilityIndex 65 3.8 Conclusions 67 PARTTWO ListedVolatilityDerivatives CHAPTER4 DataAnalysisandStrategies 71 4.1 Introduction 71 4.2 RetrievingBaseData 71 4.2.1 EUROSTOXX50Data 71 4.2.2 VSTOXXData 74 4.2.3 CombiningtheDataSets 76 4.2.4 SavingtheData 78 4.3 BasicDataAnalysis 78 4.4 CorrelationAnalysis 83 4.5 ConstantProportionInvestmentStrategies 87 4.6 Conclusions 93 CHAPTER5 VSTOXXIndex 95 5.1 Introduction 95 5.2 CollectingOptionData 95 5.3 CalculatingtheSub-Indexes 105 5.3.1 TheAlgorithm 106 5.4 CalculatingtheVSTOXXIndex 114 5.5 Conclusions 118 5.6 PythonScripts 118 5.6.1 index collect option_data.py 118 5.6.2 index_subindex_calculation.py 123 5.6.3 index_vstoxx_calculation.py 127 CHAPTER6 ValuingVolatilityDerivatives 129 6.1 Introduction 129 6.2 TheValuationFramework 129 6.3 TheFuturesPricingFormula 130 Contents vii 6.4 TheOptionPricingFormula 132 6.5 MonteCarloSimulation 135 6.6 AutomatedMonteCarloTests 141 6.6.1 TheAutomatedTesting 141 6.6.2 TheStorageFunctions 145 6.6.3 TheResults 146 6.7 ModelCalibration 153 6.7.1 TheOptionQuotes 154 6.7.2 TheCalibrationProcedure 155 6.7.3 TheCalibrationResults 160 6.8 Conclusions 163 6.9 PythonScripts 163 6.9.1 srd_functions.py 163 6.9.2 srd simulation analysis.py 167 6.9.3 srd simulation results.py 171 6.9.4 srd model calibration.py 174 CHAPTER7 AdvancedModelingoftheVSTOXXIndex 179 7.1 Introduction 179 7.2 MarketQuotesforCallOptions 179 7.3 TheSRJDModel 182 7.4 TermStructureCalibration 183 7.4.1 FuturesTermStructure 184 7.4.2 ShiftedVolatilityProcess 190 7.5 OptionValuationbyMonteCarloSimulation 191 7.5.1 MonteCarloValuation 191 7.5.2 TechnicalImplementation 192 7.6 ModelCalibration 195 7.6.1 ThePythonCode 196 7.6.2 ShortMaturity 199 7.6.3 TwoMaturities 201 7.6.4 FourMaturities 203 7.6.5 AllMaturities 205 7.7 Conclusions 209 7.8 PythonScripts 210 7.8.1 srjd fwd calibration.py 210 7.8.2 srjd_simulation.py 212 7.8.3 srjd_model_calibration.py 215 CHAPTER8 TermsoftheVSTOXXanditsDerivatives 221 8.1 TheEUROSTOXX50Index 221 8.2 TheVSTOXXIndex 221 8.3 VSTOXXFuturesContracts 223 8.4 VSTOXXOptionsContracts 224 8.5 Conclusions 225 viii CONTENTS PARTTHREE ListedVarianceDerivatives CHAPTER9 RealizedVarianceandVarianceSwaps 229 9.1 Introduction 229 9.2 RealizedVariance 229 9.3 VarianceSwaps 235 9.3.1 DefinitionofaVarianceSwap 235 9.3.2 NumericalExample 235 9.3.3 Mark-to-Market 239 9.3.4 VegaSensitivity 241 9.3.5 VarianceSwapontheEUROSTOXX50 242 9.4 Variancevs.Volatility 247 9.4.1 SquaredVariations 247 9.4.2 AdditivityinTime 247 9.4.3 StaticHedges 250 9.4.4 BroadMeasureofRisk 250 9.5 Conclusions 250 CHAPTER10 VarianceFuturesatEurex 251 10.1 Introduction 251 10.2 VarianceFuturesConcepts 252 10.2.1 RealizedVariance 252 10.2.2 NetPresentValueConcepts 252 10.2.3 TradedVarianceStrike 257 10.2.4 TradedFuturesPrice 257 10.2.5 NumberofFutures 258 10.2.6 ParVarianceStrike 258 10.2.7 FuturesSettlementPrice 258 10.3 ExampleCalculationforaVarianceFuture 258 10.4 ComparisonofVarianceSwapandFuture 265 10.5 Conclusions 268 CHAPTER11 TradingandSettlement 269 11.1 Introduction 269 11.2 OverviewofVarianceFuturesTerms 269 11.3 IntradayTrading 270 11.4 TradeMatching 274 11.5 DifferentTradedVolatilities 275 11.6 AftertheTradeMatching 277 11.7 FurtherDetails 279 11.7.1 InterestRateCalculation 279 11.7.2 MarketDisruptionEvents 280 11.8 Conclusions 280 Contents ix PARTFOUR DXAnalytics CHAPTER12 DXAnalytics–AnOverview 283 12.1 Introduction 283 12.2 ModelingRiskFactors 284 12.3 ModelingDerivatives 287 12.4 DerivativesPortfolios 290 12.4.1 ModelingPortfolios 292 12.4.2 SimulationandValuation 293 12.4.3 RiskReports 294 12.5 Conclusions 296 CHAPTER13 DXAnalytics–Square-RootDiffusion 297 13.1 Introduction 297 13.2 DataImportandSelection 297 13.3 ModelingtheVSTOXXOptions 301 13.4 CalibrationoftheVSTOXXModel 303 13.5 Conclusions 308 13.6 PythonScripts 308 13.6.1 dx srd calibration.py 308 CHAPTER14 DXAnalytics–Square-RootJumpDiffusion 315 14.1 Introduction 315 14.2 ModelingtheVSTOXXOptions 315 14.3 CalibrationoftheVSTOXXModel 320 14.4 CalibrationResults 325 14.4.1 CalibrationtoOneMaturity 325 14.4.2 CalibrationtoTwoMaturities 325 14.4.3 CalibrationtoFiveMaturities 325 14.4.4 CalibrationwithoutPenalties 331 14.5 Conclusions 332 14.6 PythonScripts 334 14.6.1 dx srjd calibration.py 334 Bibliography 345 Index 347 Preface Volatility and variance trading has evolved from something opaque to a standard tool in today’sfinancialmarkets.Themotivesfortradingvolatilityandvarianceasanassetclass ofitsownarenumerous.Amongothers,itallowsforeffectiveoptionandequityportfoliohedg- ingandriskmanagementaswellasstraightoutspeculationonfuturevolatility(index)move- ments.Thepotentialbenefitsofvolatility-andvariance-basedstrategiesarewidelyaccepted byresearchersandpractitionersalike. Withregard toproducts itmainlystartedout around 1993 withover-the-counter (OTC) varianceswaps.Ataboutthesametime,theChicagoBoardOptionsExchangeintroducedthe VIXvolatilityindex.Thisindexstillservestoday–afterasignificantchangeinitsmethod- ology – as the underlying risk factor for some of the most liquidly traded listed derivatives inthisarea.Thelistingofsuchderivativesallowsforamorestandardized,costefficientand transparentapproachtovolatilityandvariancetrading. 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 EurexAdvancedServicestutorialserieswhichusePythontoillustratethemainconceptsof volatilityandvarianceproducts.IamgratefulthatEurexallowedmetousethecontentsofthe tutorialseriesfreelyforthisbook. Pythonhasbecomenotonlyoneofthemostwidelyusedprogramminglanguagesbutalso oneofthemajortechnologyplatformsinthefinancialindustry.Itismorelikeaplatformsince thePythonecosystemprovidesawealthofpowerfullibrariesandpackagesusefulforfinancial analyticsandapplicationbuilding.Italsointegrateswellwithmanyothertechnologies,like thestatisticalprogramming language R,usedinthefinancial industry. Youcanfind linksto allPythonresourcesunderhttp://lvvd.tpq.io. IthankMichaelSchwedforprovidingpartsofthePythoncode.Ialsothankmyfamily foralltheirloveandsupportovertheyears,especiallymywifeSandraandourchildrenLilli andHenry.IdedicatethisbooktomybeloveddogJil.Imissyou. Yves Voelklingen,Saarland,April2016 xi

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.