Sunteți pe pagina 1din 54

Time Series and Applications to Finance

Lecture 1: Introduction

Ioane Muni Toke

MICS Laboratory and Chair of Quantitative Finance


CentraleSupélec – Université Paris-Saclay, France

Data and Statistics in Finance


CentraleSupelec, Université Paris-Saclay
May-June 2019

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Financial assets

I Basic characteristics of an asset:


I something to be bought or sold
I with a price (somehow) depending on bid and offer
I on a market.
I Several asset classes (definitions may vary):
I Equity : stocks, shares of some companies (listed companies vs private
equity).
I Fixed income : bonds, interest rates products, government obligations,
etc.
I Credit : when borrowing/lending incurs a non-negligible counterparty
risk
I Foreign exchanges : currencies
I Commodities : agricultural products, mining products, etc.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Derivative products

I A derivative is a contract whose value is based on some underlying


asset (or set of assets) belonging to one of the previous asset class.
I Futures, Call options, put options, etc.
I Very ancient history on agricultural commodities as an insurance
product (e.g. Japan rice bills in the 17th century, foundation of the
CBOT in 1848)
I Modern development on financial assets starting in the 1970’s (first
financial derivative on the CME in 1972 ; previously banned as
gambling)

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Financial markets

I Regulated markets
I Equity markets : Euronext, NYSE, NASDQAQ
I Commodities (derivatives) markets : CME, ICE
I Interest rates/Equity derivatives markets : CBOE, LIFFE
I Categories are not exclusive
I Mostly electronic, with order books
I OTC markets
I Broker-dealer markets, market makers
I Mostly based on request for quotes
I Less transparent
I Many recent evolutions : change of regulations (MIFID in Europe),
market privatisation, new platforms, dark pools, etc.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Clearing houses

I OTC markets incur a counterparty risk


I A clearing house reduces this risk on regulated markets :
I acts as a central counterparty for all transactions on the exchange
I may collect margins to ensure traders’s liabilities

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Introduction: assets, markets

Some vocabulary in French

clearing house chambre de compensation


bid demande, offre d’achat
ask offre (de vente)
commodities matières premières
counterparty risk risque de contrepartie
financial asset actif financier
over-the-counter de gré à gré
order book carnet d’ordres
underlying asset actif sous-jacent

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Basic description of prices

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Basic description of prices

Trend

I General price direction, if it exists

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Basic description of prices

Volatility

I Amplitude of variations

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Basic description of prices

Correlation

I Propensity of two prices to move in the same or opposite direction

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Simple returns I

Let Pt be the price of an asset at time t.


P − Pt−1 Pt
I Simple returns: Rt = t = − 1.
Pt−1 Pt−1
I k-period returns:

k−1
Y Pt−j k−1
Pt Y
Rt (k) = −1= −1= (1 + Rt−j ) − 1.
Pt−k Pt−1−j
j=0 j=0

I Time unit is to be specified.


I French vocabulary : rendement (ou parfois rentabilité).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Simple returns II
I Annualized returns (or in general multi-period returns normalized to
some unit of time): Rt (k) satisfies
 1
k
1 + Rt (k) = 1 + Rt (k)

 1/k
k−1
Y
i.e. Rt (k) = (1 + Rt (k))1/k − 1 =  (1 + Rt−j ) − 1,
j=0
(geometric mean).
k−1
1X
I If Rt , . . . , Rt−k+1  1 (small returns), then Rt (k) ∼ Rt−j
k
j=0
(Taylor expansion at the first order).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Continuous compounding I

Let r be the yearly interest rate of a bank deposit. Let C be the initial
deposit. The amount deposited after T years is:

Compounding method Amount


T
Annual (rate r ) C (1 + r )
r 2T
 
Semi-annual (rate r /2) C 1+
2
. .
. .
. .
r nT
 
n payments (r /n) C 1+
n
. .
. .
. .
Continuous C exp(rT )

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Continuous compounding II
I Value of the risk-free asset with discrete and continuous compounding

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Log returns

I By analogy with the compounding of interest rates, a continuously


compounded return rt satisfies 1 + Rt = e rt , i.e.
 
Pt
rt = log(1 + Rt ) = log = pt − pt−1 .
Pt−1

where pt = log(Pt ) is called the log-price. rt is called the log-return.


I k-period returns:

k−1
X k−1
X
rt (k) = pt − pt−k = pt−j − pt−1−j = rt−j .
j=0 j=0

I In the case of small returns, Rt ≈ rt at the first order.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Dividends

I Dividend: amount paid by a company to the owner of the share.


I A dividend payment is instantaneously incorporated into the price (cf.
arbitrage ; could be discussed).
I Returns should be corrected for dividends payments : if Dt is the
dividend paid between the observation dates t − 1 and t, then the
returns are
Pt + D t Pt − Pt−1 Dt
Rt = −1= +
Pt−1 Pt−1 Pt−1
I In log-returns,
rt = log(Pt + Dt ) − log Pt−1

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Portfolio returns
I Let us consider a portfolio invested in N assets. Let ai be the number
of shares of asset i in the portfolio. Let Pti be the price of asset i at
XN
time t. Let Vt = ai Pti be the value of the portfolio.
i=1
I The portfolio return is
N N N
Vt − Vt−1 X Pti − Pt−1
i i
X ai Pt−1 Pti − Pt−1
i X
= ai i
= i i
= wi Rti
Vt−1 Vt−1 Vt−1 Pt−1
i=1 i=1 i=1
i
ai Pt−1
where wi = i
is the proportion of the portfolio value invested in
Vt−1
the asset i.
I This property is no longer true with log-returns, but the
XN
approximation wi ri,t often used when working with log-returns.
i=1
Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Other useful definition of returns

I Excess return: difference of the observed return and a reference (e.g.,


the return of a government bond, or the return of an index, etc.)

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

Time scales

I Time scale is fundamental: yearly returns, quarterly returns, monthly


returns, weekly returns, daily returns, intraday returns, etc.
I Choice of time scale depends on the problem (type of asset,
investment horizon, hedging method, etc.)

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Definitions of asset returns

An example of timeseries : the CAC 40 index

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Empirical observations of the unconditional distribution

 !3 
X − E[X ]
I Skewness S = E  p 
V[X ]
measures asymetry ; often negative for
financial returns (but care...).
 !4 
X − E[X ]
I Kurtosis K = E  p  is
V[X ]
linked to distribution tails ; K = 3 for
Gaussian ; usually K > 3 for financial
returns (leptokurtic distributions).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Distributional assumptions I
I Gaussian assumption: simple returns are i.i.d. Gaussian
I Pros : simple. . .
I Cons: Wrong support (Rt ∈ [−1, +∞)) ; Multi-period return is not
Gaussian ; No excess kurtosis (no heavy tails) ; . . .
I Log-normal assumption: log-returns are i.i.d. Gaussian
I Pros : Still simple ; Correct support for rt and Rt = e rt − 1 ;
Multi-period log-return is still Gaussian
I Cons: No excess kurtosis (no heavy tails)
I Lévy/Stable assumption: log-returns are i.i.d. Lévy-stable (e.g.,
Cauchy distribution)
I Pros : Still simple ; Correct support for rt and Rt = e rt − 1 ;
Multi-period log-return is still Lévy-stable ; Excess kurtosis (leptokurtic
distributions, heavy tails)
I Cons: Complex modelling (e.g., no analytical expressions) ; Infinite
variance conflicting with standard financial theories

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Distributional assumptions II
I Log-returns of daily adjusted close price of the CAC 40 index
1990-2019

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Testing for normality I


I Goodness-of-fit tests (French: tests d’adéquation)
I Visual test with QQ-plots: Parametric curve (G −1 (F (yi )), yi ) for a
sample CDF F and a fitted/theoretical CDF G .
I Application to the CAC 40 daily log-returns :

Large deviations lead to the rejection of the normality assumption.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Testing for normality II


I Statistical tests : Kolmogorov-Smirnov (general test for equality of
distributions), Shapiro-Wilk, Anderson-Darling, Jarque-Bera
(normality tests), . . .
I Jarque-Bera test : The test statistic is

(K − 3)2
 
n 2
J= S + ,
6 4

where n is the size of the sample, S the sample skewness and K the
sample kurtosis. If the distribution is Gaussian (H0 ), then J ∼ χ2 (2)
(asymptotically as n → ∞).
I Application to the CAC 40 daily log-returns :
n 7279 s -0.0583
k 7.701 j 6707.739
so that the normality hypothesis is rejected (P(J > j|H0 )  1).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Distributions of financial returns

Distribution of returns in brief

I Leptokurtic distributions
I Goodness-of-fit tests reject normality of returns and log-returns
I Many possible distributions and mixtures. . .
I Precise statistical fitting of unconditional distributions of returns is
probably not very interesting per se, but should be related to models
of financial trading and exchanges.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Time series : first definitions I

Let (Ω, F, P) be a probability space.


Definition (Stochastic process)
Let I be an index set. A stochastic process is a family X = (Xt )t∈I of
random variables.

Definition (Time series)


If I is discrete, the process is called a discrete-time process, or a time
series.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Time series : first definitions II

Let (rt ) be a time series of returns.


Definition (Mean function)
The mean function of (rt ) is µ(t) = E[rt ].

Definition (Autocovariance function)


The autocovariance function of (rt ) is γ(t, t + h) = Cov(rt , rt+h ).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Stationarity of financial time series

I Some notion of stationarity is crucial (see details in forthcoming


lectures)
I i.i.d assumption of (rt ) is too strong.
I Strict stationarity assumption is too strong as well.
I Modelling usually assumes weak (or second-order) stationarity :
I Mean: E[rt ] is constant ;
I Covariance: Cov(rt , rt+h ) depends only on h (i.e. γ(t, t + h) = γ(h)).

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Autocorrelation function (ACF)


Let (rt ) be a stationary time series of returns.
Definition (Lag-h autocorrelation)
The lag-h autocorrelation of (rt ) is

Cov(rt , rt+h ) γ(h)


ρ(h) = p =
V[rt ]V[rt+h ] γ(0)

where γ is the autocovariance function of (rt ).

Definition (Lag-h sample autocorrelation)


The lag-h sample autocorrelation of a sample {rt }t=1,...,T is
PT
t=h+1 (rt − r¯)(rt−h − r¯)
ρ̂(h) = PT
t=1 (rt − r¯)

where r¯ is the empirical mean of the sample {rt }t=1,...,T .


Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Examples of autocorrelations of returns I

I Financial returns usually exhibit weak or no autocorrelation, except


for short time scales

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Autocorrelation of financial returns

Examples of autocorrelations of returns II

I Absence of autocorrelation does not mean independence of returns

I There exists some non-linear dependencies.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Volatility

I Important concept aimed at quantifying the amplitude of the


variations of an asset.
I Several concepts can be used, which may not be consistent:
I Instantaneous volatility
I Historical volatility
I In options pricing models : implied volatility, stochastic volatility, local
volatility, . . . (see further discussions on volatility in ST7 and third-year
Quantitative Finance track)
I First proxy : the standard deviation of the (annualized) asset returns.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Scaling effect on volatility


I Let σ(h) be the volatility computed with horizon h days. Recall that
log-returns satisfy
 
  k−1
Y Pt−j k−1
Pt X
rt (k) = log = log  = rt−j .
Pt−k Pt−1−j
j=0 j=0

I If log-returns were i.i.d., we would have σ(h) = V[rt (h)] = hσ(1)2 .


2

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

First observations

I Volatility is not directly observable.


I As opposed to prices, volatility “looks” stationary (at least it does not
diverge)
I Volatility is not constant.
I There exists volatility clusters (observed as early as 1963’s by
Mandelbrot)
Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Volatility estimators I

I Standard deviation

t  2 !1/2
1 X Pn
σ̂t = ln − µ̂t ,
h−1 Pn−1
n=t−h

t
1 X Pn
where µ̂t is the subsample mean : µ̂t = ln .
h Pn−1
n=t−h
I Several estimators are proposed using daily open-high-low-close data
(OHLC data, denoted here Ot , Ht , Lt , Pt ) to be consistent with
previous notations

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Volatility estimators II
I Parkinson (1980)

t  !1/2
Mn 2

1 X
σ̂t = ln .
4h ln 2 Ln
n=t−h

I Garman & Klass (1980)

t
!1/2
Mn 2 Pn 2
   
1 X 1
σ̂t = ln − (2 ln 2 − 1) ln .
h 2 Ln On
n=t−h

I Rogers & Satchell (1991)

t    !1/2
1 X Mn Mn Ln Ln
σ̂t = ln ln + ln ln .
h On Pn O n Pn
n=t−h

I etc.
Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Volatility estimators III

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
Volatility

Leverage effect
2

I Let C (δ) = Corr rt+δ , rt for some lag δ

I Leverage effect: volatility appears to be negatively correlated to


previous price changes
I Old finding, but reality/significance of this effect is questioned by
recent works
Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
High-frequency data and microstructure

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
High-frequency data and microstructure

Financial microstructure

I Standard financial modelling models the price as the fundamental


stochastic process. But price is the result of transactions, i.e. it
evolves with the behaviour of the market participants within the
structure and rules of the exchanges.
I We have looked at daily data so far, but computerization of
exchanges allows for high-frequency observations, and therefore for
finer modelling.
I Financial microstructure is the field that study the mechanisms of
financial exchanges at a very fine scale.
I Note that in general, appropriate scale of observation may vary with
the type of problem, the investment horizon, the hedging methods,
etc.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
High-frequency data and microstructure

A schematic view of the limit order book

Quantity
Bid cancellations Bid limit orders Ask limit orders

Bid

Ask cancellations
market
orders
Ask
market
orders

Price
{ {

{
Ioane Muni Toke (CentraleSupélec)
Bid side Spread Ask side

ST4 - Time series in Finance May-June 2019


High-frequency data and microstructure

Main types of orders

I Three fundamental types of orders describe market interactions:


I Market order : message sent to the exchange in order to buy (resp. sell)
a given quantity of the asset immediately, at the best available price.
I Limit order : message sent to the exchange in order to buy (resp. sell)
a given number of shares of the asset at a price not higher (resp.
lower) than a given limit price.
I Cancellation : message sent to the exchange in order to cancel a
pending limit order (that has not been executed/matched yet)
I Real exchanges propose many types of orders, that may be more
involved , with mixed behaviours and numerous execution parameters.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
High-frequency data and microstructure

Time inhomogeneity
I Trading activity varies along the day

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
High-frequency data and microstructure

Autocorrelation of trade signs


I Let us define the sign of a market order a +1 if it is a buy order, and
−1 if ti is a sell order. This time series has a long memory.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
In brief

Table of contents

Introduction: assets, markets

Basic description of prices

Definitions of asset returns

Distributions of financial returns

Autocorrelation of financial returns

Volatility

High-frequency data and microstructure

In brief

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
In brief

Stylized facts

I Log-returns are often used as the basic quantity to study a financial


time series.
I Distributions of log-returns are generally asymmetric.
I Distributions of log-returns are leptokurtic (heavy tails).
I Log-returns do not exhibit autocorrelations at daily scales.
I There exists however non-linear dependencies, linked to volatilities.
I Volatilities are not directly observable and therefore need to be
estimated.
I Volatilities exhibit a clustering effect and a leverage effect.
I Time scales are important : stylized facts are different at a daily scale
and at high frequency.

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019
In brief

Next lectures

I Stationary processes
I Linear models for time series (ARMA)
I Estimation and prediction with linear models
I Introduction to portfolio theories
I Introduction to non-linear models for financial timeseries
I ...

Ioane Muni Toke (CentraleSupélec) ST4 - Time series in Finance May-June 2019

S-ar putea să vă placă și