Analysis of Financial Data Spring 2012 Lecture: Introduction

Download Report

Transcript Analysis of Financial Data Spring 2012 Lecture: Introduction

Analysis of Financial Data
Spring 2012
Lecture 1
Priyantha Wijayatunga
Department of Statistics, Umeå University
[email protected]
Course homepage:
http://www8.stat.umu.se/kursweb/vt012/staa2st017mom2/
Dependence
• Is there a dependence between a day’s stock price and the
previous day’s stock price
• If there is, then is it linear?
• For our data: the sample correlation coefficient
Correlations
PriceYesterday
PriceYesterday
Pearson Correlation
PriceToday
1
Sig. (2-tailed)
N
PriceToday
Pearson Correlation
,978**
,000
102
101
,978**
1
Sig. (2-tailed)
,000
N
101
102
**. Correlation is significant at the 0.01 level (2-tailed).
• A strong linear relationship
• Stock prices are autocorrelated, linearly
Stationarity
• It is easy to predict price when today’s price and
yesterday’s prices are dependent functionally, linear in the
above case
• But often, even if there is a dependence, it may not be any
functional one.
• Then it is difficult to say anything about future variation
• But if the future variations is silimar to the past variations
then we can use a probability distribution to model future
given we know the past
• We use the notion of stationary for modeling the future
• Our stock prices in the example are not stationary:
expected value of stock price today is different from that of
yesterday’s
Stationarity
• Probability distribution for today’s closing price of Nordea’s
stock is different from that of yesterday’s
• There is a non-montonic trend in the mean
Closing Stock Price of Nordea
80
70
60
50
40
30
20
10
0
Closing Price
Stationarity
• If we plot the price difference (increase or decrease for
today from yesterday): Price_at_day_t – Price_at_day_(t-1)
• The price differences are rather random
• We may be able to model this better
Stationarity
• Price_at_day_t – Price_at_day_(t-1): normal or not?
Tests of Normality
Kolmogorov-Smirnova
Statistic
Price_t – Price_(t-1)
a. Lilliefors Significance Correction
df
,072
Shapiro-Wilk
Sig.
253
Statistic
,003
df
,975
Sig.
253
,000
Stationarity
• Log(Price_at_day_t) – log(Price_at_day_(t-1)
Stationarity
• Price_at_day_t / Price_at_day_(t-1)
Net Returns of an investment
• Net return measures if an investment is profitable (without
dividents taken into consideration)
• Pt be the price of an asset at time t.
• Rt be the net return over the time period (t-1,t)
Pt  Pt 1
Pt
Rt 

1
Pt 1
Pt 1
• revenue= initial asset x net return
• Net return is a measure of relative revenue or profit (scale
free, but unit is per time interval)
Gross Returns of an investment
• Simple gross return of an asset at time t (over the last time
unit)
Pt
 1  Rt
Pt 1
• The gross return over the last k-time periods 1+ Rt(k)
1  Rt (k ) 
•
Pt
P P
P
 t  t 1  .... t k 1  1  Rt  1  Rt 1  ... 1  Rt k 1 
Pt k Pt 1 Pt 2
Pt k
t
Pt
1+Rt
1+Rt(2)
1+Rt(3)
1
67,3
2
65,1
0,967311
3
66,2
1,016897
0,983655
4
62,9
0,950151
0,966206
0,934621
5
63,35
1,007154
0,956949
0,973118
6
62,8
0,991318
0,99841
0,94864
Units are per time period
Log Returns of an investment
• Continously compounded return of an asset at time t (over
the last time unit), aka log returns
 Pt 
  log1  Rt 
rt  log
 Pt 1 
• The log return over the last k-time periods rt(k)
rt (k )  log1  Rt (k )  rt  rt 1  ... rt k 1
• Are the log returns of Nodea stocks normally distributed?
Skewness
Kurtosis
,191
,153
2,227
,305
• Normal distribution has Skewness=0 and Kurtosis 3
Returns Adjusted for Dividents
• Dt be the divident paid for an asset at time interval (t-1,t)
Pt  Dt
1 R 
Pt 1
'
t
Pt  Dt
R 
1
Pt 1
'
t
• Log returns
 Pt  Dt
rt  log
 Pt 1
'

  log 1  Rt'



Pt  Dt Pt 1  Dt 1
Pt  k 1  Dt  k 1
1  R (k ) 

 ....
Pt 1
Pt  2
Pt  k
'
t

 


 1  Rt'  1  Rt'1  ... 1  Rt' k 1

rt' (k )  log(1  Rt' (k ))  log(1  Rt' )  log(1  Rt'1 )  ...  log(1  Rt' k 1 )
Risk and Quantifying it
• Rt is net return of an asset at time interval (t-1,t)
• Often we don’t know it beforehand (at time t-1): we are at
risk, if we want to keep the asset !!
• The return is random: do we know the probabilities?
• There is an uncertainty about return
• Uncertainty can be measurable or unmeasurable
• Measuable uncertianty: obtaining a ”Spade” from a well–
shuffled pack of cards
• Unmeasurable uncertainty: predicting the chance of obtaining
a blue ball from a bag of balls whose colours and amounts
are not known
• Statistical inference can handle the situation: if it is allowed to
have a random sample of ball first
Prediction of Return
• Predicting the for next time periods is one of the biggest
probalems in finance, for example, option pricing
• If the past behaviour of return is better representation for the
future we may use past returns and other data for predicting
the future
• {R1, R2,....Rn} : sample of values (possibly time depedent) for
return
• If future returns are similar to past returns, a condition called
”stationarity” then predition of future can be ”easy”
Random Walk Models for Return
Independent and identically distributed normal model
• Rt is net return of an asset at time interval (t-1,t)
• Simplest may be: R1, R2, ... Returns are,
mutually independent, identically distributed: they have same
probability distribution at any time point, normally distributed
(with some mean and variance) that is, any return R~N(µ,σ2)
• Problems in this model,
R can be from negative infinity to positive infinity (loss cant be
less than the initial investment, i.e., Rt ≥1)
Net return Rt(k) of multi–period is not normal
(it involes products of Rt)
Random Walk Models for Return
Independent and identically distributed lognormal model
• rt=log(1+Rt) is log return of an asset at time interval (t-1,t)
• Simplest may be: r1, r2, ... Returns are,
mutually independent, identically distributed: they have same
probability distribution at any time point and normally
distributed (with some mean and variance)
that is, log return r~N(µ,σ2), meaning 1+R ~logNormal(µ,σ2)
• Earlier problems are solved: r can be from negative infinity to
positive infinity so is our log return
1+Rt =exp(rt) is positive, therefore Rt ≥1
log return rt(k) of multi–period is also normal
(it involes sum of many rt)
Log return of Nordea Stock Price
• rt=Log(Price_at_day_t) – log(Price_at_day_(t-1)
Log returns vs themselves (lag)
rt vs rt-1
rt vs rt-2
• Today’s log return does not depends on that of yeaterday’s
and that of the day’s before yeatersday
• Log returns can be stationary!
• Log return may be completely random: one probability
distribution can model them: predictions are expected values
Random Walk Models for Return
• Let we start by some value S0 at time 0
• Let we take steps Z1, Z2, ... that are i.i.d N(µ,σ2)
• Now, at time t ≥1, we are value
St = S0 + Z1 + Z2 + ...+ Zt
• Conditional mean E[St | S0 ] = S0 + µt
• Conditional variance var[St | S0 ] = σ2 t
• µ is called drift : decides general direction of the random walk
• σ2 is called volatility: decides how much fluctuation from
mean S0 + µt at time t.
• With 95% confidence it will be S0 + µt ± σ √t
Random Walk Models for Return
 Pt 
  log1  Rt (k ) 
rt (k )  log
 Pt  k 1 
 log(1  Rt )  log(1  Rt 1 )  ...  log(1  Rt  k 1 )
 rt  rt 1  ...  rt  k 1
log(Pt )  log(P0 )  rt  rt 1  .... r1
where rt=log(1+Rt)
Since r1, r2, ... that can be i.i.d N(µ,σ2) we can use the
random walk model for logarithmic of stock prices
Geometric Random Walk Model
 Pt 
  rt  rt 1  ...  rt  k 1
log
 Pt  k 1 
Pt  P0  exp(rt  rt 1  .... r1 )
where rt=log(1+Rt)
Since r1, r2, ... that can be i.i.d N(µ,σ2) we can use the
geometric random walk model for stock prices
Efficient Market Hypothesis
• As we gather evidence stock prices fluctuate like random
walks
• Properly ancipated stock prices fluctuate randomly (random
walk behaviour is due to efficent market):
Paul Samuel, 1965
• Price changes happen due to unancipated information and
since they are random, so do the prices
Beating the market?
• Purely by chance, som investors will do better than
others.
• Let’s assume that we have an efficient market where all
stocks are equally likely to increase or decrease in price.
Only me…
• I choose one stock randomly.
• Then, P(stock price increases for five consecutive days)
= (½)5 = 1/32
• Quite a small chance…
Many investors
• If instead 100 people choose one (different) stock
randomly.
• Then, P(the stock price increases for five consecutive
days for at least one person) =
1-P(no stock price increases for five consecutive days) =
1-(1-(1/32))100 = 0.9582
Who to follow?
• Almost certainly, at least one person will buy a randomly
selected stock that increases for five consecutive days,
thus beating the market.
• The trick is to know who will be the lucky one…