cover.eps

Title page image

Quantitative Finance For Dummies®

To view this book's Cheat Sheet, simply go to www.dummies.com and search for “Quantitative Finance For Dummies Cheat Sheet” in the Search box.

Introduction

Quantitative finance is about applying mathematics and statistics to finance. For maths lovers that’s exciting, but for the rest of us it may sound scary and off-putting. But I guide you step by step, so no need to worry. Quantitative finance helps you to price contracts such as options, manage the risk of investment portfolios and improve trade management.

I show you how banks price derivatives contracts based on the statistics of stock and bond price movements and some simple rules of probability. Similar maths help you understand how to manage the risk of investment portfolios. Quantitative tools help you understand and manage these systems, and this book introduces you to many of the most important ones.

About This Book

This book should be helpful for professionals working in the financial sector – especially in banking. It won’t take you to the level of doing the maths for pricing the latest derivative contract, but it can help you to contribute, perhaps as a programmer, data scientist or accountant. It should also be helpful for those taking a masters course in finance or financial analysis and who want help in a module on quantitative finance. Enough detail is included to really help in understanding key topics such as the Black-Scholes equation. The book also has breadth so you can discover a range of key financial instruments and how they’re used as well as techniques used by traders and hedge fund managers. Whether you plan a career as a corporate treasurer, risk analyst, investment manager or master of the universe at an investment bank, this book should give you a boost.

This book isn’t a traditional textbook and isn’t a traditional book on quantitative finance. It is significantly different from either in the following ways:

If you haven’t done any algebra for a while, remember that mathematicians like to write products without multiplication signs. So P(H)P(H) is shorthand for the probability of heads multiplied by the probability of heads. For maths with actual numbers, I use the symbol * to indicate multiplication. This avoids any confusion with the variable x, which is a favourite of mathematicians to signify an unknown quantity.

Within this book, web addresses may break across two lines of text. If you’re reading this book in print and want to visit one of these web pages, simply key in the web address exactly as noted in the text, pretending the line break doesn’t exist. If you’re reading this as an e-book, you’ve got it easy — just click the web address to be taken directly to the website.

Foolish Assumptions

I don’t assume that you have any previous experience of quantitative finance. I don’t even assume that you’re familiar with the world of finance except for the apocalyptic stories you read in the press about crises, greed, bonuses and debt. However, I’m assuming that you’re reading this book because you’re working in a financial institution such as a bank or a hedge fund and want to know what those clever quants (quantitative finance professionals) are doing. Alternatively, you may be studying for a Masters in Finance and looking for help with those quantitative modules.

I assume that you’re familiar with mathematics such as logarithms, exponentials and basic algebra. In some parts of the book, I also assume some knowledge of calculus both differentiation and integration. The online Cheat Sheet at www.dummies.com/cheatsheet/quantitativefinance is a good place to visit if you need to brush up on some of this maths. Some of the sections with the heaviest maths have Technical Stuff icons, which means that you can skip them if you wish.

Where I use algebra, I try to take you through it step by step and introduce all the symbols before the equations so that you know what they’re about. I also include a few example calculations to help you become familiar with them and see how to use the equations in practice.

Quantitative finance is what it says it is and involves numbers and maths but you don’t need to become bogged down by it. Only then will you see that the numbers are useful in real life in your job.

Icons Used in This Book

Icons are used in this book to draw your attention to certain features that occur on a regular basis. Here’s what they mean:

remember This icon is to give those grey cells a little jolt. It’s so easy to forget what you learned in school.

tip This icon points to helpful ideas that can save you time and maybe even money.

technicalstuff Skip paragraphs marked with this icon if you don’t want to go into the gory mathematical details. But if you do manage them, you’ll really glow with achievement.

warning Sometimes things can go badly wrong. Follow these sections to avoid disasters.

Where to Go from Here

The obvious answer is to start with Chapter 1. In fact, that’s a good idea if you’re not too familiar with quantitative finance as Chapter 1 is a bit like the book in miniature. I hope it will fire you up ready to read the rest of the book. Another obvious answer is to go to the table of contents. Just find the topic you’d like to know about and go straight there – no messing about. The book is designed to be used like that. Check out the topics you want to know about and skip what you’re not interested in. A third obvious answer is to use the index, which has been conveniently arranged in alphabetical order for you. If some quantitative finance jargon is bugging you, go to the Glossary at the back. Finally, if you’re really in a hurry, try Chapters 19 and 20. They give quantitative finance to you in ten bite-sized sections.

And you can use some free online material to help. The Cheat Sheet is a goldmine of handy formulae used in quantitative finance. To view this book’s Cheat Sheet, go to www.dummies.com and search for “Quantitative Finance For Dummies Cheat Sheet” for additional bits of information that you can refer to whenever you need it.

Part 1

Getting Started with Quantitative Finance

IN THIS PART …

Realise that the chart of a stock price can look jumpy and rather random because market prices are indeed very close to being random.

Get to grips with the mathematics of random numbers and brush up on probability and statistics.

Enter the strange and fascinating world of random walks. Find out how you can use them as models for the price movement of financial assets such as stocks.

Use calculus to analyse random walks so that you can get going on the classic maths for option pricing.

Chapter 1

Quantitative Finance Unveiled

IN THIS CHAPTER

Using probability and statistics in finance

Finding alternatives for cash

Looking at efficient (and not-so-efficient) markets

Tackling options, futures and derivatives

Managing risk

Doing the maths (and the machines that can help)

Quantitative finance is the application of probability and statistics to finance. You can use it to work out the price of financial contracts. You can use it to manage the risk of trading and investing in these contracts. It helps you develop the skill to protect yourself against the turbulence of financial markets. Quantitative finance is important for all these reasons.

If you’ve ever looked at charts of exchange rates, stock prices or interest rates, you know that they can look a bit like the zigzag motion of a spider crossing the page. However, major decisions have to be made based on the information in these charts. If your bank account is in dollars but your business costs are in euros, you want to make sure that, despite fluctuations in the exchange rate, you can still pay your bills. If you’re managing a portfolio of stocks for investors and you want to achieve the best return for them at minimum risk, then you need to learn how to balance risk with reward. Quantitative finance is for banks, businesses and investors who want better control over their finances despite the random movement of the assets they trade or manage. It involves understanding the statistics of asset price movements and working out what the consequences of these fluctuations are.

However, finance, even quantitative finance, isn’t just about maths and statistics. Finance is about the behaviour of the participants and the financial instruments they use. You need to know what they’re up to and the techniques they use. This is heady stuff, but this book guides you through.

Defining Quantitative Finance

My guess is that if you’ve picked up a book with a title like this one, you want to know what you’re going to get for your money. Definitions can be a bit dry and rob a subject of its richness but I’m going to give it a go.

Quantitative finance is the application of mathematics – especially probability theory – to financial markets. It’s used most effectively to focus on the most frequently traded contracts. What this definition means is that quantitative finance is much more about stocks and bonds (both heavily traded) than real estate or life insurance policies. The basis of quantitative finance is an empirical observation of prices, exchange rates and interest rates rather than economic theory.

Quantitative finance gets straight to the point by answering key questions such as, ‘How much is a contract worth?’ It gets to the point by using many ideas from probability theory, which are laid out in Chapters 2 and 3. In addition, sometimes quantitative finance uses a lot of mathematics. Maths is really unavoidable because the subject is about answering questions about price and quantity. You need numbers for that. However, if you use too much mathematics, you can lose sight of the context of borrowing and lending money, the motivation of traders and making secure investments. Chapter 13 covers subjects such as attitudes to risk and prospect theory while Chapter 18 looks in more detail at the way markets function and dysfunction.

technicalstuff Just to avoid confusion, quantitative finance isn’t about quantitative easing. Quantitative easing is a process carried out by central banks in which they effectively print money and use it to buy assets such as government bonds or other more risky bonds. It was used following the credit crisis of 2008 to stimulate the economies of countries affected by the crisis.

Summarising the mathematics

I’m not going to pretend that quantitative finance is an easy subject. You may have to brush up on some maths. In fact, exploring quantitative finance inevitably involves some mathematics. Most of what you need is included in Chapter 2 on probability and statistics. In a few parts of the book, I assume that you remember some calculus – both integration and differentiation. If calculus is too much for you, just skip the section or check out Calculus For Dummies by Mark Ryan (Wiley). I’ve tried to keep the algebra to a minimum but in a few places you’ll find lots of it so that you know exactly where some really important results come from. If you don’t need to know this detail, just skip to the final equation.

Time and again in this book, I talk about the Gaussian (normal) distribution. Chapter 2 has a definition and explanation and a picture of the famous bell curve.

Please don’t get alarmed by the maths. I tried to follow the advice of the physicist Albert Einstein that ‘Everything should be made as simple as possible, but not simpler.’

Pricing, managing and trading

Quantitative finance is used by many professionals working in the financial industry. Investment banks use it to price and trade options and swaps. Their customers, such as the officers of retail banks and insurance companies, use it to manage their portfolios of these instruments. Brokers using electronic-trading algorithms use quantitative finance to develop their algorithms. Investment managers use ideas from modern portfolio theory to try to boost the returns of their portfolios and reduce the risks. Hedge fund managers use quantitative finance to develop new trading strategies but also to structure new products for their clients.

Meeting the market participants

Who needs quantitative finance? The answer includes banks, hedge funds, insurance companies, property investors and investment managers. Any organisation that uses financial derivatives, such as options, or manages portfolios of equities or bonds uses quantitative finance. Analysts employed specifically to use quantitative finance are often called quants, which is a friendly term for quantitative analysts, the maths geeks employed by banks.

Perhaps the most reviled participants in the world of finance are speculators. (Bankers should thank me for writing that.) A speculator makes transactions in financial assets purely to buy or sell them at a future time for profit. In that way, speculators are intermediaries between other participants in the market. Their activity is often organised as a hedge fund, which is an investment fund based on speculative trading.

remember Speculators can make a profit due to

  • Superior information
  • Good management of the risk in a portfolio
  • Understanding the products they trade
  • Fast or efficient trading mechanisms

Speculators are sometimes criticised for destabilising markets, but more likely they do the opposite. To be consistently profitable, a speculator has to buy when prices are low and sell when prices are high. This practice tends to increase prices when they’re low and reduce them when they’re high. So speculation should stabilise prices (not everyone agrees with this reasoning, though).

Speculators also provide liquidity to markets. Liquidity is the extent to which a financial asset can be bought or sold without the price being affected significantly. (Chapter 18 has more on liquidity.) Because speculators are prepared to buy (or sell) when others are selling (or buying), they increase market liquidity. That’s beneficial to other market participants such as hedgers (see the next paragraph) and is another reason not to be too hard on speculators.

In contrast to speculators, hedgers like to play safe. They use financial instruments such as options and futures (which I cover in Chapter 4) to protect a financial or physical investment against an adverse movement in price. A hedger protects against price rises if she intends to buy a commodity in the future and protects against price falls if she intends to sell in the future. A natural hedger is, for example, a utility company that knows it will want to purchase natural gas throughout the winter so as to generate electricity. Utility companies typically have a high level of debt (power stations are expensive!) and fixed output prices because of regulation, so they often manage their risk using option and futures contracts which I discuss in Chapters 5 and 6, respectively.

Walking like a drunkard

The random walk, a path made up from a sequence of random steps, is an idea that comes up time and again in quantitative finance. In fact, the random walk is probably the most important idea in quantitative finance. Chapter 3 is devoted to it and elaborates how random walks are used.

Figure 1-1 shows the imagined path of a bug walking over a piece of paper and choosing a direction completely at random at each step. (It may look like your path home from the pub after you’ve had a few too many.) The bug doesn’t get far even after taking 20 steps.

image

© John Wiley & Sons, Ltd.

FIGURE 1-1: A random walk.

In finance, you’re interested in the steps taken by the stock market or any other financial market. You can simulate the track taken by the stock market just like the simulated track taken by a bug. Doing so is a fun metaphor but a serious one, too. Even if this activity doesn’t tell you where the price ends up, it tells you a range within which you can expect to find the price, which can prove to be useful.

remember Random walks come in different forms. In Figure 1-1, the steps are all the same length. In finance, though random walks are often used with very small step sizes, in which case you get a Brownian motion. In a slightly more complex form of Brownian motion, you get the geometric Brownian motion, or GBM, which is the most common model for the motion of stock markets. You can find out in detail about GBM in Chapter 3.

Knowing that almost nothing isn’t completely nothing

The orthodox view is that financial markets are efficient, meaning that prices reflect known information and follow a random walk pattern. It’s therefore impossible to beat the market and not worth paying anyone to manage an investment portfolio. This is the efficient market hypothesis, or EMH for short. This view is quite widely accepted and is the reason for the success of tracker funds, investments that seek to follow or track a stock index such as the Dow Jones Industrial Average. Because tracking an index takes little skill, investment managers can offer a diversified portfolio at low cost. Chapter 14 has much more about diversification and portfolios.

technicalstuff Academics often distinguish different versions of the efficient market hypothesis (EMH):

  • Weak efficiency is when prices can’t be predicted from past prices.
  • Semi-strong efficiency is when prices can’t be predicted with all available public information.
  • Strong efficiency goes a step further than semi-strong efficiency and says that prices can’t be predicted using both public and private information.

Anomalies are systematically found in historical stock prices that violate even weak efficiency. For example, you find momentum in most stock prices: If the price has risen in the past few months, it will tend to rise further in the next few months. Likewise, if the price has fallen in the past few months, it will tend to continue falling in the next few months. This anomaly is quite persistent and is the basis for the trend following strategy of many hedge funds.

Somehow, though, the EMH smells wrong. Even though you can find many vendors of market information, EMH has a cost. It’s no coincidence that some of these vendors are very wealthy indeed. Also, if you examine publicly available information, you soon find that such information is not perfect. Often the information is delayed, with the numbers published days or even weeks following the time period they apply to. Some exceptions exist and you can read about one of them in the sidebar, ‘The impact of US employment numbers’.

It’s far more likely that markets are not informationally efficient and that many participants for reasons of cost or availability are not perfectly informed. It’s also highly likely that most participants are not able to instantly work out in detail the consequences of the information presented to them. This working out may take some time.

Indeed, if markets were informationally efficient, there would be no incentive to seek out information. The cost wouldn’t justify it. On the other hand, if everyone else is uninformed, it would be rewarding to become informed as you can trade successfully with those who know less than you.

remember The point that in an efficient market there’s no incentive to seek out information and so therefore no mechanism for it to become efficient is the Grossman-Stiglitz paradox, named after the American economists Sanford Grossman and Joseph Stiglitz. The implication is that markets will be efficient but certainly not perfectly efficient.

Only with deep research into market data do markets have a chance of becoming efficient. That’s the norm in financial markets, but pockets of inefficiency are always left that market traders and savvy investors can attempt to exploit. Also, attempts to use the results of deep research drive the intense trading found in many markets. In Chapter 8, I talk about techniques for analysing historical price data for patterns.

Recognising irrational exuberance

Most markets are responding constantly to a flow of news on companies, economies, interest rates and commodities. They also react to changes in the supply and demand for the financial asset in question. If more fund managers decide to buy a stock than sell it, its price tends to rise. The greater the demand for loans from companies, the higher the interest rate lenders demand.

Markets don’t always behave in this sensible way, however. Sometimes, they defy gravity and keep on rising, which is called a bubble. Figure 1-2 shows an example of this in a chart for the share price of British Telecom, a fixed-line telecom operator. In September 1996, the Chairman of the US Federal Reserve Bank warned of irrational exuberance in markets. Unusual circumstances, especially low interest rates, were making markets overly excited. He was dead right. The Internet had just been invented so even traditional companies such as British Telecom saw their share price rocket upward. The market ignored Chairman Alan Greenspan when he made his warning, although the Japanese stock market respectfully dipped several per cent on the day of his speech. In a way, the market was right and farsighted: The Internet was going to be big, it was just that British Telecom wasn’t Google. After rising to a very sharp peak in early 2000, British Telecom shares crashed back down to earth and continued on in their usual way.

image

© John Wiley & Sons, Ltd.

FIGURE 1-2: Share price chart for British Telecom plc.

tip One thing for sure is that with crazy behaviour like this, the statistics of the price movements for shares don’t obey Gaussian statistics. In Chapter 2, I explain quantities such as kurtosis, a measure of how much statistical distributions deviate from the Gaussian distribution. A large positive value for the kurtosis means that the probability of extreme events is far more likely than you’d expect from a Gaussian distribution. This situation has come to be called a fat-tailed distribution. Statistics is the way of measuring and analysing the market price data used in quantitative finance, and I try to emphasise this throughout the book.

Another possibility, of course, is that prices crash rapidly downwards far more often than you’d expect. The fear of prices crashing downwards is palpable. Market participants want to protect themselves against nasty events like that. To do that, you need financial instruments such as options and futures, which I explain in detail in Chapters 5 and 6, respectively. Options are a form of financial insurance. For example, if you think that the stock market is going to crash, then you buy an option that compensates you if that happens. If the market doesn’t crash, you’ve lost just the premium you paid for the option, just like an insurance contract.

tip George Soros, a billionaire hedge fund manager, attempted to explain these irrational market events with a concept he called reflexivity. He replaced the efficient market hypothesis view that the market is always right with something else:

  • Markets are always biased in one direction or another. An example of this bias is the British Telecom shares illustrated in Figure 1-2. The market thought that all things telecom would be highly profitable.
  • Markets can influence the events that they anticipate. Financial markets can be stabilising. If a recession is anticipated and the currency declines, this situation should boost exports and help prevent a recession.

George Soros’s ideas are controversial, but they help to explain some major market distortions. He’s been proven correct on enough occasions to have been successful using his insights.

Wielding Financial Weapons of Mass Destruction

Cash is the most fundamental of all financial assets. Economists write that money has three functions. It serves as a:

  • Store of value
  • Means of exchange
  • Unit of account

These three functions are familiar to anyone with a savings account (store of value) who has done some shopping (means of exchange) and carefully compared prices (unit of account). Whether in the form of nickel, plastic or paper, cash is the key.

tip Two alternatives to cash – one ancient, one modern – are good to know about:

  • Gold has been used for thousands of years as a store of value and also as a means of exchange. Most central banks in the world hold substantial quantities in vaults. This practice is partly a relic of the time when paper money could be exchanged for gold at the central bank. Although this ended in the United States in 1971, many investors still hold gold as part of their investment portfolios.
  • Like gold, the bitcoin is a currency not under the control of any government. However, bitcoin isn’t physical. It’s been described as a cryptocurrency because bitcoin is completely digital and relies heavily on encryption techniques for security. It can be used for payments just like other forms of cash, but at the moment these transactions are small compared with, say, the volume of credit card transactions.

One of the appeals of both gold and bitcoin is that they’re not under government control. In the past, governments have used their power to print money, which undermined the value of the currency. The currencies then no longer function well as a store of value. By investing in gold, which is limited in supply, this undermining can’t happen.

Cash exists in the form of many currencies such as the US dollar, the Japanese Yen and the Chinese renminbi. These countries all have their own central banks, and one of the key functions of these banks is to set the interest rate for the currency. This interest is money that you earn by depositing cash at the central bank. Normally, only other banks are permitted to use central banks in this way, but these interests rates are one of the key parameters in quantitative finance. The interest rate at a central bank is often called the risk-free rate because the assumption is that a central bank can’t go bankrupt. Chapter 4 has some of the maths involved with interest rates that’s the basis behind lots of quantitative finance calculations.

If you take out a loan to buy a house or expand your business, the loan is said to be a floating-rate loan if the interest rate changes when the central bank in your country changes its interest rate. The load is fixed-rate if it stays the same when the central bank changes the interest rate. However, given that the period over which loans are repaid can be long, locking into one type of loan gives you no flexibility. If you have a floating-rate loan, you may decide that you want to keep the interest payments fixed in future. That may help you sleep at night. The solution to this fixing is called an interest-rate swap. This instrument allows you to swap from a fixed-rate loan to a floating-rate loan or vice versa. Chapter 4 has a section which gives you the maths behind this.

Interest-rate swaps are one of the most important instruments used by banks to manage risk. They also use more sophisticated tools as well and Chapter 12 provides an introduction to some of the most common interest-rate derivatives. These derivatives have proved very popular with real-estate investors who typically borrow large sums of money and want to put limits on interest payments.

remember Cash in one currency can be exchanged for cash in another currency. This transaction is called foreign exchange, often abbreviated as FX. The FX market isn’t organised on an exchange and normally consists of dealers working in banks. This market is the largest financial market in the world with huge volumes of transactions per day.

Because different currencies have different interest rates, you can potentially make money by

  • Selling a currency with a low interest rate
  • Buying currency with a high interest rate
  • Earning a high interest rate

Such transactions are called the carry trade and are a big factor in influencing foreign exchange rates.

Going beyond cash

Borrowing money from a bank to expand a business is fine, but other ways are possible too:

  • Bonds are a form of loan to a business. The borrower (or business owner) receives the principal from the lender and in return promises to pay a regular interest payment called a coupon. On the bond’s maturity date, the lender gets her principal back. The clever bit, though, is that this bond is a financial instrument. This means that the lender can sell it to someone else. Then the buyer is entitled to the coupon payments and the principal repayment on maturity.
  • Owning stocks or shares in a business means you’re a part owner of the business, are entitled to dividend payments and can vote at the annual general meeting in support (or otherwise) of the managers.

    Businesses issue shares in exchange for cash from investors but they have no fixed repayment date as a bond does. Dividend payments are at the discretion of the management and can vary and, in fact, be non-existent. Because of this, shares are often considered riskier than bonds.

Bonds and shares are the building blocks for most investment portfolios. Bonds are risky because the borrower can default and fail to pay her coupons. Shares are risky because the company may be unable to pay a dividend. Shareholders have no right to any repayment of capital so are more likely to lose everything. Chapter 4 gives you the lowdown on the bond and stock markets.

If you’re thinking that you’re never going to invest in shares or bonds because you may never get your money back, then you’re not alone. However, the financial markets have created a solution to this, using two instruments, options and futures that can be used to control and manage the risk of investing in the stock and bond markets. They’re both flexible contracts that I cover in great detail in Chapters 5 and 6, respectively. Quantitative finance developed rapidly in the 1980s after people figured out a mathematical way to price options. You can find out about pricing in Chapters 10 and 11.

Inventing new contracts

Every business likes to show off shiny new products so as to boost sales, but the financial industry has been better than most at creating new products; some would say too successful. After a long career at the heights of the financial world, the former chairman of the US Federal Reserve Bank Paul Volcker said that he’d encountered only one financial innovation in his career, and that was the automatic teller machine (ATM).

Volcker’s sceptical remark points out that the nature of the contracts that people enter into are not fundamentally different from ancient contracts. Energy futures were first created in the 1970s but they’re similar to agricultural futures, which have been around for thousands of years. Indeed, they’re now traded on exactly the same exchanges. Trading is now electronic and greatly accelerated, but the function of these contracts is exactly the same. The success of energy futures led to the introduction of financial futures contracts on interest rates and bonds. They were, and are still, a big success.

Just as in the futures market, the variety of option contracts available has proliferated. Initially, most options were share options, but they soon found use in the foreign exchange and bond markets. You can also buy commodity options such as for crude oil, which have proved very popular too.

New option styles have also been introduced. In this book, I stick to what are known as plain vanilla contracts which give the holder the right, but not the obligation, to buy or sell an underlying asset at a predetermined price (the strike price) at a specified time in the future. In the plain vanilla contract, the option payoff (the amount that you may get paid when the contract expires) depends only on a single strike price (the price that has to be reached for there to be any payoff to the option) whereas for barrier options, and other more complicated options, other prices are involved too.

Finally, credit derivatives give protection against defaulting loans. The most common of these derivatives are credit-default swaps in which the buyer of the swap makes a regular series of payments to the seller; in exchange, the seller promises to compensate the buyer if the loan defaults.

remember Derivatives are useful because market participants who can’t bear certain risks can shift them (at a price) to someone who can. As a whole though, trading in derivatives can lead to risk being concentrated in a small number of dealers with fatal consequences for the likes of Lehman Brothers. As the investor Warren Buffett presciently observed years before the 2008 crisis, ‘derivatives are financial weapons of mass destruction’.

Despite the explosive possibilities inherent in the derivatives market, the use of derivatives continues because of the constant need to mitigate financial risks. Better regulation will hopefully reduce the nasty accidents that have happened.