43
Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways Week 1 Quantitative Analysis of Financial Markets Distributions A Christopher Ting Christopher Ting http://www.mysmu.edu/faculty/christophert/ k: [email protected] T: 6828 0364 : LKCSB 5036 October 29, 2017 Christopher Ting QF 603 October 29, 2017 1/44

Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Embed Size (px)

Citation preview

Page 1: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Week 1Quantitative Analysis of Financial Markets

Distributions A

Christopher Ting

Christopher Ting

http://www.mysmu.edu/faculty/christophert/

k: [email protected]: 6828 0364

ÿ: LKCSB 5036

October 29, 2017

Christopher Ting QF 603 October 29, 2017 1/44

Page 2: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

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

Page 3: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Introduction

Ô It is important to distinguish between discrete distribution versuscontinuous distribution.

Ô Probability distributions can be divided into two broad categories:parametric distributions, which is described by a mathematicalfunctionnonparametric distributions, which are not described by amathematical formula

Ô A major advantage of dealing with nonparametric distributions isthat assumptions required are minimum. “Data speak forthemselves.”

Christopher Ting QF 603 October 29, 2017 3/44

Page 4: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Learning Outcomes of QA03Chapter 4.

Michael Miller, Mathematics and Statistics for Financial Risk Management, 2nd Edition.

(Hoboken, NJ: John Wiley & Sons, 2013).

Ô Distinguish the key properties and identify common occurrencesof each distributions.

Ô DiscreteBernoulli distributionPoisson distribution

Binomial distribution

Ô Continuous Piecewise LinearUniform distribution Triangular distribution

Ô Continuous and differentialNormal distributionLognormal distributionChi-squared distribution

Student’s t distribution

F distribution

Christopher Ting QF 603 October 29, 2017 4/44

Page 5: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

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 ornot default; the return of a stock can be positive or negative; acentral 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 theonly parameter.

Christopher Ting QF 603 October 29, 2017 5/44

Page 6: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

More on Bernoulli Distribution

% The probability of a Bernoulli random variable can be written as

P(X = x) = px(1− p)1−x.

% The cumulative distributionfunction is

F (X = x) =

{1− p, for x = 0;1, for x = 1.

1

0

1− p

10

% How can we estimate p of a coin for the head to turn up?

Christopher Ting QF 603 October 29, 2017 6/44

Page 7: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

More on Bernoulli Distribution (cont’d)

% Throw N times, and count the number (n) of times the head hasturned up. Then

p̂ =n

N.

% Is this estimator unbiased? To answer this question, we need thebinomial distribution.

Christopher Ting QF 603 October 29, 2017 7/44

Page 8: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Binomial Distribution

% The binomial distribution gives the discrete probability distributionP(n,N ; p) of obtaining exactly n successes out of N Bernoullitrials. The binomial distribution is given by

P(n;N, p) =(N

n

)pn(1− p)N−n.

% The cumulative distribution function is

F (k;N, p) = P(X ≤ k) =bkc∑i=0

(N

i

)pi(1− p)N−i,

where the symbol bkc is the largest integer smaller than k.

Christopher Ting QF 603 October 29, 2017 8/44

Page 9: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Unbiasedness of p̂

Y The probability of obtaining n successes in N trials is the binomialprobability: P(n;N, p).

Y The expected value of the estimator p̂ = n/N is therefore given by

E(p̂)=

N∑n=0

n

N

(N

n

)pn(1− p

)N−n= p

N∑n=1

N !

(N − n)!n!n

Npn−1(1− p)N−n

= pN∑n=1

(N − 1)!

(N − n)!(n− 1)!pn−1(1− p)(N−1)−(n−1)

= p(1− p

)N−1 N−1∑m=0

(N − 1

m

)(p

1− p

)m= p(1− p

)N−1(1 +

p

1− p

)N−1= p(1− p

)N−1( 1

1− p

)N−1= p.

Christopher Ting QF 603 October 29, 2017 9/44

Page 10: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Mean of Binomial Distribution

Y Consider the moment generating function M(t), which is theexpected value of etn with t being the (auxiliary) variable.

M(t) = E(etn)=

N∑n=0

etn(N

n

)pn(1− p)N−n

=N∑n=0

(N

n

)(pet)n(1− p)N−n

=(pet + (1− p)

)NY The first derivative of M(t) with respect to t is

M ′(t) = N(pet + (1− p)

)N−1(pet).

The mean is µ =M ′(0) = N(p+ 1− p)p = Np.

Christopher Ting QF 603 October 29, 2017 10/44

Page 11: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Variance of Binomial Distribution

Y The second derivative is

M ′′(t) = N(N−1)(pet+(1−p)

)N−2(pet)2+N

(pet+(1−p)

)N−1(pet).

Y At t = 0, E(X2)=M ′′(0) = N(N − 1)p2 +Np.

Y Since V(X)= E

(X2)− µ2, we find that

V(X)= Np(1− p).

Y What is your intuition for mean being Np and variance beingNp(1− p)?

Christopher Ting QF 603 October 29, 2017 11/44

Page 12: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Sample Problem

Y Suppose you have four bonds, each with a 10% probability ofdefaulting over the next year. The event of default for any givenbond is independent of the other bonds defaulting. What is theprobability 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 asfollows:

Defaults(n

k

)pk(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

Page 13: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Binomial Probability Mass Function

Christopher Ting QF 603 October 29, 2017 13/44

Page 14: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

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 model1 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

Page 15: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Poisson Distribution from Binomial Model

j Recall that the probability of obtaining exactly n successes in NBernoulli 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 ofsuccesses λ := Np instead of the sample size N for fixed p, wewrite

P(X = n;N,λ := Np

)=

N !

n!(N − n)!

N

)n(1− λ

N

)N−n.

Christopher Ting QF 603 October 29, 2017 15/44

Page 16: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Poisson Distribution from Binomial Model (cont’d)

j What happens if the sample size N becomes large, even infinite?

Pλ(n) := limN→∞

P(X = n;N,λ := Np,

)= lim

N→∞

N(N − 1) · · · (N − n+ 1)

n!

λn

Nn

(1− λ

N

)N (1− λ

N

)−n= lim

N→∞

N(N − 1) · · · (N − n+ 1)

Nn

λn

n!

(1− λ

N

)N (1− λ

N

)−n= 1× λn

n!e−λ × 1

=λn

n!e−λ

j Poisson distribution is a limiting case of binomial model.

Christopher Ting QF 603 October 29, 2017 16/44

Page 17: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Mean of Poisson Random Variable

j First we show that Pλ(n), n = 0, 1, 2, . . . ,∞ indeed adds up to 1.

∞∑n=0

Pλ(n) = e−λ∞∑n=0

λn

n!= e−λeλ = 1.

j The mean is∞∑n=0

nPλ(n) = e−λ∞∑n=0

nλn

n!= e−λλ

∞∑n=0

λn−1

(n− 1)!= λ.

Christopher Ting QF 603 October 29, 2017 17/44

Page 18: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Variance of Poisson Random Variable

j To compute variance, we first compute, knowing thatn2 = n(n− 1) + n,

∞∑n=0

n2Pλ(n) = e−λλ2∞∑n=0

λn−2

(n− 2)!+ e−λλ

∞∑n=0

λn−1

(n− 1)!= λ2 + λ.

j Hence the variance is λ2 + λ− λ2 = λ.

Christopher Ting QF 603 October 29, 2017 18/44

Page 19: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Poisson Process

j If the rate at which events occur over time is constant, and theprobability of any one event occurring is independent of all otherevents, then we say that the events follow a Poisson process:

P(X := N(t+ τ)−N(t) = n

)=

(λτ)n

n!e−λτ .

Here, N(t+ τ)−N(t) = n is the number of events in the timeinterval (t, t+ τ ].

j The mean and variance of a Poisson process are the same: λt.

Christopher Ting QF 603 October 29, 2017 19/44

Page 20: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

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

Page 21: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Sample Problem

j Assume that defaults in a large bond portfolio follow a Poissonprocess. The expected number of defaults each month is four.What is the probability that there are exactly three defaults overthe course of one month? Over two months?

j Over one month, the probability is

P(X = 3

)=

(λτ)n

n!e−λτ =

(4× 1)3

3!e−4×1 = 19.5%.

j Over two months, the probability is

P(X = 3

)=

(λτ)n

n!e−λτ =

(4× 2)3

3!e−4×2 = 2.9%.

Christopher Ting QF 603 October 29, 2017 21/44

Page 22: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Uniform Distribution

B So far, we have been talking about discrete distributions.

B The continuous uniform distribution is one of the mostfundamental distributions in statistics.

B For all x ∈ [b1, b2],u(b1, b2) = c.

In other words, the probability density is constant and equal to cbetween b1 and b2, 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

Page 23: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Mean, Variance, PDF, and CDF

B The mean of the uniformrandom variable is

.

B The variance of the uniformrandom variable is

.

B Probability Density Function

b1 b20

c

B The cumulative distribution function is

.

Christopher Ting QF 603 October 29, 2017 23/44

Page 24: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Application of Uniform Random Variable

B In a computer simulation, one way to model a Bernoulli variable isto start with a standard uniform variable, which is when b1 = 0 andb2 = 1.

Christopher Ting QF 603 October 29, 2017 24/44

Page 25: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Triangular Distribution

Example

1

2

00.2 0.4 0.6 0.8 1.0

d The PDF for a triangular distributionwith a minimum of a, a maximum of b,and a mode of c is described by thefollowing two-part function:

f(x) =

2(x− a)

(b− a)(c− a), x ∈ [a, c]

2(b− x)(b− a)(b− c)

, x ∈ (c, b]

d When modeling default rates andrecovery rates, triangular distributionsare useful.

d Class Exercise: What are the valuesof a, b, and c for the example?

Christopher Ting QF 603 October 29, 2017 25/44

Page 26: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Normal Distribution

C Normal distribution is also referred to as the Gaussian distribution.

C For a random variable X, the probability density function for thenormal distribution is

f(x;µ, σ) =1

σ√2πe−

12(

x−µσ )

2

,

and we writeX ∼ N(µ, σ2

),

which means “X is normally distributed with mean µ and varianceσ2.”

Christopher Ting QF 603 October 29, 2017 26/44

Page 27: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Properties of Normal Random Variable

C Any linear combination of independent normal random variables isalso normal.

Z = aX + bY ∼ N(aµX + bµY , a

2σ2X + b2σ2Y

).

C Example: If the log returns of individual stocks are independentand normally distributed, then the average return of those stockswill 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

Page 28: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Standard Normal Random Variable

C Standard normal distribution is N(0, 1) with the probability densityfunction:

φ(x) =1√2πe−

12x2 .

C Because a linear combination of independent normal distributionsis also normal, standard normal distributions are the buildingblocks of many financial models.

C To get a normal variable with a standard deviation of σ and amean of µ, we simply multiply the standard normal variable ϕ by σand add µ.

X = µ+ σϕ ∼ N(µ, σ2).

Christopher Ting QF 603 October 29, 2017 28/44

Page 29: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Two Correlated Normal Variables

C To create two correlated normal variables, we can combine threeindependent standard normal variables, X1, X2, and X3, asfollows:

XA =√ρX1 +

√1− ρX2

XB =√ρX1 +

√1− ρX3

C Class Exercise: Show that XA and XB are standard normalrandom variables.

C Class Exercise: Show that XA and XB are indeed correlatedwith correlation coefficient ρ.

Christopher Ting QF 603 October 29, 2017 29/44

Page 30: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Log Return and Normal Distribution

C Normal distributions are used throughout finance and riskmanagement.

C Normally distributed log returns are widely used in financialsimulations as well, and form the basis of a number of financialmodels, including the Black-Scholes option pricing model.

C One attribute that makes log returns particularly attractive is thatthey 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

Page 31: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Normal Distribution Confidence Intervals

One-Tailed Two-Tailed1.00% -2.33 -2.582.50% -1.96 -2.245.00% -1.64 -1.96

10.00% -1.28 -1.6490.00% 1.28 1.6495.00% 1.64 1.9697.50% 1.96 2.2499.00% 2.33 2.58

C The normal distribution is symmetrical, 5% of the values are lessthan 1.64 standard deviations below the mean.

C The two-tailed value tells you that 95% of the mass is within ±1.96standard deviations of the mean. So, % of the outcomes areless than -1.96 standard deviations from the mean.

Christopher Ting QF 603 October 29, 2017 31/44

Page 32: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Lognormal Distribution

g Can we use another distribution and model the standard simplereturns 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 thatvariable has a normal distribution. So, if log returns are assumedto be normally distributed, then one plus the simple return will belognormally distributed.

g Using the lognormal distribution provides an easy way to ensurethat returns less than -100% are avoided.

Christopher Ting QF 603 October 29, 2017 32/44

Page 33: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

More on Lognormal Distribution

g The lognormal pdf can also be written as

f(x) = e12σ2−µ 1

σ√2πe− 1

2

(ln x−(µ−σ2)

σ

)2

.

It shows that the lognormal distribution is asymmetrical and peaksat exp

(µ− σ2

).

g Given µ and σ, the mean and variance are given by

E(X)= eµ+

12σ2

V(X)=(eσ

2 − 1)e2µ+σ

2.

g When it comes to modeling, it is often easier to work with logreturns and normal distributions than with standard returns andlognormal distributions.

Christopher Ting QF 603 October 29, 2017 33/44

Page 34: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Chi-Squared Distribution

c If we have k independent standard normal variables,Z1, Z2, . . . , Zk, then the sum of their squares, S, has achi-squared distribution.

S :=

k∑i=1

Z2i ; 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 thechi-squared distribution is

f(x) =1

2k/2Γ (k/2)xk2−1e−

x2 ,

where Γ is the gamma function: Γ (n) :=∫ ∞0

xn−1e−x dx.

Christopher Ting QF 603 October 29, 2017 34/44

Page 35: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Chi-Square Probability Density Function

Christopher Ting QF 603 October 29, 2017 35/44

Page 36: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

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 increasinglysymmetrical. As k approaches infinity, the chi-squared distributionconverges 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

Page 37: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Student’s t Distribution

e William Sealy Gosset, an employee at the Guinness brewery inDublin, used the pseudonym Student for journal publications.

e If Z is a standard normal variable and U is a chi-square variablewith k degrees of freedom, which is independent of Z, then therandom 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+12

)√kπ Γ

(k2

) (1 + x2

k

)− k+12

,

where k is the degrees of freedom and Γ (x) is the gammafunction.

Christopher Ting QF 603 October 29, 2017 37/44

Page 38: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Characteristics of Student’s t Distribution

e The t distribution is symmetrical around its mean, which is equalto zero.

e For low values of k, the t distribution looks very similar to astandard normal distribution, except that it displays excesskurtosis.

e As k increases, this excess kurtosis decreases. In fact, as kapproaches infinity, the t distribution converges to a standardnormal distribution.

e The variance of the t distribution for k > 2 isk

k − 2. As k

increases, the variance of the t distribution converges to one, thevariance of the standard normal distribution.

Christopher Ting QF 603 October 29, 2017 38/44

Page 39: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Comparison of t Distributions

Christopher Ting QF 603 October 29, 2017 39/44

Page 40: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

F -Distribution

A If U1 and U2 are two independent chi-squared distributions with k1and k2 degrees of freedom, respectively, then X,

X =U1/k1U2/k2

∼ F (k1, k2)

follows an F -distribution with parameters k1 and k2.

A The probability density function of the F -distribution is

f(x) =

√(k1x)k1k

k22(

k1x+k2)k1+k2

xB(k1/2, k2/2

) ,where B(x, y) is the beta function:

B(x, y) =

∫ 1

0zx−1(1− z)y−1 dz.

Christopher Ting QF 603 October 29, 2017 40/44

Page 41: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

A Bit More on F -Distribution

A The mean and variance of the F -distribution are as follows

µ =k2

k2 − 2, for k2 > 2,

σ2 =2k22(k1 + k2 − 2

)k1(k2 − 2

)2(k2 − 4)

, for k2 > 4.

A As k1 and k2 increase to infinity, the mean and mode converge toone, 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 distributionwith k degrees of freedom, then X2 has an F -distribution with 1and k degrees of freedom:

X2 ∼ F (1, k).Christopher Ting QF 603 October 29, 2017 41/44

Page 42: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

F Probability Density Function

Christopher Ting QF 603 October 29, 2017 42/44

Page 43: Week 1 Quantitative Analysis of Financial Markets ... · Introduction Discrete Distributions Continuous Piecewise ... Quantitative Analysis of Financial Markets Distributions A

Introduction Discrete Distributions Continuous Piecewise Linear Distributions Continuous Distributions Takeaways

Takeaways

a All the 10 distributions are parametric, being dependent onparameters that can be interpreted intuitively.

a Additionally, Student’s t, χ2, and F distributions need degrees offreedom to determine their shape.

a Probability mass function is the discrete analogue of probabilitydensity function.

a χ2 is the sum of k squared of independent standard normalvariables.

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 randomvariables.

Christopher Ting QF 603 October 29, 2017 43/44