Mathematical Techniques inFinance
AnIntroduction
AMIRSADR
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)646-8600,orontheweb atwww.copyright.com.RequeststothePublisherforpermissionshouldbeaddressedtothe PermissionsDepartment,JohnWiley&Sons,Inc.,111RiverStreet,Hoboken,NJ07030, (201)748-6011,fax(201)748-6008.
LimitofLiability/DisclaimerofWarranty:Whilethepublisherandauthorshaveusedtheir besteffortsinpreparingthiswork,theymakenorepresentationsorwarrantieswithrespectto theaccuracyorcompletenessofthecontentsofthisworkandspecificallydisclaimall warranties,includingwithoutlimitationanyimpliedwarrantiesofmerchantabilityorfitness foraparticularpurpose.Nowarrantymaybecreatedorextendedbysalesrepresentatives, writtensalesmaterialsorpromotionalstatementsforthiswork.Thefactthatan organization,website,orproductisreferredtointhisworkasacitationand/orpotential sourceoffurtherinformationdoesnotmeanthatthepublisherandauthorsendorsethe informationorservicestheorganization,website,orproductmayprovideor recommendationsitmaymake.Thisworkissoldwiththeunderstandingthatthepublisheris notengagedinrenderingprofessionalservices.Theadviceandstrategiescontainedherein maynotbesuitableforyoursituation.Youshouldconsultwithaspecialistwhere appropriate.Further,readersshouldbeawarethatwebsiteslistedinthisworkmayhave changedordisappearedbetweenwhenthisworkwaswrittenandwhenitisread.Neitherthe publishernorauthorsshallbeliableforanylossofprofitoranyothercommercialdamages, includingbutnotlimitedtospecial,incidental,consequential,orotherdamages.
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:Sadr,Amir,author.
Title:Mathematicaltechniquesinfinance:anintroduction/AmirSadr.
Description:Hoboken,NewJersey:JohnWiley&Sons,Inc.,[2022] | Series:Wileyfinanceseries | Includesindex.
Identifiers:LCCN2022000565(print) | LCCN2022000566(ebook) | ISBN 9781119838401(cloth) | ISBN9781119838425(adobepdf) | ISBN 9781119838418(epub)
Subjects:LCSH:Finance–Mathematicalmodels.
Classification:LCCHG106.S232022(print) | LCCHG106(ebook) | DDC 332.01/5195–dc23/eng/20220112
LCrecordavailableathttps://lccn.loc.gov/2022000565
LCebookrecordavailableathttps://lccn.loc.gov/2022000566
CoverDesign:Wiley
CoverImage:©StationaryTraveller/Getty
Tomystudents
5.2.1Probability-FreePricing
5.2.2NoArbitrage
5.2.3Risk-Neutrality
5.3.1Self-Financing,DynamicHedging
5.3.2IteratedExpectation
5.4.1Risk-NeutralValuation
6.2Black-Scholes-MertonCallFormula145
6.2.1Put-CallParity
6.2.2Black’sFormula:OptionsonForwards
6.4.1GreeksFormulas
6.4.2GammaversusTheta
6.4.3Delta,GammaversusTime
6.5.1Black-Scholes-MertonPDE
6.5.2CallFormulaandHeatEquation
6.6CRRBinomialModel165
6.6.1CRRGreeks
6.7.1AmericanCallOptions
6.7.2BackwardInduction
CHAPTER7
7.1.1ZeroCurve
7.1.2ForwardRateCurve
7.2.1SwapValuation
7.2.2Swap
7.2.3DiscountingtheForwards
7.2.4SwapRateasAverageForwardRate
7.3.1Black’sNormalModel
7.3.2CapsandFloors
7.4.1MoneyMarketAccount,ShortRate
7.4.2ShortRateModels
7.4.3MeanReversion,VasicekandHull-White
7.4.4ShortRateLatticeModel
7.4.5PureSecurities
Preface
Financeasadistinctfieldfromeconomicsisgenerallydefinedasthescience orstudyofthemanagementoffunds.Thecreationofcredit,savings, investments,bankinginstitutions,financialmarketsandproducts,andrisk managementallfallunderthepurviewoffinance.Theunifyingthemesin financearetime,risk,andmoney.
Mathematicalorquantitativefinanceistheapplicationofmathematicstothesecoreareas.Whilesimplearithmeticwasenoughforaccounting andkeepingledgersanddouble-entrybookkeeping,LouisBachelier’sdoctoralthesis, Théoriedelaspéculation andpublishedin1900,usedBrownian motiontostudystockprices,andiswidelyrecognizedasthebeginningof quantitativefinance.Sincethen,theuseofincreasinglysophisticatedand specializedmathematicshascreatedthemodernfieldofquantitativefinance encompassinginvestmenttheory,assetpricing,derivatives,financialdata science,andtheemergingareaofcryptoassetsandDecentralizedFinance (DeFi).
BACKGROUND
Thisbookisthecollectionofmylecturenotesforanelectiveseniorlevel undergraduatecourseonmathematicsoffinanceatNYUCourant.The mostlyseniorandsomefirstyeargraduatestudentscomefromdifferent majorswithanevendistributionofmathematics,engineering,economics, andbusinessmajors.Theprerequisitesforthebookarethesameasthe onesforthecourse:basiccalculus,probability,andlinearalgebra.Thegoal ofthebookistointroducethemathematicaltechniquesusedindifferent areasoffinanceandhighlighttheirusagebydrawingfromactualmarkets andproducts.
BOOKSTRUCTURE
Asimpledefinitionoffinancewouldbethestudyofmoney;quantitative financecouldbethoughtofasthe mathematicsofmoney.Whilereductiveandsimplistic,thisbookusesthismetaphorand followsthemoney
acrossdifferentmarketstomotivateandintroduceconceptsandmathematicaltechniques.
Bonds
InChapter2,westartwiththebasicbuildingblocksofinterestratesandtime valueofmoneytopriceanddiscountfuturecashflowsforfixedincomeand bondmarkets.Theconceptofcompoundinterestanditslimitascontinuous compoundingisthefirstforayintomathematicsoffinance.Couponbonds makeregularinterestpayments,andweintroducetheGeometricseriesto derivetheclassicbondprice-yieldformula.
Asthereisgenerallynoclosedformformulaforimpliedcalculations suchasimpliedyieldorvolatilitygivenabondoroptionprice,these calculationsrequirenumericalroot-solvingmethodsandwepresentthe Newton-Raphsonmethodandthemorerobustandpopularbisection method.
Theconceptofriskisintroducedbyconsideringthebondpricesensitivitytointerestrates.TheTaylorseriesexpansionofafunctionprovides thefirstandsecondordersensitivitiesleadingtodurationandconvexityfor bondsinChapter2,anddeltaandgammaforoptionsinChapter6.Similar firstandsecondordermeasuresarethebasisofthemean-variancetheoryof portfolioselectioninChapter3.
IntheUnitedStates,householdsholdthelargestamountofnetworth, followedbyfirms,whiletheU.S.governmentrunsanegativebalanceand isindebt.Mostofconsumerfinanceassetsandliabilitiesareintheformof levelpayhomemortgage,student,andautoloans.Theseproductscanstill betackledbytheapplicationoftheGeometricseries,andwecancalculate variousmeasuressuchasaveragelifeandtimetopayagivenfractionofthe loanviatheseformulas.Alargepartofconsumerhomemortgageloansare securitizedasmortgage-backedsecuritiesbycompaniesoriginallysetupby theU.S.governmenttopromotehomeownershipandstudentloans.The footprintofthesegiantsinthefinancialmarketsislargeandisthemain driverofstructuredfinance.Weintroducetoolsandtechniquestoquantify thenegativeconvexityriskduetoprepaymentsforthesemarkets.
Whiletheanalyticalprice-yieldformulaforbonds,loans,and mortgage-backedsecuritiescanprovidepricingandriskmeasuresforsingle productsinisolation,avarietyofbondsandfixedincomeproductstrade simultaneouslyinmarketsgivingrisetodifferentyieldandspreadcurves. Weintroducethebootstrapandinterpolationmethodstohandleyields curvesandoverlappingcashflowsofmultipleinstrumentsinaconsistent manner.
Stocks,Investments
InChapter3,wefocusoninvestmentsandtheinterplaybetweenrisk-free andriskyassets.WepresenttheSt.Petersburgparadoxtomotivatethe conceptofutilityandtohighlighttheproblemofinvestmentchoice, ranking,anddecision-makingunderuncertainty.Weintroducetheconcept ofrisk-preferenceandshowthepersonalistnatureofrankingofrandom payoffs.Wepresentutilitytheoryanditsaxioms,certainty-equivalentlotteries,anddifferentmeasuresofrisk-preference(risk-taking,risk-aversion, risk-neutrality)ascharacterizedbytheutilityfunction.Utilityfunctions representingdifferentclassesofArrow-Prattmeasures(CARA,CRRA, HARA)areintroducedanddiscussed.
Themean-variancetheoryofportfolioselectiondrawsfromthe techniquesofconstrainedandconvexoptimization,andwediscussand showthemethodofLagrangemultipliersinvariouscalculationssuchas theminimum-varianceportfolio,minimum-variancefrontier,andtangency (market)portfolio.TheseminalCAPMformularelatingtheexcessreturn ofanassettothatofthemarketportfolioisderivedbyusingthechainrule andpropertiesofthehyperbolaoffeasibleportfolios.
Movingfromequilibriumresults,wenextintroducestatisticaltechniquessuchasregression,factormodels,andPCAtofindcommondriversof assetreturnsandstatisticalmeasuressuchasthealphaandbetaofportfolio performance.Tradingstrategiessuchaspairstradingandmean-reversion tradesarebasedonthesemethods.Weconcludebyshowingtheuseof recurrenceequationsandoptimizationtechniquesforriskandmoney managementleadingtothegambler’sruinformulaandKelly’sratio.
Forwards,Futures
InChapter4,weintroducetheforwardcontractasthegatewayproductto morecomplicatedcontingentclaimsandoptionsandderivatives.Thebasic cash-and-carryargumentshowsthemethodofstaticreplicationandarbitragepricing.Thismethodisusedtocomputeforwardpricesinequities withdiscretedividendsordividendyields,forwardexchangerateviacoveredinterestparity,andforwardratesininterestratemarkets.
Risk-NeutralOptionPricing
Chapter5presentsthebuildingblocksofthemodernrisk-neutralpricing framework.Startingwithasimpleone-stepbinomialmodel,wefleshout thefulldetailsofthereplicationofacontingentclaimviatheunderlying
assetandaloanandshowthatacontingentclaim’sreplicationpricecan becomputedbytakingexpectationsinarisk-neutralsetting.Thisbasic buildingblockisextendedtomultiplestepsthroughdynamichedgingofa self-financingreplicatingportfolio,leadingtomartingalerelativepricesand thefundamentaltheoremsofassetpricingforcompleteandarbitrage-free economies.
OptionPricing
InChapter6,weusetherisk-neutralframeworktoderivetheBlackScholes-Merton(BSM)optionpricingformulabymodelingassetreturns asthecontinuous-timelimitofarandomwalk,thatisaBrownianmotion withrisk-adjusteddrift.WerecoverandinvestigatetheunderlyingreplicatingportfoliobyconsideringtheoptionGreeks:delta,gamma,theta. TheinterplaybetweentheseisshownbyapplyingtheIto’slemmatothe diffusionprocessdrivinganunderlyingassetanditsderivative,leadingto theBSMpartialdifferentialequationanditssolutionviamethodsfromthe classicalboundaryvalueheatequations.
WediscusstheCox-Ross-Rubinstein(CRR)modelasapopularand practicalcomputationalmethodforpricingoptionsthatcanalsobeused tocomputethepriceofoptionswithearlyexercisefeaturesviathebackwardinductionalgorithmfromdynamicprogramming.Forpath-dependent optionssuchasbarrieroraveragingoptions,wepresentnumericalmodels suchastheMonteCarlosimulationmodelsandvariancereductiontechniques.
InterestRateDerivatives
Chapter7introducesinterestrateswapsandtheirderivativesusedin structuredfinance.Aplainvanillaswapcanbepricedviaastaticreplication argumentfromabootstrappeddiscountfactorcurve.Inpractice,simple Europeanoptionsonswapsandinterestrateproductsarepricedand risk-managedviathenormalversionofBlack’sformulaforfutures.We introducethismodelundertherisk-neutralpricingframeworkandshow thepricingofthemainstreamcap/floors,Europeanswaptions,andCMS products.Forcomplexderivatives,oneneedsamodelfortheevolution ofmultiplematurityzero-couponbondsinarisk-neutralframework.We presentthepopularHull-Whitemean-revertingmodelfortheshortrate andshowthetypicalimplementationmethodsandtechniques,suchas theforwardinductionmethodforyieldcurveinversion.Weshowthe pricingofBermudanswaptionsviatheselatticemodels.Weconcludeour discussionbypresentingmethodsforcalculatinginterestratecurverisk andVaR.
ExercisesandPythonProjects
Theend-of-chapterexercisesarebasedonreal-worldmarketsandproducts anddelvedeeperintosomefinancialproductsandhighlightthedetailsof applyingthetechniquestothem.Allexercisescanbesolvedbyusinga spreadsheetpackagelikeExcel.ThePythonprojectsarelongerproblems andcanbedonebysmallgroupsofstudentsasatermproject.
Itismyhopethatbytheendofthisbook,readershaveobtainedagood toolkitofmathematicaltechniques,methods,andmodelsusedinfinancial marketsandproducts,andtheirinterestispiquedforadeeperjourneyinto quantitativefinance.
NewYork,NewYork December2021
—AmirSadr
OnelearnsbyteachingandIhavelearnedmuchfrommystudentsatNYU. Manythankstoallofmystudentsovertheyearswhohaveaskedgood questionsandkeptmeonmytoes.
ThankstomyeditorsatJohnWiley&Sons:BillFalloon,PurviPatel, SamanthaEnders,JulieKerr,andSelvakumaranRajendiranforpatiently walkingmethroughthisprojectandcorrectingmymanytypos.Allremainingerrorsaremine,andIwelcomeanycorrections,suggestions,andcommentssenttoasadr@panalytix.com.
AmirSadr receivedhisPhDfromCornellUniversitywithhisthesisworkon theFoundationsofProbabilityTheory.AfterworkingatAT&TBellLaboratories,hestartedhisWallStreetcareeratMorganStanley,initiallyasa VicePresidentinquantitativemodelinganddevelopmentofexoticinterest ratemodels,andlaterasanexoticstrader.HefoundedPanalytix,Inc.,to developfinancialsoftwareforpricingandriskmanagementofinterestrate derivatives.HewasaManagingDirectorforproprietarytradingatGreenwichCapital,SeniorTraderinchargeofCADexoticsandUSDinflation tradingatHSBC,theCOOofBrevanHowardU.S.AssetManagementin theUnitedStates,andco-founderofYieldCurveTrading,afixedincome proprietarytradingfirm.HeiscurrentlyapartneratCorePointPartners andisfocusedoncryptoandDeFi.
Acronyms
bpbasispoints,1%of1%,0.0001
FV futurevalue
IRRinternalrateofreturn
PnLprofitandloss
PV presentvalue
YTMyieldtomaturity
p.a.perannum
DF, D(T ) discountfactor,today’svalueunitpaymentatfuture date T
D(t , T ) dicountfactorat t forunitpaymentat T > t
r interestrate
rm compoundinginterestratewith m compoundingsper year y yield
APRannualpercentagerate–statedinterestratewithoutany compoundings
APYannualpecentageyield–yieldofadeposittakingcompoundingsintoconsideration:1 + APY =(1A PR∕m)m for m compoundingsperyear
CFcashflow
C couponrate
P, P(C, y, N , m) priceofan N -yearbondwithcouponrate C,paid m times peryear,withyield y w accrualfractionbetween2datesaccordingtosomeday countbasis
PClean cleanpriceofabond = Price accruedinterest
PZ (y, N , M) priceofan N -yearzero-couponbondwithyield y, m compoundingsperyear
PA (C, y, N , m) priceofan N -yearannuitywithannuityrateof C,paid m timesperyear,withyield y
PBill (y, T ) priceof T -maturityTreasuryBillwithdiscountyield y PV01presentvaluechangeduetoan”01”bpchangeinyield
PVBPpresentvaluechangeduetoa1bpchangeincoupon, presentvalueofa1bpannuity
Bn balanceofalevelpayloanafter n periods
Pn , In principalandinterestpaymentsofalevelpayloaninthe nthperiod
PL (C, y, N , m) priceof N -yearlevelpayloanwithloanrateof C,paid m timesperyear,withyield y
ALaveragelife
B′ n balanceofalevelpayloanafter n periodswithprepayments
P′ n , I ′ n principalandinterestpaymentsofalevelpayloanwithin the nthperiodwithprepayments
SMMsinglemonthlymortalityrate
CPRconstantprepaymentratio
s, sn periodicprepaymentspeed
U (x) utilityofwealth x
X ≺ Y lottery Y ispreferredto X
cX certainty-equivalentofrandompayoff X, U (cX )= E[U (X)]
��A ,��R absoluteriskpremium,relativeriskpremium
V , VP , Vi value,valueofaportfolio,valueof ithasset
Qi , Pi quantity,price
wi weightof ithassetinaportfolio, ∑i wi = 1
RA returnofanassetoveraperiod t : RA = A(t )∕A(0)− 1. Canbedividedby t togiverateofreturn
RA ∼(��A ,��A ) asset A’sreturn,withmean �� andstandarddeviation ��A
��,�� ,C meanvector,standarddeviationvector,andcovariance matrixofassetreturns
R0 returnofarisk-freeasset
M, RM marketportfolio,returnofthemarketportfolio
��X betaofanasset X, Cov(RX , RM )∕�� 2 M
̂ x empiricalestimateof x
x arithmeticaverageof n samplesof x,1∕n ∑n i=1 xi
T forwarddate,futuredate
FA (t , T ) forwardvalueofasset A attime t forforwarddate T
VFA (t , T , K) t -valueofaforwardagreementonasset A forforward date T andprice K
f (t , [T1 , T2 ]) simple(noncompounding)forwardratethatcanbe lockedat t forforwarddepositperiod [T1 , T2 ].Thefirst termmaybeomittedwhen t = 0.
fc (t , [T1 , T2 ]) continuouslycompoundingforwardratethatcanbe lockedat t forforwarddepositperiod [T1 , T2 ].Thefirst termmaybeomittedwhen t = 0.
FXforeigncurrencyexchangerate
rd , rf domesticandforeigninterestratesforforwardexchange ratecalculations
FX (t , T ) the T -forwardexchangeratethatcanbelockedat t
A0 , A(0) today’svalueofanasset A
C0 , C(0) today’svalueofacontingentclaim C
�� genericrandomsamplepath
M(t ), M(t ,��) valueofamoney-marketaccountattime t alongsample path ��
N (��,�� 2 ) normalorGaussianrandomvariablewithmean �� and variance �� 2
LN (��,�� 2 ) lognormalrandomvariablewhoselogis N (��,�� 2 )
CDFcumulativeditributionfunction
pdfprobabilitydensityfunction
pmfprobabilitymassfunction
N (x) cumulativedistributionfunctionofastandard(N (0,1)) normalrandomvariable, N (x)= 1 √2�� ∫ x −∞ e u2 ∕2 du
N ′ (x) probabilitydensityfunctionofastandardnormalrandomvariable, N ′ (x)= 1 √2�� e x2 ∕2
BMBrownianmotion
B(t ), B(t ,��)
Brownianmotionattime t alongsamplepath ��
�� proportional,lognormalvolatility
ATM,ATMFat-the-moneyspot,at-the-moneyforward
�� (x) Dirac’sdeltafunction, ∫ f (x)�� (x a)dx = f (a)
��N absolute,normalizedvolatility
CMSconstantmaturityswaprate
AD, AD(ti , j) Arrow-Debreuprice,today’spriceofunitpayoffatstate j onfuturedate ti
i.i.d.independentandidenticallydistributed