ebook img

Modern Computational Finance: Scripting for Derivatives and xVA PDF

288 Pages·2021·3.028 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 Modern Computational Finance: Scripting for Derivatives and xVA

(cid:2) TrimSize:6inx9in Savine540786 ffirs.tex V1-09/15/2021 11:34pm Pagei Modern Computational Finance (cid:2) (cid:2) (cid:2) (cid:2) TrimSize:6inx9in Savine540786 ffirs.tex V1-09/15/2021 11:34pm Pageii (cid:2) (cid:2) (cid:2) (cid:2) TrimSize:6inx9in Savine540786 ffirs.tex V1-09/15/2021 11:34pm Pageiii Modern Computational Finance Scripting for Derivatives and xVA (cid:2) (cid:2) ANTOINE SAVINE AND JESPER ANDREASEN (cid:2) (cid:2) TrimSize:6inx9in Savine540786 ffirs.tex V1-09/15/2021 11:34pm Pageiv Copyright©2022byJohnWiley&Sons,Inc.Allrightsreserved. PublishedbyJohnWiley&Sons,Inc.,Hoboken,NewJersey. PublishedsimultaneouslyinCanada. Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedin anyformorbyanymeans,electronic,mechanical,photocopying,recording,scanning,or otherwise,exceptaspermittedunderSection107or108ofthe1976UnitedStatesCopyright Act,withouteitherthepriorwrittenpermissionofthePublisher,orauthorizationthrough paymentoftheappropriateper-copyfeetotheCopyrightClearanceCenter,Inc.,222 RosewoodDrive,Danvers,MA01923,(978)750-8400,fax(978)750-4470,orontheweb atwww.copyright.com.RequeststothePublisherforpermissionshouldbeaddressedtothe PermissionsDepartment,JohnWiley&Sons,Inc.,111RiverStreet,Hoboken,NJ07030, (201)748-6011,fax(201)748-6008,oronlineathttp://www.wiley.com/go/permission. LimitofLiability/DisclaimerofWarranty:Whilethepublisherandauthorhaveusedtheirbest effortsinpreparingthisbook,theymakenorepresentationsorwarrantieswithrespecttothe accuracyorcompletenessofthecontentsofthisbookandspecificallydisclaimanyimplied warrantiesofmerchantabilityorfitnessforaparticularpurpose.Nowarrantymaybecreated orextendedbysalesrepresentativesorwrittensalesmaterials.Theadviceandstrategies containedhereinmaynotbesuitableforyoursituation.Youshouldconsultwitha professionalwhereappropriate.Further,readersshouldbeawarethatwebsiteslistedinthis workmayhavechangedordisappearedbetweenwhenthisworkwaswrittenandwhenitis read.Neitherthepublishernorauthorsshallbeliableforanylossofprofitoranyother commercialdamages,includingbutnotlimitedtospecial,incidental,consequential,orother (cid:2) damages. (cid:2) Forgeneralinformationonourotherproductsandservicesorfortechnicalsupport,please contactourCustomerCareDepartmentwithintheUnitedStatesat(800)762-2974,outside theUnitedStatesat(317)572-3993orfax(317)572-4002. Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappearsin printmaynotbeavailableinelectronicformats.FormoreinformationaboutWileyproducts, visitourwebsiteatwww.wiley.com. LibraryofCongressCataloging-in-PublicationData Names:AntoineSavine,author.|JesperAndreasen,1970–author. Title:Moderncomputationalfinance:scriptingforderivativesandXVA/ AntoineSavineandJesperAndreasen. Description:Hoboken,NewJersey:JohnWiley&Sons,Inc.,[2022]| Includesbibliographicalreferences. Identifiers:LCCN2021036994(print)|LCCN2021036995(ebook)|ISBN 9781119540786(hardback)|ISBN9781119540816(adobepdf)|ISBN 9781119540793(epub) Subjects:LCSH:Finance—Mathematicalmodels.|Finance—Computer simulation.|Finance—Dataprocessing. Classification:LCCHG106.A5562022(print)|LCCHG106(ebook)|DDC 332.01/5195—dc23 LCrecordavailableathttps://lccn.loc.gov/2021036994 LCebookrecordavailableathttps://lccn.loc.gov/2021036995 CoverDesign:Wiley CoverImage:©kentarcajuan/GettyImages (cid:2) (cid:2) TrimSize:6inx9in Savine540786 f01.tex V1-09/13/2021 11:45pm Pagev Contents MyLifeinScriptbyJesperAndreasen xi PART I AScriptingLibraryinC++ Introduction 3 CHAPTER1 OpeningRemarks 7 Introduction 7 (cid:2) 1.1 Scriptingisnotonlyforexotics 12 (cid:2) 1.2 Scriptingisforcash-flowsnotpayoffs 13 1.3 Simulationmodels 15 1.4 Pre-processing 17 1.5 Visitors 19 1.6 ModernimplementationinC++ 21 1.7 Scripttemplates 22 CHAPTER2 ExpressionTrees 25 2.1 Intheory 25 2.2 Incode 35 CHAPTER3 Visitors 41 3.1 Thevisitorpattern 41 3.2 Thedebuggervisitor 47 3.3 Thevariableindexer 50 3.4 Pre-processors 54 v (cid:2) (cid:2) TrimSize:6inx9in Savine540786 f01.tex V1-09/13/2021 11:45pm Pagevi vi CONTENTS 3.5 Constvisitors 55 3.6 Theevaluator 57 3.7 Communicatingwithmodels 65 CHAPTER4 PuttingScriptingTogetherwithaModel 71 4.1 AsimplisticBlack-ScholesMonte-Carlosimulator 71 4.1.1 Randomnumbergenerators 71 4.1.2 Simulationmodels 73 4.1.3 Simulationengines 76 4.2 Connectingthemodeltothescriptingframework 76 CHAPTER5 CoreExtensionsandthe“Pays”Keyword 81 5.1 Intheory 81 5.2 Incode 83 PART II BasicImprovements (cid:2) (cid:2) Introduction 93 CHAPTER6 PastEvaluator 95 CHAPTER7 Macros 97 CHAPTER8 SchedulesofCash-Flows 99 CHAPTER9 SupportforDates 105 CHAPTER10 PredefinedSchedulesandFunctions 109 (cid:2) (cid:2) TrimSize:6inx9in Savine540786 f01.tex V1-09/13/2021 11:45pm Pagevii Contents vii CHAPTER11 SupportforVectors 113 11.1 Basicfunctionality 113 11.2 Advancedfunctionality 115 11.2.1 Newnodetypes 116 11.2.2 Supportintheparser 116 11.2.3 Processing 117 11.2.4 Evaluation 117 PART III AdvancedImprovements Introduction 121 CHAPTER12 LinearProducts 123 12.1 Interestratesandswaps 123 12.2 Equities,foreignexchange,andcommodities 125 12.3 Linearmodelimplementation 126 (cid:2) (cid:2) CHAPTER13 FixedIncomeInstruments 127 13.1 Delayedpayments 127 13.2 Discountfactors 128 13.3 Thesimulateddataprocessor 129 13.4 Indexing 129 13.5 Upgrading“pays”tosupportdelayedpayments 131 13.6 Annuities 132 13.7 Forwarddiscountfactors 132 13.8 Backtoequities 132 13.9 Liborandratefixings 133 13.10 Scriptsforswapsandoptions 134 CHAPTER14 MultipleUnderlyingAssets 137 14.1 Multipleassets 137 14.2 Multiplecurrencies 139 (cid:2) (cid:2) TrimSize:6inx9in Savine540786 f01.tex V1-09/13/2021 11:45pm Pageviii viii CONTENTS CHAPTER15 AmericanMonte-Carlo 143 15.1 LeastSquaresMethod 143 15.2 Oneproxy 147 15.3 Additionalregressionvariables 149 15.4 Feedbackandexercise 149 15.5 Multipleexerciseandrecursion 152 PART IV FuzzyLogicandRiskSensitivities Introduction 157 CHAPTER16 RiskSensitivitieswithMonte-Carlo 161 16.1 Riskinstabilities 161 16.2 Twoapproachestowardasolution 165 16.3 Smoothingfordigitalsandbarriers 166 16.4 Smoothingforscriptedtransactions 168 (cid:2) (cid:2) CHAPTER17 SupportforSmoothing 169 CHAPTER18 AnAutomatedSmoothingAlgorithm 175 18.1 Basicalgorithm 176 18.2 Nestedandcombinedconditions 179 18.3 Affectedvariables 179 18.4 Furtheroptimization 180 CHAPTER19 FuzzyLogic 183 CHAPTER20 ConditionDomains 189 20.1 Fuzzyevaluationofdiscreteconditions 189 20.1.1 Conditiondomains 189 20.1.2 Constantconditions 190 20.1.3 Booleanconditions 191 20.1.4 Binaryconditions 193 20.1.5 Discreteconditions 193 20.1.6 Puttingitalltogether 197 (cid:2)

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.