Financial time series analysis and forecasting

advertisement
Financial Academy
under the Government of the Russian Federation
Report
Singular spectrum analysis for a forecasting
of financial time series
Speaker:
Kozlov Alexander A.
Moscow - 2009
Content list:
• Introduction to nonlinear dynamics approach
• Overview of the main methods (including SSA)
• Financial time series analysis and forecasting:
• Schlumberger Limited
• Deutsche Bank
• Honda Motor Co., Ltd.
• Toyota Motor Corp.
• Starbucks
• BP plc.
• Conclusions
Introduction
•
•
•
Time series is a series of variable values taken in successive periods of time.
Time series analysis is a part of nonlinear dynamics.
Supposition: market of shares is unstable and chaotic.
•
Objective: analysis and forecasting of stock price time series with
nonlinear dynamics methods
•
In this report the following questions will be considered:
• Embedding dimension as “space” characteristic
and its estimation
• К2-entropy and Lyapunov exponents as “time” characterics
and their estimation
• SSA forecasting method
Overview
• The idea of attractor reconstruction [11]:
Satisfactory geometry picture of low-dimensional strange attractor can be
obtained if instead of x-variables from dynamic system equations somebody use
k-dimensional delay vectors:

zi  {xi , xi 1 ,..., xi  ( k 1) }
• Takens theorem [2]:
There is a transformation
that k  2d  1 .
 which can embed M d
to
R k on conditions
It means that:
- k – embedding dimension;
-
xi  F ( xi 1, xi  2 ,..., xi  k )
__________________________________________________________________________________________________
[1] Packard N.H., Crutchfield J.P., Farmer J.D., Shaw R.S.,"Geometry from a time series", Phys.Rev.Lett. 45, p.712,1980.
[2] F. Takens, "Dynamical Systems and Turbulence", Lect. Notes in Math, Berlin, Springer. №898, 1981, p. 336.
Overview
•Correlation integral on r<<1 and k>>1 [4]:
Grassberger- Procaccia method [3]:
C2 ( r ) 
1
N2

 
H
r

z

i  zj
N
i , j 1

-1
-2
k
-4
-5
-6
stops
3. This k-number is embedding dimension
k
-3
1. Find  k , having curves for each k, starting
with k=1;
2. Starting with certain k-number
growing and stabilizes;
0
ln C k
•
ln Cq (r , w)  Dq ln r  K q k  const
-7
-8
de;
-4
4. Maximum value of  k is a so-called
correlation dimension d c(or D2 ) of the
attractor.
-3
-2
0
1
ln r
2.6
2.4
-1
dc
2.2
2.0
•
Limitation [4]:
k
1.8
1.6
1.4
d  2 lg N
1.2
1.0
de
0.8
1
2
3
4
k
______________________________________________________________________________________
[3] P. Grassberger, I. Procaccia, "Characterization of Strange Attractors",Phys.Rev.Lett.,50,346, 1983
[4] G.G. Malineckiy, A.B. Potapov, “Actual problems of nonlinear dynamics", М: URSS, 2002
5
6
7
Overview
•
•
Having fixed r and investigating dependence С(r*,k) from k (k>>1), somebody can
estimate K2-entropy [5].
K2 defines the time of predictability for the system in “volume” interpretation
(growing of the volume in phase space which the system can occupy in the future)
C2 (r , w) ~ r D 2 exp(  K 2 k )
•
T (1) ~ K 2
1
The time of predictability also can be determined from Lyapunov exponents
The maximal one is estimated in Wolf method [6].
1
1 
t n  t0
i
L(ti 1 )
ln

L(ti )
i 0
n 1
T ( 2 ) ~ 1
1
________________________________________________________________________________________________________
[5] Grassberger, I. Procaccia,"Estimation of the Kolmogorov Entropy from a Chaotic Signal",Phys.Rev.A,vol.28,4,1983,p.2591
[6] Wolf A., Swift J.B., Swinney H.L., "Determining Lyapunov exponents from time series", Physica D, 69 (1985), №3, p.285-317.
Overview
SSA forecasting method [7]:
• 1) Construction of the delay matrix
from time series and preliminary changes
in it (centering and normalization)
•
•
X M ( N  M 1)



 xN  M  2 

 xN  M 1 
xM 1 


x3
x2
xN

2) Finding the components (M) and selection of the most important ones (r) This
 vM(1) vM( 2)  vM( M ) 
is equal to search of
0 
 1




eigenvectors and и eigenvalues
2
 
 
 


Λ
VM M   (1)
of the matrix X  XT .
( 2)
(M ) 


v
v
 v
 2
 v (1)
 1
2
( 2)
1
2
(M )
1
 v
v
3) Time series reconstruction with r main components
ˆ  V  VT  X
and taking average on each diagonal. X
M r
•
 xM

 

x
 2
x
 1




0

M 
M r
4) Forecast constraction with «caterpillar» method:
 xˆ N 1 
Equal to constraction of the new


delay vector with one unknown
x
 N 
ˆ
x

N 1 
coordinate.
 
(xˆ N 1  VM r VMT r xˆ N 1 ) 2  min
xˆ N 1


x

 N M 2 
_____________________________________________________________________________________________________
[20] “The main components of time series: “caterpillar“ method”. Col.articles // ed. D.L. Danilov, А.А. Zhiglyavskiy – St.P.: St.P.
University, 1997. - 308 p.
Analysis and forecasting
•
Criteria for the selected companies:
- long time on the market of shares (NYSE) – more than 10 years;
- publicity;
- from different sectors;
•
Thus the following companies were chosen:
• Schlumberger Limited
• Deutsche Bank
• Honda Motor Co., Ltd.
• Toyota Motor Corp.
• Starbucks
• BP plc.
•
Forecasting parameters:
- delay number - M=20
- number of the main components –
•
r  de
During forecasting logarithmic profit is taken in to account:
- positive in growth
- negative in fall
Si  ln
x(ti )
x(ti 1 )
1. Schlumberger Limited
•Period from 31.12.1981
to 31.12.2008
•Time series consists of
6814 stock price values
(on close).
k
-2
0
3,0
-2,5
2,5
-3
ln C (k)
k
Analysis and forecasting
2,0
2
4
6
8
10
y = -0,1656x - 2,8552
R2 = 1
-3,5
-4
1,5
-4,5
1,0
-5
1
2
3
de  7
4
5
6
k
7
8
9
10
d c  3,12
11
K2  0,1656
T (1)  6,04
1  0,1597
T ( 2)  6,26
12
Analysis and forecasting
1. Schlumberger Limited
2. Deutsche Bank
•Period from 18.11.1996
to 31.12.2008.
•Time series consists of
3033 stock price values
(on close).
k
-1
3,5
-1,2
0
2
4
6
8
10
-1,4
3,0
-1,6
2,5
ln C (k)
k
Analysis and forecasting
2,0
y = -0,1208x - 1,4495
-1,8
2
R =1
-2
-2,2
1,5
-2,4
1,0
-2,6
1
2
3
de  6
4
5
6
k
7
8
9
10
d c  3,26
11
-2,8
K2  0,1208
T (1)  8,28
1  0,1164
T ( 2)  8,58
12
Analysis and forecasting
2. Deutsche Bank
Analysis and forecasting
3. Honda Motor Co., Ltd.
•Period from 11.08.1987
to 31.12.2008.
•Time series consists of
5390 stock price values
(on close).
3,0
k
-2
0
2
4
6
8
10
-2,5
2,5
-3
y = -0,1495x - 3,1127
k
ln C (k)
2,0
2
R = 0,9997
-3,5
1,5
-4
1,0
-4,5
-5
1
2
3
de  7
4
5
6
k
7
8
9
10
d c  2,80
11
K2  0,1495
T (1)  6,69
1  0,1442
T ( 2)  6,94
12
Analysis and forecasting
3. Honda Motor Co., Ltd.
Analysis and forecasting
4. Toyota Motor Corp.
•Period from 13.04.1993
to 31.12.2008.
•Time series consists of
3956 stock price values
(on close).
k
0
0
2
4
6
8
10
-0,5
2,5
-1
k
ln C (k)
2,0
-1,5
y = -0,1175x - 1,8895
R2 = 0,9999
-2
1,5
-2,5
1,0
-3
-3,5
1
2
3
de  6
4
5
6
k
7
8
9
10
d c  2,64
11
K2  0,1175
T (1)  8,51
1  0,1222
T ( 2)  8,18
12
Analysis and forecasting
4. Toyota Motor Corp.
Analysis and forecasting
5. Starbucks
•Period from 26.06.1992
to 31.12.2008.
•Time series consists of
4161 stock price values
(on close).
k
-3
0
2
4
6
8
10
2,5
-3,5
2,0
ln C (k)
k
-4
1,5
-4,5
1,0
0,5
y = -0,1389x - 3,9295
R2 = 0,9998
-5
1
2
3
de  7
4
5
6
k
7
8
9
10
11
d c  2,34
-5,5
K2  0,1389
T (1)  7,20
1  0,1342
T ( 2)  7,45
12
Analysis and forecasting
5. Starbucks
Analysis and forecasting
6. BP plc.
•Period from 03.01.1977
to 31.12.2008.
•Time series consists of
8076 stock price values
(on close).
k
-2,5
0
-3
2,0
-3,5
k
ln C (k)
2,5
1,5
4
6
8
10
y = -0,1403x - 3,0905
R2 = 1
-4
-4,5
1,0
0,5
2
-5
1
2
3
de  6
4
5
6
k
7
8
9
10
d c  2,45
11
K2  0,1403
T (1)  7,13
1  0,1369
T ( 2)  7,31
12
Analysis and forecasting
6. BP plc.
Analysis and forecasting
•Final results of analysis are in the table:
Компания
de
dc
K2
1
Schlumberger Limited
7
3,12
0,1656
0,1597
6,04
6,26
Deutsche Bank
6
3,26
0,1208
0,1164
8,28
8,58
Honda Motor Co. Ltd.
7
2,8
0,1495
0,1442
6,69
6,94
Toyota Motor Corp.
6
2,64
0,1175
0,1222
8,51
8,18
Starbucks
7
2,34
0,1389
0,1342
7,20
7,45
BP plc.
6
2,45
0,1403
0,1369
7,12
7,31
T (1)
K2
T ( 2)
•Percentage of coincidence between logarithmic profit signs of forecast and real time series
Компания
2007 , %
2008 , %
Schlumberger Limited
75
75
Deutsche Bank
81
69
Honda Motor Co. Ltd.
75
58
Toyota Motor Corp.
75
81
Starbucks
86
57
BP plc.
71
71
Conclusions
• Nonlinear dynamics methods applied to stock price time
series led to a “space” and “time” analysis of the trading
system. Thus we determined number of the main
components (=embedding dimension) and time of
predictability (according to K2-entropy and Lyapunov
exponents) for each company.
• Obtained results have both fundamental and applied
sense for economics.
• Complex analysis permitted to make a forecast on the
basis of SSA method (“caterpillar”). Forecasted values
and logarithmic profit fits the real ones quite well.
• Thus SSA forecasting method can be a useful instrument
in quantitative analysis of any risks connected with
financial time series.
Thank You for attention!
Download