[go: up one dir, main page]

0% found this document useful (0 votes)
3 views12 pages

Lecture 2

Uploaded by

asxce811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

Lecture 2

Uploaded by

asxce811
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Copyright Protected (Do Not Copy)

Modeling a Dynamic system


From Physical Laws, …

Mathematical Model
u System y

Input State Space Model


• 1 1
y (t ) = - y (t ) + u (t )
u w(t ) Output RA A

1 1
y (t + 1) - y (t ) = - y (t ) + u (t )
RA A
1 1
y y (t + 1) = ( - + 1) y (t ) + u (t )
Resistance (R)  RA
  A

f1 y1

Area (A) Stochastic Dynamic System


y (t + 1) = f1 y (t ) + y 1u (t ) + w(t )
Parameters
Information Noise
(Signal) 1. 24
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

24

Copyright Protected (Do Not Copy)

Modeling a Dynamic system

A Dynamics System:
The state at time t depends on time t-1.
It has a memory!

1. 25
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

25

1
Copyright Protected (Do Not Copy)

Modeling a Dynamic system

In reality, physical modeling could be difficult or impossible, and we have to work with the observed
data (System Identification, Parameter Estimation).
w
u System y
10
Input y (t + 1) = f1 y (t ) + y 1u (t ) Output
30
5
20
0
10
-5 0
-10 -10
0 50 100 150 200 250 300 0 50 100 150 200 250 300

• In the financial systems, we can’t measure inputs either! And Noise to Information Ratio is high.

w
Financial y
System 30
Output
20

10
0

-10
0 50 100 150 200 250 300
1. 26
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

26

Copyright Protected (Do Not Copy)

Modeling a Dynamic system

Some classifications for mathematical modeling:

Linear System Non-Linear System

(a) y (t + 1) = f1 y (t ) + y 1u (t ) yt = f ( yt -1 , ut )

Stationary System Non-Stationary System


y (t + 1) = f1 (t ) y (t ) + y 1 (t )u (t )
(b) y (t + 1) = f1 y (t ) + y 1u (t )

Constant over time. Varies over time.

Continuous in Time Discrete in Time


• y (t + 1) = f1 y (t ) + y 1u (t )
(c) y (t ) = f y (t ) + y u (t )

1. 27
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

27

2
Copyright Protected (Do Not Copy)

Modeling a Dynamic system

Some classifications for mathematical modeling:

Linear System Non-Linear System

(a) y (t + 1) = f1 y (t ) + y 1u (t ) yt = f ( yt -1 , ut )

Stationary System Non-Stationary System


y (t + 1) = f1 (t ) y (t ) + y 1 (t )u (t )
(b) y (t + 1) = f1 y (t ) + y 1u (t )

Constant over time. Varies over time.

Continuous in Time Discrete in Time


• y (t + 1) = f1 y (t ) + y 1u (t )
(c) y (t ) = f y (t ) + y u (t )

1. 28
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

28

Copyright Protected (Do Not Copy)

Modeling a Dynamic system

An Example of a Time Series:


10

Xk 8

-2

-4

-6

k
-8

-10
0 1000 2000 3000 4000 5000 6000 7000

10 10 10 10

6 Xk 8

6 Xk
8

6 Xk
8

6 Xk
4 4 4 4

2 2 2 2

0 0 0 0

-2 -2 -2 -2

-4 -4 -4 -4

-6

Xk-1 Xk-2 Xk-3


-6

Xk-10
-6 -6

-8 -8 -8 -8

-10 -10 -10 -10


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

Xk= j 1 Xk-1+ j 2 Xk-2+…+ek Auto-Regression as a Dynamic System?


1. 29
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

29

3
Copyright Protected (Do Not Copy)

Definition
Autocovariance Function:
Let {Xt} be a time series. The autocovariance function of process {Xt} for all
integers r and s is:

g X (r , s ) = cov( X r , X s )
g X (r , s ) = E[( X r - E ( X r ))( X s - E ( X s ))]
g X (r , s ) = E[ X r X s - X r E ( X s ) - X s E ( X r ) + E ( X r ) E ( X s )]
g X (r , s) = E ( X r X s ) - E ( X r ) E ( X s ) - E ( X s ) E ( X r ) + E ( X r ) E ( X s )
g X (r , s) = E ( X r X s ) - E ( X r ) E ( X s ) =0

Note that g X (r , r ) = E ( X r ) - E ( X r ) = var( X r ) ³ 0


2 2

1. 30
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

30

Copyright Protected (Do Not Copy)

Autocovariance Function

g X (0) g X (2)
Sample Autocovariance Function

0 2 4 6 8 10 12 14 16 18 20

Lag
g X (1)
What if the parameters change over time?
1. 31
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

31

4
Copyright Protected (Do Not Copy)

Definition

Note:
Stationary Process: A strict (strong) stationary time series
A time series {Xt} is stationary (weakly) if: {Xt , t=1,2,…,n}
is defined by the condition that realizations
2
1. E ( X t ) < ¥ Finite Variance (X1, X2, …, Xn) and (X1+h, X2+h, …, Xn+h)
have the same joint distributions for all

2. E ( X t ) = Some constant m for all t integers h and n>0.


Finite Moments
3. g X (r , s ) = g X (r + t , s + t )

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

Note: If {Xt} is stationary, then g X (r , s) is a function of (r - s)


g X (r , s) = g X (r - s, s - s) = g X (r - s,0) = g X (r - s)
Define h=r-s
Does not depend on t
g X (r - s) = g X (h) = cov( X t , X t + h )
1. 32
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

32

Copyright Protected (Do Not Copy)

Definition

Note:

Any strictly stationary process which has a mean and a


covariance is also weakly stationary

Strict Stationary Weak Stationary


(Strong) (Covariance Stationary)

Not generally true except for the Gaussian processes

1. 33
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

33

5
Copyright Protected (Do Not Copy)

Stationary 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. 34
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

34

Copyright Protected (Do Not Copy)

Stationary Process

80

60

40

20

Non-Stationary Process
0

-20
0 50 100 150 200 250 300

-2

-4
Mean-Reversion Stationary Process
-6
0 50 100 150 200 250 300

1. 35
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

35

6
Copyright Protected (Do Not Copy)

General 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
If bad
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


1. 36
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

36

Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

White Noise Process


E ( X t ) = s 2 and
2
If {Xt} is a sequence of random variables with E ( X t ) = 0 ,

ìs 2 r=s (s 2 < ¥)
g X (r , s) = í
î 0 otherwise
{Xt} is called White Noise and it is written as WN(0, s )
2

Note that E[Xt Xs]=0 for t=s Uncorrelated r.v.’s

If Xt and Xs independent for t=s IID(0,s 2 )


5
5
Xk

0
0
WN

-5 -5
Xk-1
-5 0 5
0 1000 2000 3000 4000 5000 6000 7000
1. 37
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

37

7
Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

White Noise Process (Is it Stationary?)

E( X t ) = 0
ìs 2 r=s (s 2 < ¥)
g X (r , s) = í
î0 otherwise

1. 38
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

38

Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Random Walk Process


IID(0, s ) random variables , a sequence {St}
2
If {Xt} be a sequence of
with S0=0 and
St = å j =1 X j
t
(Integrated Process)
Is called a Random Walk.

100 10
Sk
5
Random W alk

0
0

-5
-100
-10
Sk-1
0 1000 2000 3000 4000 5000 6000 7000 -10 -5 0 5 10

1. 39
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

39

8
Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Random Walk Process (Is it Stationary?)

St = å j =1 X j
t
IID(0, s )
2
{Xt}

1. 40
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

40

Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Moving Average Process


Let {Xt} be WN(0, s 2), and consider the process

Yt = X t + qX t -1
Where q 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 most recent values of Xt.

q =0.5
4
Yk
2

-2

-4
Yk-1
0 1000 2000 3000 4000 5000 6000 -4 -2 0 2 4

1. 41
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

41

9
Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Moving Average Process (Is it Stationary?)


{Xt} is WN(0, s 2) Yt = X t + qX t -1

1. 42
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

42

Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Autoregressive Process
Let {Zt } be WN(0, s 2), and consider the process

X t = fX t -1 + Z t
Where |f |<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).
It is easy to show that E(Xt)=0
5
10

f=0.7 5
Xk

0
0

-5

-5
-10
Xk-1
0 100 200 300 400 500 600 700 -10 -5 0 5 10

1. 43
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

43

10
Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Autoregressive Process (Is it Stationary?)


{Zt } is WN(0, s 2), and X t = fX t -1 + Z t
Where |f |<1 and Zt is uncorrelated with Xs for each s<t.

We will see this later

1. 44
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

44

Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

Building Blocks of Financial Models 10


St = å j =1 X j
t
5
Sk
Random Walk 0

-5
(Integrated Process)
te -10
Sk-1
ra -10 -5 0 5 10
White Noise te g
In

ìs 2 r=s
g X (r , s) = í 4
î0 otherwise Yt = X t + qX t -1 Yk
2
5 Moving Average
Xk Moving Average
0

-2
0
-4
Yk-1
-4 -2 0 2 4
Au
-5
Xk-1 to
Re
gr
-5 0 5 es
s io 10
n
X t = fX t -1 + Z t 5
Xk
Auto Regressive
0

-5

-10
Xk-1
-10 -5 0 5 10

Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

45

11
Copyright Protected (Do Not Copy)

Building Blocks of Financial Models

X t = fX t -1 + Z t
30 30

f =1
20 20

10 10

0 0 Random Walk
-10 -10
0 50 100 150 200 250 300 -10 0 10 20 30

10 10

f = 0.9
5 5

0 0

-5 -5 AR(1)
-10 -10
0 50 100 150 200 250 300 -10 -5 0 5 10

4 4

f = 0.1
2 2

0 0

-2 -2 AR(1)
-4 -4
0 50 100 150 200 250 300 -4 -2 0 2 4
1. 46
Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

46

Copyright Protected (Do Not Copy)

Before we start…

A Note on Continuous-Time SDEs

Geometric Brownian Motion Ornstein Uhlenbeck Process


dX t = µX t dt + sX t dWt dX t = a ( µ - X t ) dt + sdWt
dWt ¾ (
¾® N 0, dt ) dWt ¾
¾® N 0, dt ( )

Random Walk Stationary AR(1)

Farshid Maghami Asl G63.2707 - Financial Econometrics and Statistical Arbitrage

47

12

You might also like