+ All Categories
Home > Documents > Financial Econometrics and Statistical Arbitrage

Financial Econometrics and Statistical Arbitrage

Date post: 12-Sep-2021
Category:
Upload: others
View: 10 times
Download: 0 times
Share this document with a friend
22
1. 1 G63.2707 - Financial Econometrics and Statistical Arbitrage Farshid Magami Asl Lecture Financial Econometrics and Statistical Arbitrage Master of Science Program in Mathematical Finance New York University Lecture 1: Basics on Time Series Analysis Fall 2005 1. 2 G63.2707 - Financial Econometrics and Statistical Arbitrage Farshid Magami Asl Lecture Administrative Details Instructors: Farshid Maghami ASL and Lee Maclin Email: [email protected] Course Web sites: Blackboard http://homepages.nyu.edu/~fma1 Teaching Assistant: Junyoep Park Email: [email protected] Office Hours: Mondays 5-7 pm Office Location: WWH 606
Transcript
Page 1: Financial Econometrics and Statistical Arbitrage

1

1. 1

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

Financial Econometrics and Statistical Arbitrage

Master of Science Program in Mathematical FinanceNew York University

Lecture 1: Basics on Time Series Analysis

Fall 2005

1. 2

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureAdministrative Details

• Instructors: Farshid Maghami ASL and Lee Maclin

• Email: [email protected]

• Course Web sites:– Blackboard

– http://homepages.nyu.edu/~fma1

• Teaching Assistant: Junyoep Park

• Email: [email protected]

• Office Hours: Mondays 5-7 pm

• Office Location: WWH 606

Page 2: Financial Econometrics and Statistical Arbitrage

2

1. 3

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureAdministrative Details (cont.)

Time: Mondays, 7:10 – 9 pm First Class: September 12, 2005, Last Class: December 12, 2005. There will be no class on Columbus Day (October 10, 2005). We will make it up on Wednesday 11/23/05.

Homework and Exam:

• There will be six homework sets which will be assigned every other week. Students must write up and turn in their solutions individually within one week.

• Computer assignments can be solved by C/C++/C#, MATLAB, R. For other tools, please coordinate with the TA or the instructor.

• There will be one final exam (no mid-term).

• Final grade will be evaluated based on homework solutions (30%) and the final exam (70%).

• Lecture Notes and Homework will be posted on the course website as they become available

1. 4

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureAdministrative Details (cont.)

Textbooks: Lectures are drawn from many sources including the following books:

1. Alexander, C. “Market Models,” John Wiley and Sons, 2001 2. Brockwell, P.J., Davis, R.A., “Introduction to Time Series and

Forecasting,” Springer3. Javaheri, A. “Inside Volatility Arbitrage : The Secrets of Skewness”

Wiley4. Tsay, R. S., “Analysis of Financial Time Series,” Wiley, 20025. Wilmott, P. “Derivatives: The Theory and Practice of Financial

Engineering,” Wiley Frontiers in Finance Series6. Pandit S.M., Wu S.M., “Time Series and System Analysis with

Applications.” Krieger Publishing, Malabar, FL, 20017. Hamilton J. D. “Time Series Analysis.” Princeton University Press, 1994

A number of research articles will be posted on the course webpage.

Page 3: Financial Econometrics and Statistical Arbitrage

3

1. 5

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureExpected Background

• Prior knowledge of Linear Algebra, Probability and Statistics is required

• I assume you have taken the following courses:– Derivative Securities– Continuous Time Finance– Scientific Computing / Computing for Finance

• Programming in C/C++ or MATLAB/R is required

1. 6

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

Market Microstructur Theory(Transaction costs and Optimal Control, Algorithmic Trading,…)

Risk Management(Practical Risk Measurement and Management Technics)

Financial Econometrics(Time Series Review and Volatility modeling)

Strategies and Implementation Process(Cointegration based pairs trading, Volatility trading, …)

What is Statistical Arbitrage?

• Statistical Arbitrage covers any trading strategy which uses statistical tools and time series analysis to identify approximate arbitrage opportunities while evaluating the risks inherent in the trades considering the transaction costs and other practical aspects.

• Arbitrage is a riskless profit. “Arbitrage Strategy” is a trading strategy that locks in a riskless profit.

Page 4: Financial Econometrics and Statistical Arbitrage

4

1. 7

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureCourse Outline

• Financial Econometrics (8 weeks)– Time Series Models Review and Analysis– Volatility and Correlation Models in Financial Systems– Calibration and Estimation Methods

• Cointegration and Market Microstructure in Practice (3 weeks)– Cointegration and Pairs Trading– Transaction Costs, and Market Friction– Trade Execution Strategies

• Practical Simulation and Risk Management (1 week)

• More on Trading Strategies (1-2 week)

1. 8

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTypical Behavior of Financial Assets

• The unpredictability inherent in asset prices is the main feature of financial modeling.

• Because there is so much randomness, any mathematical model of a financial asset must acknowledge the randomness and have a probabilistic foundation.

0 1000 2000 3000 4000 5000 6000 7000 8000 90000

2000

4000

6000

8000

10000

12000

Time in days from 1/1/1975 to 07/30/2005

Dow

Jon

es In

dex

Page 5: Financial Econometrics and Statistical Arbitrage

5

1. 9

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureIntroduction to Financial Modeling

• There are three general types of analysis used in finance and trading

1. Fundamental Analysis2. Technical Analysis3. Quantitative Analysis

• Return in financial assetsBy return we mean the percentage growth in the value of an asset, together with accumulated dividends, over some period:

Change in value of the asset + accumulated cashflowsOriginal value of the asset

Return =

• Denoting the asset value on the i-th day by Si, the return from day ito day i+1 is given by

i

iii S

SSR −= +1

1. 10

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureIntroduction to Financial Modeling

• Supposing that we believe that the empirical returns are close enough to Normal for this to be a good approximation.

• For start, we write the returns as a random variable drawn from a Normal distribution with a known, constant, non-zero mean and a known, constant, non-zero standard deviation:

0 1000 2000 3000 4000 5000 6000 7000 8000 9000-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

Time in days from 1/1/1975 to 07/30/2005

Diff

eren

ce o

f the

Log

Tra

nsfo

rm o

f Dow

Jon

es In

dex

i

iii S

SSR −= +1 = mean + standard deviation x φ

2

21

21)1,0(

φ

π

−= eN

Page 6: Financial Econometrics and Statistical Arbitrage

6

1. 11

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureIntroduction to Financial Modeling

i

iii S

SSR −= +1 = mean + standard deviation x φ

φσδµδ ×+=−

= + 2/11 ttS

SSRi

iii

• Time scale δt

tµδ

Mean return over period δt is

2/1tσδ

Standard deviation over period δt is

δXAnd in the limit δt 0

tt

t dXdtS

dSR σµ +==

1. 12

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

020

4060

80100

1

2

3

4

50.9

1

1.1

1.2

1.3

x 104

Basic Review

STOCHASTIC PROCESS:

A stochastic process is a collection of random variables defined on a probability space . ( )PF ,,Ω

τω ∈tX t ),(

State 2State 1

State 3State 4

State 5

Ω

Time

Time

ω

ωFor a fixed , a realization of stochastic process is a function of time (t).

Page 7: Financial Econometrics and Statistical Arbitrage

7

1. 13

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureSimulation of a Stochastic Process

020

4060

80100

0

50

100

150

2000.6

0.8

1

1.2

1.4

1.6

x 104

1. 14

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureDefinition

Time Series:

A time series is a stochastic process where τ is a set of discrete points in time. In other words, it is a discrete time, continuous state process.

In this course we consider τ = all integers

X1 X2 X3 …

Xk

k0 5 10 15 20 25 30 35 40

-4

-3

-2

-1

0

1

2

3

Page 8: Financial Econometrics and Statistical Arbitrage

8

1. 15

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

We want to forecast distributions

Goals of Studying Time Series

1- Forecasting

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100000

2000

4000

6000

8000

10000

12000

Time in days from 1/1/1975 to 07/30/2005

Dow

Jone

s Ind

ex

2- Understanding the statistical characteristics and buildingtrading strategies based on them

1. 16

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBasic Review

An Example of a Time Series:

0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0- 1 0

- 8

- 6

- 4

- 2

0

2

4

6

8

1 0

Xk

k

-10 -8 -6 -4 -2 0 2 4 6 8 10-10

-8

-6

-4

-2

0

2

4

6

8

10

Xk

Xk-1-10 -8 -6 -4 -2 0 2 4 6 8 10

-10

-8

-6

-4

-2

0

2

4

6

8

10

Xk

Xk-2-10 -8 -6 -4 -2 0 2 4 6 8 10

-10

-8

-6

-4

-2

0

2

4

6

8

10

Xk

Xk-3-10 -8 -6 -4 -2 0 2 4 6 8 10

-10

-8

-6

-4

-2

0

2

4

6

8

10

Xk

Xk-10

Xk= ϕ 1 Xk-1+ ϕ 2 Xk-2+…+ekAuto-Regression as a Dynamic System?We will get back to this

Page 9: Financial Econometrics and Statistical Arbitrage

9

1. 17

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureDefinition

Autocovariance Function: Let Xt be a time series. The autocovariance function of process Xt for all

integers r and s is:),cov(),( srX XXsr =γ

))]())(([(),( ssrrX XEXXEXEsr −−=γ

)]()()()([),( srrssrsrX XEXEXEXXEXXXEsr +−−=γ

)()()()()()()(),( srrssrsrX XEXEXEXEXEXEXXEsr +−−=γ

)()()(),( srsrX XEXEXXEsr −=γ

0)var()()(),( 22 ≥=−= rrrX XXEXErrγNote that

= 0

1. 18

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureAutocovariance Function

0 2 4 6 8 10 12 14 16 18 20

Lag

Sample Autocovariance Function

Page 10: Financial Econometrics and Statistical Arbitrage

10

1. 19

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureDefinition

Stationary Process: A time series Xt is stationary (weakly) if:

),(),(.3)(.2)(.1 2

tstrsrXEXE

XX

t

t

++==

∞<

γγSome constant m for all t

i.e. Cov(Xr,Xs) only depends on r and s and not on t.

)()0,(),(),( srsrsssrsr XXXX −=−=−−= γγγγ

Note: If Xt is stationary, then

),cov()()( httXX XXhsr +==− γγDefine h=r-s

Does not depend on t

A strict (strong) stationary time seriesXt , t=1,2,…,n

is defined by the condition that realizations(X1, X2, …, Xn) and (X1+h, X2+h, …, Xn+h)have the same joint distributions for all integers h and n>0.

Note:

1. 20

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureDefinition

Note:

Strict Stationary(Strong)

Weak Stationary(Covariance Stationary)

Not generally true except for the Gaussian processes

Page 11: Financial Econometrics and Statistical Arbitrage

11

1. 21

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureStationary Process

Stationary Process and Mean Reversion• We are interested in stationary time series because many models and

tools are developed for stationary processes.

• A stationary process can never drift too far from its mean because of

the finite variance. The speed of mean-reversion is determined by the

autocovariance function: Mean-reversion is quick when autocovariances

are small and slow when autocovariances are large.

• Trends and periodic components make a time series non-stationary.

1. 22

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureStationary Process

0 50 100 150 200 250 300-20

0

20

40

60

80

0 50 100 150 200 250 300-6

-4

-2

0

2

4

Stationary Process

Non-Stationary Process

Mean-Reversion

Page 12: Financial Econometrics and Statistical Arbitrage

12

1. 23

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureGeneral Approach to Time Series

Time Series Analysis

1. Plot time series and check for trends or sharp changes in behavior

(most of the time non-stationary)

2. Transform into a stationary time series

3. Fit a model

4. Perform diagnostic tests (residual analysis,…)

5. Generate forecasts (find predictive distributions) and invert the

transformations performed in 2.

Note for option pricing:

6. Find a risk neutral version of the model

7. Obtain predictive distributions under the risk neutral model

If bad

1. 24

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

White Noise Process

=

=otherwise

srsrX 0),(

2σγ

0 1000 2000 3000 4000 5000 6000 7000

-5

0

5

WN

If Xt is a sequence of random variables with , and 0)( =tXE

)( 2 ∞<σ

2σXt is called White Noise and it is written as WN(0, )

22 )( σ=tXE

Note that E[Xt Xs]=0 for t=s Uncorrelated r.v.’s2σIf Xt and Xs independent for t=s IID(0, )

-5 0 5-5

0

5Xk

Xk-1

Page 13: Financial Econometrics and Statistical Arbitrage

13

1. 25

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

0)( =tXE

)( 2 ∞<σ

=

=otherwise

srsrX 0),(

2σγ

White Noise Process (Is it Stationary?)

1. 26

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Random Walk Process

0 1000 2000 3000 4000 5000 6000 7000-100

0

100

Ran

dom

Wal

k

If Xt be a sequence of random variables , a sequence St with S0=0 and

Is called a Random Walk.

2σIID(0, )

∑ ==

t

j jt XS1

(Integrated Process)

-10 -5 0 5 10-10

-5

0

5

10Sk

Sk-1

Page 14: Financial Econometrics and Statistical Arbitrage

14

1. 27

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Random Walk Process (Is it Stationary?)

2σIID(0, )∑ ==

t

j jt XS1

Xt

1. 28

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Moving Average ProcessLet Xt be WN(0, ), and consider the process

Where θ could be any constant. This time series model is called a first-order moving average process, denoted MA(1).

The term “Moving Average” comes from the fact that Yt is constructed from a weighted sum of the two most recent values of Xt.

1−+= ttt XXY θ

Yk

-4 -2 0 2 4-4

-2

0

2

4

Yk-10 1000 2000 3000 4000 5000 6000

θ =0.5

Page 15: Financial Econometrics and Statistical Arbitrage

15

1. 29

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Moving Average Process (Is it Stationary?)Xt is WN(0, )

1−+= ttt XXY θ2σ

1. 30

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Autoregressive ProcessLet Zt be WN(0, ), and consider the process

Where |φ |<1 and Zt is uncorrelated with Xs for each s<t. This time series model is called a first-order Autoregressive process, denoted AR(1).

ttt ZXX += − 1φ

It is easy to show that E(Xt)=0

0 100 200 300 400 500 600 700

-5

0

5

Ran

dom

Wal

k φ=0.7

-10 -5 0 5 10-10

-5

0

5

10Xk

Xk-1

Page 16: Financial Econometrics and Statistical Arbitrage

16

1. 31

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

Autoregressive Process (Is it Stationary?)Zt is WN(0, ), and

Where |φ |<1 and Zt is uncorrelated with Xs for each s<t.

2σ ttt ZXX += − 1φ

We will see this later

1. 32

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureBuilding Blocks of Financial Models

ttt ZXX += − 1φ

0 50 100 150 200 250 300-10

0

10

20

30

-10 0 10 20 30-10

0

10

20

30

φ = 1Random Walk

0 50 100 150 200 250 300-10

-5

0

5

10

-10 -5 0 5 10-10

-5

0

5

10

φ = 0.9AR(1)

0 50 100 150 200 250 300-4

-2

0

2

4

-4 -2 0 2 4-4

-2

0

2

4

φ = 0.1AR(1)

Page 17: Financial Econometrics and Statistical Arbitrage

17

1. 33

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

Classical Decomposition

tttt YSmX ++=

Original Time series

(Nonstationary)Trend

Seasonalcomponent

StationaryTime series(zero-mean)

∑=

=d

jjS

1

0

Seasonal component St satisfies

St+d=St where d= period of seasonality

Also for mathematical convenience assume

Most observed time series are non-stationary but they can be transformed to stationary processes.

1. 34

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

Classical Decompositiontttt YSmX ++=

tttt SmXX^^

* +−=

Idea of transformation is to estimate mt and St by mt and St, then work with the stationary process:

Assume there is no seasonal component (St=0)

ttt YmX +=

2210

^tataamt ++=

Consider a parametric form for mt e.g.

2

1

^)(∑

=

−n

ttt mX

Using observed data X1, X2, … Xn, choose α0, α1, α2 to minimize

Page 18: Financial Econometrics and Statistical Arbitrage

18

1. 35

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 90000

2000

4000

6000

8000

10000

12000

Time in days from 1/1/1975 to 07/30/2005

Dow

Jone

s Ind

ex

1. 36

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 90005

5.5

6

6.5

7

7.5

8

8.5

9

9.5

10

Time in days from 1/1/1975 to 07/30/2005

Log

Tran

sfor

m o

f Dow

Jone

s Ind

ex

Page 19: Financial Econometrics and Statistical Arbitrage

19

1. 37

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 90005

5.5

6

6.5

7

7.5

8

8.5

9

9.5

10

Time in days from 1/1/1975 to 07/30/2005

Log

Tran

sfor

m o

f Dow

Jone

s Ind

ex

tmt 0004.01513.6 +=

1. 38

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

Time in days from 1/1/1975 to 07/30/2005

Diff

eren

ce o

f the

Log

Tra

nsfo

rm o

f Dow

Jone

s Ind

ex

Page 20: Financial Econometrics and Statistical Arbitrage

20

1. 39

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

Forecast

Transforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

Time in days from 1/1/1975 to 07/30/2005

Fore

cast

of t

he m

odel

1. 40

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

Forecast

Transforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100006

6.5

7

7.5

8

8.5

9

9.5

10

Time in days from 1/1/1975 to 07/30/2005

Con

vert

back

the

diff

eren

ce in

the

Fore

cast

of t

he m

odel

Page 21: Financial Econometrics and Statistical Arbitrage

21

1. 41

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

Lecture

Forecast

Transforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100000

5000

10000

15000

Time in days from 1/1/1975 to 07/30/2005

conv

ert b

ack

the

Log

of th

e Fo

reca

st o

f the

mod

el

1. 42

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100000

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2x 10

4

Time in days from 1/1/1975 to 07/30/2005

Mon

te C

arlo

Sim

ulat

ion

of th

e Fo

reca

st

Page 22: Financial Econometrics and Statistical Arbitrage

22

1. 43

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100000

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2x 10

4

Time in days from 1/1/1975 to 07/30/2005

Mon

te C

arlo

Sim

ulat

ion

of th

e Fo

reca

st

1. 44

G63.2707 - Financial Econometrics and Statistical ArbitrageFarshid Magami Asl

LectureTransforming a Non-Stationary Process to a Stationary Process

0 10 20 30 40 50 60 70 80 90 1000.8

0.9

1

1.1

1.2

1.3x 10

4

0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6

x 104

0

20

40

60


Recommended