程序代写代做代考 chain Capital Markets & Investments

Capital Markets & Investments

Math Methods – Financial Price Analysis
Mathematics GR5360
Instructor: Alexei Chekhlov

Mathematics GR5360
Mathematics G4075

Instructor: Alexei Chekhlov

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Stationarity, Correlation and Memory*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Short-Range Memory Random Processes*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Long-Range Memory Random Processes*
* – with some changes from “An Introduction to Econophysics” by Mantegna and Stanley, ref. B1.

Mathematics GR5360

Influence of Mean-Reversion on Variance

Mathematics GR5360

Influence of Mean-Reversion on Variance

Mathematics GR5360

Andrew Lo’s Variance Ratio Test
* – with changes from “The Economics of Financial Markets” by Campbell, Lo and MacKinlay, ref. B5.

Mathematics GR5360

Basic Behavioral Biases and Price Predictabilities
Over-Reaction or Mean-Reversion, when agents over-react to new information by overselling on new bad information with later correction and/or over-buying on good new information with later opposite correction.
Under-Reaction or Trend-Following, when agents under-react to new information, by establishing a partial position, waiting for confirmations to their actions from other agents. Once received, they continue to increase their position in the same direction – self-reinforcement. Thus, through delayed chain reactions, the new information is gradually priced into the market.

Mathematics GR5360

Price-Change Sign Counting Experiments
Data type used: 1-minute frequency, back-adjusted futures prices since inception (different for each market) until present.
In both of these experiments the frequency (1-minute) is chosen to: be small enough in order to reveal the self-similar statistical properties within the continuous price assumption p=p(t), and be large enough as compared to the so-called “bid-ask bounce” (“fake” mean-reversion). This can be easily verified by comparing the standard deviation of 1-minute price changes with the average ask-bid spread, the standard deviation has to be several times (5-10) larger.
Both experiments are inspired by some of the early experiments of Andrew W. Lo.

Mathematics GR5360

Experiment 1: Counting Continuations and Reversals

Mathematics GR5360

Experiment 1: Counting Continuations and Reversals

Mathematics GR5360

Experiment 1: Counting Continuations and Reversals

Mathematics GR5360

Experiment 1: Counting Continuations and Reversals

Mathematics GR5360

Experiment 1: Counting Continuations and Reversals
Evidence of short-term (up to a couple of hours) over-reaction or mean-reversion and longer-term (beyond a day) under-reaction or trend-following;
Short-term over-reaction or mean-reversion is quite strong and robust statistically.
Longer-term under-reaction or trend-following is weaker and less robust statistically.
The agreement with the RW model gets better as time-separation gets larger.

Mathematics GR5360

Experiment 2: Counting Up- and Down- Trends

Mathematics GR5360

Experiment 2: Counting Up- and Down- Trends

Mathematics GR5360

Experiment 2: 1-min

Mathematics GR5360

Experiment 2: 1-min

Mathematics GR5360

Experiment 2: 5-min

Mathematics GR5360

Experiment 2: 5-min

Mathematics GR5360

Experiment 2: 15-min

Mathematics GR5360

Experiment 2: 15-min

Mathematics GR5360

Experiment 2: 1-hour

Mathematics GR5360

Experiment 2: 1-hour

Mathematics GR5360

Experiment 2: Counting Up- and Down- Trends
Not only the numbers of trends above theoretical values indicate under-reaction or trend-following behavior, but conversely, the numbers of trends below theoretical values indicate possible over-reaction or mean-reversion;
There is a reasonable agreement between the two experiments, although this experiment provides further evidence on how weak the under-reaction or trend-following regime is;
Short length trends counts have better agreement with the RW formulas.

Mathematics GR5360

Variance Ratio Test
We will now transition from the signs under- and over-reaction to the price change under- and over-reaction studies;
Time series will be taken since inception to present at 1-min resolution with time-separation from 1 min to 90 trading hours, during most liquid session (pit session);

Mathematics GR5360

Variance Ratio Test

Mathematics GR5360

Push-Response Diagram Test
This test is free from the fat-tailed bias of the VR test – positive;
This test is quickly growing sample error as you increase the Δp – negative.

Mathematics GR5360

Push-Response Diagram Test

Mathematics GR5360

Push-Response Diagram Test

Mathematics GR5360

Random Walk Comparisons Tests Results
General inspection of the test results confirms the previous sign-tests results: a general pattern is statistically strong short-term over-reaction or mean-reversion, beyond which either inconclusive or statistically weaker, selective longer-term under-reaction or trend-following properties;
Beyond 10 trading days time-separation shows little predictability;
These tests are more general than the first two signs tests because they considers both the price change sign and its magnitude – positive;
These tests could be somewhat biased if the price-difference distributions function is “fat tailed” or the data sample is not large enough – negative.

Mathematics GR5360

Sheet1

1st Price Change 2nd Price Change Probability Type
+ + p^2 C
+ – p*q R
– + q*p R
– – q^2 C
+ 0 p*(1-p-q) 0
0 + (1-p-q)*p 0
– 0 q*(1-p-q) 0
0 – (1-p-q)*q 0
0 0 (1-p-q)^2 0

Sheet2

Sheet3

t.
independen

time
is

,
)
0
(

process,
such

of

variance
the
Therefore,
).
0
(
)
(

and

,

of
function

a
only

is

)
(
)
,
(

where

),
,
(
)
(
)
(

,
)
(
:
met

are

conditions

three
following

the
if

defined

is

process

stationary

sense

wide
a

example,
For

exist.

also
ty
stationari

of

s
definition

e
restrictiv

less

Some

.
:
shift

time
a
under
invariant

is

)
,
(
function
density
y
probabilit
its

if

stationary

called

is

)
(

process

stochastic

a

sense,
strict

a
In
2
2
1
2
2
1
2
1
2
1
m
t
t
m

=

=
=
=
×
=
D
+
®
R
R
t
x
t
t
R
t
t
R
t
t
R
t
x
t
x
t
x
t
t
t
t
x
P
t
x

.

have

we

of

values
large
for

Indeed,

.
correlated

range

short
or
dependent
weakly
are

variables
random

the
case

In this
.
lim
:
namely

,

of

values
large
for

finite

is

n terms
correlatio

of

sum

The

1.
:
cases

h two
distinguis
can

we
equation,

this
of

term
second

the
of
behavior

on the

Depending
.
2
:
get

we
),
(

of

values
large
for

and

0

variables
random

correlated

positively
only

assume

we
If

.

and

variables
e
between th
n
correlatio

auto

the
is

where
,
)
(
2
:
exactly

have

we
Indeed,

.

:

variables
stochastic

of

sum

the
of

variance
of
bahavior

general

of

case

In the
2
1
1
n
1
1
2
2
1
1
2
2
1
n
S
n
const
x
x
n
x
x
x
n
S
n
n
x
x
x
x
x
x
x
x
k
n
x
n
S
x
S
x
n
n
n
n
n
i
n
k
k
i
i
n
i
n
k
k
i
i
i
k
i
i
k
i
i
k
i
i
n
i
n
k
k
i
i
i
n
i
i
n
i
µ
=
÷
ø
ö
ç
è
æ
×
+
®

®
>
þ
ý
ü
î
í
ì

×
+
=
=
å
å
å
å
å
å
å
=
=
+

®
=
=
+
+
+
+
=
=
+
=

(
)
.

,
1
0
for

:
)
R(

)
3
.
1

:
)
(

)
2
.
e

:
)
(

1)
:
examples

notable

Some

process.

the
of

n time
correlatio

the
called

memory

time

typical
a

exists

there
finite,

is

integral

When this
time.
of
dimension

physical

the
has

integral

This
memory.

long”

infinite
memory;

short”

finite
)
(
:
)
memory”

or time

scale

time

typical
(a

time
of
dimension

the
has

)
(

below

area

then the
process,

stationary

a
for

)
(
function
n
correlatio

auto

ess
dimensionl

the
of

integral

he
consider t

we
If

process.

stochastic

of

memory”

(time)

called

so

with the
do

to
has
n
correlatio

auto

the
of

meaning

physical

The
1
0
0
c
t
1

1

1
0
0
0
0
0

0
¥
=
£
< µ ÷ ø ö ç è æ G × = = = - × = × = = î í ì = = ò ò ò ò ò ¥ ¥ - - ¥ ¥ ¥ - - - ¥ + t t h t t n n t t t t t t t t t t t t t h h n t t t t t t t t n n d d e e R e e dy e d e R d τ R R R c c y c c c c . 1 ) 0 ( : nce unit varia and , 0 mean zero with processes stochastic consider can we simplicity For . for 0 ) ( to off falls ly continuous and , ) 0 ( at starts it : be will function n correlatio - auto the of shape typical the process stochastic correlated positively a For . ) ( ) ( : to equal is covariance - auto the processes stationary For ). ( ) ( ) , ( ) , ( : covariance - auto g considerin by this accomodate to needs one zero, from different is value average the If process. stochastic the of value average on the dependent is above introduced function n correlatio - auto The 2 2 2 2 1 2 1 2 1 = = = +¥ ® + ® = - = × - º s m t t s m t t m m R C C R C t t t t R t t C memory. with processes stochastic correlated - auto range - short of ts fingerprin the are 1 resembling spectra energy and functions n correlatio - auto decaying - fast The spectrum. energy or the function n correlatio - auto either the ing investigat by properties l statistica their respect to with zed characteri be can process stochastic correlated range - short summarize, To Walk. Random is which , ) (2 1 for , 1 2 ; noise" white " t independen - frequency is which , ) (2 1 for , 2 ) ( : behaviors al asymptotic two has spectrum energy This . ) 2 ( 1 2 ) ( : form closed in doable is integral this above function n correlatio - auto For the . ) ( ) ( : function n correlatio - auto its of ansform Fourier tr the is process random stationary sense - wide a of spectrum energy the Theorem, Khinchin the Recalling domain. frequency - Fourier in the properties l statistica same the e investigat now can we function, n correlatio - auto of in terms properties l statistica point - two the of zation characteri the o addition t In . for 0 ) ( assume can one as , easy" " are processes Such ). ( of function n correlatio - auto the as particle, Brownian a of ) ( velocity the of memory l statistica the describes example, for function, n correlatio - auto This . ) ( : function n correlatio - auto decaying lly exponentia h namely wit us, by considered already was example One memory. finite or scale time typical a by zed characteri are processes random correlated range - short that noted have We 2 c 2 2 2 c 2 2 2 2 | | 2 w pt w w t p s pt w t s w pwt t s w t t w t t t s t t wt p t t ï ï î ï ï í ì >>
×
<< ® + = × × = >
=
×
=
ò
¥
+

=


c
c
c
c
i
c
E
E
d
e
R
E
R
t
v
t
v
e
R
c

.
correlated

range

long

be

to
called

are

(3)

case
in

as
such
function
n
correlatio

auto
an
by

zed
characteri

variables
Random

ce.
independen

pairwise

of

regime

a

from

ns
correlatio

temporal
of

regime

a

separate
can
that
scale

time
a
select

to
impossible

is
it

above,

(3)

case
in

example,
For

finite!

are

functions

decreasing
lly
monotonica

the
of
integrals

all
not

Obviously,

function.
n
correlatio

auto

under the

area

the

is

where
,
for
present

is

0)
(
n
correlatio

no

and

,

scales

to
up
smallest

the
from
present

is
n
correlatio

1)
(

full

that the
assuming
by

system

the
model

to
possible

is
it

ion,
approximat
order

zero

a

as

fact,
In

process.

the
of
memory

the
of

scale

time
typical
about the
n
informatio
carries
function
n
correlatio

auto

under the

area

the
of

finiteness

The
*
*
*
t
t
t
t
>
=
+
=

(
)
(
)
(
)
(
)
move.

price

unchanged
an

observe

y to
probabilit

the
be

will
1
then
move;

negative

a

observe

y to
probabilit

move;

positive

a

observe

y to
probabilit

:
measure

also
can

we

separation
any
For
.
0

zero,

to
equal

is

change

price

one
least
at

where
changes

price

e
consecutiv

of

pairs

of
number

the
calculate

also

will
We

).
(Reversals
direction

opposite

in the

changes

price

ve
consequiti

of

pairs

of
number

the
ions);
(Continuat
direction

same

in the

changes

price

ve
consequiti

of

pairs

of
number

the
:
calculate

will
we
minutes,

1,000

of

maximal

the
to
minute

1

of

minimal

the
from

starting

,

separation

time
particular
any
For
q
p
q
p
N
N
N





+
t
t
t
t
t

(
)

memory.

range

long

and

range

short
with
processes
between
h
distinguis

to
used

be
can
function
n
correlatio

auto

the
of

integral

the
series

price

financial

a
for

,
therefore
,

where
,
)
(
)
(
)
(
)
(
)
(
:
identity

simple
very
a

recall

us
Let

above.

(3)

case
in

as

function,
n
correlatio

auto

law

power

a
by

zed
characteri

processes

stochastic
in

observed

is
behavior

This

scale.

temporal
typical
a

of
lack

by the

zed
characteri

are

variables
random

correlated

range

Long

.
correlated

range

long
or
dependent
strongly

be

to
said

are

variables
random

the
case

In this
.
lim
:
or

diverges,

n terms
correlatio

of

sum

The

2.
1
1
0
1
0
1
1
n
t
i
t
t
P
t
P
t
P
P
t
P
t
P
x
x
i
n
i
i
i
n
i
i
n
n
i
n
k
k
i
i
D
×
=

+
=
D
+
=
¥
=
å
å
å
å
=
+
=
=
=
+

®

(
)
(
)
(
)

.

shifts

time
small
near

)
(
test
the
of

slope

by the

series

time
a

of

properties

l
statistica

reverting

mean

and

following

end
between tr
h
distinguis
easily
can

we
test,
this
using

Therefore,
.
1
2
1
)
(
:
that
show
can

one

integer
any
for

Further,

)
3
.
3
2
3
4
1
)
3
(
that
follows
which
from

,
2
4
3
:
have

we
3

case

in the

Similarly,

)
2
.
1
)
2
(

have

we
Therefore,

.
1
2
:
have

we
2

case

In the

1)
.
)
1
(
)
(
)
(
:
test
Ratio

Variance

following

he
consider t

us
Let

).
(
)
2
(

:
have

obviously,

Then we,

).
(
)
2
(

and

),
(
)
(
:
shift

time
same

over the

changes

price

successive

wo
consider t

us
Let

Walk.
Random

a

of

those
to
series

time

random

a

of

properties

l
statistica

compare

to
1987

around

al.

et.

Lo

Andrew
by

proposed

test was
simple
A very
1
1
2
1
2
2
1
2
2
2
3
2
1
1
1
2
2
2
1
2
1
2
1
q
q
VR
q
k
q
VR
q
VR
p
p
p
q
VR
p
p
q
Var
q
q
Var
q
VR
t
p
t
p
p
p
t
p
t
p
p
t
p
t
p
p
k
q
k
r
r
r
r
s
r
s
s
r
r
s
t
t
t
t
t
×
÷
÷
ø
ö
ç
ç
è
æ

×
+
=
+
+
=
×
×
+
×
×
+
×
=
D
+
D
+
D
=
+
=
+
×
×
=
D
+
D
=
×
=

+
=
D
+
D
+

+
=
D

+
=
D
å

=

(
)
(
)
:
form

graphical
In

.
dominating
reversion

mean

to
s
correspond
which
,
1
for

,
;
dominating
Walk
Random

to
s
correspond
which
,
1
for

,
)
(
:
cases

limiting

wo
consider t
can

we
Therefore
.
1
0
for

1

if

1
1
1
2
)
(
:
ce
for varian
that
show
can

one

it,

Using
.

:
is
it

of

on)
substituti

recursive
(by
solution

The

.
0
;
variables
random

i.i.d.

and

,
1
0
for

,
:
process

reverting

mean

discrete

following

he
consider t

us
let

Now,
.
)
(
)
(
or

,
)
(
)
(
)
(
)
(
:
have

Walk we
Random

a
for
that
recall

us
Let

it.

of
version
continuous
then
and

discrete

a
first

solving
by

processes,

reverting

mean
such

of

details

he
consider t

now

will
we
follows
In what

process.
Uhlenbeck

Ornstein
an
by

modeled

as
reversion

mean

of
effect

the
simulated

and

introduced
already

have

Earlier we
2
2
2
2
2
1
0
1
0
k
1
2
2
ï
ï
î
ï
ï
í
ì
>>
<< ® << < - = - × ® - - × = × = î í ì = £ < + × = µ = µ - + = D º - - = - - + å e t e s e t t s t e e a e s a a s t x a x a x a t t t t t t et t V e V x x x x V S t p t p p V k l l l k k k k k ( ) ( ) ( ) ( ) move. price unchanged an observe y to probabilit the be will 1 then move; negative a observe y to probabilit - move; positive a observe y to probabilit - : measure also will again, we, separation any For . 0 changes, price zero e consecutiv of chains of number the calculate also will We ds). (down tren direction negative in the length of changes price ve consequiti of chains of number the , trends); (up direction positive in the length of changes price ve consequiti of chains of number the , : calculate will we 1hr}, 15min, 5min, min, {1 set in the separation - time particular any for Here q p q p N l l N l l N - - - - - + t t t t t : hold formulas simple following the separation any time and RW symmetric - non For t 1st Price Change2nd Price ChangeProbabilityType ++p^2C +-p*qR -+q*pR --q^2C +0p*(1-p-q)0 0+(1-p-q)*p0 -0q*(1-p-q)0 0-(1-p-q)*q0 00(1-p-q)^20 ( ) ( ) ( ) ( ) . 1 0 ; 2 ; 2 2 2 q p P pq R P q p C P + - = = + = ( ) ( ) ( ) ( ) ( ) ( ) ( ) ons.) distributi l Exponentia or Poisson called are ons distributi (similar . length of periods flat of number for the - L q - p - 1 1 - L - M , 0 and ; length of trends - down of number for the - L q 1 - L - M , ; length of trends - up of number for the - L p 1 - L - M , : RW asymmetric an for chains of numbers for those solutions exact the are length chain the and , separation time , length series for time Here, L l N L L N L L N l M × = × = - × = + t t t t ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) . 2 , , , and , 2 , , , : , , , : response the influences part asymmetric only the which of parts, asymmetric and symmetric a into decomposed be can It . of change price preceding y immediatel the subject to of change price of function density y probabilit a is , Here . push" " a to response mean l conditiona the as , : as defined is response" " al, et. Trainin V. by papers in defined As y x P y x P y x P y x P y x P y x P y x P y x P y x P x y x P y x P x y P x dy x y P y y y a s a s x - - = - + = + = = × × = ò ¥ + ¥ - ( ) ( ) axys. - x same on the all put them to us allows which hours, in trading measured here is separation Time minutes. by separated changes price two of t coefficien n correlatio - auto is and minutes, in separation time discrete a is where , 1 2 1 1 ) ( : is ratio variance MacKinlay, Lo, Campbell, in defined As k 1 1 q k q q k q Var q Var q VR q k k r r å - = × ÷ ÷ ø ö ç ç è æ - × + = × º ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) . if , 2 1 2 ) ( : have we variance for the Lastly, . 1 2 ) ( ) ( : have we covariance For the . if , ) ( : have mean we for the that see can e solution w general this Using . ) ( 1 ) 0 ( ) ( : get we ) ( to reverting After . ) ( 1 ) 0 ( ) ( : solution general the has which , : get on we substituti after Then . : form in the solution seek the us Let . : case model Uhlenbeck - Ornstein linear continuous with the proceed us let Now 2 2 2 2 2 ) , min( 2 ) ( 2 0 ) ( 0 +¥ ® ® - × × = - × × = - - +¥ ® ® × × + - × + × = × × + - × + = × + × × = × × = × + × - × - = - × + - = - - - = - - ò ò t e e x - t x e e x s x x t x t x t x s dW e e x e x t x t x s dW e e x y t y dW dt x e dy e y x dW dt x x dx t t t s t s t s t s t t t s s t t t a s a s a s s s s a s a a a a a a a a a a a a g. forecastin some for allow do ns applicatio financial of case in the which processes g interestin most the are These scales. time stic characteri many with process a from scale time stic characteri no has which noise - 1 h distinguis to diffucult is It . stationary - non are processes Such etc. highway, a on low in traffic ns fluctuatio e; turbulenc strong in velocity of ns fluctuatio rs; transisto and diodes in ns fluctuatio current : phenomena of variety in wide observed were processes Such noise". - 1 " called often are and g interestin very are 2 0 cases between - in the All Walk. Random to s correspond 2 case the and noise white to s correspond 0 case that the concluded we page previous On the . and 2 0 where , ) ( : form the of spectrum energy a with process stochastic a consider us Let economic. and , biological physical, - systems many in observed are functions n correlatio - auto law - Power . correlated range - long are function n correlatio - auto law - power a by zed characteri processes stochastic seen that already have We w w h h h h w w h h < < = = = < < = const C C E . statistics point - two only the know to sufficient is it studies most in but , and , every for ) , , , ; , , , ( function density y probabilit joint the know to need we process, stochastic a of properties l statistica the describe fully o Although t . at time variable random the and at time variable random the observing of function density y probabilit joint the is ) , ; , ( where , ) , ; , ( ) ( ) ( : function n correlatio - auto the define to sufficient is it case, order nd - 2 In the . at time variable random the observing of function density y probabilit the is ) , ( where , ) , ( ) ( : mean the define to sufficient is it case order st - 1 in the example, For . properties l statistica order th - of in terms written be can process stochastic a zing characteri es) (measurabl s observable l statistica The (iid). d distribute y identicall t independen is ) ( process stochastic that the implies ty stationari t, independen are variables stochastic When the first. changes, price of ty stationari of property the discuss us Let 2 1 2 1 2 2 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 n t x t t t x x x P t x t x t t x x P dx dx t t x x P x x t x t x t x t x P dx t x P x t x n t x i i n n K K ò ò ò ¥ ¥ - ¥ ¥ - ¥ ¥ - × × × × = × × × =