Week 1 Quantitative Analysis of Financial Markets Distributions A

Similar documents
Probability Distributions Columns (a) through (d)

Week 2 Quantitative Analysis of Financial Markets Bayesian Analysis

MA/ST 810 Mathematical-Statistical Modeling and Analysis of Complex Systems

Probabilities & Statistics Revision

Probability. Table of contents

Statistical Methods in Particle Physics

1: PROBABILITY REVIEW

BMIR Lecture Series on Probability and Statistics Fall, 2015 Uniform Distribution

3 Continuous Random Variables

1 Review of Probability

Lecture 2: Review of Probability

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

Plotting data is one method for selecting a probability distribution. The following

15 Discrete Distributions

Statistics and data analyses

Ching-Han Hsu, BMES, National Tsing Hua University c 2015 by Ching-Han Hsu, Ph.D., BMIR Lab. = a + b 2. b a. x a b a = 12

Probability and Distributions

Chapter 4: An Introduction to Probability and Statistics

Chapter 5. Chapter 5 sections

Continuous Distributions

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

ECON 5350 Class Notes Review of Probability and Distribution Theory

IV. The Normal Distribution

Statistics, Data Analysis, and Simulation SS 2013

Multivariate Distributions

Brief Review of Probability

Statistics, Data Analysis, and Simulation SS 2017

SUMMARY OF PROBABILITY CONCEPTS SO FAR (SUPPLEMENT FOR MA416)

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles

Slides 8: Statistical Models in Simulation

Common ontinuous random variables

FRM QUANTITATIVE ANALYSIS

Basics on Probability. Jingrui He 09/11/2007

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

II. The Normal Distribution

Why study probability? Set theory. ECE 6010 Lecture 1 Introduction; Review of Random Variables

MFM Practitioner Module: Quantitative Risk Management. John Dodson. September 23, 2015

Normal Random Variables and Probability

Random Variables and Their Distributions

Chapter 1. Probability, Random Variables and Expectations. 1.1 Axiomatic Probability

Lecture 6: Special probability distributions. Summarizing probability distributions. Let X be a random variable with probability distribution

3 Modeling Process Quality

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Math489/889 Stochastic Processes and Advanced Mathematical Finance Solutions for Homework 7

Probability Distribution

1 Presessional Probability

Distributions of Functions of Random Variables. 5.1 Functions of One Random Variable

Machine Learning. Theory of Classification and Nonparametric Classifier. Lecture 2, January 16, What is theoretically the best classifier

Chapter 2: Random Variables

STATISTICS SYLLABUS UNIT I

MATH Notebook 5 Fall 2018/2019

APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 651 APPENDIX B. BIBLIOGRAPHY 677 APPENDIX C. ANSWERS TO SELECTED EXERCISES 679

7 Random samples and sampling distributions

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

Department of Mathematics

Random Variables. Random variables. A numerically valued map X of an outcome ω from a sample space Ω to the real line R

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 18

Dr. Junchao Xia Center of Biophysics and Computational Biology. Fall /13/2016 1/33

Introduction to Probability Theory for Graduate Economics Fall 2008

Estimating the accuracy of a hypothesis Setting. Assume a binary classification setting

SOME SPECIFIC PROBABILITY DISTRIBUTIONS. 1 2πσ. 2 e 1 2 ( x µ

Statistics, Data Analysis, and Simulation SS 2015

Statistical Methods in Particle Physics

Exercises and Answers to Chapter 1

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

STATISTICAL METHODS FOR SIGNAL PROCESSING c Alfred Hero

Physics 403. Segev BenZvi. Parameter Estimation, Correlations, and Error Bars. Department of Physics and Astronomy University of Rochester

Probability Background

Chapter 2. Random Variable. Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance.

Name: Firas Rassoul-Agha

Part 3: Parametric Models

Review for the previous lecture

Slides for Data Mining by I. H. Witten and E. Frank

Solutions of the Financial Risk Management Examination

Chapter 1 Statistical Reasoning Why statistics? Section 1.1 Basics of Probability Theory

Probability Distributions for Continuous Variables. Probability Distributions for Continuous Variables

Department of Mathematics

PCMI Introduction to Random Matrix Theory Handout # REVIEW OF PROBABILITY THEORY. Chapter 1 - Events and Their Probabilities

1 Exercises for lecture 1

DS-GA 1002 Lecture notes 2 Fall Random variables

Continuous Random Variables and Continuous Distributions

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

Chapter 5 continued. Chapter 5 sections

16.4. Power Series. Introduction. Prerequisites. Learning Outcomes

Probability Distributions.

Random Variables. Definition: A random variable (r.v.) X on the probability space (Ω, F, P) is a mapping

Chapter 1. Sets and probability. 1.3 Probability space

Lecture 1: August 28

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002

Probability Distributions - Lecture 5

Statistical Concepts. Distributions of Data

2008 Winton. Statistical Testing of RNGs

Sampling Distributions

Stat 5101 Notes: Brand Name Distributions

Simple Linear Regression

Set Theory Digression

Actuarial Science Exam 1/P

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 2

ECE 313 Probability with Engineering Applications Fall 2000

Advanced Herd Management Probabilities and distributions

Transcription:

Week 1 Quantitative Analysis of Financial Markets Distributions A Christopher Ting http://www.mysmu.edu/faculty/christophert/ Christopher Ting : christopherting@smu.edu.sg : 6828 0364 : LKCSB 5036 October 29, 2017 Christopher Ting QF 603 October 29, 2017 1/44

Table of Contents 1 Introduction 2 Discrete Distributions 3 Continuous Piecewise Linear Distributions 4 Continuous Distributions 5 Takeaways Christopher Ting QF 603 October 29, 2017 2/44

Introduction It is important to distinguish between discrete distribution versus continuous distribution. Probability distributions can be divided into two broad categories: parametric distributions, which is described by a mathematical function nonparametric distributions, which are not described by a mathematical formula A major advantage of dealing with nonparametric distributions is that assumptions required are minimum. Data speak for themselves. Christopher Ting QF 603 October 29, 2017 3/44

Chapter 4. Learning Outcomes of QA03 Michael Miller, Mathematics and Statistics for Financial Risk Management, 2nd Edition. (Hoboken, NJ: John Wiley & Sons, 2013). Distinguish the key properties and identify common occurrences of each distributions. Discrete Bernoulli distribution Binomial distribution Poisson distribution Continuous Piecewise Linear Uniform distribution Continuous and differential Normal distribution Lognormal distribution Chi-squared distribution Triangular distribution Student s t distribution F distribution Christopher Ting QF 603 October 29, 2017 4/44

Bernoulli Distribution A Bernoulli random variable X is equal to either zero or one. If we define p as the probability that X equals one, we have P ( X = 1 ) = p; P ( X = 0 ) = 1 p. Binary outcomes are common in finance: a bond can default or not default; the return of a stock can be positive or negative; a central bank can decide to raise rates or not to raise rates. The mean and variance of a Bernoulli random variable are µ = p 1 + (1 p) 0 = p σ 2 = p (1 p) 2 + (1 p) (0 p) 2 = p(1 p). Bernoulli Distribution is discrete, and parametric with p being the only parameter. Christopher Ting QF 603 October 29, 2017 5/44

More on Bernoulli Distribution The probability of a Bernoulli random variable can be written as P(X = x) = p x (1 p) 1 x. The cumulative distribution function is F (X = x) = { 1 p, for x = 0; 1, for x = 1. 1 1 p 0 0 1 How can we estimate p of a coin for the head to turn up? Christopher Ting QF 603 October 29, 2017 6/44

More on Bernoulli Distribution (cont d) Throw N times, and count the number (n) of times the head has turned up. Then p = n N. Is this estimator unbiased? To answer this question, we need the binomial distribution. Christopher Ting QF 603 October 29, 2017 7/44

Binomial Distribution The binomial distribution gives the discrete probability distribution P(n, N; p) of obtaining exactly n successes out of N Bernoulli trials. The binomial distribution is given by ( ) N P(n; N, p) = p n (1 p) N n. n The cumulative distribution function is k ( ) N F (k; N, p) = P(X k) = p i (1 p) N i, i where the symbol k is the largest integer smaller than k. i=0 Christopher Ting QF 603 October 29, 2017 8/44

Unbiasedness of p Y The probability of obtaining n successes in N trials is the binomial probability: P(n; N, p). Y The expected value of the estimator p = n/n is therefore given by E ( p ) = = p N n=0 n N N n=1 ( ) N p n( 1 p ) N n N = p n n=1 (N 1)! (N n)!(n 1)! pn 1 (1 p) (N 1) (n 1) = p ( 1 p ) N 1 N 1 = p ( 1 p ) ( N 1 m=0 ( )( N 1 p ) m m 1 p ) N 1 = p ( 1 p ) N 1 1 + p 1 p N! n (N n)!n! N pn 1 (1 p) N n ( ) 1 N 1 = p. 1 p Christopher Ting QF 603 October 29, 2017 9/44

Mean of Binomial Distribution Y Consider the moment generating function M(t), which is the expected value of e tn with t being the (auxiliary) variable. M(t) = E ( e tn) = = N n=0 N ( ) N e tn p n (1 p) N n n n=0 ( ) N (pe t ) n (1 p) N n n = ( pe t + (1 p) ) N Y The first derivative of M(t) with respect to t is M (t) = N ( pe t + (1 p) ) N 1( pe t ). The mean is µ = M (0) = N(p + 1 p)p = Np. Christopher Ting QF 603 October 29, 2017 10/44

Variance of Binomial Distribution Y The second derivative is M (t) = N(N 1) ( pe t +(1 p) ) N 2( pe t ) 2 +N ( pe t +(1 p) ) N 1( pe t ). Y At t = 0, E ( X 2) = M (0) = N(N 1)p 2 + Np. Y Since V ( X ) = E ( X 2) µ 2, we find that V ( X ) = Np(1 p). Y What is your intuition for mean being Np and variance being Np(1 p)? Christopher Ting QF 603 October 29, 2017 11/44

Sample Problem Y Suppose you have four bonds, each with a 10% probability of defaulting over the next year. The event of default for any given bond is independent of the other bonds defaulting. What is the probability that zero, one, two, three, or all of the bonds default? What is the mean number of defaults? The standard deviation? Y Answer: We calculate the probability of each possible outcome as follows: ( ) n Defaults k p k (1 p) n k Probability 0 1 65.61% 65.61% 1 4 7.29% 29.16% 2 6 0.81% 4.86% 3 4 0.09% 0.36% 4 1 0.01% 0.01% Christopher Ting QF 603 October 29, 2017 12/44

Binomial Probability Mass Function Christopher Ting QF 603 October 29, 2017 13/44

Poisson Distribution j For a Poisson random variable X, P ( X = n ) = λn n! e λ, where λ is the constant parameter. j The Poisson distribution is often used to model 1 the occurrence of events over time such as the number of bond defaults in a portfolio or the number of crashes in equity markets. 2 jumps in jump-diffusion models Christopher Ting QF 603 October 29, 2017 14/44

Poisson Distribution from Binomial Model j Recall that the probability of obtaining exactly n successes in N Bernoulli trials is given by P ( X = n; N, p ) = N! n!(n n)! pn (1 p) N n. j Viewing the distribution as a function of the expected number of successes λ := Np instead of the sample size N for fixed p, we write P ( X = n; N, λ := Np ) ( ) N! λ n ( = 1 λ ) N n. n!(n n)! N N Christopher Ting QF 603 October 29, 2017 15/44

Poisson Distribution from Binomial Model (cont d) j What happens if the sample size N becomes large, even infinite? P λ (n) := lim N P ( X = n; N, λ := Np, ) = lim N = lim N N(N 1) (N n + 1) n! λ n N n N(N 1) (N n + 1) λ n N n n! = 1 λn n! e λ 1 = λn n! e λ ( 1 λ ) N ( 1 λ ) n N N ( 1 λ N j Poisson distribution is a limiting case of binomial model. ) N ( 1 λ ) n N Christopher Ting QF 603 October 29, 2017 16/44

Mean of Poisson Random Variable j First we show that P λ (n), n = 0, 1, 2,..., indeed adds up to 1. j The mean is P λ (n) = e λ n=0 np λ (n) = e λ n=0 n=0 n=0 λ n n! = e λ e λ = 1. n λn n! = e λ λ n=0 λ n 1 (n 1)! = λ. Christopher Ting QF 603 October 29, 2017 17/44

Variance of Poisson Random Variable j To compute variance, we first compute, knowing that n 2 = n(n 1) + n, n 2 P λ (n) = e λ λ 2 n=0 n=0 λ n 2 (n 2)! + e λ λ j Hence the variance is λ 2 + λ λ 2 = λ. n=0 λ n 1 (n 1)! = λ2 + λ. Christopher Ting QF 603 October 29, 2017 18/44

Poisson Process j If the rate at which events occur over time is constant, and the probability of any one event occurring is independent of all other events, then we say that the events follow a Poisson process: P ( X := N(t + τ) N(t) = n ) = (λτ)n e λτ. n! Here, N(t + τ) N(t) = n is the number of events in the time interval (t, t + τ]. j The mean and variance of a Poisson process are the same: λt. Christopher Ting QF 603 October 29, 2017 19/44

Probability Mass Function and CDF Probability Mass Function Cumulative Distribution Function Source: https://en.wikipedia.org/ Christopher Ting QF 603 October 29, 2017 20/44

Sample Problem j Assume that defaults in a large bond portfolio follow a Poisson process. The expected number of defaults each month is four. What is the probability that there are exactly three defaults over the course of one month? Over two months? j Over one month, the probability is P ( X = 3 ) = (λτ)n e λτ = n! j Over two months, the probability is P ( X = 3 ) = (λτ)n e λτ = n! (4 1)3 e 4 1 = 19.5%. 3! (4 2)3 e 4 2 = 2.9%. 3! Christopher Ting QF 603 October 29, 2017 21/44

Uniform Distribution B So far, we have been talking about discrete distributions. B The continuous uniform distribution is one of the most fundamental distributions in statistics. B For all x [b 1, b 2 ], u(b 1, b 2 ) = c. In other words, the probability density is constant and equal to c between b 1 and b 2, and zero everywhere else. B Because the probability of any outcome occurring must be one, you can find the value of c as. Christopher Ting QF 603 October 29, 2017 22/44

Mean, Variance, PDF, and CDF B The mean of the uniform random variable is. B Probability Density Function c B The variance of the uniform random variable is. 0 b 1 b 2 B The cumulative distribution function is. Christopher Ting QF 603 October 29, 2017 23/44

Application of Uniform Random Variable B In a computer simulation, one way to model a Bernoulli variable is to start with a standard uniform variable, which is when b 1 = 0 and b 2 = 1. Christopher Ting QF 603 October 29, 2017 24/44

Triangular Distribution Example 2 1 0 0.2 0.4 0.6 0.8 1.0 d The PDF for a triangular distribution with a minimum of a, a maximum of b, and a mode of c is described by the following two-part function: f(x) = 2(x a), x [a, c] (b a)(c a) 2(b x), x (c, b] (b a)(b c) d When modeling default rates and recovery rates, triangular distributions are useful. d Class Exercise: What are the values of a, b, and c for the example? Christopher Ting QF 603 October 29, 2017 25/44

Normal Distribution C Normal distribution is also referred to as the Gaussian distribution. C For a random variable X, the probability density function for the normal distribution is and we write f(x; µ, σ) = 1 σ 2π e 1 X N(µ, σ 2), 2( x µ σ ) 2, which means X is normally distributed with mean µ and variance σ 2. Christopher Ting QF 603 October 29, 2017 26/44

Properties of Normal Random Variable C Any linear combination of independent normal random variables is also normal. ( ) Z = ax + by N aµ X + bµ Y, a 2 σx 2 + b 2 σy 2. C Example: If the log returns of individual stocks are independent and normally distributed, then the average return of those stocks will also be normally distributed. C The bell shape curve has 0 skewness and kurtosis of 3. Christopher Ting QF 603 October 29, 2017 27/44

Standard Normal Random Variable C Standard normal distribution is N(0, 1) with the probability density function: φ(x) = 1 e 1 2 x2. 2π C Because a linear combination of independent normal distributions is also normal, standard normal distributions are the building blocks of many financial models. C To get a normal variable with a standard deviation of σ and a mean of µ, we simply multiply the standard normal variable ϕ by σ and add µ. X = µ + σϕ N(µ, σ 2). Christopher Ting QF 603 October 29, 2017 28/44

Two Correlated Normal Variables C To create two correlated normal variables, we can combine three independent standard normal variables, X 1, X 2, and X 3, as follows: X A = ρx 1 + 1 ρx 2 X B = ρx 1 + 1 ρx 3 C Class Exercise: Show that X A and X B are standard normal random variables. C Class Exercise: Show that X A and X B are indeed correlated with correlation coefficient ρ. Christopher Ting QF 603 October 29, 2017 29/44

Log Return and Normal Distribution C Normal distributions are used throughout finance and risk management. C Normally distributed log returns are widely used in financial simulations as well, and form the basis of a number of financial models, including the Black-Scholes option pricing model. C One attribute that makes log returns particularly attractive is that they can be modeled using normal distributions. 1 A normal random variable can realize values ranging from to. 2 Simple return has a minimum, -100%. 3 But log return does not have a minimum as it can potentially be, and thus more amenable to modeling by a normal distribution. Christopher Ting QF 603 October 29, 2017 30/44

Normal Distribution Confidence Intervals One-Tailed Two-Tailed 1.00% -2.33-2.58 2.50% -1.96-2.24 5.00% -1.64-1.96 10.00% -1.28-1.64 90.00% 1.28 1.64 95.00% 1.64 1.96 97.50% 1.96 2.24 99.00% 2.33 2.58 C The normal distribution is symmetrical, 5% of the values are less than 1.64 standard deviations below the mean. C The two-tailed value tells you that 95% of the mass is within ±1.96 standard deviations of the mean. So, % of the outcomes are less than -1.96 standard deviations from the mean. Christopher Ting QF 603 October 29, 2017 31/44

Lognormal Distribution g Can we use another distribution and model the standard simple returns directly? g Yes, use the lognormal distribution instead. For x > 0, f(x) = 1 xσ 2π e 1 2 ( ) ln(x) µ 2 σ. g If a variable has a lognormal distribution, then the log of that variable has a normal distribution. So, if log returns are assumed to be normally distributed, then one plus the simple return will be lognormally distributed. g Using the lognormal distribution provides an easy way to ensure that returns less than -100% are avoided. Christopher Ting QF 603 October 29, 2017 32/44

More on Lognormal Distribution g The lognormal pdf can also be written as f(x) = e 1 2 σ2 µ 1 σ 2π e ( 1 2 ) ln x (µ σ 2 2 ) σ. It shows that the lognormal distribution is asymmetrical and peaks at exp ( µ σ 2). g Given µ and σ, the mean and variance are given by E ( X ) = e µ+ 1 2 σ2 V ( X ) = ( e σ2 1 ) e 2µ+σ2. g When it comes to modeling, it is often easier to work with log returns and normal distributions than with standard returns and lognormal distributions. Christopher Ting QF 603 October 29, 2017 33/44

Chi-Squared Distribution c If we have k independent standard normal variables, Z 1, Z 2,..., Z k, then the sum of their squares, S, has a chi-squared distribution. S := k Z 2 i ; i=1 S χ 2 k c The variable k is commonly referred to as the degrees of freedom. c For positive values of x, the probability density function for the chi-squared distribution is f(x) = 1 2 k/2 Γ (k/2) x k 2 1 e x 2, where Γ is the gamma function: Γ (n) := 0 x n 1 e x dx. Christopher Ting QF 603 October 29, 2017 34/44

Chi-Square Probability Density Function Christopher Ting QF 603 October 29, 2017 35/44

More on Chi-Squared Distribution c The mean of the distribution is k, and the variance is 2k. c As k increases, the chi-squared distribution becomes increasingly symmetrical. As k approaches infinity, the chi-squared distribution converges to the normal distribution. c The chi-squared distribution is widely used in risk management, and in statistics in general, for hypothesis testing. Christopher Ting QF 603 October 29, 2017 36/44

Student s t Distribution e William Sealy Gosset, an employee at the Guinness brewery in Dublin, used the pseudonym Student for journal publications. e If Z is a standard normal variable and U is a chi-square variable with k degrees of freedom, which is independent of Z, then the random variable X, X = Z, U/k follows a t distribution with k degrees of freedom. e The probability density function of Student s t random variable is f(x) = Γ ( ) k+1 ) k+1 2 ( kπ Γ k ) (1 + x2 2, k 2 where k is the degrees of freedom and Γ (x) is the gamma function. Christopher Ting QF 603 October 29, 2017 37/44

Characteristics of Student s t Distribution e The t distribution is symmetrical around its mean, which is equal to zero. e For low values of k, the t distribution looks very similar to a standard normal distribution, except that it displays excess kurtosis. e As k increases, this excess kurtosis decreases. In fact, as k approaches infinity, the t distribution converges to a standard normal distribution. k e The variance of the t distribution for k > 2 is k 2. As k increases, the variance of the t distribution converges to one, the variance of the standard normal distribution. Christopher Ting QF 603 October 29, 2017 38/44

Comparison of t Distributions Christopher Ting QF 603 October 29, 2017 39/44

F -Distribution A If U 1 and U 2 are two independent chi-squared distributions with k 1 and k 2 degrees of freedom, respectively, then X, X = U 1/k 1 U 2 /k 2 F (k 1, k 2 ) follows an F -distribution with parameters k 1 and k 2. A The probability density function of the F -distribution is f(x) = where B(x, y) is the beta function: B(x, y) = 1 (k 1 x) k 1 k k 2 2 (k 1 x+k 2 ) k1 +k 2 xb ( k 1 /2, k 2 /2 ), 0 z x 1 (1 z) y 1 dz. Christopher Ting QF 603 October 29, 2017 40/44

A Bit More on F -Distribution A The mean and variance of the F -distribution are as follows µ = k 2 k 2 2, for k 2 > 2, ( σ 2 = 2k2 2 k1 + k 2 2 ) ( k 1 k2 2 ) 2 (k2 4), for k 2 > 4. A As k 1 and k 2 increase to infinity, the mean and mode converge to one, and the F -distribution converges to a normal distribution. A The square of a variable with a t distribution has an F -distribution. More specifically, if X is a random variable with a t distribution with k degrees of freedom, then X 2 has an F -distribution with 1 and k degrees of freedom: X 2 F (1, k). Christopher Ting QF 603 October 29, 2017 41/44

F Probability Density Function Christopher Ting QF 603 October 29, 2017 42/44

Takeaways a All the 10 distributions are parametric, being dependent on parameters that can be interpreted intuitively. a Additionally, Student s t, χ 2, and F distributions need degrees of freedom to determine their shape. a Probability mass function is the discrete analogue of probability density function. a χ 2 is the sum of k squared of independent standard normal variables. a t variable is made of a standard normal random variable and a χ 2 random variable, which are independent. a The F random variable is the ratio of two independent χ 2 random variables. Christopher Ting QF 603 October 29, 2017 43/44