## Quantophile

### Financial programming for Quants

#### Page 2 of 2 In a typical $$6/49$$ lotto, where $$6$$ numbers are drawn from a range of $$49$$ and if the six numbers drawn match on the ticket, the ticket holder is a jackpot winner. The odds of this event are $$1$$ in $$13,983,816$$.

The study of counting methods dates at least to Gottfried Wilhelm Leibniz’s Dissertatio de Arte Combinatoria in the seventeenth century. Combinatorics has applications in many fields of study. Applications of combinatorics arise, for example in chemistry, in studying the arrangements of atoms in molecules and crystals; biology in questions about the structure of genes and proteins; physics, in problems in statistical mechanics; communication, in the design of codes for encryption, compression, and especially in computer science, for instance in problems of scheduling and allocating resources.

The links to my notes on how to count and the solved problems are given below. The random behavior of financial variables such as stock prices, interest rates, FX rates, credit spreads can be approximated using two-state lattices known as Binomial trees. Binomial trees are useful for a variety of European-style and American-style derivatives.

##### Introduction

Consider an asset with an initial value $$S_{0}$$ at time $$t=0$$. During a time period $$\Delta{t}$$, the asset price can go up to $$Su$$ with probability $$p$$ or down to $$Sd$$ with probability $$q=1-p$$. The asset price $$S$$ is a Bernoulli random variable. The points of a sample space may be very concrete objects. For example, on tossing a coin, a head or tail is realized, on tossing a coin twice, a head-head, head-tail, tail-head or tail-tail is realized, on rolling die, one of the numbers $$1,2,3,4,5,6$$ is realized, on drawing a card from a standard deck of cards, one of four suits – club, spade, heart, diamond and one of $$13$$ ranks is realized.

However, sometimes the sample space of an experiment can be incredibly complicated or higher dimensional and the outcomes may be non-numeric. For example, in a sequence of $$N$$ coin tosses, the sample space has an enormous $$2^N$$ sample points. In a survey of a random sample of people in a city, various questions may have numeric (e.g. age or height) and non-numeric answers (e.g. favorite political party or favorite movie). Thus, we require a mathematical description of the sample points.

Random variables fulfill this purpose. They assign numerical values to each sample point.

Random variables and their distributions A beautiful rendering of the Bugatti Veyron with 2 million polygons worth of information using ray-tracing! The science behind ray-tracing is to use the Monte-carlo methods to simulate the random paths of light through any given pixel and create a 3D-image.

Simulations are central to finance and risk management. They allow us to price complex financial instruments e.g. European style options for which no analytic pricing formula is available. They allow risk managers to simulate a portfolio’s profit and loss performance for a specified time horizon. Repeated trials within the simulation produce a frequency distribution for the changes in the portfolio value. The cutoff point beyond which there is very low probability of greater losses is an estimate of VAR.

© 2019 Quantophile

Theme by Anders NorenUp ↑