Computational Science and Engineering - TUM · Computational Science and Engineering Technical...

122
Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing based on the Heston model and sparse grids Author: Samuel Maurus 1 st examiner: Univ.-Prof. Dr. Hans-Joachim Bungartz 2 nd examiner: Univ.-Prof. Dr. Thomas Huckle Advisors: Dipl.-Tech. Math. Stefanie Schraufstetter Alexander Heinecke M.Sc., M.Sc. with honors Submission date: August 2, 2012

Transcript of Computational Science and Engineering - TUM · Computational Science and Engineering Technical...

Page 1: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Computational Science and EngineeringTechnical University of Munich

Master’s Thesis

A multi-dimensional PDE solver for option pricingbased on the Heston model and sparse grids

Author: Samuel Maurus1st examiner: Univ.-Prof. Dr. Hans-Joachim Bungartz2nd examiner: Univ.-Prof. Dr. Thomas HuckleAdvisors: Dipl.-Tech. Math. Stefanie Schraufstetter

Alexander Heinecke M.Sc., M.Sc. with honorsSubmission date: August 2, 2012

Page 2: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 3: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

I hereby declare that this thesis is entirely the result of my own work except where other-wise indicated. I have only used the resources given in the list of references.

August 2, 2012 Samuel Maurus

Page 4: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 5: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Acknowledgments

First and foremost I am indebted to Stefanie Schraufstetter, my primary supervisor. Ste-fanie supported me with patience and knowledge throughout my thesis whilst allowingme the room to work in my own way. I am additionally grateful to the direct support pro-vided by Alexander Heinecke, my secondary supervisor who guided me through the finalweeks and also provided me with valuable assistance towards the oral presentation.

From the chair I particularly wish to thank Professor Hans-Joachim Bungartz and Profes-sor Thomas Huckle for taking the time to read and assess this submission, and ChristophRiesinger for the prompt administrative-assistance rendered at various stages during thisthesis and my Master’s in general.

Finally I wish to acknowledge the primary member of my general “support crew”: mymother Rosemary. I remain in awe of the down-to-earth dedication, consideration andattention with which she raised me.

v

Page 6: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 7: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Abstract

The equations describing the price of non-trivial financial options must in general besolved numerically. This thesis presents a practical implementation of a deterministicoption-equation solver based on Heston’s stochastic volatility model - a model which gen-eralises on that of Black-Scholes. The solver uses a finite-element approach based on sparsegrids for spatial discretisation. Grid adaptivity is used to refine sensitive regions in theproblem space. The solver supports the pricing of European basket call and put optionswithout the drawback of slow convergence that typically accompanies non-deterministictechniques.

Results from the solver for vanilla options are provided and compared to Heston’s closed-form solution as well as to an existing numerical solver (based on the Black-Scholes model).Results for basket options with up to three underlyings (problem dimensionality of six) arealso provided and compared with existing Monte-Carlo data. Conclusions are made on theapplicability of the solver and recommendations for further work in the area are given.

vii

Page 8: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 9: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Contents

Acknowledgments v

Abstract vii

1. Introduction 1

2. Relevant Financial Fundamentals 52.1. Financial Instruments and Derivatives . . . . . . . . . . . . . . . . . . . . . . 52.2. Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3. Modeling Stock-Price Behaviour . . . . . . . . . . . . . . . . . . . . . . . . . 82.4. The Black-Scholes-Merton Legacy . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4.1. The PDE for a Vanilla Option . . . . . . . . . . . . . . . . . . . . . . . 92.4.2. Shortcomings of the Black-Scholes Model . . . . . . . . . . . . . . . . 10

3. Heston’s Stochastic Volatility Approach 113.1. Models with Stochastic Volatility . . . . . . . . . . . . . . . . . . . . . . . . . 113.2. Heston’s Stochastic Volatility Model . . . . . . . . . . . . . . . . . . . . . . . 113.3. The PDEs for a Vanilla Option . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.4. The Closed-Form Solution for Vanilla Options . . . . . . . . . . . . . . . . . 15

4. Space Discretisation using Sparse Grids 194.1. Motivation - The Curse of Dimensionality and the Pricing of Basket Options 194.2. Basis Functions and Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2.1. Nodal Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2.2. Hierarchical Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.2.3. Comparison of Nodal and Hierarchical Basis . . . . . . . . . . . . . . 254.2.4. Basis Functions of General Support . . . . . . . . . . . . . . . . . . . 26

4.3. Sparse Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.3.1. Principle of Construction . . . . . . . . . . . . . . . . . . . . . . . . . 274.3.2. Taming the Curse with Sparse Grids . . . . . . . . . . . . . . . . . . . 27

4.4. Function Interpolation using the Hierarchical Basis and Sparse Grids . . . . 29

5. Discretising Heston’s PDEs on Sparse Grids 335.1. The Appropriate Discretisation Scheme . . . . . . . . . . . . . . . . . . . . . 335.2. Introduction to the Finite Element Method . . . . . . . . . . . . . . . . . . . 345.3. The Finite Element Method Applied to Heston’s PDEs . . . . . . . . . . . . . 36

5.3.1. Variational Formulation: Vanilla Case (Cartesian) . . . . . . . . . . . 365.3.2. Operator Formulation: Vanilla Case (Cartesian) . . . . . . . . . . . . 385.3.3. Variational Formulation: Vanilla Case (Log-Transformed) . . . . . . 40

ix

Page 10: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Contents

5.3.4. Operator Formulation: Vanilla Case (Log-Transformed) . . . . . . . . 415.3.5. Variational Formulation: Basket Case (Log-Transformed) . . . . . . . 415.3.6. Operator Formulation: Basket Case (Log-Transformed) . . . . . . . . 42

5.4. Exploiting Sparse Grids in the Heston Solver . . . . . . . . . . . . . . . . . . 435.5. Time Discretisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445.6. Domain-Truncation and Boundary Conditions for the Heston Solver . . . . 45

5.6.1. Boundary Conditions for a Call Option . . . . . . . . . . . . . . . . . 465.6.2. Boundary Conditions for a Put Option . . . . . . . . . . . . . . . . . 48

6. Solving Heston’s Linear Systems on Sparse Grids 536.1. “Sparser than most, but not quite sparse” . . . . . . . . . . . . . . . . . . . . 536.2. The Up/Down Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546.3. Parameter Overview for the General Heston Solver . . . . . . . . . . . . . . 546.4. Operator Decomposition for use with One-Dimensional Up/Down Schemes 55

6.4.1. Decomposition of Operator D =∫

Ω zb∂φn(~z )∂zb

∂φm(~z )∂zb

d~z . . . . . . . . 56

6.4.2. Decomposition of Operator K =∫

Ω

√zb√zf

∂φn(~z )∂zc

∂φm(~z )∂za

d~z . . . . . 576.4.3. Decomposition of Remaining Operators . . . . . . . . . . . . . . . . . 58

6.5. Derivation of Missing 1D Up/Down Schemes . . . . . . . . . . . . . . . . . 606.5.1. 1D Up/Down Scheme for

∫x ∂φ(x)

∂x∂φ(x)∂x dx . . . . . . . . . . . . . . . 60

6.5.2. 1D Up/Down Scheme for∫ √

xφ(x)φ(x) dx . . . . . . . . . . . . . . 626.6. Principal Axis Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

7. Results 677.1. Qualitative Analysis of Vanilla Solution Surfaces . . . . . . . . . . . . . . . . 677.2. The Heston Solver as a Black-Scholes Solver . . . . . . . . . . . . . . . . . . . 687.3. Comparison with Heston’s Closed-Form Solution . . . . . . . . . . . . . . . 697.4. Convergence Investigations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

7.4.1. Varying Problem Domain Size . . . . . . . . . . . . . . . . . . . . . . 707.4.2. Varying Sparse Grid Level . . . . . . . . . . . . . . . . . . . . . . . . . 717.4.3. Varying Time Step Size . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

7.5. Grid-Adaptivity Investigations . . . . . . . . . . . . . . . . . . . . . . . . . . 737.6. Basket Option Investigations . . . . . . . . . . . . . . . . . . . . . . . . . . . 747.7. Comparison of Boundary Conditions for the Vanilla Put Case . . . . . . . . 77

8. Summary 79

Appendix 85

A. Complementary Material in Stochastic Calculus and Finance 85A.1. Stochastic Processes in Finance . . . . . . . . . . . . . . . . . . . . . . . . . . 85

A.1.1. Stochastic Processes Defined . . . . . . . . . . . . . . . . . . . . . . . 85A.1.2. Markov Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85A.1.3. Wiener Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86A.1.4. Generalised Wiener Process . . . . . . . . . . . . . . . . . . . . . . . . 86A.1.5. Ito Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

x

Page 11: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Contents

A.1.6. CIR Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87A.2. Ito’s Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

A.2.1. Univariate Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87A.2.2. Bivariate Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

A.3. Put-Call Parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

B. Derivation of Various Forms of the Black-Scholes PDE 91B.1. Vanilla Form with Cartesian Coordinates . . . . . . . . . . . . . . . . . . . . 91B.2. Multi-Asset Form with Cartesian Coordinates . . . . . . . . . . . . . . . . . 93B.3. Vanilla Form with Log-Transformed Coordinates . . . . . . . . . . . . . . . . 93B.4. Multi-Asset Form with Log-Transformed Coordinates . . . . . . . . . . . . . 93B.5. The Black-Scholes Pricing Formulas . . . . . . . . . . . . . . . . . . . . . . . 94

C. Derivation of Various Forms of the Heston PDE 95C.1. Vanilla Form with Cartesian Coordinates . . . . . . . . . . . . . . . . . . . . 95C.2. Multi-Asset Form with Cartesian Coordinates . . . . . . . . . . . . . . . . . 99C.3. Vanilla Form with Log-Transformed Coordinates . . . . . . . . . . . . . . . . 101C.4. Multi-Asset Form with Log-Transformed Coordinates . . . . . . . . . . . . . 101

D. Additional Calculations 103D.1. Additional 1D Up/Down Schemes . . . . . . . . . . . . . . . . . . . . . . . . 103

D.1.1. 1D Up/Down Scheme for∫ √

xφ(x)φ(x) dx . . . . . . . . . . . . . . 103D.2. Principal Axis Transformation of the Multi-Asset Black-Scholes PDE . . . . 105

Bibliography 107

xi

Page 12: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 13: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

1. Introduction

I am opposed to millionaires, but it wouldbe dangerous to offer me the position.

MARK TWAIN

This thesis is concerned with option pricing. Options are popular trading instruments withconceptual uses dating back to the Bible [58]. Like other financial derivatives, options canbe used to reduce risks or to take risks. The risk-taking use of options is in speculation - if atrader has a hunch on the evolution of a particular asset price and trades in the appropriateoptions instead of directly in the assets, the financial outcomes are magnified (it becomesmuch more profitable if the hunch turns out to be correct and much more destructive if itdoes not). The risk-reducing use of options is in hedging - a trader who owns assets but isconcerned about their possible price decline can use options to provide insurance againstadverse future price movements.

Options markets (and derivative markets in general) continue to evolve. Speculators,hedgers and arbitrageurs wish to trade in increasingly sophisticated flavours of options,and technological advancements like real-time computer trading systems nurture this trendby allowing traders to easily find a second party with which to enter such contracts.

Regardless of an option’s flavour and underlying assets, determining its fair price (that is,the premium which the holder of the option must pay the writer of the option in orderto enter the contract) is commonly considered an esoteric task. Initially, a model mustbe generated to accurately encompass the dynamics of the market and its entities. Topreserve tractability, such models usually make a number of simplifying assumptions.Having decided on a model, a deterministic mathematical equation - usually a partialdifferential equation (PDE) - is deduced (typically using various arbitrage arguments).The equation describes how the price of the option behaves with respect to the modeledparameters and variables. Solving the equation elicits the price of the option.

Perhaps the most prevalent of market models was published in 1973 by Black, Scholesand Merton [4]. The Black-Scholes model leads to a PDE with a closed-form solution forEuropean options involving a single asset. For other flavours of options the PDE must ingeneral be treated numerically.

Despite its widespread adoption by practitioners, the Black-Scholes model disagrees withreality in a number of ways. One of its most significant limitations is the assumption of aflat volatility surface, which entails that a particular asset has constant implied volatilityirrespective of variations in the strike price and maturity of its derivative options. Practicehas shown this assumption to be incorrect - the implied volatility surface is not flat butrather resembles a smile.

1

Page 14: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

1. Introduction

Stochastic volatility models offer the flexibility to represent a more realistic volatility sur-face and hence option price. Heston’s model [25] is considered to be the most popularstochastic volatility model and is the focus of this thesis. The application of Heston’sstochastic volatility model to single-asset European call options leads to a PDE with aclosed-form solution. For any other class of option, however, the resulting PDE must besolved numerically. The goal of this thesis is to implement a numerical solver for the moregeneral case of European basket-options. A closed-form solver is implemented to vali-date the numerical solver in the vanilla case, and existing Monte-Carlo results are used tovalidate the solver for the more general basket-option case.

Heston’s PDEs prescribe complex boundary conditions on infinitely-large problem do-mains. A significant challenge in the implementation of a Heston solver is the reasonableapproximation of these boundary conditions on numerically-treatable domains. One as-pect of this challenge is the decision on where the infinitely-large domain should be trun-cated, and the other aspect is the simplification of the complex boundary conditions suchthat they can be practically implemented. This thesis discusses these issues and presentssolutions in the context of the implemented Heston solver.

The pricing of basket options inherently involves work in high-dimensional spaces. Asthe problem dimensionality increases (that is, as more and more underlying assets areconsidered), the exponentially-increasing resource requirements of traditional determinis-tic discretisation techniques become overwhelming. This numerical nightmare, known asthe curse of dimensionality, is typically solved by switching to non-deterministic approacheslike the Monte-Carlo method.

The Monte-Carlo method can be applied with relative ease to numerical problems of highdimensionality. The method involves random sampling of values in the problem space.The number of samples is chosen by compromising between space representation (accu-racy) and execution time. Although the method is simple and robust, the Central LimitTheorem shows the convergence rate to be in O

(N−1/2

)[9]. The convergence rate is inde-

pendent of dimensionality, but it is also extremely slow: investing four times more com-putational effort returns only a doubling in accuracy. Furthermore, in financial problemsspecifically, the determination of the so-called Greeks (measurements of the different di-mensions of risk associated with an option position) for use with the Monte-Carlo methodis known to be difficult [39].

Enter sparse grids. For a small price in accuracy, sparse grids deterministically discre-tise higher-dimensional space with considerably more efficiently than conventional grids.Sparse grids practically cure the curse of dimensionality and their use reopens the doorfor deterministic, fast-converging PDE solvers. Building a software architecture support-ing generalised sparse grids is however a task that would in itself be substantial enoughfor its own Master’s thesis. Fortunately, the clever souls from this thesis’ host chair havealready created such a framework (known as SG++). The exploitation of sparse grids in theHeston solver was thus within scope.

Although sparse grids provide a means for significantly reducing the number of gridpoints (degrees of freedom) required to represent a high-dimensional space, avoiding acounterproductive deterioration in accuracy is dependent on the smoothness of the solu-

2

Page 15: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

tion. Unfortunately it is typically the case in option-pricing that the PDE solutions arenon-smooth, because the payoff function (that is, the price of the option at maturity) con-tains a cusp at which the solution is non-differentiable. Fortunately, the standard sparsegrid approach can be extended to such solutions by using adaptive refinement methods.Adaptivity is thus also explored and applied in the Heston solver.

The thesis is organised as follows: Chapter 2 reviews the relevant financial fundamentalsand includes both a review and a brief critique of the Black-Scholes model. Chapter 3introduces the Heston model, discussing its benefits, resulting PDEs and the existence ofa closed-form solution. Chapter 4 links the theory of sparse grids to the implementationof the Heston solver. Chapter 5 details the discretisation of Heston’s PDEs onto sparsegrids using the finite element method. Chapter 6 addresses various practical challengessurrounding the use of sparse grids for solving Heston’s PDEs. Chapter 7 presents theresults of the implemented solver, including comparisons to Heston’s closed-form solutionas well as to the existing Black-Scholes solver. Chapter 8 gives concluding remarks.

3

Page 16: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 17: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2. Relevant Financial Fundamentals

Let us watch well our beginnings, andresults will manage themselves.

ALEXANDER CLARK

This chapter provides a brief revision of concepts in (numerical) finance. It begins with adiscussion of financial instruments and concludes with a short critique of the Black-Scholesmodel of stock-price behaviour and its associated PDEs.

2.1. Financial Instruments and Derivatives

A financial instrument is a legal document (physical or virtual) that embodies monetaryvalue [54]. Financial instruments can be broadly categorised as shown in Figure 2.1. Thisthesis concentrates on options, which are a type of financial derivative. A detailed discus-sion on the other types of financial instruments is not within the scope of this thesis and isdelegated to [15], for example.

FINANCIAL INSTRUMENTS

CASH INSTRUMENTS DERIVATIVE INSTRUMENTS

CURRENCY BONDS LOANS FUTURES OPTIONS SWAPS FORWARD CONTRACTS

Figure 2.1. Broad overview of financial instrument types based on the classification in [55].Options are the focus of this thesis.

In the context of finance, a derivative is a financial instrument with no independent value.At risk of stating the obvious, one might say that a derivative derives its value from thevalue and properties of one or more underlying entities. Stocks and indexes are commontypes of underlyings, but derivatives can be dependent on almost any variable from theprice of tulips to the quality of the surf conditions at a particular beach. For the purposesof this thesis it will be assumed, without a great loss in generality, that the underlyings aretradable stocks. A comprehensive coverage of general derivatives can be found in [26].

5

Page 18: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2. Relevant Financial Fundamentals

2.2. Options

Telling a historical anecdote might initially provide a more interesting introduction to theidea of an option than a textbook definition. In his classical work on market psychology,Mackay [38] tells the story of Tulipomania in Holland, generally considered to be the firstreport of an economic bubble. The story is summarised as follows:

The tulip was introduced into western Europe in the sixteenth century. Its frag-ile beauty quickly attracted the interest of many learned men, and by the mid1630s the demand for certain species had increased so much that marketsfor their sale were established on the Dutch stock exchanges. People from allcorners of society converted their property into cash and invested it in flowers.

Before long, foreigners became infected with the same frenzy and money be-gan to flow into Holland from all directions. In smaller towns, “show-places”were set up to allow for the high and low to trade in tulips whilst enjoying sump-tuous entertainments. The tulip became a “masterpiece of culture” [38, p. 215].On the markets, confidence was at its height, and everybody gained.

The more prudent investors, however, eventually began to see that the hypewas not sustainable. No longer were the rich buying the flowers for the purposeof keeping them in their gardens - their goal had turned to profit. This desire formonetary gain began to outweigh the organic demand for the flower’s beauty,and it was soon seen that considerable losses were in store.

The ensuing sentiment shattered the confidence of investors. In 1637 the priceof the flowers fell and never rose again. Party A, who had agreed to purchasean agreed quantity of Semper Augustines and Viceroys from party B at a fixedprice on a fixed date, now refused to either pay the difference or receive thetulips.

Panicked tulip traders sought help from the government. Attempts were madeto resolve the situation to the satisfaction of all parties, but in the end therewere many hapless individuals stuck with the bulbs they held at the end of thecrash.

The Tulipomania story provides an intriguing context in which to explain the concept ofan option. It was known at the time that tulips typically bloom for only a short time inspring. During the rest of the year, traders signed contracts to purchase flowers at the endof the season. The purchase quantity, price and date formed the underlying terms of thecontract.

As mentioned in the story, party A declined to pay party B for the flowers after the pricefell. In today’s financial system, the answer to the question of whether or not this be-haviour is legal depends on the type of contract. If the contract were a futures contract,the holder of the contract (party A) would be legally obliged to buy the bulbs. If it were anoption contract, the holder has the right to forgo payment and receipt of the goods.

6

Page 19: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2.2. Options

With this contextual understanding a more formal definition of an option is now surelymore digestible. An option is a type of derivative financial instrument which represents acontract between two parties on a potential future transaction [26]. An option specifies thefollowing:

• The party selling the contract, known as the writer.

• The party purchasing the contract, known as the holder.

• The quantity and class of the underlying. During Tulipomania, a contract may havespecified a particular quantity of Semper Augustus bulbs, for example.

• The type of option. Here there are two basic possibilities1:

1. If the contract gives the holder the right to buy the underlying asset, the optionis termed a call.

2. If the contract gives the holder the right to sell the underlying asset, the optionis termed a put.

• The agreed price K ∈ R+ of the underlying, at which the holder of the option hasthe right to exercise the transaction. The price K is thus termed the exercise price or,as will be used in the remainder of this thesis, the strike price.

• The expiration date or maturity T ∈ R+, after which the option is worthless.

• The price U ∈ R+ of the option. This is the price that the holder must pay to thewriter to enter into the contract, also known as the premium.

Options with these basic specifications are termed plain vanilla2 (or simply vanilla). Thepayoff functions for vanilla call and put options are shown in Figure 2.2. As depicted inthe diagram, an option is at-the-money if the strike price equals the price of the underlying(S = K). Call options are termed in-the-money if S > K and out-of-the-money if S < K. Putoptions are termed in-the-money if S < K and out-of-the-money if S > K.

It should be emphasised that an option is so-named because it grants its holder the prerog-ative to exercise (that is, the holder may choose not to). The time at which the holder canexercise depends on whether the option is American or European3. Holders of Americanoptions have the flexibility to call the transaction at any time t <= T , whereas holders ofEuropean options are only permitted to exercise the transaction at maturity, that is, at timet = T . American options are not treated by the Heston solver in this thesis.

Options with non-standard contract specifications are termed exotic. A basket option is akind of exotic option in which more than one class of underlying (that is, a basket of un-derlyings) is considered [28]. The payoff of a basket option is determined by the strikeprice and some aggregate function applied over the underlyings (the weighted sum, for

1The perspective of the option purchaser is taken in this thesis, thus the terms call and put are a short formfor long call and long put respectively.

2The term plain vanilla can also be used to describe the most basic or standard version of other financialinstruments, such as bonds, futures or swaps.

3The names American and European have no geographical significance - it is not uncommon for Americanoptions to be traded on European exchanges and vice-versa.

7

Page 20: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2. Relevant Financial Fundamentals

maxST−K, 0

K 2K00

K

Price of the underlying at exercise, ST

Payo

ff(P

rofit

)

Out of the money In the money

At the money

maxK−ST, 0

K 2K00

K

Price of the underlying at exercise, ST

Payo

ff(P

rofit

)

In the money Out the money

At the money

Figure 2.2. Payoff functions for plain-vanilla call (left) and put (right) options.

example). The treatment of exotic options in this thesis is restricted to European basketoptions.

Consider a trader who wishes to purchase a vanilla option at time t = 0. Various factorsaffect the price of the option. The main factors are [26]

• the current stock price S,

• the strike price K,

• the maturity T ,

• the volatility of the stock price σ,

• the risk-free interest rate (that is, the rate of interest that can be earned without as-suming any risks) r, and

• the dividends expected during the life of the option.

Here the simplifying assumption of a zero dividend rate is made (with an acceptably smallloss of generality). The task then remains to establish a model which accurately describesthe effect that each of the remaining parameters has on the option price. The followingsections are dedicated to exploring the fundamentals of such models.

2.3. Modeling Stock-Price Behaviour

The most pervasive model of stock-price behaviour is that of geometric Brownian motion[26]. The continuous-time version of the model is

dS(t) = µGBMS(t)dt+ σGBMS(t)dW (t), (2.1)

where µGBM is the expected rate of return or so-called drift of the stock price S(t), σGBM isthe volatility of the stock price, and W (t) represents a Wiener process. Using Ito’s Lemma

8

Page 21: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2.4. The Black-Scholes-Merton Legacy

(discussed alongside the Wiener process in Appendix A) it can be shown that for a timeT > 0,

lnS(T )− lnS(0) ∼ N[(µGBM −

σ2GBM

2

)T, σGBM

√T

]⇔ lnS(T ) ∼ N

[lnS(0) +

(µGBM −

σ2GBM

2

)T, σGBM

√T

]. (2.2)

This implies that, given the stock price at t = 0, the logarithm lnS(T ) of the stock priceat time t = T is normally distributed (the normal distribution with mean µn and standarddeviation σn is denoted here with N (µn, σn)). The stock price S(T ) is thus said to be log-normally distributed. The standard deviation of the logarithm of the stock price is σGBM

√T .

For perspective it is worthwhile to briefly reflect on the terms included in (2.1). The firstterm represents the deterministic part of the movement of the stock price and capturesthe key aspect that the expected percentage return required by investors from a stock isindependent of the stock’s price. The second term is responsible for the stochastic part ofthe movement of the stock price, the relative strength of which is dictated by the volatilityof the stock.

At this stage it is assumed that the parameters µGBM and σGBM are constant, howeverthese assumptions will later be relaxed when introducing the Heston model.

2.4. The Black-Scholes-Merton Legacy

Fischer Black, Myron Scholes and Robert Merton published a revolutionary paper on op-tion pricing in 1973 [4]. In it they derived a deterministic equation describing the priceof a European option. A closed-form solution of the equation for vanilla options was alsogiven. This section reviews the fundamental aspects of what has become to be known asthe Black-Scholes equation and discusses its shortcomings in preparation for the introduc-tion of the Heston model in the following chapter.

2.4.1. The PDE for a Vanilla Option

The Black-Scholes model is based on the assumption that the stochastic process of the un-derlyings is geometric Brownian motion (2.1). With this and other market-related assump-tions, the PDE for the price U(S, t) of a European vanilla option is (function argumentsomitted)

∂U

∂t+

1

2σ2S2∂

2U

∂S2+ rS

∂U

∂S− rU = 0. (2.3)

This equation, along with the relevant closed-form “pricing formula” solutions and basket-option variants, is derived and further discussed for reference in Appendix B.

9

Page 22: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

2. Relevant Financial Fundamentals

2.4.2. Shortcomings of the Black-Scholes Model

Despite its popularity among option traders, the Black-Scholes option-pricing formulais often reported to produce model values which differ in systematic ways from marketprices [50]. One of the main reasons for this is that the original Black-Scholes model as-sumes a constant volatility σ. In order to be able to validate this assumption, the volatilityof a particular stock would have to be measurable. Unfortunately, this is the one param-eter in the Black-Scholes pricing formulas that cannot be directly observed. Practically,implied volatilities are used to monitor the market’s opinion about the volatility of a partic-ular stock [26]. The implied volatility of a particular stock is the value of σ such that thepricing formula holds for an observed option value U .

If the constant-volatility assumption were correct, plotting implied volatility against strikeprice and maturity would result in a flat surface with no gradient in either direction. Un-fortunately, real-world results produce a non-constant volatility surface like that shown inFigure 2.3.

MaturityStrike Price

Impl

ied

Vola

tilit

y

Figure 2.3. Qualitative example of a more realistic volatility surface. The implied volatility isrelatively small for at-the-money options and becomes progressively larger as anoption moves either into the money or out of the money. The smile tends to becomeless pronounced as the option maturity increases. Figure adapted from [41].

The assumption of a constant volatility in the Black-Scholes model is thus somewhat un-realistic. One method of relaxing this assumption in option-price calculations is to makeuse of a deterministic volatility surface like the one shown in Figure 2.3. Whilst such asurface may capture the volatility well at a particular point in time, it does a poor job ofcapturing dynamics (that is, how the data change with time). A second method of relaxingthis assumption is the inclusion of randomness in the volatility. This leads to stochasticvolatility models and in particular the Heston model [25], which is detailed in the follow-ing chapter as the model used for the solver in this thesis. Finally, additional techniquesbased on jump-diffusion models allow both the stock and volatility to be discontinuous,but a digression into such complex models is not within scope here.

10

Page 23: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3. Heston’s Stochastic Volatility Approach

I believe in chance: how else can youexplain the success of those you dislike?

JEAN COCTEAU

3.1. Models with Stochastic Volatility

A stochastic volatility model is one in which the volatility is assumed to be variable andinclude an element of randomness. As randomness is also an assumed element for thebehaviour of the stock price, such models thus consider two random processes for eachclass of underlying. One of the parameters in these models is the correlation between thetwo sources of randomness. This correlation is often negative, implying that a fall in thestock price is accompanied by a rise in the volatility.

Hull and White [27], Scott [53] and Wiggins [60] generalised the Black-Scholes model toallow for stochastic volatility. Perhaps the most popular stochastic volatility model, how-ever, is that of Heston.

3.2. Heston’s Stochastic Volatility Model

Heston proposed that the price S(t) for the underlying of a vanilla European option fol-lows the stochastic differential equation [25]

dS(t) = µH S(t) dt+√v(t)S(t) dWs(t), (3.1)

with the expected rate of return µH assumed constant as in the Black-Scholes model. Thevolatility σ(t) of the stock price is equal to the square-root of the stochastic variance v(t),which in turn follows the stochastic differential equation

dv(t) = κ (θ − v(t)) dt+ ξ√v(t) dWv(t). (3.2)

whereWs(t) andWv(t) are Wiener processes with correlation factor ρ such that |ρ| ≤ 1 and[16]

11

Page 24: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3. Heston’s Stochastic Volatility Approach

〈dWs(t), dWv(t)〉 = ρ dt. (3.3)

Consider for a moment the statement of Equation (3.2) when v(t) = θ. In this situation, thedeterministic part of dv vanishes and the change in the variance is purely stochastic. Thisstochastic term will in general lead to a non-zero value of dv, which in turn will cause thevariance to deviate from θ. As soon as this deviation occurs, however, the deterministicpart of the equation acts in such a way as to send the variance back to the value of θ. Therate at which the deterministic part of the equation does this is proportional to κ as well asthe difference between the variance and θ. That is, the more the variance and θ differ, thestronger the deterministic influence to bring them back to the same value.

This “stabilising” behaviour is somewhat analogous to that of the proportional term in aPID controller in feedback control theory - a change in the output is made that is propor-tional to the current error value [42]. For this analogy the proportional gain is the same asκ.

The stochastic process is more formally recognised as being identical to the mean-revertingsquare-root (or CIR) process described in [11]. For κ, θ ∈ R+

0 , the continuous-time processis first-order autoregressive in that the randomly-moving variance v is elastically pulledtoward a central location or long-run variance, θ. The parameter κ determines the speed ofadjustment or mean reversion rate. The parameter ξ ∈ R+

0 is affectionately known by twonames: 1) the volatility of the variance [62], since ξ can be interpreted as a scaling factor forthe diffusion term of the variance process1, or 2) the volatility of the volatility, because ξ actsdirectly on the stock-price volatility σ =

√v (t). The latter term will be adopted here.

It can be shown that the variance v is always positive if Feller’s condition for a square-rootprocess is satisfied [62]:

2κθ > ξ2, v(0) > 0. (3.4)

This condition will be adhered to in later simulations of the Heston solver.

3.3. The PDEs for a Vanilla Option

Based on the model in the previous section and with similar market and arbitrage argu-ments to that of Black-Scholes, the PDE for the price U(S, v, t) of a European option basedon a single class of underlying is (omitting function arguments)

1

2vS2∂

2U

∂S2+ ρξvS

∂2U

∂S∂v+

1

2ξ2v

∂2U

∂v2

+∂U

∂t+ κ (θ − v)

∂U

∂v+ rS

∂U

∂S− rU = 0. (3.5)

1The true volatility of the variance should be ξ√v (t) since it is the coefficient of the diffusion term.

12

Page 25: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3.3. The PDEs for a Vanilla Option

The log-transformed variant of this PDE is more practical to solve numerically. Based onthe simple transformation of x = ln(S) it states that the price U(x, v, t) is described by

1

2v∂2U

∂x2+ ρ ξ v

∂2U

∂x∂v+

1

2ξ2v

∂2U

∂v2︸ ︷︷ ︸diffusion

+∂U

∂t+ κ (θ − v)

∂U

∂v+

(r − 1

2v

)∂U

∂x︸ ︷︷ ︸convection

− r U︸︷︷︸reaction

= 0. (3.6)

These equations and their basket-option variants are derived in Appendix C, where bene-fits of the log-transformed variant are also detailed.

Equation (3.6) is a parabolic, non-stationary second order PDE. A unique solution requiresadditional conditions prescribed on the boundary of the problem domain as well as aninitial condition prescribed on the entire problem domain. In the same way as the classicheat equation describes the variation in a region’s temperature over time, (3.6) describesthe variation in the option price over time.

As boundary2 conditions for the Cartesian case Heston [25] suggests for a vanilla Europeancall

U(S, v, T ) = max S −K, 0 , (3.7)U(0, v, t) = 0, (3.8)

∂U(∞, v, t)∂S

= 1, (3.9)

rS∂U(S, 0, t)

∂S+ κθ

∂U(S, 0, t)

∂v

−rU(S, 0, t) +∂U(S, 0, t)

∂t= 0, and (3.10)

U(S,∞, t) = S. (3.11)

The boundary conditions for a European put are given analogously as [61]

2One could argue the terminology used here. A number of the conditions involve the case when variablesapproach an infinite value, so one could debate that an alternative name such as “limit conditions” wouldbe more fitting. The term boundary conditions will however be persisted here.

13

Page 26: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3. Heston’s Stochastic Volatility Approach

U(S, v, T ) = max K − S, 0 , (3.12)

U(0, v, t) = Ke−r(T−t), (3.13)U(∞, v, t) = 0, (3.14)

rS∂U(S, 0, t)

∂S+ κθ

∂U(S, 0, t)

∂v

−rU(S, 0, t) +∂U(S, 0, t)

∂t= 0, and (3.15)

U(S,∞, t) = Ke−r(T−t). (3.16)

The boundary conditions are explained as follows [44]. Firstly, (3.7) and (3.12) state thatan option must be worth its intrinsic value (the payoff) at maturity. Figure 3.1 shows thepayoff surfaces for a European vanilla call and put. Note that the value of the variance atmaturity has no influence on the payoff.

0K

Smax

vmin

vmax

K

max S −K, 0

U(S,v,T

)

0

K

Smaxvmin

vmax

K

max K − S, 0

U(S,v,T

)

Figure 3.1. Terminal-value conditions for option pricing based on Heston’s model. Left: Payoffsurface for a European vanilla call. Right: Payoff surface for a European vanillaput.

If the stock price reaches zero (S = 0) before maturity, it remains at zero because therelevant stochastic process (3.1) dictates that the change dS in the stock price must alsobe zero. A call option in such a situation would become worthless irrespective of theremaining time to maturity, hence the condition (3.8). On the other hand, a put option insuch a situation is guaranteed to be exercised at maturity, so its present value must be thediscounted value of the exercise price, resulting in condition (3.13).

If the stock price grows infinitely large (S → ∞) it becomes increasingly likely that acall option will be exercised at maturity. Furthermore the magnitude of the strike pricebecomes increasingly insignificant. Thus the price of a call option in such circumstanceswill tend to behave like the underlying stock, resulting in the condition (3.9). Similarly, itbecomes increasingly unlikely that a European put will be exercised at maturity, hence theworthless-option condition (3.14).

14

Page 27: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3.4. The Closed-Form Solution for Vanilla Options

If the variance grows infinitely large (v →∞) the volatility and thus the risk on the part ofthe option writer also grows infinitely large. A call option is thus worth the upper boundon the option price (the price of the underlying). A put option is worth the maximumamount of profit attainable (the discounted strike price). This gives the conditions (3.9)and (3.14).

For the case of zero variance it is standard to simply substitute v = 0 into (3.5) whichelicits the conditions (3.10) and (3.15). Finally it is noted that the boundary conditions forthe log-transformed case follow directly from the relevant substitution of x = ln(S).

At this early stage it is warranted to briefly discuss the eventual implementation of theboundary conditions in the Heston solver. The conditions described above are in generalrelatively complex as they include Dirichlet, Neumann and Robin cases. Unfortunately,the sparse grids used by the Heston solver in the SG++framework are based on linear basisfunctions. The second derivative of these basis functions is zero, which renders problem-atic the realisation of non-Dirichlet conditions. Certain simplifications therefore need tobe made to Heston’s suggestions in order for the solver to materialise. Section 5.6 is ded-icated to the discussion of such simplifications and the justification of the implementedconditions.

3.4. The Closed-Form Solution for Vanilla Options

This section discusses the closed-form solution of Heston’s PDE for vanilla European op-tions. The original derivation is found in [25]. The closed-form solution for a vanillaEuropean call takes the form

UC(S, v, t) = SP1 −KP (t, T )P2, (3.17)

where P (t, T ) = e−r(T−t). The Pj terms for j = 1, 2 may be interpreted as “adjusted” or“risk-neutralised” probabilities and are evaluated as

Pj(x, v, T ; ln(K)) =1

2+

1

π

∫ ∞0

Re

[e−ıφ ln(K)fj(x, v, T ;φ)

ıφ

]dφ, (3.18)

where ı :=√−1 is the imaginary unit and f1(x, v, T ;φ) and f2(x, v, T ;φ) are the character-

istic functions of P1 and P2 respectively. These functions satisfy the log-transformed PDE(3.6). The characteristic function solution is

fj(x, v, t;φ) = eC(T−t;φ)+D(T−t;φ)v+ıφx, (3.19)

where

15

Page 28: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3. Heston’s Stochastic Volatility Approach

C(τ ;φ) = rφıτ +a

ξ2

(bj − ρξφı+ d) τ − 2 ln

[1− gedτ

1− g

],

D(τ ;φ) =bj − ρξφı+ d

ξ2

[1− edτ

1− gedτ

],

and

g =bj − ρξφı+ d

bj − ρξφı− d, d =

√(ρξφı− bj)2 − ξ2 (2ujφı− φ2),

u1 =1

2, u2 =

−1

2, a = κθ, b1 = κ− ρξ, b2 = κ.

Thus, given the market risk-free interest rate r and an option with strike K and maturityt = T that is based on an underlying asset with Heston parameters κ, θ, ξ and ρ, the priceof the option at the current time t = 0 can be determined in a closed-form manner fromthe asset’s current price S and variance v.

0 2 4 6 8 100

0.1

0.2

0.3

0.4

0.5∫ ∞

0

Re

[e−ıφ ln(K)f1(x, v, T ;φ)

ıφ

]dφ

∫ ∞0

Re

[e−ıφ ln(K)f2(x, v, T ;φ)

ıφ

]dφ

φ

Figure 3.2. Example integral evaluations (for j = 1, 2) required for the Heston closed-formsolution. The integrand functions are noted as smooth and rapidly decaying. Thisexample assumes an option with T = 1 and K = 1. The stochastic parameters areκ = 2, θ = 0.2, ξ = 0.3 and ρ = 0.8. The risk-free interest rate is r = 0.03 and thecurrent stock price and variance are S = 1.5 and v = 0.2 respectively.

16

Page 29: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

3.4. The Closed-Form Solution for Vanilla Options

Some attention is deserved for the evaluation of the integral in (3.18). In his original paperHeston notes that the integrand is a “smooth function that decays rapidly and presents nodifficulties”. This statement is supported by the integral examples for j = 1, 2 shown inFigure 3.2. The integrand thus supports the upper-truncation of the integration domainwith a negligible loss in accuracy, and a subsequent treatment with numerical quadrature.The C++ code which evaluates the price of a European vanilla call option based on theclosed-form solution is implemented in the class HestonSolver in the SG++framework.

1 210

0.5

1

Sv

UH

001 2

10

0.5

1

Sv

UBS

00 12

0.5

1

−0.1

0

0.1

S

v

UH−UBS

0

0

Figure 3.3. Pricing analysis of a European call option with strike K = 1, maturity T = 1 anda single underlying asset with the stochastic Heston parameters κ = 2, θ = 0.2,ξ = 0.3 and ρ = 0.8. The risk-free interest rate is r = 0.03. Left: Option pricebased on the closed-form solution of Heston’s PDE. Middle: Option price basedon the closed-form solution of the Black-Scholes PDE. Right: Surface showing thedifference between the Heston and Black-Scholes prices.

Given the closed-form solution for the price of a vanilla European call, the put-call parity(discussed in Appendix A) can be used to determine the price of a European put with thesame strike and maturity. Inserting (3.17) into the put-call parity formula (A.6) gives

SP1 −KP (t, T )P2 +Ke−rT = UP + S,

which can be solved for UP to give the closed-form price for the put option

UP = SP1 −KP (t, T )P2 +Ke−rT − S.

With closed-form solvers available for both the Black-Scholes and Heston PDEs, a com-parison between the results is a worthwhile digression. Figure 3.3 shows the call-optioncomparison graphically which agrees with the discussion given by Heston [25]. It is par-ticularly noted that the at-the-money Heston price tends lower than the Black-Scholes pricefor increasing variance v = σ2.

17

Page 30: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 31: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

Man’s mind, stretched by a new idea,never goes back to its original dimensions.

OLIVER WENDELL HOLMES

In a more general context, this chapter explores a typical issue that arises when attemptingto solve high-dimensional problems using classical discretisation techniques. It presentssparse grids as an alternative discretisation approach, explaining their underlying theoryas well as the basic principles for their construction. The following chapter (Chapter 5)will then discuss the discretisation of Heston’s PDEs on these sparse grid structures.

4.1. Motivation - The Curse of Dimensionality and the Pricing ofBasket Options

In 1961 Richard Bellman coined the phrase curse of dimensionality, describing it as “a male-diction that has plagued the scientist from the earliest days” [2]. In the context of sci-entific computing, the term refers to the tractability problems caused by the exponentialdependence between the computational cost of approximating (and representing) a fixed-accuracy solution and the problem dimensionality d. That is, increasing the number ofdimensions in the problem exponentially increases the cost to solve it. Depending on thenature of the problem, tractability issues can typically be seen starting at three, four orfive dimensions [45]. Attempting to apply classical discretisation techniques to problemswith a higher number of dimensions results in computational requirements that quicklyoverwhelm even the most state-of-the-art machines.

In order to understand the curse, consider first a problem from classical physics, whichtypically only involves a maximum of three spatial dimensions and possibly one time di-mension. The stationary heat equation is one such example. To solve this equation, onemight discretise a three-dimensional unit cube with piecewise polynomial functions in afinite element or finite difference approach employing p = 100 points (or degrees of free-dom) in each dimension. The resulting number of grid points would be P = pd = 1003 =106 = O(pd). Assuming ideal execution and a single floating point operation per gridpoint, the time required to solve such a problem would be of the order of nanoseconds ona modest supercomputer capable of 100 TFLOPS.

Consider now the task of approximating the price U of a financial basket option using themulti-asset Black-Scholes PDE, given in Appendix B.2. The number of dimensions d is

19

Page 32: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

given by the number of assets underlying the option. For example, dimensional countsof d ≈ 30 are common in problems dealing with stock indices [47]. Taking d = 10 as anexample and using the same Cartesian discretisation approach results in P = pd = 10010 =1020. A solution to this equation on a similar supercomputer would require a number ofweeks to complete, and further doubling the number of dimensions to d = 20 wouldresult in an ideal computation time of approximately 1018 years. In addition, the storagerequirements quickly become unmanageable. These effects are the typical manifestationsof the curse of dimensionality.

The multi-asset Heston PDE (C.20) in Appendix C.2 is another example of a high-dimensionalproblem. Indeed, for the same number of underlying assets, this problem has a dimension-ality of twice the size of that for the Black-Scholes multi-asset PDE. This problem is thusplagued by the curse of dimensionality to a larger extent, and it is clear that a smarterdiscretisation approach is mandatory in order to be able to tackle all but the most trivialcases.

0 18

14

38

12

58

34

78

10

0.2

0.4

0.6

0.8

1

x

φ3,5

(x)

Figure 4.1. Nodal basis function φ3,5 (x)

0 18

14

38

12

58

34

78

10

0.2

0.4

0.6

0.8

1

x

φ3,0(x) φ3,8(x)

φ3,1(x) φ3,2(x) φ3,3(x) φ3,4(x) φ3,5(x) φ3,6(x) φ3,7(x)

φ3,j

(x)

Figure 4.2. Nodal basis space V3, consisting of nine one-dimensional functions φ3,j (x) | j =0, 1, . . . , 8.

20

Page 33: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.2. Basis Functions and Spaces

4.2. Basis Functions and Spaces

A short retreat to the basic principles of grid-construction is necessary if one is to find analternative to Cartesian grids. This section presents the nodal basis as the basic mathemat-ical structure underpinning Cartesian grids, and goes on to introduce an alternative basiscalled the hierarchical basis. The hierarchical basis is the key to achieving low grid-pointcounts in sparse grids, and is thus an important topic on the road towards a cure for thecurse of dimensionality.

4.2.1. Nodal Basis

In one dimension, the nodal basis can be defined on the unit interval Ω = [0, 1] for adyadic discretization level l ∈ N0. The corresponding isotropic grid Ωl has mesh widthq = 2−l with boundary points x0 = 0 and x2l = 1, where xi = qi (i as defined below).The nodal basis for level l is then defined as in [17] by the function space Vl of piecewiseone-dimensional linear functions

Vl := spanφl,i | i = 0, 1, . . . , 2l. (4.1)

The one-dimensional functions φl,i in the space Vl are defined as

φl,i(x) :=

1−

∣∣∣x−qiq ∣∣∣ , if x ∈ [xi − q, xi + q] ∩ [0, 1]

0, otherwise.(4.2)

Figure 4.1 shows φ3,5(x) as an example. This function is the sixth member of the V3 functionspace, having support on the interval

[12 ,

34

]and a maximum value satisfying φ3,5

(58

)= 1.

The nodal basis V3 is shown fully in Figure 4.2.

One can generalise the nodal basis to an arbitrary number of dimensions d supportinganisotropic mesh widths across dimensions (that is, the mesh width is constant along anyone dimension, but may not be equal to the mesh width on other dimensions). The scalardiscretisation level l is first extended to a multi-index vector ~l = [l1 l2 · · · ld] ∈ Nd0as defined in [17]. For example, the vector ~l = [1 4 2] refers to the discretised three-dimensional unit cube with mesh widths in the respective dimensions defined by ~q :=[q1 q2 · · · qd] =

[2−l1 2−l2 · · · 2−ld

]and calculated as ~q =

[2−1 2−4 2−2

]∈ R3

for this example.

The multi-dimensional nodal basis is then defined by the function space V~l as the naturalextension of (4.1):

V~l := spanφ~l,~i | it = 0, 1, . . . , 2lt , t = 1, 2, . . . , d. (4.3)

21

Page 34: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

The basis functions for the d-dimensional nodal basis on the unit hypercube [0, 1]d can bedefined as in [40] as the tensor product of the one-dimensional nodal basis functions (4.2)from each dimension, that is:

φ~l,~i (x1, x2, . . . , x3) = φl1,i1(x1) · φl2,i2(x2) · . . . · φld,id(xd)

=

d∏k=1

φlk,ik(xk). (4.4)

0

0.2

0.4

0.6

0.81 0

0.2

0.4

0.6

0.8

10

0.5

1

φ2,1

(x1 )

φ1,

1(x

2)

x1 x2

φ~ l,~ i

Figure 4.3. Nodal basis function φ~l,~i, with ~l = [2 1] and~i = [1 1].

Figure 4.3 shows φ~l,~i for the two-dimensional case where ~l = [2 1] and ~i = [1 1].The projections of the one-dimensional basis functions involved in the tensor productφ~l,~i (x1, x2) = φl1,i1 (x1) · φl2,i2 (x2) = φ2,1 (x1) · φ1,1 (x2) are shown on the respective axisplanes.

4.2.2. Hierarchical Basis

The hierarchical basis is an alternative to the nodal basis and will provide a building blockfor sparse grids in the upcoming sections. In order to understand the hierarchical basis,the hierarchical increment space W~lp

is first introduced as in [17] as

W~lp:= span φ~lp,~i | i ∈ B~lp . (4.5)

22

Page 35: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.2. Basis Functions and Spaces

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1W1

φ1,1 φ0,1φ0,0

x

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1W2

φ2,1 φ2,3

x

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1W3

φ3,1 φ3,3 φ3,5 φ3,7

x

Figure 4.4. One-dimensional hierarchical basis H3 which consists of the three hierarchical in-crement spaces W1, W2 and W3. The red functions are the two boundary functionsfrom level zero in the nodal basis - they are included in the hierarchical incrementspace W1.

where the new level vector ~lp is different to the vector ~l in that its elements are strictlypositive integers, ~lp ∈ Nd. This new level vector is used so that the upcoming definition ofboundary-inclusive sparse grids has the same simple notation as that found in the literaturefor boundary-exclusive sparse grids. The definition of the vector ~lp implies that there are nohierarchical increment spaces of level zero, so the boundary basis functions are includedby definition in the hierarchical increment space of level one. To this end, the index set B~lp

23

Page 36: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

is given in the one-dimensional case by

Blp :=

i ∈ N0

∣∣∣∣∣∣i = 1, 3, 5, . . . , 2lp − 1 , i odd if lp > 1

i = 0, 1, 2 if lp = 1(4.6)

and for the d-dimensional case using the analogous definition to that in [17] for example.The basis function φ~lp,~i is defined in the single-dimensional case as

φlp,i :=

φ0,i if lp = 1, i ∈ 0, 1φ1,1 if lp = 1, i = 2

φlp,i otherwise,

and the same way as in (4.4) for the d-dimensional case. The key difference between thedefinition of the basis functions φl,i and φlp,i is in the nature of the boundary basis functionsof level one. In the former case the level-one boundary functions have support on half ofthe unit interval, whereas in the latter case they have support on the full unit interval (thatis, identical to the nodal basis functions of level zero).

Note from (4.6) that the hierarchical increment spaces for levels lp > 1 consist of only thosebasis functions that are centred at odd grid points. As aforementioned, (4.6) also ensuresthat the hierarchical increment space for level lp = 1 consists of three basis functions - thetwo boundary functions from the nodal basis of level zero (φ0,0 and φ0,1) and the singleodd-indexed (i = 1) basis function from level one (φ1,1). The one-dimensional hierarchicalincrement spaces W1, W2 and W3 are shown in Figure 4.4, where it is visible that W1 con-tains these three basis functions. The same concept in two dimensions is shown in Figure4.5.

In comparison to the nodal basis, the hierarchical basis for ~lp = [3 3] for example is pro-duced in a multi-level fashion by combining all 9 hierarchical increment subspaces shownin Figure 4.5. The hierarchical basis [19] is defined in general by

H~lp := spanφ~k,~i :~i ∈ B~k,~k ≤ ~lp

, (4.7)

where the ‘less-than or equal to’ relationship (≤) is element-wise.

Equation (4.7) describes the hierarchical basis as the combination of basis functions thatbelong to the hierarchical increment subspaces of all discretisation levels ~k that are smallerthan or equal to ~lp.

An example of the one-dimensional hierarchical basis H3 (consisting of the hierarchicalincrement spaces W1 through W3) is given in Figure 4.4. Labels for the single nodal basisfunctions φl,i(x) that comprise each hierarchical increment space are given in the figure.

24

Page 37: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.2. Basis Functions and Spaces

For the multi-dimensional case with isotropic mesh widths across dimensions, (i.e. l1 =l2 = . . . = ld = n > 0) one can define Hn := H[n ···n] [8] and hence the hierarchical basis forlevel n as:

Hn :=n⊕

l1=0

n⊕l2=0

· · ·n⊕

ld=0

W~lp=

⊕|~lp |∞≤n

W~lp. (4.8)

Figure 4.5. Decomposition of the two-dimensional space H3 into its hierarchical incrementspaces W~lp

(adapted from [17]). Selection of only the spaces above the dashed

separator results in the two-dimensional L2-norm based sparse grid space V (1)3 .

4.2.3. Comparison of Nodal and Hierarchical Basis

The one-dimensional case is considered here for brevity. The comparisons made can begeneralised to higher dimensions in a straight-forward manner. A comparison betweenthe number of nodes and basis functions is presented in Table 4.1.

For comparison it is also worthy to note that the supports of hierarchical basis functions ofdifferent levels can overlap (visible in Figure 4.4). If used generally to generate a problem

25

Page 38: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

Table 4.1. Comparison of nodal and hierarchical basis for level l in one dimensionNodal Basis Hierarchical Basis

Number of nodes(2l + 1

) (2l + 1

)Basis functions

(2l − 1

)interior hat functions

with support 2h, and twoboundary functions of sup-port h

Two boundary functions ofsupport 1, one global func-tion of support 1, two func-tions of support 1

2 , four func-tions of support 1

4 and soon until the required level isreached [36].

Refinement flexibility Refinement requires a newsetup.

Incremental refinement pos-sible (simple addition of extraincrement spaces).

stiffness matrix A for a linear system, the matrix A will hence be less sparse if based ona hierarchical basis than it would be if based on a nodal basis [35, p. 102]. This fact isimportant for the Heston solver - the matrix on which operations are performed in theiterative solver is not sparse. The algorithm used to solve this problem is discussed inSection 6.2.

4.2.4. Basis Functions of General Support

The one-dimensional basis functions φl,i(x) from (4.2) are defined on the unit interval [0, 1].In many cases it may not be practical to normalise a variable to this interval, and thus adefinition of a basis function on the generalised interval of [t, t+ q] needs to be devel-oped [22]. Here q is the scaling factor of the unit-interval and t its translation in the posi-tive x-direction. Simple substitutions into (4.2) lead to the one-dimensional basis functionφ

(BB)l,i (x) on the interval [t, t+ q] being defined as

φ(BB)l,i (x) =

1− |2

l(x−t)−qi|q , if x ∈

[q(i−1)

2l+ t, q(i+1)

2l+ t]∩ [t, t+ q]

0, otherwise.(4.9)

4.3. Sparse Grids

Sparse grids are a general, multi-dimensional discretisation technique which, at least tosome extent, cure the curse of dimensionality [17, 36]. This section presents the basic con-struction technique for a sparse grid and makes a comparison to the classical Cartesiandiscretisation technique.

26

Page 39: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.3. Sparse Grids

4.3.1. Principle of Construction

Various approaches exist for constructing a sparse grid at a particular discretisation level.The classical method explored here is based on optimising the cost-benefit relationshipusing the L2-norm [8]. This method involves cutting a diagonal in the tableau of hierar-chical increment spaces and taking the spaces that lie above this diagonal (in Figure 4.5these spaces lie above the dashed separator). More formally, the L2-norm based sparsegrid space V (1)

n for level n can be written [18] as

V (1)n :=

⊕|~lp |1≤n+d−1

W~lp. (4.10)

For example, the sparse grid space V (1)3 in two dimensions is built by combining all spaces

W~lp∈ W[α β] such that α + β ≤ 4. These spaces are found above the dashed separator

in Figure 4.5. The corresponding two-dimensional sparse grid V (1)3 is shown in Figure 4.6

along with the further-refined grids V (1)4 and V

(1)5 . Finally it is noted that sparse grids

offer a node-count benefit over Cartesian grids for d ≥ 2 (that is, there is no benefit inusing sparse grids in the one-dimensional case).

V(1)

3 V(1)

4 V(1)

5

Figure 4.6. The two-dimensional sparse grids V (1)3 , V (1)

4 and V (1)5 .

4.3.2. Taming the Curse with Sparse Grids

The number of grid points (including the boundary points) in an L2-norm based sparsegrid is given [8] as

∣∣∣V (1)n

∣∣∣ = 2n[(

nd−1

(d− 1)!

)+O

(nd−2

)]+ 2d−1 (2n − 1) d+ 2d. (4.11)

Table 4.2 shows the number of grid points of L2-norm based sparse grids compared tostandard Cartesian grids. The table gives counts for up to seven dimensions with levels

27

Page 40: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

l = 3 and l = 6 . A further grouping of the data is made corresponding to the inclusionand exclusion of boundary points. It is clearly noticeable that sparse grids exhibit a slowergrowth rate than Cartesian grids as the dimensionality and level increases.

The table also shows that the majority of sparse grid points are boundary points for non-trivial level and dimensionality. As will be discussed in the following chapter, the Hestonsolver uses Dirichlet conditions on the boundary of the problem space. The use of theseconditions allows for the exclusion of boundary points from the system being solved, re-sulting in computational savings that reflect those shown in the table.

l = 3 l = 6

Dimension Count Cartesian Grid Sparse Grid Cartesian Grid Sparse Grid

Including Boundary Points

d = 1 9 9 65 65d = 2 81 49 4225 577d = 3 729 225 274625 3713d = 4 6561 945 17850625 20481d = 5 59049 3753 1160290625 102785d = 6 531441 14337 75418890625 483201d = 7 4782969 53217 4902227890625 2163969

Excluding Boundary Points

d = 1 7 7 63 63d = 2 49 17 3969 321d = 3 343 31 250047 1023d = 4 2401 49 15752961 2561d = 5 16807 71 992436543 5503d = 6 117649 97 62523502209 10625d = 7 823543 127 3938980639167 18943

Table 4.2. Comparison of the number of grid points (nodes) between Cartesian and sparsegrids with varying dimension-count, level and boundary-inclusion. The data wasobtained through the generation of the corresponding grids in the SG++framework.

From (4.11) the general asymptotic complexity for the number of grid points in anL2-normbased sparse grid can be determined as

∣∣∣V (1)n

∣∣∣ = O(

2n · nd−1)

= O(h−1n · log

(h−1n

)d−1).

The use of an L2-norm based sparse grid in place of a Cartesian grid hence reduces thenumber of grid points from

O(

2n·d)

= O(h−dn

)

28

Page 41: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.4. Function Interpolation using the Hierarchical Basis and Sparse Grids

to

O(

2n · nd−1)

= O(h−1n · log

(h−1n

)d−1)

with hn = 2−n.

Although a dependence on d is still present in the asymptotic complexity for the numberof grid points, it is much weaker. This represents a considerable reduction in the numberof grid points and improves the tractability of solving high-dimensional problems in thesense of the involved computational work and storage. The use of L2-norm based sparsegrids hence alleviates at least to some extent the curse of dimensionality.

A natural question that one might pose at this stage is: What is the deterioration in accu-racy that results from using such sparse grids? It is first noted that the interpolation errormeasured in the L2-norm for regular Cartesian grids is in O

(h2n

). For the sparse grids dis-

cussed here it can be shown (in [8], for example) that the corresponding error with respectto the L2 and L∞ norms is in

O(h2n ·(

log(h−1n

)d−1))

,

assuming that the solution is sufficiently smooth (bounded second mixed derivatives [8]).It is clear that this is a small price to pay for the large savings obtained with respect to thenumber of grid points.

4.4. Function Interpolation using the Hierarchical Basis andSparse Grids

Function interpolation in one dimension is first investigated. The function fn ∈ Hn on thehierarchical basis of level n can linearly interpolate the function f ∈ V using [17]

fn(x) =n∑

lp=1

∑i∈Blp

αlp,i · φlp,i (x)

, (4.12)

where αlp,i ∈ R are the coefficients of the representation of the function in the hierarchi-cal basis. The coefficient values are calculated for the one-dimensional case in a simplemanner using

αlp,i =

f(xlp,i) if lp = 1, i ∈ 0, 1 (the boundaries),

f(xlp,i)−f(xlp,0)+f(xlp,1)

2 if lp = 1, i = 2,

f(xlp,i)−f(xlp,i−1)+f(xlp,i+1)

2 otherwise,

(4.13)

29

Page 42: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4. Space Discretisation using Sparse Grids

where xlp,i is the grid node belonging to the basis function φlp,i (x). The α coefficientsare commonly known as the hierarchical surplus values. The aptness of this name becomesclear after considering Figure 4.7, which shows the interpolation of the one-dimensionalfunction f(x) = sin(2.5x) on the hierarchical basis of level lp = 3. For the levels lp > 1,the graphic shows that the coefficient αlp,i is the remaining value that, when added to theinterpolant of the previous level, gives the exact function value at the grid node belongingto φlp,i (x).

Based on the calculation in (4.13) for the non-boundary points, one also notices that hi-erarchical surplus values are a measurement for discrete second mixed derivatives andcan hence be interpreted as a measure of the smoothness of the considered function atthat point. This interpretation is exploited in the SG++adaptivity functionality used in theHeston solver - local refinement of the grid can be completed in non-smooth areas by con-sidering the hierarchical surplus value (measured against the maximum norm) of eachpoint and completing subsequent refinement if this value exceeds a threshold [22].

0 18

14

38

12

58

34

78

10

0.2

0.4

0.6

0.8

1

α1,0

α1,1

α1,2

α2,1

α2,3

α3,1

α3,3

α3,5

α3,7

x

Level 1 Contributions

Level 2 Contributions

Level 3 Contributions

Figure 4.7. Interpolation of the function f(x) = sin(2.5x) using the hierarchical basis of levellp = 3. The exact function is shown in red. Each successive level adds to the existinginterpolant to provide an improved representation of the function. The hierarchicalsurplus values αlp,i are shown in purple.

The extension to multiple dimensions is trivial with the use of the tensor-product definitionof the basis functions given in (4.4). The hierarchical surplus values can be calculated usingthe multiple-dimensional extension of (4.13) (see [17]1, for example). Now the function

1Note that a trivial adjustment is required in these formulas for the level-one case, which is defined in thisthesis to include the boundary basis functions.

30

Page 43: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

4.4. Function Interpolation using the Hierarchical Basis and Sparse Grids

fn ∈ Hn on the hierarchical basis of level n can d-linearly interpolate the function f ∈ Vusing (now assuming ~x ∈ Rd)

fn(~x) =∑|~lp |∞≤n

∑~i∈B~lp

α~lp,~i · φ~lp,~i (~x)

. (4.14)

This concept can then be extended to the use of sparse grids. Analogous to (4.10), this isdone by simply restricting the choice of hierarchy increment spaces from which the basisfunctions are taken. The function f (1)

n ∈ V (1)n on the L2-norm based sparse grid of level n

can interpolate the same function f using

f (1)n (~x) =

∑|~lp |1≤n+d−1

∑~i∈B~lp

α~lp,~i · φ~lp,~i (~x)

. (4.15)

31

Page 44: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 45: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on SparseGrids

The safe way to double your money is tofold it over once and put it in your pocket.

FRANK HUBBARD

This chapter presents the approach used to spatially discretise Heston’s PDEs on sparsegrids. Discretisation in the time dimension is also discussed. The chapter finishes with anexplanation of the boundary conditions used in the Heston solver.

5.1. The Appropriate Discretisation Scheme

Finite difference (FD) schemes have to date been a popular choice for discretising Heston’sPDEs (see [13, 29], for example). The solvers described in such papers are typically basedon non-uniform Cartesian grids which provide refinement in the non-smooth “strike” re-gion of the payoff function. As explained in Chapter 4, however, the use of Cartesian gridsrenders costly the pricing of options that are based on a non-trivial number of underlyings(this is likely the reason for the fact that it is very difficult to find existing research resultsfor Heston solvers based on more than one underlying). In this thesis, sparse grids areused in order to efficiently price such options. Although the sparse grid concept has beenapplied to most of the relevant discretisation schemes for PDEs (finite element methodsand Galerkin techniques, finite differences, finite volumes and spectral methods), the firstmain focus of the development of sparse grid discretisation methods was on piecewiselinear finite elements [8]. Finite element methods lend themselves well to the hierarchicalbasis and have been the standard choice for other sparse-grid based PDE solvers at thechair [22, 23, 48]. They can also handle both complicated domains and irregular solutions[6, 56]. The choice was thus made to use finite elements as the discretization scheme forsolving Heston’s PDEs.

Given a discretisation scheme, perhaps the simplest way to solve a PDE on a sparse grid isto use the combination technique [20]. The combination technique is based on the observa-tion that the sparse grid space V (1)

n can be viewed as a combination of nodal-basis spaces.The solution to the PDE on a sparse grid can then be obtained by the superposition ofmultiple PDE solutions which are based on smaller, regular grids. This approach is ad-vantageous in that its algorithmic implementation is naturally parallel and well-matchedto today’s high-performance computer architectures. Furthermore, the power of existing’out-of-the-box’ regular-grid tools (e.g. multigrid methods) can be leveraged to efficiently

33

Page 46: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

arrive at each of the partial solutions. The combination technique, however, encountersdifficulties when grid-adaptivity is desired. Given the cusp in the payoff function of a Eu-ropean option, it was indeed tempting to exploit the existing SG++adaptivity functionalityfor use in the Heston solver. The decision was then made to solve directly on the relevantsparse grid, rather than using the combination technique.

5.2. Introduction to the Finite Element Method

The purpose of this section is to provide an overview of the Finite Element Method (FEM),which will be applied later in this chapter to discretise various forms of Heston’s PDE. Anin-depth treatment of FEM theory is not within the scope of this thesis; the reader with athirst not quenchable by the following introduction is referred to the plethora of textbookson the topic (see [6, 57], for example).

The FEM provides a formalism for generating discrete algorithms for approximating thesolutions of differential equations. As an introduction it will suffice to consider the generalone-dimensional problem

Lv(x) = f(x) x ∈ Ω, Ω ⊂ R, (5.1)

where L is a known arbitrary differential operator (for example, the Laplacian in the Pois-son equation), f a known arbitrary right-hand side, and v an unknown function for whicha solution is sought. Additional restraints for the solution v are typically prescribed on theboundary ∂Ω. Such boundary conditions come in different flavours, including Dirichlet,Neumann and Robin types. Boundary conditions are generally necessary if a unique so-lution is desired. The governing equation (5.1) together with its boundary conditions istermed the strong form of the problem.

Depending on the nature ofL, solving the strong form of the problem using approximationtechniques typically requires computation of second or higher-order derivatives [63]. Suchrequirements may be weakened by considering an integral expression for (5.1) written as

∫ΩLv(x)ψ(x) dx =

∫Ωf(x)ψ(x) dx ∀v, ψ, (5.2)

known as the weak (or variational) formulation of the same problem. Here ψ is an arbitrarytest function. It can be shown (in [6, 63], for example) that (5.2) is equivalent to (5.1) (thatis, the trial solution that satisfies the weak form of the problem is also the solution tothe strong form of the problem). Compared to the strong form, the weak form is so-namedbecause it relaxes the continuity requirements of the associated variables (only lower-orderderivatives are required for constructing a solution).

At this stage it may appear as though little has been gained. This new problem is moredifficult to solve than the differential equation was, since there are an infinite number oftrial functions for v that must be tested against an infinite number of test functions ψ [57].

34

Page 47: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.2. Introduction to the Finite Element Method

At this point it is however recalled that an exact solution to the problem is typically notrequired - an approximate solution suffices. Accepting this, Equation (5.2) only needs tohold for a constrained function space and thus a finite set of trial functions, which leadsto an approach involving the solution v(x) being approximated by u(x), where u(x) is thesum of N weighted basis functions,

u(x) :=N∑n=1

un φn(x). (5.3)

The basis functions φn(x) are static for the solution; the degrees of freedom lie in the con-stant coefficients un. The goal is then to determine each un such that u(x) ≈ v(x).

The task remains to select a finite set of test functions ψ for which (5.2) must hold; aninfinite set of test functions is computationally intractable. Although various methodsfor choosing such a set exist, the Ritz-Galerkin [14] method will be adopted here. Thismethod simply dictates that the set of test functions is the same as the set of basis functions.Assuming that L is linear it follows that (5.2) can be rewritten as

N∑n=1

un

∫ΩLφn(x)φm(x) dx︸ ︷︷ ︸

:=an,m

=

∫Ωf(x)φm(x) dx︸ ︷︷ ︸

bm

∀m = (1, . . . , N) . (5.4)

Due to the fact that both φn and φm are in the same function space, (5.4) represents acollection of N equations which can be utilised to solve for the N coefficients un. Thecorresponding system can be written as

A~u = ~ba1,1 · · · a1,N...

. . ....

aN,1 · · · aN,N

u1

...uN

=

b1...bN

.Depending on the properties of the matrix A (size, symmetry and sparsity for example),various approaches exist for solving such systems (hopefully exploiting some level of par-allelism). Small systems lend themselves well to direct solvers such as LU or QR decompo-sition, which lead to the exact solution (not considering roundoff errors) in a fixed numberof steps. Large systems typically need to be tamed by iterative approaches like the non-stationary conjugate gradient (CG) method or its relatives GMRES, BiCG and BiCGSTAB.The practical success of such iterative solvers is however governed by the speed of con-vergence, which depends on properties such as the distribution of eigenvalues and thecomponents of the starting vector in the eigenvector directions [12]. Preconditioning is of-ten required. A full discussion of these issues is the topic of numerous texts (see [12, 32, 51],for example) and will not be pursued in detail here. For this thesis it is sufficient to note

35

Page 48: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

that the Heston solver does not use CG because the systems being solved are not symmet-ric (owing to the use of non-symmetric up/down schemes, as explained in Chapter 6). Forthis reason the Heston solver uses the BiCGSTAB iterative solver.

5.3. The Finite Element Method Applied to Heston’s PDEs

The following subsections use the FEM to discretise Heston’s PDEs, whereby henceforth a“housekeeping” transformation of the time dimension is implemented by substituting

τ = T − t , 0 ≤ τ ≤ T.

This substitution turns the terminal values of (3.7) and (3.12) into initial values (the generalconvention) and results in the equations from Section 3.3 undergoing a replacement suchthat

∂U

∂t=∂U

∂τ

∂τ

∂t=∂U

∂τ

∂t(T − t) = −∂U

∂τ.

The τ -derivative term of each equation can then be isolated with a positive sign on theopposite side.

5.3.1. Variational Formulation: Vanilla Case (Cartesian)

The Cartesian variant of Heston’s vanilla PDE (3.5) is two-dimensional in space (S and v).The aim of this section is to determine a variational formulation for this PDE, which will actas a stepping stone to the upcoming multi-asset formulation in logarithmic-transformedcoordinates.

The first task is to proceed analogously to Appendix C.2 and define a vector ~z which holdsS and v for the single asset:

~z :=[z1 z2

]=[S v

]∈ R2.

Using the new τ variable for the time dimension, the Cartesian vanilla PDE (3.5) expressedin terms of the vector ~z is

∂U

∂τ=

1

2z2

1z2∂2U

∂z21

+ ρξz1z2∂2U

∂z1∂z2+

1

2ξ2z2

∂2U

∂z22

+ κ (θ − z2)∂U

∂z2+ rz1

∂U

∂z1− rU, (5.5)

36

Page 49: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.3. The Finite Element Method Applied to Heston’s PDEs

with the initial condition (payoff function)

U(~z, τ = 0) =

max z1 −K, 0 for a call option,max K − z1, 0 for a put option.

Analogously to (5.3), the exact solutionU(~z, τ) can be approximated by the function u(~z, τ) ≈U(~z, τ), where

u(~z, τ) :=N∑n=1

un(τ)φn(~z). (5.6)

At this point it is noted that the coefficients un(τ) of the basis functions are no longerconstant as in the example of Section 5.2. The coefficients are instead functions of the timevariable τ . This difference stems from the fact that the Heston PDE is non-stationary; thefunctions however remain constant in the spatial domain.

Substituting the approximate solution u(~z, τ) into (5.5) leads to

∂u(~z, τ)

∂τ=

1

2z2

1z2∂2u(~z, τ)

∂z21

+ ρξz1z2∂2u(~z, τ)

∂z1∂z2+

1

2ξ2z2

∂2u(~z, τ)

∂z22

+ κ (θ − z2)∂u(~z, τ)

∂z2+ rz1

∂u(~z, τ)

∂z1− ru(~z, τ). (5.7)

Using the Ritz-Galerkin approach introduced in Section 5.2, Equation (5.7) is now multi-plied with a finite number of test functions ψm = φm with m = (1, 2, . . . , N), followed byan integration over the solution domain Ω

∫Ω

∂u(~z, τ)

∂τφm(~z ) d~z =

∫Ω

[1

2z2

1z2∂2u(~z, τ)

∂z21

+ ρξz1z2∂2u(~z, τ)

∂z1∂z2+

1

2ξ2z2

∂2u(~z, τ)

∂z22

+ κ (θ − z2)∂u(~z, τ)

∂z2+ rz1

∂u(~z, τ)

∂z1

− ru(~z, τ)

]φm(~z ) d~z ∀m = (1, . . . , N) .

Performing the necessary integration by parts to remove second-order derivative termsgives

∫Ω

∂u(~z, τ)

∂τφm(~z ) d~z =

1

2

[∫∂Ωz2

1z2∂u(~z, τ)

∂z1φm(~z ) d~z − 2

∫Ωz1z2

∂u(~z, τ)

∂z1φm(~z )d~z

37

Page 50: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

−∫

Ωz2

1z2∂u(~z, τ)

∂z1

∂φm(~z )

∂z1d~z

]+ ρ ξ

[∫∂Ωz1z2

∂u(~z, τ)

∂z2φm(~z ) d~z −

∫Ωz2∂u(~z, τ)

∂z2φm(~z )d~z

−∫

Ωz1z2

∂u(~z, τ)

∂z2

∂φm(~z )

∂z1d~z

]+

1

2ξ2

[∫∂Ω

z2∂u(~z, τ)

∂z2φm(~z ) d~z −

∫Ω

∂u(~z, τ)

∂z2φm(~z )d~z

−∫

Ωz2∂u(~z, τ)

∂z2

∂φm(~z )

∂z2d~z

]+

∫Ωκ (θ − z2)

∂u(~z, τ)

∂z2φm(~z ) d~z

+ r

∫Ωz1∂u(~z, τ)

∂z1φm(~z ) d~z − r

∫Ωu(~z, τ)φm(~z ) d~z ∀m = (1, . . . , N) .

Substituting the definition of u(~z, τ) from (5.6), rearranging and regrouping gives

N∑n=1

∂un(τ)

∂τ

∫Ωφn(~z )φm(~z ) d~z =

N∑n=1

un(τ)

[1

2

∫∂Ωz2

1z2∂φn(~z )

∂z1φm(~z ) d~z

+ ρξ

∫∂Ωz1z2

∂φn(~z )

∂z2φm(~z ) d~z +

1

2ξ2

∫∂Ωz2∂φn(~z )

∂z2φm(~z ) d~z

−∫

Ωz1z2

∂φn(~z )

∂z1φm(~z ) d~z − 1

2

∫Ωz2

1z2∂φn(~z )

∂z1

∂φm(~z )

∂z1d~z

− (κ+ ρ ξ)

∫Ωz2∂φn(~z )

∂z2φm(~z ) d~z − ρξ

∫Ωz1z2

∂φn(~z )

∂z2

∂φm(~z )

∂z1d~z

+

(κθ − 1

2ξ2

)∫Ω

∂φn(~z )

∂z2φm(~z ) d~z − 1

2ξ2

∫Ωz2∂φn(~z )

∂z2

∂φm(~z )

∂z2d~z

+ r

∫Ωz1∂φn(~z )

∂z1φm(~z ) d~z − r

∫Ωφn(~z )φm(~z ) d~z

]∀m = (1, . . . , N) . (5.8)

5.3.2. Operator Formulation: Vanilla Case (Cartesian)

Equation (5.8) can be written in terms of operators for matrix application. The rewrittenequation is

A~u(τ) =

[1

2Γ(III) + ρξΓ(IV) +

1

2ξ2Γ(II) − X − 1

2Y − (κ+ ρξ)G

− ρξW +

(κθ − 1

2ξ2

)F − 1

2ξ2D + rZ − rA

]· ~u(τ)

:= Lcart · ~u(τ),

38

Page 51: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.3. The Finite Element Method Applied to Heston’s PDEs

with the operators1

A := (an,m) ∈ RN×N with an,m =

∫Ωφn(~z )φm(~z ) d~z,

D := (dn,m) ∈ RN×N with dn,m =

∫Ωz2i∂φn(~z )

∂z2i

∂φm(~z )

∂z2id~z,

F := (fn,m) ∈ RN×N with fn,m =

∫Ω

∂φn(~z )

∂z2iφm(~z ) d~z,

G := (gn,m) ∈ RN×N with gn,m =

∫Ωz2i∂φn(~z )

∂z2iφm(~z ) d~z,

W := (wn,m) ∈ RN×N with wn,m =

∫Ωz2i−1z2i

∂φn(~z )

∂z2i

∂φm(~z )

∂z2i−1d~z,

X := (xn,m) ∈ RN×N with xn,m =

∫Ωz2i−1z2i

∂φn(~z )

∂z2i−1φm(~z ) d~z,

Y := (yn,m) ∈ RN×N with yn,m =

∫Ωz2

2i−1z2i∂φn(~z )

∂z2i−1

∂φm(~z )

∂z2i−1d~z,

Z := (zn,m) ∈ RN×N with zn,m =

∫Ωz2i−1

∂φn(~z )

∂z2i−1φm(~z ) d~z,

Γ(II) := (γ(II)n,m) ∈ RN×N with γ(II)

n,m =

∫∂Ωz2i∂φn(~z )

∂z2iφm(~z ) d~z,

Γ(III) := (γ(III)n,m) ∈ RN×N with γ(III)

n,m =

∫∂Ωz2

2i−1z2i∂φn(~z )

∂z2i−1φm(~z ) d~z and

Γ(IV) := (γ(IV)n,m) ∈ RN×N with γ(IV)

n,m =

∫∂Ωz2i−1z2i

∂φn(~z )

∂z2iφm(~z ) d~z.

where it is noted that i = 1 in the vanilla case. As described in Section 3.3, the boundaryconditions used in the Heston solver are all of the Dirichlet variety. The operators Γ(II),Γ(III) and Γ(IV) can hence be ignored because the corresponding boundary integrals vanishin this situation. The remaining operators above need to be evaluated in order to build theoperator Lcart.

1Note the distinction between the vector ~z (elements indexed with one variable) and the operatorZ (elementsindexed with two variables)

39

Page 52: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

5.3.3. Variational Formulation: Vanilla Case (Log-Transformed)

The log-transformed variant of Heston’s vanilla PDE (3.6) is also two-dimensional in space(x and v). The aim of this section is to determine a variational formulation for this PDE,which is the next step on the road to the eventual multi-asset formulation in log-transformedcoordinates. Again the starting point is to proceed analogously to Appendix C.2 and de-fine a vector2 ~z which holds x and v for the single asset:

~z :=[z1 z2

]=[x v

]∈ R2.

The log-transformed Heston PDE for the single-asset case (3.6) can now be rewritten as

∂U

∂τ=

1

2z2∂2U

∂z21

+ ρ ξ z2∂2U

∂z1∂z2+

1

2ξ2z2

∂2U

∂z22

+ κ (θ − z2)∂U

∂z2+

(r − 1

2z2

)∂U

∂z1− rU, (5.9)

with the initial condition (payoff function)

U(~z, τ = 0) =

max ez1 −K, 0 for a call option,max K − ez1 , 0 for a put option.

Following the approach from Section 5.3.1, the variational formulation obtained for thisPDE is

N∑n=1

∂un(τ)

∂τ

∫Ωφn(~z )φm(~z ) d~z =

N∑n=1

un(τ)

[1

2

∫∂Ωz2∂φn(~z )

∂z1φm(~z ) d~z

+

(ρ ξ +

1

2ξ2

)∫∂Ωz2∂φn(~z )

∂z2φm(~z ) d~z + r

∫Ω

∂φn(~z )

∂z1φm(~z ) d~z

+

(κ θ − 1

2ξ2

)∫Ω

∂φn(~z )

∂z2φm(~z ) d~z − 1

2

∫Ωz2∂φn(~z )

∂z1

∂φm(~z )

∂z1d~z

− ρ ξ

∫Ωz2∂φn(~z )

∂z2

∂φm(~z )

∂z1d~z − 1

2ξ2

∫Ωz2∂φn(~z )

∂z2

∂φm(~z )

∂z2d~z

− κ

∫Ωz2∂φn(~z )

∂z2φm(~z ) d~z − 1

2

∫Ωz2∂φn(~z )

∂z1φm(~z ) d~z

2In this thesis the vector ~z is used in both the Cartesian and log-transformed PDEs. In the Cartesian casethe vector’s stock-price elements are Si and in the log-transformed case the stock-price elements are xi(1 ≤ i ≤M ). The vector’s variance elements vi are the same in both cases.

40

Page 53: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.3. The Finite Element Method Applied to Heston’s PDEs

− r∫

Ωφn(~z )φm(~z ) d~z

]∀m = (1, . . . , N) . (5.10)

5.3.4. Operator Formulation: Vanilla Case (Log-Transformed)

Equation (5.10) can be written in terms of operators for matrix application as

A~u(τ) =

[1

2Γ(I) +

(ρ ξ +

1

2ξ2

)Γ(II) + rE +

(κ θ − 1

2ξ2

)F

− 1

2B − ρ ξC − 1

2ξ2D − κG − 1

2H − rA

]· ~u(τ)

:= Llog · ~u(τ).

with the additional operators

B := (bn,m) ∈ RN×N with bn,m =

∫Ωz2i∂φn(~z )

∂z2i−1

∂φm(~z )

∂z2i−1d~z,

C := (cn,m) ∈ RN×N with cn,m =

∫Ωz2i∂φn(~z )

∂z2i

∂φm(~z )

∂z2i−1d~z,

E := (en,m) ∈ RN×N with en,m =

∫Ω

∂φn(~z )

∂z2i−1φm(~z ) d~z,

H := (hn,m) ∈ RN×N with hn,m =

∫Ωz2i∂φn(~z )

∂z2i−1φm(~z ) d~z and

Γ(I) := (γ(I)n,m) ∈ RN×N with γ(I)

n,m =

∫∂Ωz2i∂φn(~z )

∂z2i−1φm(~z ) d~z.

where again it is noted that i = 1 in the vanilla case. Similarly to the Cartesian case,the operators Γ(I) and Γ(II) can be ignored because the corresponding boundary integralsvanish. This leaves the operators A to H which are to be evaluated in order to constructthe operator Llog.

5.3.5. Variational Formulation: Basket Case (Log-Transformed)

Due to the complexity of its required operators, the Cartesian form of Heston’s basket-option PDE (C.20) was de-scoped from treatment by the Heston solver. The numerically“friendlier” log-transformed variant was instead chosen for implementation. The relevantPDE (C.23) in terms of the vector ~z is

41

Page 54: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

∂U

∂τ=

1

2

M∑i=1

M∑j=1

√z2i√z2jρ(2i−1,2j−1)

∂2U

∂z2i−1∂z2j−1

+M∑i=1

M∑j=1

ξj√z2i√z2jρ(2i−1,2j)

∂2U

∂z2i−1∂z2j+

1

2

M∑i=1

M∑j=1

ξiξj√z2i√z2jρ(2i,2j)

∂2U

∂z2i∂z2j

+M∑i=1

κi (θi − z2i)∂U

∂z2i+

M∑i=1

(r − 1

2z2i

)∂U

∂z2i−1− rU, (5.11)

with the initial condition (payoff function)

U(~z, τ = 0) =

max

1M

M∑i=1

(ez2i−1 −K) , 0

for a call option,

max

1M

M∑i=1

(K − ez2i−1) , 0

for a put option.

Following again the approach from Section 5.3.1, the variational formulation obtained forthis PDE is

N∑n=1

∂un(τ)

∂τ

∫Ωφn(~z )φm(~z ) d~z =

N∑n=1

un(τ)

M∑i=1

M∑j=1

[ξjρ(2i−1,2j)

∫∂Ω

√z2i√z2j

∂φn(~z )

∂z2jφm(~z ) d~z

+1

2ρ(2i−1,2j−1)

∫∂Ω

√z2i√z2j

∂φn(~z )

∂z2j−1φm(~z ) d~z +

1

2ξiξjρ(2i,2j)

∫∂Ω

√z2i√z2j

∂φn(~z )

∂z2jφm(~z ) d~z

− ξjρ(2i−1,2j)

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j

∂φm(~z )

∂z2i−1d~z − 1

2ρ(2i−1,2j−1)

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j−1

∂φm(~z )

∂z2i−1d~z

−1

2ξiξjρ(2i,2j)

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j

∂φm(~z )

∂z2id~z − 1

4ξiξjρ(2i,2j)

∫Ω

1√z2i

√z2j

∂φn(~z )

∂z2jφm(~z ) d~z

]

+

M∑i=1

[κiθi

∫Ω

∂φn(~z )

∂z2iφm(~z ) d~z + r

∫Ω

∂φn(~z )

∂z2i−1φm(~z ) d~z − 1

2

∫Ωz2i∂φn(~z )

∂z2i−1φm(~z ) d~z

−κi∫

Ωz2i∂φn(~z )

∂z2iφm(~z ) d~z

]− r

∫Ωφn(~z )φm(~z ) d~z

∀m = (1, . . . , N) . (5.12)

5.3.6. Operator Formulation: Basket Case (Log-Transformed)

Despite the aesthetic complexity of (5.12), the earlier approach is still applicable and leadsto the form

42

Page 55: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.4. Exploiting Sparse Grids in the Heston Solver

A~u(τ) =

M∑i=1

M∑j=1

[(ξjρ(2i−1,2j) +

1

2ξiξjρ(2i,2j)

)Γ(V) +

1

2ρ(2i−1,2j−1)Γ

(VI)

− ξjρ(2i−1,2j)J −1

2ρ(2i−1,2j−1)K −

1

2ξiξjρ(2i,2j)P −

1

4ξiξjρ(2i,2j)Q

]

+M∑i=1

[κiθiF + rE − 1

2H − κiG

]− rA

· ~u(τ)

:=Lbasket · ~u(τ),

with the additional operators

J := (jn,m) ∈ RN×N with jn,m =

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j

∂φm(~z )

∂z2i−1d~z,

K := (kn,m) ∈ RN×N with kn,m =

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j−1

∂φm(~z )

∂z2i−1d~z,

P := (pn,m) ∈ RN×N with pn,m =

∫Ω

√z2i√z2j

∂φn(~z )

∂z2j

∂φm(~z )

∂z2id~z,

Q := (qn,m) ∈ RN×N with qn,m =

∫Ω

1√z2i

√z2j

∂φn(~z )

∂z2jφm(~z ) d~z,

Γ(V) := (γ(V)n,m) ∈ RN×N with γ(V)

n,m =

∫∂Ω

√z2i√z2j

∂φn(~z )

∂z2jφm(~z ) d~z and

Γ(VI) := (γ(VI)n,m) ∈ RN×N with γ(VI)

n,m =

∫∂Ω

√z2i√z2j

∂φn(~z )

∂z2j−1φm(~z ) d~z.

Again the operators Γ(V) and Γ(VI) vanish owing to the use of Dirichlet boundary condi-tions.

5.4. Exploiting Sparse Grids in the Heston Solver

Based on the discussion in Chapter 4 it should be clear that a nodal-basis implementationof a deterministic, multi-dimensional Heston solver would suffer from the curse of dimen-sionality. Sparse grids can temper this curse. The task remains to describe the means bywhich sparse grids can be integrated into the finite element discretisations given in theprevious sections.

From the Ritz-Galerkin approach it is remembered that both the basis and test functionsshare the same function space. This space consists of N functions; one function corre-sponding to each of the N grid points in the domain. Until now we have not addressed

43

Page 56: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

how these grid points are defined, but the astute reader should no longer require a degreein rocket surgery to presume that in order to exploit the benefits of sparse grids, thesemulti-dimensional functions must be defined in the same way as (4.4). That is, each d-dimensional basis function φn(~z) defined on the n-th grid point in multiple dimensions isdescribed by the n-th level- and index-vector pair ~lp and~i such that

φn(~z) =

d-dimensional︷ ︸︸ ︷φ~lp,~i(~z) =

d∏k=1

1-dimensional︷ ︸︸ ︷φlk,ik(zk) . (5.13)

As with (4.4), the multi-dimensional basis and test functions used in the finite elementdiscretisation are now expressed as the tensor product of multiple one-dimensional basisfunctions. The N level and index vector pairs are given in accordance with (4.5) and (4.10)by the hierarchical increment spaces W~lp

that are included in the chosen sparse grid.

Based on this definition of the basis functions it is now briefly noted that the discretisationof the approximate solution u(~z, τ) defined in (5.6) can be written more precisely as

u(~z, τ) :=∑~lp,~i

u~lp,~i(τ)d∏

k=1

φlk,ik(zk).

Although this form is more relevant for the actual software implementation of the finiteelement method, the shorter version of (5.6) will be retained in the remainder of this thesisfor the sake of brevity.

5.5. Time Discretisation

The concluding equations of the previous subsections are all of the form

A~u(τ) = L~u. (5.14)

It remains to discretise the time-derivative ~u(τ). This is done using the standard forwardfinite difference approach

~u(τ) ≈ ~u(τ + ∆τ)− ~u(τ)

∆τ=~u(τ (k+1))− ~u(τ (k))

∆τ, (5.15)

where τ (0) = 0 and ~u(0) is known. For simplicity it is enforced that ∆τ = τ (k+1) − τ (k)

is constant for every time step k ∈ N0. The solution to (5.14) then involves stepping in adiscrete fashion through the τ dimension and solving a more manageable3 PDE at each

3The use of such a time stepping approach keeps the allocated memory limited by reducing the number ofderivative terms that need to be discretised.

44

Page 57: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.6. Domain-Truncation and Boundary Conditions for the Heston Solver

step. The price of the option is then obtained as the solution to the final step in the series,when τ = T .

The common one-step θ1 family of time-stepping schemes [31] can be used in the applica-tion of this discretisation to (5.14):

A~u(τ (k+1))− ~u(τ (k))

∆τ= θ1L~u(τ (k+1)) + (1− θ1)L~u(τ (k)). (5.16)

Here θ1 can take any value in the range 0 ≤ θ1 ≤ 1, resulting in different time-steppingschemes. Popular choices for θ1 include 0, 1 or 1

2 , which refer to the explicit (forward) Euler,implicit (backward) Euler and Crank-Nicholson schemes respectively. The implementedHeston solver uses a combination of the implicit Euler and Crank-Nicholson methods asfollows:

1. A small, fixed number of initial time steps are performed using the implicit Eulerscheme. Although this scheme has low-order accuracy in time (first-order), it is ableto more robustly handle any initial instabilities.

2. Remaining time steps are completed with the Crank-Nicholson scheme in order toexploit its higher-order accuracy in time (second-order).

5.6. Domain-Truncation and Boundary Conditions for the HestonSolver

Unlike applications in many areas of physics (thermodynamics, electromagnetism, fluiddynamics), the problem domain can be infinitely large for financial problems such as op-tion pricing. For example, although the price of a stock cannot be negative, the choice forthe simulated upper-bound of a stock-price variable is less clear-cut. A similar problemexists for the variance variable. The Heston boundary conditions given in Section 3.3 aretypical in that one only knows how the solution behaves as these variables approach an in-finite value. As the simulation of an infinite domain is numerically infeasible, a truncationvalue must be chosen such that the domain of interest can be practically discretised.

The task of choosing boundary conditions on such a truncated domain can be challeng-ing. Initially it was thought to apply the same approach used in the existing Black-Scholessolver [22, 23]. For an arbitrary number of assets, the boundary conditions in this solverare simply the discounted values of the payoff function. If this approach were used in theHeston solver, the boundaries at both minimum and maximum variance (∂U(S, vmin, τ)and ∂U(S, vmax, τ)) would have the same value. Coupled with the fact that the initial so-lution (the payoff at time τ (0)) is also constant in the v-direction, there would be no overallvariation of the solution in this dimension on which Heston’s corresponding diffusion andconvection terms could act. As such, employing such boundary conditions would notallow for the expected results in the v-dimension.

45

Page 58: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

With the naive approach of using the discounted payoff function for the boundary condi-tions out of the question, focus turns to Heston’s original conditions that are discussed inSection 3.3. Unfortunately the complexity associated with implementing Heston’s sug-gested boundary conditions increases when one recognises three practical factors thatcome into play in the Heston solver:

1. The solver shall be able to price basket options withM underlyings. The correspond-ing problem dimensionality is d = 2M . The dimensionality of each boundary in thebounding box is d − 1, and there are 2d = 4M boundaries (for example, the vanillacase results in four boundaries with each boundary having a dimensionality of one).

2. The solver is based on sparse grids that employ linear basis functions.

3. Heston’s suggested boundary conditions are a mixture of Dirichlet, Neumann andRobin types.

The requirement for pricing basket options excludes the possibility of using either Black-Scholes or Heston closed-form solutions on the boundaries (no such solutions exist forbasket options). The use of linear basis functions in sparse grids practically restricts theuse of boundary conditions to only the Dirichlet type (explained in Section 3.3), which canonly roughly approximate the non-Dirichlet conditions specified by Heston. With theselimitations in mind, the aim of this section is to present and justify the practical alternativesfor boundary conditions in the Heston solver.

5.6.1. Boundary Conditions for a Call Option

This section discusses alternatives to the boundary conditions suggested by Heston for acall option. Figure 5.1 provides a visual reference to complement the following description.All boundary conditions are specified here for τ (0) and undergo discounting after eachtime step.

Boundaries at ∂U(S, vmin, τ(0)) and ∂U(x, vmin, τ

(0))

A Dirichlet condition is needed to approximate the Robin boundary (3.10) suggested byHeston for v = vmin. Assuming vmin is close to zero (achievable from a numerical perspec-tive), the chosen condition should reflect the fact that the option writer assumes a relativelylow-risk in selling the option. The use of the payoff function on this boundary is then anobvious choice as it corresponds to the a priori bound for the minimum option price. Theimplementation of this condition is simple and can be scaled to basket options. As it is thelower bound for the option price, this condition inherently results in values lower than theclosed-form solution, as visible in Figure 3.3. This underestimate helps to “balance” theoverestimate made at the maximum variance boundary discussed below.

46

Page 59: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.6. Domain-Truncation and Boundary Conditions for the Heston Solver

∂U(S, vmin, τ (0)) = max S −K, 0 (Payoff function)

∂U(S, vmax, τ (0)) = S (Maximum option value)

Linear interpolation along v-axis

SminK

Smax

vmin

vmax

∂U

(S,v,τ

(0))

Figure 5.1. Structure of the Heston-solver boundary conditions for the vanilla call case. Allboundary conditions are Dirichlet. The boundary conditions along the v-axis forfixed Smin and Smax are calculated using linear interpolants. This concept is ex-tended to the multi-asset case for use in the basket-option solver. This particularillustration implies that Smin = 0 because of the constant interpolant along thev-axis for S = Smin.

Boundaries at ∂U(S, vmax, τ(0)) and ∂U(x, vmax, τ

(0))

From (3.11) the relevant condition4 suggested by Heston is ∂U(S,∞, τ (0)) = S. Imple-menting this as a Dirichlet boundary condition for a finite vmax is an over-estimation ofthe option price, as visible from the closed-form solution in Figure 3.3. Choosing a largervalue for vmax improves the approximation.

Boundaries at ∂U(Smin, v, τ(0)), ∂U(xmin, v, τ

(0)), ∂U(Smax, v, τ(0)) and ∂U(xmax, v, τ

(0))

Dirichlet variants are again required to approximate the conditions (3.8) and (3.9) sug-gested by Heston for the minimum and maximum stock price boundaries respectively.Given the above conditions for the boundaries at minimum and maximum variance, ascalable approach for the minimum and maximum stock price boundaries is to interpolatein a linear fashion as depicted in Figure 5.1.

When using Cartesian coordinates and a value of Smin = 0, the interpolation ensuresthat Heston’s condition ∂U(0, v, τ) = 0 is met exactly. When using log-transformed co-

4For brevity, conditions are given here and in the following sections for the case of Cartesian coordinatesonly.

47

Page 60: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

ordinates, the true representation of a zero stock-price is not achievable as it requiresxmin = −∞. The interpolation on a finite value of xmin is thus only an approximationof the true condition, and this approximation is improved if xmin is chosen as small aspracticable.

For both Cartesian and log-transformed coordinates, the interpolation along the maximumstock-price boundary is only an approximation of the true boundary condition. The Dirich-let interpolant is not an exact substitute for the Neumann condition, and the required val-ues of Smax = ∞ and xmax = ∞ are not numerically realisable. Choosing a finite valueof Smax and xmax as large as practicable leads to an improved approximation on theseboundaries.

Generalisation for Basket Call Options

In the (log-transformed) basket case the boundaries can be determined using a simpleformula. For a given boundary point ~zb =

[x1 v1 · · · xM vM

]∈ R2M the price is

calculated as

∂U(~zb, τ(0)) = max

1

M

M∑i=1

(exi − αiK) , 0

= max

1

M

M∑i=1

(ez(2i−1) − αiK) , 0

, (5.17)

where αi is found using the maximum v(i)max and minimum v

(i)min bounds for the simulated

variance dimension vi as

αi =v

(i)max − vi

v(i)max − v(i)

min

=v

(i)max − z(2i)

v(i)max − v(i)

min

.

Equation (5.17) is the generalisation of the previously-described interpolation approachfor multiple underlyings. If the boundary point is such that all the variance values are aminimum

(~zb =

[x1 v

(1)min · · · xM v

(M)min

]∈ R2M

), then the resulting price is equal to

the payoff function at that point. Alternatively, if all the variance values are a maximum(~zb =

[x1 v

(1)max · · · xM v

(M)max

]∈ R2M ), then the result is the a priori upper bound for

the option price at that point. The values for the other boundary points are determined byinterpolating between these two extremes in accordance with (5.17).

5.6.2. Boundary Conditions for a Put Option

This section discusses alternatives to the boundary conditions suggested by Heston for aput option. Figure 5.2 provides a visual reference to complement the following description.All boundary conditions are specified here for τ (0) and undergo discounting after eachtime step.

48

Page 61: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.6. Domain-Truncation and Boundary Conditions for the Heston Solver

U(S, vmin, τ (0)) = max K − S, 0 (Payoff function)U(S, vmax, τ (0)) = K

(1− S−Smin

2(Smax−Smin)

)

Linear interpolation along v-axis

SminK

Smaxvmin

vmax

∂U

(S,v,τ

(0))

Figure 5.2. Structure of the Heston-solver boundary conditions for the vanilla put case. Allboundary conditions are Dirichlet. The boundary conditions along the v-axis forfixed Smin and Smax are calculated using linear interpolants. This concept is ex-tended to the multi-asset case for use in the basket-option solver. This particularillustration implies that Smin = 0 because of the constant interpolant along thev-axis for S = Smin.

Boundaries at ∂U(S, vmin, τ(0)) and ∂U(x, vmin, τ

(0))

A Dirichlet condition is needed to approximate the Robin boundary (3.15) suggested byHeston for v = vmin. Using the same arguments as above for a call option, the payofffunction on this boundary is an obvious choice. Again, this condition inherently resultsin values lower than the closed-form solution. This underestimate helps to “balance” theoverestimate made at the maximum variance boundary discussed below.

Boundaries at ∂U(S, vmax, τ(0)) and ∂U(x, vmax, τ

(0))

From (3.11) the relevant condition suggested by Heston is: U(S,∞, τ (0)) = K. Implement-ing this as a Dirichlet boundary condition for a finite vmax is clearly an over-estimation ofthe option price. A compromise was made by using a linear function on this boundary:for S = Smin the function has a value of K, and for S = Smax the function has a value ofK2 . This also improved the approximation quality of the interpolant along the v-axis for a

finite S = Smax.

49

Page 62: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

Boundaries at ∂U(Smin, v, τ(0)), ∂U(xmin, v, τ

(0)), ∂U(Smax, v, τ(0)) and ∂U(xmax, v, τ

(0))

Interpolation is performed along these boundaries in the same manner discussed for thecase of a call option. The results are visible in Figure 5.2.

Generalisation for Basket Put Options

In the (log-transformed) basket case the boundaries can be determined using a simpleformula. For a given boundary point ~zb as defined in the case of a call option above, theprice is calculated as

∂U(~zb, τ(0)) = max

1

M

M∑i=1

(K − βiez(2i−1) + δi) , 0

, (5.18)

where βi and δi are found as

βi = 1 +

K − 2(ex

(i)max − ex

(i)min

)2(ex

(i)max − ex

(i)min

) ·( v − v(i)

min

v(i)max − v(i)

min

),

δi =

Kex(i)min

2(ex

(i)max − ex

(i)min

) ·( v − v(i)

min

v(i)max − v(i)

min

).

Equation (5.18) is the generalisation of the put-option boundary conditions for multi-ple underlyings. If the boundary point is such that all the variance values are a mini-mum

(~zb =

[x1 v

(1)min · · · xM v

(M)min

]∈ R2M

), then the resulting price is equal to the

payoff function at that point. Alternatively, if all the variance values are a maximum(~zb =

[x1 v

(1)max · · · xM v

(M)max

]∈ R2M ), then the result is a point on the linear com-

promise function used along the x-axis for v = vmax. As with the call conditions, the valuefor all other boundary points is determined by interpolating between these two extremesusing (5.18).

Alternative Conditions for Vanilla Put Options

The above conditions for the boundaries at v = vmax and S = Smax are a compromisebetween Heston’s suggested conditions and the requirement to scale to the basket case.By restricting the scope to vanilla options only, alternative boundaries can be formulated.One such alternative is discussed in this section, and a comparison of the results is madein Section 7.7.

The proposed alternative is detailed as follows:

50

Page 63: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5.6. Domain-Truncation and Boundary Conditions for the Heston Solver

• The boundaries along v = vmin and S = Smin are the same as those discussed above.

• The boundary along v = vmax is set to ∂U(S, vmax, τ(0)) = K as suggested by Heston.

• The boundary along S = Smax is an exponential function satisfying ∂U(Smax, vmin, τ(0)) =

0 and ∂U(Smax, vmax, τ(0)) = K. Such an exponential function does not introduce

any discontinuities where the boundaries meet, and is a smooth approximation toHeston’s suggested condition ∂U(Smax, v, τ) = 0.

• As above, all boundaries are discounted after each time step.

The exponential function along S = Smax takes the form

∂U(Smax, v, τ(0)) = a

(ev−vmax

)c − b. (5.19)

In order to meet the required conditions at this boundary’s intersection with its two neigh-bours, the values for a and b must satisfy

a = K + b and

b =K (evmin−vmax)

c

1− (evmin−vmax)c.

vmin vmax0

K

v

∂U

(Smax,v,τ

(0))

c = 2

c = 5

c = 10

c = 20

Figure 5.3. Form of the alternative S = Smax boundary for a vanilla put option, as determinedby (5.19). The parameter c controls the shape of the curve between the two limits.

The parameter c controls the shape of the exponential curve along the boundary. The largerthe value of c, the tighter and longer the curve approximates zero along this boundary(visible in Figure 5.3). Figure 5.4 depicts the alternative boundary situation overall.

51

Page 64: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

5. Discretising Heston’s PDEs on Sparse Grids

U(S, vmin, τ (0)) = max K − S, 0 (Payoff function)

U(S, vmax, τ (0)) = K

U(Smin, v, τ (0)) = K

U(Smax, v, τ (0)) = a (ev−vmax)c − b

SminK

Smaxvmin

vmax

∂U

(S,v,τ

(0))

Figure 5.4. Structure of the alternative boundary conditions for the vanilla put case. Againthis illustration implies that Smin = 0 because of the constant interpolant along thev-axis for S = Smin.

52

Page 65: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on SparseGrids

If history was all there was to the game, therichest people would be librarians.

WARREN BUFFETT

Section 5.5 described the discretisation technique used to produce a time-series of linearsystems. For each time step the linear system that needs to be solved takes the form

A~u = ~b. (6.1)

Chapter 4 described how a sparse grid structure, based on the hierarchical basis, leads toa more efficient discretisation of the high-dimensional spaces involved in Heston’s PDEs.This chapter discusses the relevant nuances of solving (6.1) on such sparse grid structures.

6.1. “Sparser than most, but not quite sparse”

Is the matrix A in (6.1) sparse? The definition of a sparse matrix tends to vary in literature.Some authors use the concept of a limit: a matrix of order N is sparse when it has O(N)nonzero elements [46]. The classical nodal-basis variant of the finite element method pro-duces sparse matrices in this sense, because due to the strictly local support of the nodalbasis functions, an element Ai,j of such a matrix is nonzero only if nodes i and j belong tothe same finite element.

The situation is different if the finite element method is based on an underlying sparsegrid structure (and thus the hierarchical basis). By definition the hierarchical basis func-tions have varying levels of support, which lead to a higher degree of coupling betweenthe elements. The number of overlapping functions and hence nonzero matrix elements isin O(N · logN) for the one-dimensional hierarchical basis, and more in higher dimensions[52]. One might therefore state that, although finite-element matrices based on the hierar-chical basis have a non-negligible portion of zero elements, there are not enough of themto consider the matrix truly ’sparse’.

This fact presents complications for iterative methods that aim to solve linear systemsbased on sparse grid structures. Is it tractable to explicitly store such a matrix during thecourse of computation? If not, how would matrix-vector operations then be performed?

53

Page 66: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

The answer to the former question is in the negative: particularly in higher dimensions, itis neither efficient nor typically possible to store or operate on such a matrix.

6.2. The Up/Down Algorithm

With direct storage out of the question, an in-situ approach must be used in order to evalu-ate sparse-grid-based matrix-vector multiplications. Such an approach is provided by theso-called up/down algorithm.

The up/down algorithm removes the need for explicit matrix setup and storage. It is re-cursive in the sense that the algorithm for d dimensions involves invoking the algorithmfor d − 1 dimensions. Finally it is unidirectional, meaning that the essential operations ofthe algorithm only involve computations in individual dimensions (easing the implemen-tation effort). A more detailed digression into the algorithm is not within scope here - thereader is instead referred to [7], for example.

6.3. Parameter Overview for the General Heston Solver

Given the large number of constant parameters existing in the general Heston PDE forpricing a basket option consisting of M underlyings (5.12), it is warranted to provide abrief overview of these parameters and the structures used to manage them.

The option-related parameters used by the Heston solver are the maturity T and strike-price K. The only market-related parameter is the risk-free interest rate r. These pa-rameters are scalar values (independent of M ). They are provided to the solver throughcommand-line arguments in the same way as the existing Black-Scholes solver.

The parameters specific to the Heston model are more interesting. The ith underlying(1 ≤ i ≤ M ) has the Heston parameters ξi, θi and κi. In addition, correlation parametersexist between all of the Wiener processes (two for each underlying). All of the Hestonparameters are then encompassed by three vectors

~ξ =

ξ1

ξ2...

ξM−1

ξM

∈ RM , ~θ =

θ1

θ2...

θM−1

θM

∈ RM , ~κ =

κ1

κ2...

κM−1

κM

∈ RM

and the correlation matrix (with ri and cj marking row i and column j respectively)

54

Page 67: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.4. Operator Decomposition for use with One-Dimensional Up/Down Schemes

H =

c1 c2 c3 c4 cd−1 cd

r1 1 ρ(S1,v1) ρ(S1,S2) ρ(S1,v2) · · · ρ(S1,SM ) ρ(S1,vM )

r2 ρ(v1,S1) 1 ρ(v1,S2) ρ(v1,v2) · · · ρ(v1,SM ) ρ(v1,vM )

r3 ρ(S2,S1) ρ(S2,v1) 1 ρ(S2,v2) · · · ρ(S2,SM ) ρ(S2,vM )

r4 ρ(v2,S1) ρ(v2,v1) ρ(v2,S2) 1 · · · ρ(v2,SM ) ρ(v2,vM )

......

......

. . ....

...rd−1 ρ(SM ,S1) ρ(SM ,v1) ρ(SM ,S2) ρ(SM ,v2) · · · 1 ρ(SM ,vM )

rd ρ(vM ,S1) ρ(vM ,v1) ρ(vM ,S2) ρ(vM ,v2) · · · ρ(vM ,SM ) 1

∈ Rd×d.

The matrix H is of size d = 2M to encompass the correlation between all stock-price andvariance processes. It is symmetric because the correlation between the Wiener processesWa(t) and Wb(t) is the same as the correlation between Wb(t) and Wa(t). Full correlationexists between a Wiener process and itself, so the diagonal entries are all equal to one.

The Heston solver assumes the following regarding the correlations between the HestonWiener processes for two different assets with indices i and k:

• The stock price processW is(t) and variance processW k

v (t) have zero correlation. Thatis, ρ(Si,vk) = ρ(vk,Si) = 0, ∀i, k where i 6= k.

• The variance processes W iv(t) and W k

v (t) have zero correlation. That is, ρ(vi,vk) =ρ(vk,vi) = 0, ∀i, k where i 6= k.

The remaining matrix entries are not assumed to be zero. This leads to the matrix H havingthe fill-structure shown in Figure 6.1. The figure shows that the matrix is not sparse - it hasO(d2) non-zero entries.

6.4. Operator Decomposition for use with One-DimensionalUp/Down Schemes

The up/down algorithm provided in the SG++ framework is one-dimensional. That is,it will only function with one-dimensional bilinear forms. The operators from Section5.3.4 are multi-dimensional, and hence need to be decomposed into one-dimensional con-stituents. The following subsections will focus on this task, whereby for formatting reasonsthe following substitutions are made:

a := 2i− 1, b := 2i,

c := 2j − 1, and f := 2j where (1 ≤ i ≤M) and (1 ≤ j ≤M) .

Furthermore, it is assumed that the basis and test functions are indexed with n and mrespectively, and that d = 2M and ~z ∈ Rd.

55

Page 68: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Figure 6.1. Non-zero entries in the correlation matrix H . The diagonal (red) entries have avalue of one by definition. The green entries represent the correlation between thestock-price process and the variance process from the same asset. The blue entriesrepresent correlations between stock-price processes from different assets.

6.4.1. Decomposition of Operator D =∫

Ωzb∂φn(~z )∂zb

∂φm(~z )∂zb

d~z

D will be used in this section to demonstrate the process of deriving the one-dimensionalbilinear forms of a multi-dimensional operator. In general, the process involves substitut-ing the hierarchical basis and test functions with their tensor-product form (5.13), followedby elementary integral manipulations. For the operator D the derivation is

D =

∫Ωzb∂φn(~z )

∂zb

∂φm(~z )

∂zbd~z

=

∫Ω1

∫Ω2

· · ·∫

Ωb

· · ·∫

Ωd

[zb∂φnb(zb)

∂zb

∂φmb(zb)

∂zb·d∏

k=1k 6=b

φnk(zk)φmk(zk)

]dzd · · · dzb · · · dz2dz1

=

∫Ωb

zb∂φnb(zb)

∂zb

∂φmb(zb)

∂zbdzb︸ ︷︷ ︸

“X, dPhi, dPhi”

·d∏

k=1k 6=b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

,

From the result it is observable that the custom one-dimensional operator “X, dPhi, dPhi”is needed for dimension b (note that “X” is used in generic SG++operator identifiers; here itcorresponds to the variable zb). The standard L2 scalar product is needed in the remainingd − 1 dimensions. The one-dimensional bilinear forms are computed during the downtraversal as

56

Page 69: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.4. Operator Decomposition for use with One-Dimensional Up/Down Schemes

〈zb∂φnb(zb)

∂zb,∑m<n

∂φmb(zb)

∂zb〉L2 and 〈φnk(zk),

∑m<n

φmk(zk)〉L2 ,

and the up traversal as

〈zb∂φnb(zb)

∂zb,∑m>n

∂φmb(zb)

∂zb〉L2 and 〈φnk(zk),

∑m>n

φmk(zk)〉L2 .

An up/down scheme-implementation in the SG++framework was required for the “X,dPhi, dPhi” operator (no previous work had required the use of this operator). The de-sign and implementation of this scheme is addressed in Section 6.5.

6.4.2. Decomposition of Operator K =∫

Ω

√zb√zf

∂φn(~z )∂zc

∂φm(~z )∂za

d~z

A somewhat more interesting operator that deserves attention is K. This operator is re-quired for implementing the basket-option Heston solver. Following the same approachas Section 6.4.1 leads to

K =

∫Ωa

φna(za)∂φma(za)

∂zadza︸ ︷︷ ︸

“Phi, dPhi”

·∫

Ωb

√zbφnb(zb)φmb(zb)dzb︸ ︷︷ ︸“SqrtX, Phi, Phi”

·∫

Ωc

∂φnc(zc)

∂zcφmc(zc)dzc︸ ︷︷ ︸

“dPhi, Phi”

·∫

Ωf

√zfφnf (zf )φmf (zf )dzf︸ ︷︷ ︸

“SqrtX, Phi, Phi”

·d∏

k=1k/∈a,b,c,f

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

.

Here four dimensions require the application of a custom one-dimensional operator. ThestandardL2 scalar product is needed in the remaining d−4 dimensions. The one-dimensionalbilinear forms are then computed during the down traversal as

〈φna(za),∑m<n

∂φma(za)

∂za〉L2 , 〈

√zbφnb(zb),

∑m<n

φmb(zb)〉L2 , 〈∂φnc(zc)∂zc

,∑m<n

φmc(zc)〉L2 ,

〈√zfφnf (zf ),∑m<n

φmf (zf )〉L2 and 〈φnk(zk),∑m<n

φmk(zk)〉L2 ,

and the up traversal as

〈φna(za),∑m>n

∂φma(za)

∂za〉L2 , 〈

√zbφnb(zb),

∑m>n

φmb(zb)〉L2 , 〈∂φnc(zc)∂zc

,∑m>n

φmc(zc)〉L2 ,

〈√zfφnf (zf ),∑m>n

φmf (zf )〉L2 and 〈φnk(zk),∑m>n

φmk(zk)〉L2 .

57

Page 70: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

Until now, no other SG++application has required the support of this number of customoperators in an up/down scheme implementation (in existing work the largest number ofrequired custom operators is two).

The additional task of extending the SG++framework to support up/down schemes withfour custom-operation dimensions was thus undertaken. This led to the creation of theclass UpDownFourOpDims to accompany the existing UpDownOneOpDim and UpDownT-woOpDims classes.

6.4.3. Decomposition of Remaining Operators

The decomposition of the remaining operators from Section 5.3 follows analogously to thatshown in the previous sections:

A =d∏

k=1

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

B =

∫Ωa

∂φna(za)

∂za

∂φma(za)

∂zadza︸ ︷︷ ︸

“dPhi, dPhi”

·∫

Ωb

zb φnb(zb)φmb(zb)dzb︸ ︷︷ ︸“X, Phi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

C =

∫Ωa

φna(za)∂φma(za)

∂zadza︸ ︷︷ ︸

“Phi, dPhi”

·∫

Ωb

zb∂φnb(zb)

∂zbφmb(zb) dzb︸ ︷︷ ︸

“X, dPhi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

E =

∫Ωa

∂φna(za)

∂zaφma(za) dza︸ ︷︷ ︸

“dPhi, Phi”

·d∏

k=1k 6=a

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

F =

∫Ωb

∂φnb(zb)

∂zbφmb(zb) dzb︸ ︷︷ ︸

“dPhi, Phi”

·d∏

k=1k 6=b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

G =

∫Ωb

zb∂φnb(zb)

∂zbφmb(zb) dzb︸ ︷︷ ︸

“X, dPhi, Phi”

·d∏

k=1k 6=b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

H =

∫Ωa

∂φna(za)

∂zaφma(za) dza︸ ︷︷ ︸

“dPhi, Phi”

·∫

Ωb

zb φnb(zb)φmb(zb)dzb︸ ︷︷ ︸“X, Phi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

J =

∫Ωa

φna(za)∂φma(za)

∂zadza︸ ︷︷ ︸

“Phi, dPhi”

·∫

Ωb

√zb φnb(zb)φmb(zb)dzb︸ ︷︷ ︸

“SqrtX, Phi, Phi”

·∫

Ωf

√zf∂φnf (zf )

∂zfφmf (zf )dzf︸ ︷︷ ︸

“SqrtX, dPhi, Phi”

58

Page 71: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.4. Operator Decomposition for use with One-Dimensional Up/Down Schemes

·d∏

k=1k/∈a,b,f

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

P =

∫Ωb

√zb φnb(zb)

∂φmb(zb)

∂zbdzb︸ ︷︷ ︸

“SqrtX, Phi, dPhi”

·∫

Ωf

√zf∂φnf (zf )

∂zfφmf (zf )dzf︸ ︷︷ ︸

“SqrtX, dPhi, Phi”

·d∏

k=1k/∈b,f

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

Q =

∫Ωb

1√zbφnb(zb)φmb(zb)dzb︸ ︷︷ ︸

“InvSqrtX, Phi, Phi”

·∫

Ωf

√zf∂φnf (zf )

∂zfφmf (zf )dzf︸ ︷︷ ︸

“SqrtX, dPhi, Phi”

·d∏

k=1k/∈b,f

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

W =

∫Ωa

zaφna(za)∂φma(za)

∂zadza︸ ︷︷ ︸

“X, dPhi, Phi”

·∫

Ωb

zb∂φnb(zb)

∂zbφmb(zb)dzb︸ ︷︷ ︸

“X, dPhi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

X =

∫Ωa

za∂φna(za)

∂zaφma(za) dza︸ ︷︷ ︸

“X, dPhi, Phi”

·∫

Ωb

zb φnb(zb)φmb(zb)dzb︸ ︷︷ ︸“X, Phi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

Y =

∫Ωa

z2a

∂φna(za)

∂za

∂φma(za)

∂zadza︸ ︷︷ ︸

“SqX, dPhi, dPhi”

·∫

Ωb

zb φnb(zb)φmb(zb)dzb︸ ︷︷ ︸“X, Phi, Phi”

·d∏

k=1k/∈a,b

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

Z =

∫Ωa

za∂φna(za)

∂zaφma(za) dza︸ ︷︷ ︸

“X, dPhi, Phi”

·d∏

k=1k 6=a

∫Ωk

φnk(zk)φmk(zk)dzk︸ ︷︷ ︸“Phi, Phi”

It is noted that the operators J , P and Q are not implemented in the Heston solver be-cause the associated correlation coefficients are zero (see Section 6.3). The decompositionfor these operators is provided here for the sake of completeness only. If in the futurethe correlation assumptions of Section 6.3 were to be relaxed, the operators J , P and Qwould have to be implemented. Aside from a number of additional up/down schemesthat would increase the effort required to complete this task, it is noted that the operator Jhas three dimensions on which custom one-dimensional operators must be used. An addi-tional class UpDownThreeOpDims would hence also be required in order to realise this par-ticular operator in the SG++framework (alternatively, the UpDownFourOpDims class couldbe used, with one of the custom dimensions performing the standard L2 scalar product).

59

Page 72: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

6.5. Derivation of Missing 1D Up/Down Schemes

Owing to previous work in the SG++ framework (see [22, 23] for example), the majorityof the one-dimensional up/down schemes required for the operators in Section 6.4 arealready existing. The up/down scheme for two one-dimensional bilinear forms, however,have not been implemented as a result of previous work. These bilinear forms are

∫x∂φ(x)

∂x

∂φ(x)

∂xdx (“X, dPhi, dPhi”)

and∫ √

xφ(x)φ(x) dx (“Sqrt X, Phi, Phi”).

This section derives the one-dimensional up/down schemes for these bilinear forms toaccompany their integration into the SG++ framework.

6.5.1. 1D Up/Down Scheme for∫x ∂φ(x)

∂x∂φ(x)∂x

dx

In the hope of increasing the applicability to future problems, the scheme for this operatorwill be derived in a general way. The derivation will use the same variables and approachas that for the other symmetric schemes presented in [22, 48]. One can begin by consideringa matrix M1D, for which the elements are calculated based on the test (φi) and basis (φj)functions (1 ≤ i ≤ N , 1 ≤ j ≤ N ) using

m1Di,j =

∫ t+q

tx∂φi(x)

∂x

∂φj(x)

∂xdx. (6.2)

Treatment of Boundary Cases

The boundary basis and test functions demand a particular treatment. The four possibili-ties for combining the two boundary basis functions evaluate to

∫ t+q

tx

d (φ0,0(x))

dx

d (φ0,0(x))

dxdx =

1

2z,

∫ t+q

tx

d (φ0,1(x))

dx

d (φ0,1(x))

dxdx =

1

2z,∫ t+q

tx

d (φ0,0(x))

dx

d (φ0,1(x))

dxdx = −1

2z and

∫ t+q

tx

d (φ0,1(x))

dx

d (φ0,0(x))

dxdx = −1

2z,

with

z =q + 2t

q.

60

Page 73: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.5. Derivation of Missing 1D Up/Down Schemes

Due to the use of Dirichlet boundary conditions in the Heston solver, the boundary resultsabove are redundant (that is, they are not required for the solver’s implementation). Theresults are presented here for completeness only.

Treatment of the Diagonal

For the diagonal it holds that i = j. The corresponding elements are computed as

∫ t+q

tx

d (φi(x))

dx

d (φj(x))

dxdx =

∫ t+q

tx

(d (φi(x))

dx

)2

dx =2 (ihlq + t)

hlq. (6.3)

Treatment of the down

For the calculation of the down terms, we consider φj hierarchically larger than φi, whichcorresponds to i > j (i.e. the lower triangle of the matrix). In this case, the support ofthe function φi is important - outside this support the expression inside the integral has avalue of zero. The nature of φj on this support is noteworthy: only a linear (“straight line”)portion of the full φj function falls on this support. As in [48] we can denote this linearfunction as F (x) and find its derivative [7]

F (x) =fL (hl − x) + fR (hl + x)

2hl(6.4)

dF (x)

dx=fR − fL

2hl

where fL := φj(xL) and fR := φj(xR). The important factor for the computation of thedown is then computed as

∫ t+q

tx

d (φi(x))

dx

dF (x)

dxdx =

fR − fL2h

∫ t+q

tx

d (φi(x))

dxdx =

1

2q (fL − fR) .

The results fi and gi of the down operation are then calculated as

fi =1

2(fL + fR) + u(t)i,

gi =1

2q (fL − fR) .

The expression for gi can be rewritten in a form that will be helpful for the treatment of theup in the following section:

61

Page 74: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

gi =(

12q −

12q)(fL

fR

)= M

(fLfR

).

Treatment of the up

The up case can be handled in a simple way because the operator under consideration issymmetric. For the calculation of the up elements the transpose of M from the down casecan be used:

(fLfR

)= MT fi =

(12q−1

2q

)fi =

(12qfi−1

2qfi

).

6.5.2. 1D Up/Down Scheme for∫ √

xφ(x)φ(x) dx

Numerical quadrature was initially considered for the computation of this operator’s re-quired up/down integrals. However, the integrals were indeed able to be evaluated inclosed form using the Maple™ engine (its output was confirmed against a numerical quadra-ture implementation in MATLAB™ ). The results are rather exhaustive and are relegatedto Appendix D. Although the resulting formulas are lengthy, many of the operations needonly be completed once (for example, taking the 2nd and 3rd powers of the variables) and itwas thus decided that the closed-form evaluation is more efficient than numerical quadra-ture.

6.6. Principal Axis Transformation

The number of diffusion terms in the multi-asset Heston PDE (5.11) grows with O(M2),where M is the number of underlyings. This quadratic growth analogously increases thecomputational effort required to reach a solution. With the assumptions given in Section6.3, this growth is attributable to the correlation between the Wiener processes of two (log-transformed) stock prices xi and xk, k 6= i (corresponding to the blue elements in Figure6.1). The aim of this section is to determine if the computational effort can be reduced toO(M) by using a principal-axis transformation (PAT). The PAT has been applied success-fully to the Black-Scholes multi-asset PDE in this way [24] and is outlined for reference inAppendix D.

To prepare for the PAT, the ~z vector is reordered so that the log-transformed stock-pricevariables precede the variance variables (again it is noted that d = 2M ):

~z =[x1 x2 . . . xM−1 xM v1 v2 . . . vM−1 vM

]∈ Rd. (6.5)

62

Page 75: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.6. Principal Axis Transformation

With ~z ordered in this way, the general log-transformed, basket-option Heston PDE (5.11)becomes

1

2

M∑i=1

M∑j=1

√z(i+M)

√z(j+M)ρ(i,j)

∂2U

∂zi∂zj+

M∑i=1

M∑j=1

ξj√z(i+M)

√z(j+M)ρ(i,j+M)

∂2U

∂zi∂z(j+M)

+1

2

M∑i=1

M∑j=1

ξiξj√z(i+M)

√z(j+M)ρ(i+M,j+M)

∂2U

∂z(i+M)∂z(j+M)

+

M∑i=1

κi(θi − z(i+M)

) ∂U

∂z(i+M)+

M∑i=1

(r − 1

2z(i+M)

)∂U

∂zi− rU =

∂U

∂τ, (6.6)

with the initial condition (payoff function)

U(~z, τ = 0) =

max

1M

M∑i=1

(ezi −K) , 0

for a call option,

max

1M

M∑i=1

(K − ezi) , 0

for a put option.

Before commencing with the PAT, (6.6) is simplified by introducing a number of additionalvectors:

• The constant vector ~a, defined such that the first M elements are equal to one andthe remaining M elements are given by ξi for 1 ≤ i ≤ M (the M “volatility of thevolatility” values).

• The constant vector ~b, defined such that the first M elements are equal to zero andthe remaining M elements are given by κi for 1 ≤ i ≤ M (the M mean reversionrates).

• The constant vector ~c, defined such that the first M elements are equal to zero andthe remaining M elements are given by θi for 1 ≤ i ≤ M (the M long-run variancevalues).

• The constant vector ~f , defined such that the first M elements are equal to the marketrisk-free interest rate r and the remaining M elements are equal to zero.

• The vector ~g of variables, defined such that the first M elements are given by z(i+M)

for 1 ≤ i ≤M . The remaining elements are equal to zero.

• The vector ~η, defined to hold the variable square-root coefficients of the diffusionterms. The first M elements of the vector are given by √z(i+M) for 1 ≤ i ≤ M . Thefinal M elements are the same as the first M elements.

63

Page 76: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

~a :=

11...1ξ1

ξ2...ξM

∈ Rd, ~b :=

00...0κ1

κ2...κM

∈ Rd, ~c :=

00...0θ1

θ2...θM

∈ Rd,

~f :=

rr...r0000

∈ Rd, ~g :=

z(1+M)

z(2+M)...zd0000

∈ Rd and ~η :=

√z(1+M)√z(2+M)

...√zd√

z(1+M)√z(2+M)

...√zd

∈ Rd.

Using these additional vectors permits the rewriting of (6.6) as1

1

2

d∑i=1

d∑j=1

ηiηjaiajρ(i,j)∂2U

∂zi∂zj+

d∑i=1

bici∂U

∂zi−

d∑i=1

bizi∂U

∂zi

+d∑i=1

fi∂U

∂zi− 1

2

d∑i=1

gi∂U

∂zi+ −rU =

∂U

∂τ. (6.7)

As aforementioned, the aim of the PAT is to allow for the first term in (6.7) to be expressedas a single summation rather than a double summation. Analogous to the Black-Scholesapproach in Appendix D, the PAT takes the form ~y = QT~z, where Q ∈ Rd×d is an orthogo-nal transformation matrix resulting from the eigendecomposition

D = QTΣQ.

The eigenvalues λi are contained in the matrix D = diag(λ1 λ2 · · · λd−1 λd

)∈ Rd×d.

The eigenvectors ~qi ∈ Rd define the orthogonal transformation matrix in such a way thatQ =

(~q1 ~q2 · · · ~qd−1 ~qd

)∈ Rd×d. The symmetric covariance matrix Σ has the entries

Σ =(aiajρ(i,j)

)i,j=1...d

. If the zero-correlation assumptions from Section 6.3 are appliedthen Σ has the sparsity structure2

1Note that the upper-limit of each summation is now d.2In the visualisation of the sparsity pattern the matrix is split into four square partitions, each of size M

(M = 4 in this example).

64

Page 77: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6.6. Principal Axis Transformation

Σ =

∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗∗ ∗ ∗ ∗ ∗∗ ∗∗ ∗∗ ∗∗ ∗

.

From the definition of the PAT it follows that the partial derivative ∂U∂zi

can be expressed as

∂U

∂zi=∂U

∂y1· ∂y1

∂zi+ . . .+

∂U

∂yd· ∂yd∂zi

= qi,1 ·∂U

∂y1+ . . . qi,d ·

∂U

∂yd=

d∑j=1

qi,j ·∂U

∂yj.

In vector calculus notation this generalises to

∇~z U(~z, τ) = Q · ∇~y U(~y, τ).

The double-sum of differential operators used in (6.7) can then be expressed and reformedas

d∑i=1

d∑j=1

ηiηjaiajρ(i,j)∂2

∂zi∂zj= [∇~z ~η ]T · Σ · [∇~z ~η ]

=[(Q∇~y

) ~η]T · Σ · [(Q∇~y) ~η ]

=(∇~y ~η

)T ·QTΣQ︸ ︷︷ ︸:=D

·(∇~y ~η

)=(∇~y ~η

)T ·D · (∇~y ~η) ,where the operator denotes the piecewise (element-wise) vector product, (~x ~y)i = xiyi.The double-summation term of (6.7) can now be rewritten as

d∑i=1

d∑j=1

ηiηjaiajρ(i,j)∂2U

∂zi∂zj≡

d∑i=1

λiη2i

∂2U

∂y2i

. (6.8)

On first inspection the sum appears to have been reduced to O(d) as in the Black-Scholescase, however there is a key difference here: the individual elements η2

i are variables, notconstants. Based on the definition of the vector ~η, a vector ~β is defined that contains thesquares of each ηi element:

65

Page 78: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

6. Solving Heston’s Linear Systems on Sparse Grids

~β :=

η21

η22...η2M

η21+M

η22+M

...η2d

=

z(1+M)

z(2+M)...zd

z(1+M)

z(2+M)...zd

=

d∑j=1

q(1+M,j)yj

d∑j=1

q(2+M,j)yj

...d∑j=1

q(d,j)yj

d∑j=1

q(1+M,j)yj

d∑j=1

q(2+M,j)yj

...d∑j=1

q(d,j)yj

∈ Rd.

Equation (6.8) can now be rewritten as

d∑i=1

d∑j=1

ηiηjaiajρ(i,j)∂2U

∂zi∂zj≡

d∑i=1

λi

d∑j=1

q(αi,j)yj

∂2U

∂y2i

≡d∑i=1

d∑j=1

λiq(αi,j)yj∂2U

∂y2i

,

where αi = [(i− 1) mod M ] + 1 + M . It is now evident that the PAT has not reduced thediffusion term count, because the inner summation is not constant and hence cannot beremoved from the iterative solution process. It is thus not worthwhile to continue trans-forming the remainder of (6.7). The failure of the PAT here is attributable to the variablecoefficients, which do not exist in the case of the log-transformed Black-Scholes PDE. Theconclusion is hence reached that a transformation of this form offers no asymptotic gainwith respect to the computational effort required to solve Heston’s PDEs.

66

Page 79: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

Results! Why, man, I have gotten a lot ofresults. I know several thousand thingsthat won’t work.

THOMAS ALVA EDISON

This chapter presents various results from the implemented Heston solver. It begins witha qualitative analysis of the solutions for vanilla options and concludes with investigationsinto basket-option pricing and boundary-condition comparisons.

7.1. Qualitative Analysis of Vanilla Solution Surfaces

Four examples of solution surfaces produced by the Heston solver for vanilla options areshown in Figure 7.1. Although no comment can be made on the overall correctness ofthe solver based on the plots alone, the following points are noted from simple visualinspection:

• The surfaces appear smooth (no abnormal jumps in the option price).

• The surfaces lie within the a priori bounds for European vanilla options. That is,arbitrage arguments stipulate that the value UC and UP of a call and put optionrespectively must satisfy [54]

maxS −Ke−rτ , 0

≤UC ≤ S, and

maxKe−rτ − S, 0

≤UP ≤ K.

• The surfaces satisfy the monotonicity requirements with respect to the stock price[54] and the variance [43]:

UC(S2, v, t) > UC(S1, v, t) for S2 > S1,

UP (S2, v, t) < UP (S1, v, t) for S2 > S1,

UC(S, v2, t) ≥ UC(S, v1, t) for v2 > v1,

UP (S, v2, t) ≥ UP (S, v1, t) for v2 > v1.

• The boundary conditions are seen to be in accordance with the implementation de-cisions discussed in Section 5.6.

67

Page 80: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

−2 −1 0 10.2

0.4

0.6

0

2

4

6

xv

UCH

(x,v

)

0 0.5 1 1.5 20.2

0.4

0.6

0

1

2

S

v

UCH

(S,v

)

−2 −1 0 1 0.2

0.4

0.60

0.5

1

xv

UPH

(x,v

)

0 0.5 1 1.5 2 0.2

0.4

0.60

0.5

1

S

v

UPH

(S,v

)

Figure 7.1. Heston solution surfaces for a vanilla option with strike K = 1, maturity T =1 and stochastic parameters κ = 2, θ = 0.2, ξ = 0.3 and ρ = −0.5. The risk-free interest rate is r = 0.05. Above: Call option with log-transformed (left) andCartesian (right) stock-price coordinates. Below: Put option with log-transformed(left) and Cartesian (right) stock-price coordinates.

7.2. The Heston Solver as a Black-Scholes Solver

As noted in Appendix C.1, the Heston PDE can be reduced to the Black-Scholes PDE bysetting κ = ξ = 0. Initial single-asset trials involved computing the Black-Scholes solutionsurface for varying v = σ2 and comparing this to the results of the Heston solver withκ = ξ = 0. The results are shown for log-transformed stock-price coordinates in Figure 7.2.

The following observations are made from the plots:

• The boundary condition at v = vmax represents a clear discontinuity in the solutionsurface. This can be explained by the fact that, when κ = ξ = 0, there are onlydiffusion and convection terms with changes in the x-direction, not in the v-direction,and thus this abrupt change is not smoothed.

68

Page 81: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7.3. Comparison with Heston’s Closed-Form Solution

−1.5 0 1.50.20.8

0

5

xv

UCF

−1.5 0 1.50.20.8

0

5

xv

UN

−1.5 01.5 0.2

0.8

−0.5

0

0.5

x

v

UN−UCF

Figure 7.2. Pricing analysis of a European call option with strike K = 1, maturity T = 1 anda single underlying asset with the stochastic Heston parameters κ = 0 and ξ = 0(Black-Scholes model equivalent). The risk-free interest rate is r = 0.05 and theproblem domain Ω = [−2.04, 1.95] × [0, 1]. Left: Closed-form Black-Scholes solu-tion. Middle: Numerical solution using the Heston solver on a sparse grid of levell = 7. Right: Error surface.

• The at-the-money price determined by the Heston solver on the vmin boundary islower than the Black-Scholes solution. The boundary condition used in the Hestonsolver for v = vmin is the reason for this. This boundary condition dictates that theat-the-money price on this boundary is zero, whereas the at-the-money closed-formBlack-Scholes solution for zero volatility is larger than zero.

• The nature of the boundary at x = xmax explains the errors for large values of x.The boundary line along x = xmax goes from being the a priori lower bound for theoption price (at the intersection with v = vmin) to being the a priori upper boundfor the option price (at the intersection with v = vmax). This results in the respectiveunderestimation and overestimation seen in the plot in the region of this boundary.

7.3. Comparison with Heston’s Closed-Form Solution

Figure 7.3 shows the result of applying the log-transformed variant of the Heston solverto the problem of pricing a vanilla European call. The figure also shows the correspondingclosed-form solution and error surface. The effect of the approximated boundary condi-tions discussed in Section 5.6 is evident in the error plot: the minimum a priori optionprice bound at v = vmin is an underestimate for the correct option price, and the max-imum a priori option price bound at v = vmax is an overestimate. These overestimatesand underestimates are approximately balanced along the contour of v = vmid, where it isnoticeable that the error is considerably smaller. As expected, these observations suggestthat the numerical Heston solver is more accurate for variance values in the middle of thev-domain.

69

Page 82: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

−1.5 0 1.50.30.6

0

5

xv

UCF

−1.5 0 1.50.30.6

0

5

xv

UN

−1.5 01.5

0.3

0.6−0.5

0

0.5

x

v

UN−UCF

Figure 7.3. Pricing analysis of a European call option with strike K = 1, maturity T = 1 anda single underlying asset with the stochastic Heston parameters κ = 2, θ = 0.2,ξ = 0.3 and ρ = −0.5. The risk-free interest rate is r = 0.05. Problem domainΩ = [−2.04, 1.95] × [0.1, 0.61]. Left: Closed-form solution. Middle: Numericalsolution on a sparse grid of level l = 8. Right: Error surface.

7.4. Convergence Investigations

This section analyses the results of various convergence-related tests. These tests wereundertaken to aid in verifying the correctness of the implemented solver. The first collec-tion of experiments investigate whether or not the option price converges to the correct(closed-form) result when the influence of the approximated boundary conditions on anevaluation point decreases. The remaining experiments investigate the convergence of thesolution whilst varying the sparse-grid level and time step size.

7.4.1. Varying Problem Domain Size

Figure 7.4 describes the way in which the problem domain size was varied for the experi-ments in this section. For all tests the evaluation point is in the middle of the domain andthe size of the problem domain increases around the evaluation point. The market, optionand stochastic parameters are constant.

Figures 7.5, 7.6 and 7.7 show the effect on the error (measured against the closed-form so-lution) from increasing the domain size in various ways (in accordance with Figure 7.4).The logarithm and absolute values of the error are plotted in each case. The first figurecorresponds to the linear increase of the size of the problem domain in both the x and vdimensions. For the second and third figures the domain size is increased in the v andx direction only (respectively). One notices that, after initial increases, the error gener-ally decreases for increasing domain size. This behaviour supports the correctness of theimplemented solver.

One remark is made about the results in Figure 7.7. It is noticeable that, after reducingto a minimum value, the error again increases as the size of the x-domain is further in-creased. In order to understand this behaviour it is recognised that the sparse grid level isheld constant as the domain size is increased, and thus the mean spacing between adjacentsparse grid points also increases. The existence of the minimum error as the domain size

70

Page 83: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7.4. Convergence Investigations

: Evaluation point

: Problem domain boundary

Ωi

Ωf

: Initial domain

: Final domainΩi

Ωf

Figure 7.4. Depiction of how the problem domain size is varied for the experiments presentedin this section. For a given experiment the evaluation point is always at the samecoordinates. The varying quantity is the size of the problem domain around theevaluation point. The evaluation point is always in the centre of the problem do-main.

0.02

0.04

0.06

0.08

0.1

|UCF

(0.4,0.4,T

)−U

(0.4,0.4,T

)|

Ωi = [−0.2, 1.0]

× [0.36, 0.44]

Ωf = [−1.95, 2.75]

× [0.01, 0.79]

Increasing domain size (linear in x and v)

−6

−5

−4

−3

ln|UCF

(0.4,0.4,T

)−U

(0.4,0.4,T

)|

Ωi = [−0.2, 1.0]

× [0.36, 0.44]

Ωf = [−1.95, 2.75]

× [0.01, 0.79]

Increasing domain size (linear in x and v)

Figure 7.5. Absolute error (left) and its logarithm (right) for the price U(x, v, T ) = U(0.4, 0.4, T )using the log-transformed variant of the Heston solver as a function of increasingproblem domain size. Vanilla call with T = 1, K = 1 and r = 0.05. Initial do-main Ωi = [−0.2, 1.0] × [0.36, 0.44], final domain Ωf = [−1.95, 2.75] × [0.01, 0.79].Stochastic parameters ξ = 0.3, θ = 0.2, κ = 2 and ρ = −0.5.

is increased is hence explained by the trade-off between the reduction of the error associ-ated with the boundary conditions and the increase in the error resulting from the spacediscretisation.

7.4.2. Varying Sparse Grid Level

Table 7.1 shows how an at-the-money evaluation price is influenced by a varying sparsegrid level. Adaptivity is not used in these tests. For a large l the value of the option priceis seen to be a good approximation to the closed-form solution.

71

Page 84: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

0.02

0.04

0.06

0.08

0.1

0.12

|UCF

(0,0.5

5,T

)−U

(0,0.5

5,T

)|

Ωi = [−2.04, 1.95]

× [0.43, 0.67]

Ωf = [−2.04, 1.95]

× [0.07, 1.03]

Increasing domain size (linear in v only)

−8

−6

−4

−2

ln|UCF

(0,0.5

5,T

)−U

(0,0.5

5,T

)|

Ωi = [−2.04, 1.95]

× [0.43, 0.57]

Ωf = [−2.04, 1.95]

× [0.07, 1.03]

Increasing domain size (linear in v only)

Figure 7.6. Absolute error (left) and its logarithm (right) for the at-the-money price U(x, v, t) =U(0, 0.55, T ) using the log-transformed variant of the Heston solver as a functionof increasing problem domain size in v only. All option and stochastic parametersidentical to Figure 7.5.

0.02

0.03

0.04

0.05

|UCF

(0,0.3

05,T

)−U

(0,0.3

05,T

)|

Ωi = [−0.8, 0.8]

× [0.01, 0.61]

Ωf = [−4.6, 4.6]

× [0.01, 0.61]

Increasing domain size (linear in x only)

−4

−3.5

−3

ln|UCF

(0,0.3

05,T

)−U

(0,0.3

05,T

)|

Ωi = [−0.8, 0.8]

× [0.01, 0.61]

Ωf = [−4.6, 4.6]

× [0.01, 0.61]

Increasing domain size (linear in x only)

Figure 7.7. Absolute error (left) and its logarithm (right) for the at-the-money price U(x, v, t) =U(0, 0.305, T ) using the log-transformed variant of the Heston solver as a functionof increasing problem domain size in x only. All option and stochastic parametersidentical to Figure 7.5.

7.4.3. Varying Time Step Size

Table 7.2 shows the results of varying the time step size for an otherwise constant simula-tion. Figure 7.8 shows the data in graphical form. Clearly the choice of a finer time stepsize gives more accurate results, however one notices little benefit from time step sizes

72

Page 85: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7.5. Grid-Adaptivity Investigations

Level Price Relative Error Absolute Error

l = 2 0.151498 0.177165 0.032619l = 3 0.201641 0.095179 0.017524l = 4 0.193159 0.049110 0.009042l = 5 0.188068 0.021459 0.003951l = 6 0.185585 0.007973 0.001468l = 7 0.184528 0.002232 0.000411l = 8 0.184367 0.001358 0.000250l = 9 0.184074 0.000234 0.000043l = 10 0.184117

Closed-form 0.188815

Table 7.1. Error-convergence analysis for increasing sparse-grid level for the at-the-moneyprice U(x, v, t) = U(0, 0.16, T ). Errors relative to the solution for l = 10. All op-tion and stochastic parameters identical to Figure 7.5.

smaller than around ∆t = 0.05. This value of ∆t was hence chosen for all remaining tests.

Time Step Size Price Relative Error Absolute Error

∆τ = 0.250 0.178344 0.034867 0.006443∆τ = 0.200 0.180626 0.022518 0.004161∆τ = 0.100 0.183750 0.005612 0.001037∆τ = 0.050 0.184528 0.001402 0.000259∆τ = 0.040 0.184622 0.000893 0.000165∆τ = 0.020 0.184747 0.000216 0.000040∆τ = 0.010 0.184778 0.000049 0.000009∆τ = 0.005 0.184785 0.000011 0.000002∆τ = 0.004 0.184786 0.000005 0.000001∆τ = 0.002 0.184787

Closed-form 0.188815

Table 7.2. Error-convergence analysis for varying time step size ∆t. The data is for the at-the-money price of a vanilla call with v = 0.16, K = 1, T = 1, r = 0.05 and Hestonparameters κ = 2, θ = 0.2, ξ = 0.3 and ρ = −0.5. Sparse grid level l = 7 on asimulated domain of Ω = [−2.04, 1.95]× [0.01, 0.33].

7.5. Grid-Adaptivity Investigations

Table 7.3 shows the affect of using adaptivity in the Heston solver. The investigations in-volved varying the amount of refinement imposed on a sparse grid of level1 l = 6 and

1The sparse-grid level-variable lp defined in Chapter 4 should strictly be used in this chapter, however thesimpler notation of l will be persisted for easier readability.

73

Page 86: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

0 20 40 60 80 100

0.178

0.18

0.182

0.184

0.186

0.188

UCF = 0.188815

1∆τ

U(x,v,τ)

=U

(0,0.1

6,T

)

Figure 7.8. Alternative perspective on a subset of the data shown in Table 7.2. The value of theclosed-form solution UCF is shown in red.

comparing the error to a non-refined sparse grid of level l = 10 for an at-the-money eval-uation point with a variance value of v = 0.305. Additional settings are provided in thecaption of the figure. It can be seen that using a grid of level l = 6 with an appropriategrid-refinement threshold results in the same error as for a grid of level l = 10. In termsof the number of grid points in total, it is thus cheaper to evaluate the price using a lower-level grid with adaptivity than a higher-level grid. This is due to refinement that occursaround the strike-price region, as seen in Figure 7.9.

A further noteworthy result from Figure 7.9 is the location of the additional points intro-duced by the adaptivity function. There is strong adaptivity in the x-direction in the regionof the payoff cusp. That is, many more grid points are added to accommodate for the factthat the solution is non-continuous along this dimension. Theoretically the solution shouldbe smooth in the v-direction, however in this case one can also notice adaptivity in the v-direction in the region of v = vmax. Here the adaptivity is a result of the discontinuityintroduced by the boundary condition along the v = vmax boundary.

7.6. Basket Option Investigations

Figure 7.10 compares the Heston and Black-Scholes results for a European basket call op-tion with two underlyings. The dimensionality of the Heston problem in this case is fourand the dimensionality of the Black-Scholes problem is two (the Black-Scholes solver wasrun once for each parameterised set of σ1 and σ2).

Accepting that the multi-asset Black-Scholes results can only be used as a broad approx-imation to the Heston results, one still notices that the Heston price tends to the a prioriupper bound of the option price as the variance values increase. As with the vanilla case,evaluation points in the center of the domain are not as highly influenced by the coarseboundary conditions and are thus more accurate.

74

Page 87: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7.6. Basket Option Investigations

−2 −1 0 10.15

0.25

0

2

4

6

x

v

UN

Figure 7.9. Refinement with threshold of 10−5 used on a sparse grid of level l = 6 for thenumerical solution UN of the vanilla, log-transformed Heston PDE on the prob-lem domain Ω = [−2.04, 1.95] × [0.1, 0.29]. All option and stochastic parametersidentical to Figure 7.5. Here the refinement was performed with five iterations inthe pre-computation phase; the plot shows the post-computation solution on therefined grid.

Level/Refinement #Grid Points Price Relative Error Absolute Error

l = 6, no refinement 577 0.218606 0.021619 0.004626l = 6, δr = 0.01 609 0.218620 0.021684 0.004640l = 6, δr = 0.001 633 0.218616 0.021666 0.004636l = 6, δr = 0.0001 830 0.216318 0.010926 0.002338l = 6, δr = 0.00001 1097 0.216738 0.012889 0.002758l = 10, no refinement 13313 0.217064 0.014413 0.003084

Closed-form 0.21398

Table 7.3. Error-convergence analysis for increasing refinement threshold (adaptivity) δr onsparse-grid level l = 6 level for the at-the-money price U(x, v, t) = U(0, 0.305, T ).Adaptivity performed on the starting solution with five iterations in each case. Er-rors relative to the closed-form solution. All option and stochastic parameters iden-tical to those given in Figure 7.5.

Table 7.4 compares at-the-money prices computed by the Heston solver against existingresults for basket options with two and three underlyings (Heston problem dimensionalityof four and six respectively). The existing results were taken from [3] based on a setup withthe following parameters:

75

Page 88: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7. Results

0.2 0.60.20.6

0.1

0.2

σ21

σ22

UBS

0.2 0.60.20.6

0

0.5

1

v1v2

UH

0.20.4

0.2

0.40

0.5

1

v1

v2

UH−UBS

Figure 7.10. At-the-money pricing (S1 = S2 = K) for a basket call option with strike K = 1,maturity T = 1 and two underlyings with variance v1 and v2. Heston stochasticparameters κ = 2, θ = 0.2, ξ = 0.3 and ρ(S1,v1) = ρ(S2,v2) = −0.5 (for bothunderlyings) and ρ(S1,S2) = −0.5. The risk-free interest rate is r = 0.05. Left:Black-Scholes solution for µ1 = µ2 = 0.05 and equivalent volatilities σ1 =

√v1

and σ2 =√v2. Middle: Heston solution on a sparse grid of level l = 6. Right:

Difference surface.

• Market risk-free interest rate r = 0.05.

• Heston stochastic parameters κ = 2.0, θ = 0.06 and ξ = 0.3 for each asset.

• Correlation of ρ = −0.5 between a stock price process and the variance process fromthe same asset.

• Correlation of ρ = 0.2 between two different stock price processes. The volatilitiesare not correlated.

• Strike K = 1, maturity T = 1 and initial values Si = 1 and vi = 0.05 for 1 ≤ i ≤M .

The results from the Heston solver are seen to converge to the Monte-Carlo results as thegrid level l is increased.

Two Underlyings (d = 4) Three Underlyings (d = 6)

Grid Level Price Rel. Error Abs. Error Price Rel. Error Abs. Error

l = 2 0.16870 0.71768 0.07048 0.15784 0.75910 0.06811l = 3 0.12015 0.22341 0.02194 0.10072 0.12257 0.01100l = 4 0.10593 0.07859 0.00772 0.09811 0.09350 0.00839l = 5 0.10047 0.02302 0.00226 0.09483 0.05686 0.00510l = 6 0.09821 0.08973

MC 0.096782 0.08875

Table 7.4. Convergence analysis for pricing basket options with two and three underlyings.Simulation setup identical to that given in [3] (the Monte Carlo results were alsoobtained from this source).

76

Page 89: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

7.7. Comparison of Boundary Conditions for the Vanilla Put Case

7.7. Comparison of Boundary Conditions for the Vanilla Put Case

Section 5.6.2 presented two boundary-condition alternatives for the case of a vanilla putoption. Figure 7.11 compares the alternatives by showing the convergence to an at-the-money price as the simulated problem domain is enlarged around the evaluation point(again in the same way as depicted in Figure 7.4).

0.05

0.1

0.15

0.2

|UCF−UN|

Alternative BCsOriginal BCs

Ωi = [−0.6, 0.6]

× [0.71, 0.91]

Ωf = [−4.1, 4.1]

× [0.01, 1.61]

Increasing domain size (linear in x and v)

−6

−5

−4

−3

−2

ln|UCF−UN|

Alternative BCsOriginal BCs

Ωi = [−0.6, 0.6]

× [0.71, 0.91]

Ωf = [−4.1, 4.1]

× [0.01, 1.61]

Increasing domain size (linear in x and v)

Figure 7.11. Comparison between the boundary-condition alternatives for a vanilla put op-tion. Absolute error (left) and its logarithm (right) for the at-the-money priceU(x, v, T ) = U(0, 0.81, T ) using the log-transformed variant of the Heston solveras a function of increasing problem domain size. Option parameters T = 1, K = 1and r = 0.05. Stochastic parameters ξ = 0.3, θ = 0.2, κ = 2 and ρ = −0.5.

The results show that the alternative boundary conditions discussed in Section 5.6.2 re-sult in better convergence of this at-the-money price. This conclusion is expected becausethese alternative boundary conditions tend towards a better approximation for the trueboundary conditions as the simulated problem size increases.

77

Page 90: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 91: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

8. Summary

If you took all the economists in the worldand laid them end-to-end, they still wouldnot reach a conclusion.

GEORGE BERNARD SHAW

This thesis presented a deterministic solver for multi-dimensional option-pricing PDEsbased on the Heston model. The Heston model uses a stochastic volatility approachto model stock-price behaviour. The model is a generalisation of that of Black-Scholes-Merton, which somewhat unrealistically assumes a constant volatility for each class ofunderlying. The additional flexibility of the Heston model enables it to more realisticallyrepresent stock-price behaviour and address some of the reported practical shortcomingsof the Black-Scholes-Merton model, namely fat tails and the smile effect.

The Heston solver was implemented in the SG++framework of the host chair. It supportsEuropean call and put options and uses the finite element method for discretisation onsparse grids. Grid adaptivity can optionally be applied to refine regions of discontinuity.For vanilla options the solver supports the treatment of the PDEs with Cartesian or log-transformed stock-price coordinates. For multiple underlyings (basket options) the solversupports the PDE with log-transformed stock-price coordinates.

The curse of dimensionality, which is normally encountered when treating basket-optionproblems, was tamed using sparse grids. The use of sparse grids, however, introducedadditional challenges. The first challenge was associated with the fact that system matricesstemming from sparse-grid structures are not sparse in the classical sense. Complicationsresult when basic operations need to be executed on such a system matrix, as is the casewith the applied iterative methods used in the Heston solver. Fortunately, the so-calledup/down algorithm already implemented in the SG++framework provided an efficientsolution to this problem.

The second and perhaps most significant challenge was the imposed rigidity on the choiceof boundary conditions. The variables involved in the Heston model, namely the stockprice and the variance, theoretically need to be considered on an infinite domain in orderfor Heston’s suggested conditions to be financially correct. Infinite domains are a nat-ural foe of computational methods - domain truncation was therefore required and wasaccompanied by a loss in solution accuracy in the region of the respective boundaries.Furthermore, the use of linear basis functions in the SG++sparse grids restricted the choiceof boundary conditions to only the Dirichlet type, which resulted in additional errors.

A closed-form Heston solver for the case of a vanilla option was also implemented, and

79

Page 92: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

8. Summary

this proved useful in verifying the numerical solver. By comparing numerical results tothe closed-form solution, the adverse effects of the approximated boundary conditions be-came evident. Whilst the results for variance values in the middle of the problem domainwere promising and showed the expected convergence behaviour, the solver producednon-negligible errors towards the boundaries. For both call and put options the error ismost significant at the maximum-variance boundary, where the implemented boundaryconditions are shown to be an overestimate of the closed-form option price.

The errors associated with the approximated boundary conditions are also noticeable whenmoving to higher-dimensional problems (more underlyings). In these cases the solutionremains reasonable when the evaluation point lies in the center of the problem domain.Increasing the variance values towards their upper limits, however, results in errors anal-ogous to the vanilla case.

In conclusion, the results have shown that the implemented Heston solver gives promisingresults provided that the evaluation point lies relatively central in the problem domain. Tominimise the errors introduced by the boundary conditions, the problem domain shouldbe chosen as large as practicable, keeping of course in mind the trade-off against discreti-sation accuracy.

An improved Heston solver would be one that ameliorated the boundary conditions. Thiswould likely entail the implementation of non-linear basis functions for the foundation ofthe sparse grids. This task also involves the recalculation of all up/down schemes andwould thus be rather effort-intensive. For basket options an improved solver would sup-port the full set of correlation possibilities between the stock price and variance variablesof the underlyings (non-zero correlation is currently only supported in two cases: betweentwo different stock price variables, and between a stock price and variance variable fromthe same underlying). An improved solver may also support the pricing of basket optionsusing Cartesian stock-price coordinates, although this would again involve the develop-ment of additional up/down schemes.

This thesis did not investigate a number of natural extensions to the solver. Firstly, theinvestigations into adaptivity were rather brief. The solver currently only supports initialadaptivity of the grid - it does not perform dynamic adaptivity across time steps. Con-sidering that such functionality is already supported in the SG++framework, one wouldexpect that such an extension be relatively trivial.

A further extension would be the support of multiple ordinary differential equation (ODE)solvers. The SG++framework already supports a multitude of ODE solvers. The existingBlack-Scholes solver offers the option to choose between a number of these, however theHeston solver is currently limited to the use of the Implicit Euler/Crank-Nicholson com-bination as discussed in Section 5.5.

The parallel performance of the solver was not investigated in this thesis. The SG++ frame-work has considerable support for parallelism in the low-level solving routines (OpenMPdirectives, for example), and it would be beneficial to exploit such functionality if basketoptions of higher dimensions were to be priced. Investigation of the relevant parallelismmetrics like speedup and efficiency could thus be a useful and interesting topic for furtherwork on the solver.

80

Page 93: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Finally, additional transformations of the relevant PDEs could be investigated (aside fromthe standard log transformation of the stock-price variable). A useful transformation wouldbe one that reduces the number of diffusion terms in the PDE, resulting in fewer operationsthat need to be performed on the system matrix in each iteration of the solver. Althoughthe principal-axis transformation discussed in Section 6.6 is not successful in the case ofHeston’s PDEs, investigations into other transformation techniques may yield better re-sults.

81

Page 94: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 95: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Appendix

83

Page 96: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 97: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

A. Complementary Material in StochasticCalculus and Finance

This appendix serves as a quick reference for concepts in stochastic calculus that arisethroughout the thesis. For a more comprehensive coverage of the topics discussed here,the reader is referred to one of the plethora of texts available on the subject ([21, 33], forexample). Knowledge of basic concepts from probability theory is assumed (example re-freshment texts include [34, 37]).

A.1. Stochastic Processes in Finance

A.1.1. Stochastic Processes Defined

A stochastic process is a family of stochastic variables

X = (X(t), t ∈ T ) = (X(t, ω), t ∈ T, w ∈ Ω)

defined on some space Ω. If T is an interval (as is typically the case in finance) like T =[a, b) for a < b, then X is termed a continuous-time process. If T is a finite or countably-infinite set, X is referred to as a discrete-time process.

A stochastic process X is a function of two variables. For a fixed value of time tf , it is arandom variable X = X(tf , ω) where ω ∈ Ω. For a fixed random outcome ωf ∈ Ω, it is afunction of time known as a path or trajectory, X = X(t, ωf ) where t ∈ T . Figure A.1 showsfive trajectories of a discrete stochastic process known as a random walk.

A.1.2. Markov Processes

A stochastic process X is Markov if its past is independent of its future conditional onthe present [21]. It is usually assumed that stock prices follow a Markov process, whichmeans that the conditional probability distribution of future states of the stock-price pro-cess depends only on the present state. The Markov property thus refers to the memorylessproperty of a stochastic process. The use of the Markov property in finance is consistentwith the weak form of market efficiency, which states that the competitive nature of themarket tends to ensure that the current price of the stock reflects all information that canbe derived by examining historical market trading data [5].

85

Page 98: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

A. Complementary Material in Stochastic Calculus and Finance

−60

−40

−20

0

20

40

t

X

Figure A.1. Five trajectories of a random walk. Each path corresponds to a different randomoutcome. The fixed values of time (vertical grid lines with orange points intersect-ing the trajectories) visualise the random variables; they occur as the projections ofthe sample paths on the these lines.

A.1.3. Wiener Processes

A Wiener process is a particular type of Markov process. It is often called standard Brow-nian motion. A stochastic process (W (t), t ∈ [0,∞)) is a Wiener process if the followingconditions are satisfied [26]:

1. For every 0 ≤ t1 < t2, it holds that ∆W = W (t2) −W (t1) is normally distributedwith a mean of zero and standard deviation of

√t2 − t1 =

√∆t:

∆W (t) = N (0,√

∆t)

2. The values of ∆W (t) for any two different short intervals of time, (∆t)1 and (∆t)2,are independent (Markov property).

A.1.4. Generalised Wiener Process

A generalised Wiener process is said to have a drift rate µ ∈ R and variance rate σ2 ∈ R+0 .

Here the term drift rate defines the mean change in the underlying variable per unit time,and the term variance rate defines the variance per unit time. For the standard Wienerprocess W (t) above, µ = 0 and σ2 = 1. The stochastic process defined by

86

Page 99: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

A.2. Ito’s Lemma

X(t) = µt+ σW (t) (A.1)

is a generalised Wiener process (here W (t) is a standard Wiener process).

A.1.5. Ito Processes

The drift rate µ and variance rate σ2 are constant in a generalised Wiener process. An Itoprocess is an extension to the generalised Wiener model which allows both µ and σ to befunctions of X(t) and t [59]. The Ito process is the solution to the stochastic differentialequation

dX(t) = µ(X(t), t)dt+ σ(X(t), t)dW (t), (A.2)

where W (t) is a standard Wiener process.

A.1.6. CIR Process

The CIR process is used to model stochastic volatility in the Heston model. The process isthe solution X(t) to the stochastic differential equation

dX(t) = κ (θ −X(t)) dt+ ξ√X(t)dW (t),

where W (t) is a standard Wiener process and κ, θ, ξ ∈ R+0 are parameters of the process.

A.2. Ito’s Lemma

Ito’s lemma provides a tool for finding the differential of stochastic processes. It is thestochastic counterpart of the chain rule for deterministic functions.

A.2.1. Univariate Case

If X(t) is an Ito process as described in Section A.1.5 and G(x, t) is a deterministic functionwhich is continuously differentiable in t and continuously twice differentiable in x, thenIto’s Lemma shows that the stochastic process G(X(t), t) is a solution of the followingstochastic differential equation [26]

87

Page 100: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

A. Complementary Material in Stochastic Calculus and Finance

dG(X(t), t) =

(µ(X(t), t)

∂G(X(t), t)

∂x+∂G(X(t), t)

∂t+

1

2[σ(X(t), t)]2

∂2G(X(t), t)

∂x2

)dt

+ σ(X(t), t)∂G(X(t), t)

∂xdW (t) (A.3)

where it is important to note that the Wiener process W (t) is the same as that from the Itoprocess X(t).

A.2.2. Bivariate Case

Ito’s Lemma in the bivariate case can be obtained by applying Taylor’s theorem to a func-tion of three variables [1]. If X(t) and Y (t) are Ito processes with

dX(t) = µx(X(t), t)dt+ σx(X(t), t)dWx(t) anddY (t) = µy(Y (t), t)dt+ σy(Y (t), t)dWy(t),

and the Wiener processes Wx(t) and Wy(t) are correlated with factor ρ, then Ito’s Lemmafor the bivariate case states that a function G of X(t), Y (t) and t is the solution to thestochastic differential equation (dropping function arguments for brevity) [10]

dG(X,Y, t) =∂G

∂tdt+

∂G

∂XdX +

∂G

∂YdY +

1

2

∂2G

∂X2dX2 +

∂2G

∂X∂YdXdY +

1

2

∂2G

∂Y 2dY 2

=

(∂G

∂t+∂G

∂XµxX +

∂G

∂YµyY +

∂2G

∂X∂YρσxσyXY +

1

2

∂2G

∂X2σ2xX

2 +1

2

∂2G

∂Y 2σ2yY

2

)dt

+∂G

∂XσxXdWx +

∂G

∂YσyY dWy. (A.4)

A.3. Put-Call Parity

For European call and put options with the same strike priceK and maturity T , there existsa relationship termed the put-call parity between their respective prices UC and UP [26]. Toillustrate the relationship, it is sufficient to consider two portfolios P1 and P2 with thefollowing assets:

Portfolio P1: One European call option with value UC and an amount of cash equal toKe−rT .

Portfolio P2: One European put option with value UP and one unit of the underlying.

At maturity, if the price of the underlying is less than the strike price (i.e. ST < K), theholder of portfolio P1 will not exercise the option, leaving it to expire worthless. The value

88

Page 101: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

A.3. Put-Call Parity

of P1 is then determined only by the cash, which at time t = T has a value of Ke−rT erT =K, assuming a continuously-compounding growth with interest rate r. If the price of theunderlying is greater than the strike price at maturity (i.e. ST > K), the holder of P1 willexercise the option, spending the cash of amount K to purchase the share, resulting in aportfolio value of ST .

Focusing now on portfolio P2, it is clear that if ST < K at maturity, the holder will exercisethe option, selling the underlying and receiving an amount of cash equal to the strike priceK. If ST > K at maturity, the holder will not exercise the option and will be left with oneunderlying of value ST . Thus, at maturity, the values Π1 and Π2 of the respective portfoliosP1 and P2 are

Π1 = Π2 = max (ST ,K) . (A.5)

Considering also that the options are European, they cannot be exercised prior to maturity.It hence follows that the portfolios must have identical values today [26]:

UC +Ke−rT = UP + S0. (A.6)

Equation A.6 is known as put-call parity. Given the value of either UC or UP , this relation-ship can be used to deduce the value of the other, assuming the options have identicalvalues for the maturity and strike price.

89

Page 102: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing
Page 103: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

B. Derivation of Various Forms of theBlack-Scholes PDE

B.1. Vanilla Form with Cartesian Coordinates

The Cartesian Black-Scholes PDE for a European vanilla option is derived in this section.To begin, the following ideal conditions in the market for the stock and for the option areassumed [4]:

1. The short-term interest rate is known and is constant through time.

2. The stock price ST at the end of a finite time interval is lognormally distributed, asshown in section 2.3.

3. The variance rate of the return on the stock is constant.

4. The stock pays no dividends or other distributions.

5. The option is European.

6. There are no transaction costs in buying or selling the stock or the option (that is, themarket is frictionless).

7. It is possible to borrow any fraction of the price of a security to buy it or to hold it, atthe short-term interest rate.

8. There are no penalties to short selling.

The Black-Scholes model assumes that the stock price follows a geometric Brownian mo-tion. From Section 2.3 the relevant continuous-time expression is (henceforth omittingsubscripts and function-arguments for brevity)

dS = µSdt+ σSdW. (B.1)

Let the variable U(S, t) be the price of the option for an underlying stock price S at timet. The goal is to determine the value of the option for a given stock price at a given time.Based on the Black-Scholes assumptions above, the volatility σ is a constant. From theunivariate form of Ito’s Lemma (Section A.2), it follows that

dU =

(µS

∂U

∂S+∂U

∂t+

1

2σ2S2∂

2U

∂S2

)dt+ σS

∂U

∂SdW. (B.2)

91

Page 104: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

B. Derivation of Various Forms of the Black-Scholes PDE

At this point it is important to mention that the Wiener processes W underlying U and Sin (B.1) and (B.2) are the same. The goal is then to use these two equations to eliminatethis common Wiener process. In order to do so, it is sufficient to set up a portfolio whichconsists of one short option with valueU and the quantity of ∆ long units of the underlyingasset with price S. By definition, the value Π of the portfolio is

Π = −U + ∆ · S. (B.3)

The change dΠ in the value of the portfolio in the time interval dt depends on the weightedchanges in the values of the option and underlying assets:

dΠ = −dU + ∆ · dS. (B.4)

Substituting (B.1) and (B.2) into (B.4) leads to the expression

dΠ = −((

µS∂U

∂S+∂U

∂t+

1

2σ2S2∂

2U

∂S2

)dt+ σS

∂U

∂SdW

)+ ∆ · (µSdt+ σSdW )

= −(µS

(∂U

∂S−∆

)+∂U

∂t+ σ2S2 1

2

∂2U

∂S2

)dt+ σS

(∆− ∂U

∂S

)dW. (B.5)

The value of ∆ is sought such that the Wiener process W is eliminated. From (B.5) thenecessary condition is ∆ = ∂U

∂S . This number of units of the underlying asset makes theportfolio described in (B.3) risk-less, assuming that the hedging strategy is maintainedcontinuously for 0 ≤ t ≤ T . The corresponding substitution of ∆ into (B.5) leads to

dΠ = −(∂U

∂t+

1

2σ2S2∂

2U

∂S2

)dt. (B.6)

An alternate expression for dΠ, based on the assumption of a fixed short-term interest rater ∈ R+

0 , can be derived to express the risk-less gain of the portfolio in time dt:

dΠ = rΠdt. (B.7)

Substituting (B.3) leads to

dΠ =

(−rU + rS

∂U

∂S

)dt. (B.8)

The no-arbitrage assumptions stated earlier imply that, for a European option with nopossibility of early exercise, the expressions for dΠ in (B.6) and (B.8) are equal. The resultis the renowned Black-Scholes partial differential equation which describes the price of theoption over time:

92

Page 105: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

B.2. Multi-Asset Form with Cartesian Coordinates

∂U

∂t+

1

2σ2S2∂

2U

∂S2+ rS

∂U

∂S− rU = 0. (B.9)

B.2. Multi-Asset Form with Cartesian Coordinates

This section presents the Cartesian Black-Scholes PDE for a basket option having M un-derlyings. One variable, the stock price Si, exists for each of the underlyings, and thusthe problem dimensionality is d = M . The matrix H ∈ Rd×d, H = Hᵀ, holds the correla-tion values between the underlyings. An entry ρi,j of this matrix, for example, gives thecorrelation factor between the underlyings Si and Sj .

The multi-asset Black-Scholes PDE for the Cartesian case is then [22]

∂U

∂t+

1

2

d∑i=1

d∑j=1

σiσjρi,jSiSj∂2U

∂Si∂Sj+

d∑i=1

rSi∂U

∂Si− rU = 0. (B.10)

B.3. Vanilla Form with Log-Transformed Coordinates

For the log-transformed case the transformed stock variable x = ln(S) is introduced. Bydefinition, ∂x∂S = 1

S and hence ∂U∂x = ∂U

∂S∂S∂x = ∂U

∂S S. Equation (B.9) can then be rewritten togive the log-transformed version of the single-asset Black-Scholes PDE:

∂U

∂t+

1

2σ2∂

2U

∂x2+ r

∂U

∂x− rU = 0. (B.11)

This log-transformed version of the Black-Scholes PDE offers the advantage of havingno variable coefficients. The resulting equation system therefore offers better condition-ing, which in turn has the benefit of requiring fewer iterations for solution convergence.The log-transformed formulation does however increase the theoretical domain to Ω =[−∞,∞].

B.4. Multi-Asset Form with Log-Transformed Coordinates

Following the approach given in Section B.3, (B.10) can be rewritten to give the log-transformedversion of the multi-asset Black-Scholes PDE:

∂U

∂t+

1

2

d∑i=1

d∑j=1

σiσjρi,j∂2U

∂xi∂xj+

d∑i=1

(r − 1

2σ2i

)∂U

∂xi− rU = 0. (B.12)

93

Page 106: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

B. Derivation of Various Forms of the Black-Scholes PDE

B.5. The Black-Scholes Pricing Formulas

With the assumptions given at the beginning of Section B.1, the single-asset, CartesianBlack-Scholes equation (B.9) has a closed-form solution for the price UC(S, t) of a vanillacall and the price UP (S, t) of a vanilla put [54]. These solutions for options with maturityT and strike K are known as the Black-Scholes pricing formulas, given as

UC(S, t) = Se−δ(T−t)NC(a)−Ke−r(T−t)NC(b) (B.13)

for a call option, and

UP (S, t) = UC(S, t)− Se−δ(T−t) +Ke−r(T−t) (B.14)

for a put option, where NC(x) is the cumulative probability function for the standard nor-mal distribution, S is the stock price at current time t, and δ is the continuous dividendyield (assumed to be zero in this thesis). The values for a and b are calculated from

a : =log S

K +(r − δ + σ2

2

)(T − t)

σ√T − t

b : =log S

K +(r − δ − σ2

2

)(T − t)

σ√T − t

.

94

Page 107: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C. Derivation of Various Forms of the HestonPDE

C.1. Vanilla Form with Cartesian Coordinates

The Heston PDE describing the price U(S, v, t) of a European vanilla option is derived inthis section, following the general approach given in [30]. The focus here is on the non-transformed (Cartesian) case.

To begin, the stock-price and volatility processes described by the Heston model are re-called from Section 3.2 as:

dS = µH S(t) dt+√v(t)S(t) dWs(t) (C.1)

dv = κ (θ − v(t)) dt+ ξ√v(t) dWv(t). (C.2)

To support the readability of the following derivation, the processes are rewritten as:

dS = µsdt+ σsdWSt (C.3)

dv = µvdt+ σvdWvt . (C.4)

From the definition of these processes it is clear that there is randomness in both the assetprice and the volatility. Thus, in order to form a risk-less portfolio, both the asset priceand the volatility have to be hedged. The asset price can be hedged with a certain numberof units of the asset. Volatility, however, cannot be traded directly and hence the varianceprocess cannot be used in creating such a portfolio. One therefore introduces a secondderivative V (S, v, t) which is used to hedge the volatility.

The portfolio is constructed with one unit of the option U(S, v, t), a quantity −∆S of theasset S and a quantity −∆V of the second derivative V (S, v, t). By definition, the value Πof the portfolio is then (henceforth the function arguments are omitted to abbreviate thenotation)

Π = U −∆s · S −∆v · V. (C.5)

The change dΠ in the value of the portfolio is

95

Page 108: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C. Derivation of Various Forms of the Heston PDE

dΠ = dU −∆s · dS −∆v · dV. (C.6)

Expressing the bivariate form of Ito’s lemma (A.4) in terms of dS and dv gives the expres-sion for the change dU in the price of the option as

dU =∂U

∂tdt+

∂U

∂SdS +

∂U

∂vdv +

1

2

∂2U

∂S2dS2 +

∂2U

∂S∂vdS dv +

1

2

∂2U

∂v2dv2. (C.7)

Expanding (C.7) by inserting the process definitions for dS and dv gives

dU =∂U

∂tdt+

∂U

∂S

(µsdt+ σsdW

St

)+∂U

∂v(µvdt+ σvdW

vt )

+1

2

∂2U

∂S2

(µ2s dt2 + 2µsσs dtdWS

t + σ2s

(dWS

t

)2)+∂2U

∂S∂v

(µs µv dt2 + µs σv dtdW v

t + µv σs dt dWSt + σs σv dWS

t dW vt

)+

1

2

∂2U

∂v2

(µ2v dt2 + 2µvσv dtdW v

t + σ2v (dW v

t )). (C.8)

To reduce the above equation, the multiplication rules

dt2 = 0,

dt dWt = 0,

(dWt)2 = dt and

dWSt dW v

t = ρdt

can be used [49], with the last rule following from (3.3). Application of these rules reduces(C.8) to

dU(S, v, t) =∂U

∂tdt+

∂U

∂S

(µsdt+ σsdW

St

)+∂U

∂v(µvdt+ σvdW

vt )

+1

2

∂2U

∂S2

(σ2s dt)

+∂2U

∂S∂v(ρ σs σv dt) +

1

2

∂2U

∂v2

(σ2v dt). (C.9)

Analogously, dV is

dV (S, v, t) =∂V

∂tdt+

∂V

∂S

(µsdt+ σsdW

St

)+∂V

∂v(µvdt+ σvdW

vt )

+1

2

∂2V

∂S2

(σ2s dt)

+∂2V

∂S∂v(ρ σs σv dt) +

1

2

∂2V

∂v2

(σ2v dt). (C.10)

96

Page 109: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C.1. Vanilla Form with Cartesian Coordinates

Substituting (C.3), (C.9) and (C.10) into (C.6) and rearranging the terms leads to

dΠ =

[1

2

∂2U

∂S2σ2s +

∂2U

∂S∂vρ σs σv +

1

2

∂2U

∂v2σ2v +

∂U

∂t+ µs

∂U

∂S+ µv

∂U

∂v−∆s µs

]dt

−∆v

[1

2

∂2V

∂S2σ2s +

∂2V

∂S∂vρ σs σv +

1

2

∂2V

∂v2σ2v +

∂V

∂t+ µs

∂V

∂S+ µv

∂V

∂v

]dt

+

(∂U

∂Sσs −∆v

∂V

∂Sσs −∆s σs

)dWS

t +

(∂U

∂vσv −∆v

∂V

∂vσv

)dW v

t . (C.11)

In order to achieve risk neutrality (i.e. remove the uncertainty), the coefficients of dWSt

and dW vt must be zero. This is done by meeting the conditions

∂U

∂S= ∆s + ∆v

∂V

∂Sand

∂U

∂v= ∆v

∂V

∂v. (C.12)

Solving the first condition for ∆s gives

∆s =∂U

∂S−∆v

∂V

∂S. (C.13)

Rewriting (C.11) by using (C.13) to substitute for ∆s and allowing the uncertainty terms tovanish leads to

dΠ =

[1

2

∂2U

∂S2σ2s +

∂2U

∂S∂vρ σs σv +

1

2

∂2U

∂v2σ2v +

∂U

∂t+ µv

∂U

∂v

]dt

−∆v

[1

2

∂2V

∂S2σ2s +

∂2V

∂S∂vρ σs σv +

1

2

∂2V

∂v2σ2v +

∂V

∂t+ µv

∂V

∂v

]dt. (C.14)

With the conditions specified in (C.12), the instantaneous change dΠ of the fully-hedgedportfolio must equal the return on a risk-free investment (otherwise arbitrage opportuni-ties would exist), hence

dΠ = rΠ dt = r (U −∆s · S −∆v · V ) dt

= r

[U −

(∂U

∂S−∆v

∂V

∂S

)S −∆v · V

]dt. (C.15)

Combining (C.14) and (C.15), substituting ∆v =(∂U∂v /

∂V∂v

)and rearranging leads to the

expression

97

Page 110: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C. Derivation of Various Forms of the Heston PDE

[1

2

∂2U

∂S2σ2s +

∂2U

∂S∂vρ σs σv +

1

2

∂2U

∂v2σ2v +

∂U

∂t+ µv

∂U

∂v+ r S

∂U

∂S− r U

]/∂U

∂v

=

[1

2

∂2V

∂S2σ2s +

∂2V

∂S∂vρ σs σv +

1

2

∂2V

∂v2σ2v +

∂V

∂t+ µv

∂V

∂v+ r S

∂V

∂S− r V

]/∂V

∂v,

at which point it is realised that the two sides of the equality sign are identical in theirexpression, differing only in the financial derivative to which they apply. This equationmust hold for vanilla options of maturity T and strike price K. Each side of the equalitymust therefore be equal to some function λ(S, v, t), which may be interpreted as the marketpremium on volatility risk. This leads to the partial differential equation

1

2

∂2U

∂S2σ2s +

∂2U

∂S∂vρσsσv +

1

2

∂2U

∂v2σ2v

+∂U

∂t+ [µv − λ(S, v, t)]

∂U

∂v+ rS

∂U

∂S− rU = 0.

Finally, the assumption is made in this thesis that the market premium on volatility risk isequal to zero (this assumption causes no significant loss in generality for European options[25]), i.e. λ(S, v, t) = 0. Asserting this assumption and reintroducing the original valuesfrom the stochastic processes leads to the Cartesian form of Heston’s vanilla PDE as usedin the body of this thesis:

1

2vS2∂

2U

∂S2+ ρξvS

∂2U

∂S∂v+

1

2ξ2v

∂2U

∂v2

+∂U

∂t+ κ (θ − v)

∂U

∂v+ rS

∂U

∂S− rU = 0. (C.16)

It is worthwhile at this point to make a small digression in order to relate this equationto the Black-Scholes PDE. Comparing the coefficients of the stock price processes (B.1)and (C.1) from both models gives σ =

√v. Asserting the Black-Scholes constant-volatility

assumption on the Heston model is equivalent to having dv = 0 and thus ξ = κ = 0.Rewriting (C.16) with these parameter-values gives

1

2

∂2U

∂S2

(√v)2S2 +

∂U

∂t+ rS

∂U

∂S− rU

=1

2

∂2U

∂S2σ2S2 +

∂U

∂t+ rS

∂U

∂S− rU

=0,

which is the Cartesian Black-Scholes PDE (B.9) for a vanilla option. This shows that, bysetting the appropriate parameters in the Heston PDE to zero, the familiar Black-Scholes

98

Page 111: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C.2. Multi-Asset Form with Cartesian Coordinates

PDE results. This relationship was utilised in testing this thesis’ implemented Hestonsolver; that is, initial testing involved setting the stochastic parameters ξ = κ = 0 andensuring that the results were similar to those of the existing Black-Scholes solver executedwith equivalent parameters.

C.2. Multi-Asset Form with Cartesian Coordinates

The vanilla (single asset) Heston PDE (C.16) can be generalised to the basket option (multiasset) case. To this end it is assumed that the basket option has a positive integer numberM of underlyings. From Section 3.2 it is recalled that each asset has a stock price processand a variance process. The dimensionality of the problem is thus d = 2M .

A vector of the stock price processes from M underlying assets can be written as

[dS1 dS2 · · · dSM

]∈ RM , (C.17)

and a vector of the variance processes from the same underlying assets can be written as

[dv1 dv2 · · · dvM

]∈ RM . (C.18)

The stock price processes and variance processes can be collected and pairwise-orderedinto the vector ~p of processes

~p =[p1 p2 p3 p4 · · · pd−1 pd

]=[

dS1 dv1 dS2 dv2 · · · dSM dvM]∈ Rd.

A helpful stepping stone on the road to the multi-asset PDE is to consider the two-assetcase. Here the variables are the stock-prices S1, S2 and the variances v1, v2. Diffusion termsexist in the resulting PDE for each second-order partial derivative combination, as in thesingle-asset case. The resulting equation is

1

2ρ(1,1) S

21v1

∂2U

∂S21

+ ρ(1,2) ξ1S1v1∂2U

∂S1∂v1+ ρ(1,3) ξ1S1S2

√v1√v2

∂2U

∂S1∂S2

+ ρ(1,4) ξ2S1√v1√v2

∂2U

∂S1∂v2+

1

2ρ(2,2) ξ

21v1

∂2U

∂v21

+ ρ(2,3) ξ1S2√v1√v2

∂2U

∂v1∂S2

+ ρ(2,4) ξ1ξ2√v1√v2

∂2U

∂v1∂v2+

1

2ρ(3,3) S

22v2

∂2U

∂S22

+ ρ(3,4) ξ2S2v2∂2U

∂S2∂v2

+1

2ρ(4,4) ξ

22v2

∂2U

∂v22

+∂U

∂t+ κ1 (θ1 − v1)

∂U

∂v1+ κ2 (θ2 − v2)

∂U

∂v2

+ rS1∂U

∂S1+ rS2

∂U

∂S2− rU = 0,

99

Page 112: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C. Derivation of Various Forms of the Heston PDE

where ξi, κi and θi are the ξ, κ and θ values of the ith underlying respectively, and the valueρ(i,j) of the correlation matrix H ∈ Rd×d is the correlation between the process pi and pj .

With the two-asset PDE available as reference, the extension toM assets is straightforward:

1

2

M∑i=1

S2i viρ(2i−1,2i−1)

∂2U

∂S2i︸ ︷︷ ︸

Diagonal S terms

+1

2

M∑i=1

ξ2i viρ(2i,2i)

∂2U

∂v2i︸ ︷︷ ︸

Diagonal v terms

+

M∑i=1

ξiSiviρ(2i−1,2i)∂2U

∂Si∂vi︸ ︷︷ ︸S and v from the same asset

+

M∑i=1

M∑j=1

j 6=i

ξjSi√vi√vjρ(2i−1,2j)

∂2U

∂Si∂vj

︸ ︷︷ ︸S and v from different assets

+

M∑i=1

M∑j=i+1

SiSj√vi√vjρ(2i−1,2j−1)

∂2U

∂Si∂Sj︸ ︷︷ ︸S variables from two different assets

+

M∑i=1

M∑j=i+1

ξiξj√vi√vj

∂2U

∂vi∂vj︸ ︷︷ ︸v variables from two different assets

+

M∑i=1

κi (θi − vi)∂U

∂vi+

M∑i=1

rSi∂U

∂Si

+∂U

∂t− rU = 0 (C.19)

It is noted that the “diagonal” terms include a partial second derivative with respect to asingle S or v variable. These terms occur once each and thus have a coefficient of 1

2 . Dueto the symmetry of the operator and the application of the Clairaut/Schwarz theorem forthe symmetry of second derivatives, the remaining “off-diagonal” terms occur twice andcan be combined to a single term with a coefficient of 1.

As a final simplification step, the stock price and variance variables can be collected andordered pairwise into a vector ~z, defined as

~z =[S1 v1 S2 v2 · · · SM vM

]∈ Rd.

Using the vector ~z and simplifying the summation terms, the basket Cartesian Heston PDEcan be written as

1

2

M∑i=1

M∑j=1

z2i−1z2j−1√z2i√z2jρ(2i−1,2j−1)

∂2U

∂z2i−1∂z2j−1

+M∑i=1

M∑j=1

ξjz2i−1√z2i√z2jρ(2i−1,2j)

∂2U

∂z2i−1∂z2j+

1

2

M∑i=1

M∑j=1

ξiξj√z2i√z2jρ(2i,2j)

∂2U

∂z2i∂z2j

+

M∑i=1

κi (θi − z2i)∂U

∂z2i+

M∑i=1

rz2i−1∂U

∂z2i−1+∂U

∂t− rU = 0. (C.20)

100

Page 113: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C.3. Vanilla Form with Log-Transformed Coordinates

C.3. Vanilla Form with Log-Transformed Coordinates

The focus in this section is towards the formulation of the PDE corresponding to the log-transformed, European vanilla-option case.

The starting point for the derivation is Equation (C.16). Following the same approach asin Appendix B.3, the transformed stock variable x = ln (S) is introduced. The derivativeterms in (C.16) can then be written as:

∂U

∂S=∂U

∂x

∂x

∂S=

1

S

∂U

∂x(chain rule)

∂2U

∂v∂S=

∂v

(∂U

∂S

)=

∂v

(1

S

∂U

∂x

)=

1

S

∂2U

∂v∂x(chain rule)

∂2U

∂S2=

∂S

(∂U

∂S

)=

∂S

(1

S

∂U

∂x

)= − 1

S2

∂U

∂x+

1

S

∂2U

∂S∂x= − 1

S2

∂U

∂x+

1

S

∂x

(∂U

∂S

)= − 1

S2

∂U

∂x+

1

S2

∂2U

∂x2(product rule).

Replacing the derivative terms in (C.16) by these expressions leads to

1

2v S2

(− 1

S2

∂U

∂x+

1

S2

∂2U

∂x2

)+ ρ ξ v S

(1

S

∂2U

∂v∂x

)+

1

2ξ2v

∂2U

∂v2

+∂U

∂t+ κ (θ − v)

∂U

∂v+ r S

(1

S

∂U

∂x

)− r U = 0,

which upon simplification gives the log-transformed vanilla Heston PDE

1

2v∂2U

∂x2+ ρ ξ v

∂2U

∂x∂v+

1

2ξ2v

∂2U

∂v2

+∂U

∂t+ κ (θ − v)

∂U

∂v+

(r − 1

2v

)∂U

∂x− rU = 0. (C.21)

Comparing this PDE to (C.16) reveals the convenient property that the convection anddiffusion stock-price variable coefficients have vanished. This simplifies the numericalsolution to some extent.

C.4. Multi-Asset Form with Log-Transformed Coordinates

The focus in this section is towards the formulation of the PDE corresponding to the log-transformed, European basket-option case.

101

Page 114: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

C. Derivation of Various Forms of the Heston PDE

Following the approach given in Section C.2, the PDE is determined as:

1

2

M∑i=1

viρ(2i−1,2i−1)∂2U

∂x2i

+1

2

M∑i=1

ξ2i viρ(2i,2i)

∂2U

∂v2i

+

M∑i=1

ξiviρ(2i−1,2i)∂2U

∂xi∂vi

+M∑i=1

M∑j=1

j 6=i

ξj√vi√vjρ(2i−1,2j)

∂2U

∂xi∂vj+

M∑i=1

M∑j=i+1

√vi√vjρ(2i−1,2j−1)

∂2U

∂xi∂xj

+M∑i=1

M∑j=i+1

ξiξjρ(2i,2j)√vi√vj

∂2U

∂vi∂vj+

M∑i=1

κi (θi − vi)∂U

∂vi+

M∑i=1

(r − 1

2vi

)∂U

∂xi

+∂U

∂t− rU = 0, (C.22)

which, upon simplification and substitution with the vector ~z, leads to

1

2

M∑i=1

M∑j=1

√z2i√z2jρ(2i−1,2j−1)

∂2U

∂z2i−1∂z2j−1

+M∑i=1

M∑j=1

ξj√z2i√z2jρ(2i−1,2j)

∂2U

∂z2i−1∂z2j+

1

2

M∑i=1

M∑j=1

ξiξj√z2i√z2jρ(2i,2j)

∂2U

∂z2i∂z2j

+

M∑i=1

κi (θi − z2i)∂U

∂z2i+

M∑i=1

(r − 1

2z2i

)∂U

∂z2i−1+∂U

∂t− rU = 0, (C.23)

This is the log-transformed Heston PDE for M underlyings.

102

Page 115: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

D. Additional Calculations

This appendix covers the miscellaneous calculations determined too exhaustive for themain text.

D.1. Additional 1D Up/Down Schemes

This section derives additional up/down schemes to complement Section 6.5.

D.1.1. 1D Up/Down Scheme for∫ √

xφ(x)φ(x) dx

As with the operator discussed in Section 6.5.1, this operator is symmetric. The samederivation approach can hence followed (here only the main results are presented).

Treatment of Boundary Cases

The four possibilities evaluate to

∫ t+q

t

√xφ0,0(x)φ0,0(x)dx =

2

105·

8√q + t

(q3 + 3tq2 + 3qt2 + t3

)− 35t

32 q2 − 28t

52 q − 8t

72

q2,∫ t+q

t

√xφ0,1(x)φ0,1(x)dx =

2

105·√q + t

(8t3 − 4qt2 + 3q2t+ 15q3

)− 8t

72

q2,∫ t+q

t

√xφ0,0(x)φ0,1(x)dx =

4

105·√q + t

(3q3 + 2q2t− 5qt2 − 4t3

)+ 7qt

52 + 4t

72

q2, and∫ t+q

t

√xφ0,1(x)φ0,0(x)dx =

4

105·√q + t

(3q3 + 2q2t− 5qt2 − 4t3

)+ 7qt

52 + 4t

72

q2.

Treatment of the Diagonal

The diagonal case (i = j) evaluates to

∫ t+q

t

√xφi(x)φj(x)dx =

∫ t+q

tx (φi(x))2 dx

103

Page 116: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

D. Additional Calculations

= − 16

105q2h2

[α(t3 + 3 i2h2q2t+ 3 ihqt2 − 6 ih2q2t− q3h3 + i3h3q3 − 3 i2h3q3 + 3 ih3q3

− 3 t2qh+ 3 tq2h2)

+ β(− t3 − 3 i2h2q2t− 3 ihqt2 − 6 ih2q2t− q3h3 − i3h3q3 − 3 i2h3q3 − 3 ih3q3

− 3 t2qh− 3 tq2h2)

+ γ(

14 tq2h2i+ 7 t2qh+ 7 i2h3q3)].

with

α =√ihq + t− qh,

β =√ihq + t+ qh and

γ =√ihq + t.

Treatment of the down

The down case (i > j) evaluates to (using the same definition of α, β and γ from above)

∫ t+q

t

√xφi(x)F (x)dx

=4

105q2h2

[α(

+ 12 ih2q2tb+ 6 i2h2q2ta− 6 i2h2q2tb− 6 ihqt2b+ 6 ihqt2a+ 2 ih2q2ta

+ 2 q3h3b+ 5 q3h3a+ t2aqh+ 6 t2bqh− 2 i3h3q3b+ 6 i2h3q3b− 6 ih3q3b

+ 2 i3h3q3a+ i2h3q3a− 6 tq2h2b− 8 ih3q3a− 8 tq2h2a+ 2 t3a− 2 t3b)

+ β(− 6 i2h2q2tb+ 2 ih2q2tb+ 12 ih2q2ta+ 6 ihqt2a+ 6 i2h2q2ta− 6 ihqt2b

+ 5 q3h3b+ 2 q3h3a− 2 i3h3q3b+ i2h3q3b+ 6 i2h3q3a+ 6 ih3q3a

+ 2 i3h3q3a+ 6 tq2h2a+ 8 tq2h2b+ 8 ih3q3b+ t2bqh+ 6 t2aqh− 2 t3b+ 2 t3a)

+ γ(− 14 ih2q2at+ 12 ihqt2b− 14 ih2q2bt− 12 ihqt2a− 12 i2h2q2ta+ 12 i2h2q2tb

− 7 t2qha− 7 t2qhb− 7 i2h3q3a+ 4 i3h3q3b− 7 i2h3q3b− 4 i3h3q3a

+ 4 t3b− 4 t3a)],

where F (x) is defined in Equation (6.4).

104

Page 117: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

D.2. Principal Axis Transformation of the Multi-Asset Black-Scholes PDE

Treatment of the up

The up result is not explicitly printed here because it can be obtained by transposing thedown matrix M , as illustrated in Section 6.5.1. This is possible because the operator is alsosymmetric.

Numerical Evaluation

The formulas above contain a large number of terms. The computational effort can bereduced by computing only once the values of q2, q3, t2, t3 and so on. Furthermore, theclassical conditioning problem encountered when performing subtraction of two similararguments can be minimised by summing first the positive terms and then the negativeterms before doing a single subtraction (the variables q, h and i are always non-negative,and conditional summation can be performed based on the sign of the offset t). In thisway the number of numerical operations required to reach a result is relatively low incomparison to that typically required by a high-accuracy numerical quadrature approach.

D.2. Principal Axis Transformation of the Multi-AssetBlack-Scholes PDE

The number of diffusion terms in the multi-asset Black-Scholes PDE (B.4) grows withO(d2), where d is the number of underlyings. This quadratic growth analogously increasesthe computational effort required to reach a solution. The number of diffusion terms canbe reduced to O(d) (thereby reducing the required computational effort) by using the so-called Principal Axis Transformation (PAT) as described in [24].

Beginning with the log-transformed equation (B.4) and applying the backward-time trans-formation τ = T − t (discussed in Section 5.3) gives

∂U

∂τ− 1

2

d∑i=1

d∑j=1

σiσjρi,j∂2U

∂xi∂xj−

d∑i=1

(r − 1

2σ2i

)∂U

∂xi+ rU = 0. (D.1)

The PAT takes the form ~y = QT~x, where Q ∈ Rd×d is an orthogonal transformation matrixresulting from the eigendecomposition

D = QTΣQ.

The eigenvalues λi are contained in the matrix D = diag(λ1 λ2 · · · λd−1 λd

)∈ Rd×d,

and Σ is the symmetric covariance matrix with Σ = (σiσjρi,j)i,j=1...d entries. The eigenvec-tors ~qi ∈ Rd define the orthogonal transformation matrix, i.e. Q =

(~q1 ~q2 · · · ~qd−1 ~qd

)∈

Rd×d.

105

Page 118: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

D. Additional Calculations

It follows that the partial derivative ∂U∂xi

can be expressed as

∂U

∂xi=∂U

∂y1· ∂y1

∂xi+ . . .+

∂U

∂yd· ∂yd∂xi

= qi,1 ·∂U

∂y1+ . . . qi,d ·

∂U

∂yd=

d∑j=1

qi,j ·∂U

∂yj.

In vector calculus notation this generalises to

∇~x U(~x, τ) = Q · ∇~y U(~y, τ).

The double-sum of differential operators used in (D.1) can then be expressed and reformedas

d∑i=1

d∑j=1

σiσjρi,j∂2

∂xi∂xj= ∇T~x · Σ · ∇~x

=(Q∇~y

)T · Σ · (Q∇~y)= ∇T~y ·Q

TΣQ︸ ︷︷ ︸:=D

·∇~y

= ∇T~y ·D · ∇~y

=

d∑i=1

λi∂2

∂y2i

,

from which (D.1) is rewritten as

∂U

∂τ− 1

2

d∑i=1

λi∂2U

∂y2i

−d∑j=1

[d∑i=1

(r − 1

2σ2i

)qi,j

]∂U

∂yj+ rU = 0.

The number of diffusion terms in the PDE is now in O(d). The new inner-summationcoefficient of each convection term is evaluated in each case using constant values. Theseconvection-term coefficients are hence constants and do not need to be evaluated duringthe iterative solution process. The practical count of O(d) convection terms is thus alsoretained.

106

Page 119: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Bibliography

[1] Jamil Baz and George Chacko. Financial Derivatives: Pricing, Applications, and Mathe-matics. Cambridge University Press, Cambridge, England, 2004.

[2] Richard Bellman. Adaptive control processes: a guided tour. Technical report, RandCorporation, 1961.

[3] Janos Benk, Dirk Pfluger, and Stefanie Schraufstetter. Pricing Multi-Dimensional Fi-nancial Derivatives with Dimensional Adaptive Combination Technique under theHeston Process. Chair of Scientific Computing, Technical University of Munich, De-cember 2011.

[4] Fischer Black and Myron Scholes. The Pricing of Options and Corporate Liabilities.Journal of Political Economy, 81(3):637–654, 1973.

[5] John Black, Nigar Hashimzade, and Gareth Myles. A dictionary of economics. OxfordUniversity Press, Oxford, third edition, 2009.

[6] Susanne C. Brenner and L. Ridgway Scott. The Mathematical Theory of Finite ElementMethods. Springer-Verlag, New York, third edition, 2008.

[7] Hans-Joachim Bungartz. Rekursive verfahren und hierarchische datenstrukturen inder numerische analysis. Chair of Scientific Computing, Technical University of Mu-nich, March 1999.

[8] Hans-Joachim Bungartz. Sparse Grids. Acta Numerica, 13:147–269, 2004.

[9] Russel E. Caflisch. Monte carlo and quasi-monti carlo methods. Acta Numerica, 7:1–49,1998.

[10] Fwu-Ranq Chang. Stochastic Optimization in Continuous Time. Cambridge UniversityPress, Cambridge, England, 2004.

[11] John C. Cox, Jonathan E. Ingersoll, Jr., and Stephen A. Ross. A Theory of the TermStructure of Interest Rates. Econometrica, 53(2):385–407, 1985.

[12] Jack J. Dongarra, Iain S. Duff, Danny C. Sorensen, and Henk A. van der Vorst. Numer-ical Linear Algebra for High-Performance Computers. Society for Industrial and AppliedMathematics, Philadelphia PA, 1998.

[13] Bertram During and Michel Fournie. High-order compact finite difference scheme foroption pricing in stochastic volatility models. Technical report, Institute for Analysisand Scientific Computing, Vienna University of Technology, 2010.

107

Page 120: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Bibliography

[14] Alexandre Ern and Jean-Luc Guermond. Theory and Practice of Finite Elements.Springer-Verlag, Berlin, 2004.

[15] Frank J. Fabozzi. The Handbook of Financial Instruments. John Wiley & Sons, Hoboken,New Jersey, 2002.

[16] Jean-Pierre Fouque, George Papanicolaou, Ronnie Sircar, and Knut Sølna. MultiscaleStochastic Volatility for Equity, Interest Rate, and Credit Derivatives. Cambridge Univer-sity Press, Cambridge, England, 2011.

[17] Jochen Garcke. Sparse grid tutorial. Technical report, Mathematical Sciences Institute,Australian National University, August 2006.

[18] Thomas Gerstner and Michael Griebel. Sparse grids. In Encyclopedia of QuantitativeFinance. John Wiley and Sons, February 2010.

[19] Michael Griebel. Sparse grids and related approximation schemes for higher dimen-sional problems. In Foundations of Computational Mathematics, Santander 2005, Band 13,pages 106–158, 2005.

[20] Michael Griebel, Michael Schneider, and Christoph Zenger. A combination techniquefor the solution of sparse grid problems. Technical report, Technical University ofMunich, 1992.

[21] Mircea Grigoriu. Stochastic Calculus: Applications in Science and Engineering.Birkhauser, Basel, 2009.

[22] Alexander Heinecke. Realization of a boundary handling for adaptive sparse gridmethods with applications in data mining and finance. Master’s thesis, TechnicalUniversity of Munich, 2010.

[23] Alexander Heinecke. Integration of adaptivity into a sparse grid solver for basketoptions. Master’s thesis, Technical University of Munich, 2011.

[24] Alexander Heinecke, Stefanie Schraufstetter, and Hans-Joachim Bungartz. A highly-parallel black-scholes solver based on adaptive sparse grids. International Journal ofComputer Mathematics, 13(1):to appear, 2011.

[25] Steven L. Heston. A Closed-Form Solution for Options with Stochastic Volatility withApplications to Bond and Currency Options. The Review of Financial Studies, 6(2):327–343, 1993.

[26] John C. Hull. Options, Futures, and Other Derivatives. Prentice Hall, Upper SaddleRiver, New Jersey, sixth edition, 2006.

[27] John C. Hull and Alan White. The Pricing of Options on Assets with Stochastic Volatil-ities. Journal of Finance, 42:281–300, 1987.

[28] Stefano M. Iacus. Option Pricing and Estimation of Financial Models with R. John Wiley& Sons, Hoboken, New Jersey, 2011.

[29] K.J. in ’t Hout and S. Foulon. ADI finite difference schemes for option pricing in the

108

Page 121: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Bibliography

Heston model with correlation. International Journal of Numerical Analysis and Model-ing, 7(2):303–320, 2010.

[30] Eric Jondeau, Ser-Huang Poon, and Michael Rockinger. Financial Modeling Under Non-Gaussian Distributions. Springer Verlag, Berlin, 2007.

[31] George Karniadakis and Robert M. Kirby. Parallel Scientific Computing in C++ andMPI: A Seamless Approach to Parallel Algorithms and Their Implementation. CambridgeUniversity Press, Cambridge, England, 2003.

[32] Jaan Kiusalaas. Numerical Methods in Engineering with MATLAB. Cambridge Univer-sity Press, Cambridge, England, 2005.

[33] Fima C. Klebaner. Introduction to Stochastic Calculus with Applications. Imperial CollegePress, London, 2005.

[34] Achim Klenke. Probability Theory: A Comprehensive Course. Springer-Verlag, Berlin,2008.

[35] Johannes Kraus and Svetozar Margenov. Robust Algebraic Multilevel Methods and Al-gorithms. Walter de Gruyter, Berlin, 2009.

[36] Hans Petter Langtangen, Are Magnus Bruaset, and Ewald Quak. Advances in softwaretools for scientific computing. Springer, Heidelberg, 2000.

[37] Mario Lefebvre. Basic Probability Theory with Applications. Springer, Heidelberg, 2009.

[38] Charles Mackay. Extraordinary Popular Delusions and the Madness of Crowds. HarrimanHouse, Hampshire, 2003.

[39] Paul Malliavin and Anton Thalmaier. Stochastic Calculus of Variations in MathematicalFinance. Springer Verlag, Berlin, 2006.

[40] Michael May and Thomas Schiekofer. An abstract data type for parallel simulationsbased on sparse grids. Parallel Virtual Machine - EuroPVM ’96, Lecture Notes in Com-puter Science, 1156:59–67, 1996.

[41] Nimalin Moodley. The Heston Model: A Practical Approach with Matlab Code.Bachelor’s thesis, Faculty of Science, University of the Witwatersrand, Johannesburg,South Africa, 2005.

[42] Katsuhiko Ogata. Modern Control Engineering. Prentice Hall, Upper Saddle River,New Jersey, 2010.

[43] S.M. Ould Aly. Sensitivity of Prices in Heston Model. HAL - Inria archive ouverte/openarchive, hal-00678437, 2012.

[44] Sunil K. Parameswaran. Valuation of Options. Tata McGraw-Hill, New Delhi, 2009.

[45] Dirk Pfluger. Spatially Adaptive Sparse Grids for High-Dimensional Problems. PhD thesis,Technical University of Munich, August 2010.

[46] Sergio Pissanetzky. Sparse Matrix Technology. Academic Press, Waltham, Mas-sachusetts, 1984.

109

Page 122: Computational Science and Engineering - TUM · Computational Science and Engineering Technical University of Munich Master’s Thesis A multi-dimensional PDE solver for option pricing

Bibliography

[47] David Pommier and Yves Achdou. High dimensional PDE methods applied to optionpricing. Technical report, Seminaire des doctorants CERMICS, February 2010.

[48] Chao Qi. Pricing variable annuities with partial differential equations. Master’s the-sis, Technical University of Munich, 2010.

[49] Camilla Rosenkilde. Capital protected funds - an analysis & valuation with stochasticvolatility. Master’s thesis, Aarhus University, 2010.

[50] Mark E. Rubinstein. Nonparametric Tests of Alternative Option Pricing Models UsingAll Reported Trades and Quotes on the 30 Most Active CBOE Option Classes fromAugust 23, 1976 through August 31, 1978. Journal of Finance, 40:455–480, 1985.

[51] Yousef Saad. Iterative Methods for Sparse Linear Systems. SIAM, Philadelphia, PA, 2003.

[52] Stefanie Schraufstetter. A Pricing Framework for the Efficient Evaluation of FinancialDerivatives based on Theta Calculus and Adaptive Sparse Grids. Dissertation, Institut furInformatik, Technische Universitat Munchen, Munchen, 2012.

[53] Louis O. Scott. Option Pricing When the Variance Changes Randomly: Theory, Esti-mation and an Application. Journal of Financial and Quantitative Analysis, 22:419–438,1987.

[54] Rudiger Seydel. Tools for Computational Finance. Springer-Verlag, Berlin, second edi-tion, 2004.

[55] S.L. Gupta. Financial Derivatives (Theory, Concepts and Problems). PHI Learning, NewDelhi, 2005.

[56] Gilbert Strang and George J. Fix. An Analysis of the Finite Element Method. Wellesley-Cambridge Press, Wellesley, MA, second edition, 2008.

[57] Barna Szabo and Ivo Babuska. Introduction to Finite Element Analysis: Formulation,Verification and Validation. John Wiley & Sons, Hoboken, New Jersey, 2011.

[58] The Options Institute. Options - Essential Concepts & Trading Strategies. McGraw-Hill,New York, third edition, 1999.

[59] Ruey S. Tsay. Analysis of Financial Time Series. John Wiley & Sons, Hoboken, NewJersey, third edition, 2010.

[60] James B. Wiggins. Option Values Under Stochastic Volatility - Theory and EmpiricalEstimates. Journal of Financial Economics, 19:351–372, 1987.

[61] Gunter Winkler, Thomas Apel, and Uwe Wystup. Valuation of Options in Heston’sStochastic Volatility Model Using Finite Element Methods. Risk Books, London, 2002.

[62] Jianwei Zhu. Applications of Fourier Transform to Smile Modeling. Springer, Heidelberg,second edition, 2011.

[63] Olgierd Cecil Zienkiewicz and Robert Lee Taylor. Finite Element Method for Fluid Dy-namics. Elsevier, Amsterdam, sixth edition, 2005.

110