Book Image

Advanced Quantitative Finance with C++

By : Alonso Peña, Ph.D.
Book Image

Advanced Quantitative Finance with C++

By: Alonso Peña, Ph.D.

Overview of this book

<p>This book will introduce you to the key mathematical models used to price financial derivatives, as well as the implementation of main numerical models used to solve them. In particular, equity, currency, interest rates, and credit derivatives are discussed. In the first part of the book, the main mathematical models used in the world of financial derivatives are discussed. Next, the numerical methods used to solve the mathematical models are presented. Finally, both the mathematical models and the numerical methods are used to solve some concrete problems in equity, forex, interest rate, and credit derivatives.</p> <p>The models used include the Black-Scholes and Garman-Kohlhagen models, the LIBOR market model, structural and intensity credit models. The numerical methods described are Monte Carlo simulation (for single and multiple assets), Binomial Trees, and Finite Difference Methods. You will find implementation of concrete problems including European Call, Equity Basket, Currency European Call, FX Barrier Option, Interest Rate Swap, Bankruptcy, and Credit Default Swap in C++.</p>
Table of Contents (17 chapters)
Advanced Quantitative Finance with C++
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Discipline 1 – finance (financial derivatives)


In general, a financial derivative is a contract between two parties who agree to exchange one or more cash flows in the future. The value of these cash flows depends on some future event, for example, that the value of some stock index or interest rate being above or below some predefined level. The activation or triggering of this future event thus depends on the behavior of a variable quantity known as the underlying. Financial derivatives receive their name because they derive their value from the behavior of another financial instrument.

As such, financial derivatives do not have an intrinsic value in themselves (in contrast to bonds or stocks); their price depends entirely on the underlying.

A critical feature of derivative contracts is thus that their future cash flows are probabilistic and not deterministic. The future cash flows in a derivative contract are contingent on some future event. That is why derivatives are also known as contingent claims. This feature makes these types of contracts difficult to price.

The following are the most common types of financial derivatives:

  • Futures

  • Forwards

  • Options

  • Swaps

Futures and forwards are financial contracts between two parties. One party agrees to buy the underlying from the other party at some predetermined date (the maturity date) for some predetermined price (the delivery price). An example could be a one-month forward contract on one ounce of silver. The underlying is the price of one ounce of silver. No exchange of cash flows occur at inception (today, t=0), but it occurs only at maturity (t=T). Here t represents the variable time. Forwards are contracts negotiated privately between two parties (in other words, Over The Counter (OTC)), while futures are negotiated at an exchange.

Options are financial contracts between two parties. One party (called the holder of the option) pays a premium to the other party (called the writer of the option) in order to have the right, but not the obligation, to buy some particular asset (the underlying) for some particular price (the strike price) at some particular date in the future (the maturity date). This type of contract is called a European Call contract.

Example 1

Consider a one-month call contract on the S&P 500 index. The underlying in this case will be the value of the S&P 500 index. There are cash flows both at inception (today, t=0) and at maturity (t=T). At inception, (t=0) the premium is paid, while at maturity (t=T), the holder of the option will choose between the following two possible scenarios, depending on the value of the underlying at maturity S(T):

  • Scenario A: To exercise his/her right and buy the underlying asset for K

  • Scenario B: To do nothing if the value of the underlying at maturity is below the value of the strike, that is, S(T)<K

The option holder will choose Scenario A if the value of the underlying at maturity is above the value of the strike, that is, S(T)>K. This will guarantee him/her a profit of S(T)-K. The option holder will choose Scenario B if the value of the underlying at maturity is below the value of the strike, that is, S(T)<K. This will guarantee him/her to limit his/her losses to zero.

Example 2

An Interest Rate Swap (IRS) is a financial contract between two parties A and B who agree to exchange cash flows at regular intervals during a given period of time (the life of a contract). Typically, the cash flows from A to B are indexed to a fixed rate of interest, while the cash flows from B to A are indexed to a floating interest rate. The set of fixed cash flows is known as the fixed leg, while the set of floating cash flows is known as the floating leg. The cash flows occur at regular intervals during the life of the contract between inception (t=0) and maturity (t=T). An example could be a fixed-for-floating IRS, who pays a rate of 5 percent on the agreed notional N every three months and receives EURIBOR3M on the agreed notional N every three months.

Example 3

A futures contract on a stock index also involves a single future cash flow (the delivery price) to be paid at the maturity of the contract. However, the payoff in this case is uncertain because how much profit I will get from this operation will depend on the value of the underlying at maturity.

If the price of the underlying is above the delivery price, then the payoff I get (denoted by function H) is positive (indicating a profit) and corresponds to the difference between the value of the underlying at maturity S(T) and the delivery price K. If the price of the underlying is below the delivery price, then the payoff I get is negative (indicating a loss) and corresponds to the difference between the delivery price K and the value of the underlying at maturity S(T). This characteristic can be summarized in the following payoff formula:

Equation 1

Here, H(S(T)) is the payoff at maturity, which is a function of S(T). Financial derivatives are very important to the modern financial markets. According to the Bank of International Settlements (BIS) as of December 2012, the amounts outstanding for OTC derivative contracts worldwide were Foreign exchange derivatives with 67,358 billion USD, Interest Rate Derivatives with 489,703 billion USD, Equity-linked derivatives with 6,251 billion USD, Commodity derivatives with 2,587 billion USD, and Credit default swaps with 25,069 billion USD. For more information, see http://www.bis.org/statistics/dt1920a.pdf.