Professional Documents
Culture Documents
Industrial background:
Ionospheric research at EISCAT
Riga workshop 28-29/11 1997
Thomas Hellstrm
Common viewpoints
Types of in and out data
Prediction as Inductive Learning
Performance evaluation
Common viewpoints
Traders viewpoints
Just a question of hard work and good intuition!
The market clearly goes through periods of positive
and negative trends. Its just to identify the peaks and
the troughs
+
A successful prediction algorithm does not have to
give predictions for all points in the time series.
Can we predict predictability?
3
7 00
7 00
6 50
6 50
6 00
S tock price
S tock price
6 00
5 50
5 00
4 50
5 50
5 00
4 50
4 00
Lower Break out SELL!
4 00
3 50
3 50
3 00
3 00
2 50
0
100
200
300
4 00
da y nu m b e r
5 00
6 00
70 0
2 50
0
5
100
200
300
4 00
da y nu m b e r
5 00
6 00
70 0
6
Ooops!
0.4
0.35
0.3
7 00
6 00
0.25
6 50
0.2
0.15
S tock price
0.1
5 50
0.05
5 00
0
-6
Random walk
4 50
3 50
3 00
2 50
0
100
200
300
4 00
da y nu m b e r
5 00
6 00
-2
0
2
Daily change r (%)
r P(R<r)
0 5.00E-01
-1 2.00E-01
-2 4.00E-02
-3 4.00E-02
-4 2.00E-04
-5 4.00E-06
-6 5.00E-08
-7 3.00E-10
-8 6.00E-13
-9 7.00E-16
4 00
-4
70 0
7
Question:
How often can we expect a crash like
november 1987 (-28% in one day) ?
Close price
Highest payed during day
Lowest payed during day
Volume (no. of traded stocks)
9
Thomas Hellstrm 1997
10
Thomas Hellstrm 1997
11
12
Derived entities
Derived entities
k-day Returns:
y(t)
y(t) - y(t k)
log
y(t k)
y(t k)
R k (t) =
V=
y( t )
ln y(t 1) m
t =1
where
m=
1
N1
1 k
y( t i)
k i=1
13
1
N
y( t )
ln y(t 1)
t =1
14
Inductive Learning
Inductive Learning
The case of Prediction:
E = (e 1,...e N ) where
e t = e(g( X (t)), z( t + h ))
1)
15
et = g(X(t)) z(t + h)
E =
N-h
1
Nhk +1
e
t =k
2
t
16
y(t)
y(t-1)
(RMSE)
g( t )
y(t-2)
y(t-3)
g(t) =
i= 0
y(t - i)
AR-model
E =
Neural network
17
N -1
1
N 4
(g
( t ) y( t + 1)) 2
t=4
18
1)
Drawbacks:
A stationary model is not realistic
Fixed horizon not realistic. A profit 2 days ahead is
as good as 1 day ahead.
threshold 0
e t = 1 g( X(t)) < AND z(t) > 0
0 otherwise
E =
1
N
2
t
t =1
if g( X(t) ) >
buy
T(t) = sell
if g( X(t) ) <
do nothing otherwise
19
R1( t )
R5 (t)
20
gw (t)
R 10 ( t )
R 20 ( t )
N-5
1
N 24
E =
2
t
t = 20
21
N -1
1
N 4
(g
( t ) y( t + 1)) 2
t=4
Technical Indicators
22
Technical Indicators
Can often be described as a trading rule:
if g( X (t) ) >
buy
T(t) = sell
if g( X (t) ) <
do nothing otherwise
Examples:
Moving averages
Formations such as triangles
RSI - the relation between the average upward price
change and the average downward price change
within a time window normally 14 days backwards
Thomas Hellstrm 1997
23
1 k -1
y( t i)
k i= 0
24
Portfolio management
Minimise the variance in a portfolio by quadratic
programming
Also possible with single stock methods by:
Computing relative stocks:
SELL
160
SELL
140
S tock price
SELL
120
100
i =1
80
BUY
60
BUY
40
BUY
20
200
400
600
800
day number
1000
1200
25
Benchmarks
Performance measures
Theil coefficient:
y(t)=y(t-1)
R (t) = R(t - 1)
T=
y (t) = a i y(t - i)
i =1
( y(t) y (t) )
( y(t) - y(t - 1) )
27
{ t | R(t)R(t
{ t | R(t)R(t
Mean profit =
- 1) > 0, t = 1, N }
- 1) 0, t = 1, N }
sign(
t =1
I.e:
A trade is assumed at every time step, in the
direction of the predicted change.
H
HN
28
Performance measures
H0 =
Performance measures
HN =
i =1
i =1
H=
26
30
Evaluating performance
Evaluating performance
250
P (H = x ) =
x
31
0 . 5 x 0 . 5 250 x
32
Evaluating performance
Evaluating performance
P(H>0.55*500)=0.0112
The probability that ANY of the 100 indicators produce 55%
hit rate is 1-minus the probability that all are less then 55%:
1 (1 0 . 0112 )100 = 0 . 68
33
Results so far
Future work
Used methods
34
Other methods
Results:
No statistically significant predictions
Significant seasonal patterns in data
35
36