Applied Statistics III
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Applied Statistics III

  • 340 views
Uploaded on

Third Session, MSc 4th Year

Third Session, MSc 4th Year

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
340
On Slideshare
339
From Embeds
1
Number of Embeds
1

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 1

http://www.docshut.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ESGF 4IFM Q1 2012 Applied StatisticsVincent JEANNIN – ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 1
  • 2. ESGF 4IFM Q1 2012Summary of the session (est. 4.5h)• Reminders of last session• Multiple regression• Introduction to econometrics vinzjeannin@hotmail.com• Estimations• Games: beat the statistics 2
  • 3. Reminders of last session ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com3 Methods • Historical • Parametrical • Monte-Carlo 3
  • 4. Options: what to look at to calculate the VaR? ESGF 4IFM Q1 2012 4 risk factors: • Underlying price • Interest rate • Volatility • Time vinzjeannin@hotmail.com 4 answers: • Delta/Gamma approximation knowing the distribution of the underlying • Rho approximation knowing the distribution of the underlying rate • Vega approximation knowing the distribution of implied volatility • Theta (time decay)Yes but,… Does the underling price/rate/volatility vary independently? 4 Might be a bit more complicated than expected…
  • 5. Portfolio scale: what to look at to calculate the VaR? ESGF 4IFM Q1 2012 Big question, is the VaR additive? vinzjeannin@hotmail.com NO! Keywords for the future: covariance, correlation, diversification 5
  • 6. Parametric VaR on 2 assets? VAR + = 2 + 2 + 2(, ) ESGF 4IFM Q1 2012 ≤ −1.645 ∗ + = 0.05 ≤ −2.326 ∗ + = 0.01 vinzjeannin@hotmail.com Asset 1 Asset 2 Mean 0 Mean 0 Correlation 0.59 SD 2.34% SD 1.50%Weight 50% Weight 50% What is the VaR (95%)? 6 2.83%
  • 7. OLS: Ordinary Least Square Linear regression model Minimize the sum of the square vertical distances between the observations and the linear ESGF 5IFM Q1 2012 approximation = = + vinzjeannin@hotmail.com Residual εMinimising residuals = 2 = 2 = − + 2 7 =1 =1 = −
  • 8. ESGF 5IFM Q1 2012 = Value between -1 and 1 vinzjeannin@hotmail.com Dispersion Regression 2 = Total Dispersion 8
  • 9. vinzjeannin@hotmail.com ESGF 5IFM Q1 20129
  • 10. vinzjeannin@hotmail.com ESGF 5IFM Q1 201210
  • 11. Differentiation can happen before the OLS ESGF 5IFM Q1 2012 vinzjeannin@hotmail.com 11What do you suggest?
  • 12. Let’s create a new variable = ln⁡ ) ( ESGF 5IFM Q1 2012 vinzjeannin@hotmail.com Magic! 12
  • 13. New idea… No intercept Only one parameters to estimate: ESGF 5IFM Q1 2012 • Slope βMinimising residuals vinzjeannin@hotmail.com = 2 = − 2 =1 =1 When E is minimal? When partial derivatives i.r.w. a is 0 13
  • 14. = 2 = − 2 =1 =1 Quick high school reminder if necessary… ESGF 5IFM Q1 2012 − 2 = 2 − 2 + 2 2 vinzjeannin@hotmail.com = −2 + 2 2 = 0 =1 =1 − 2 = 0 = 2 =1 =1 ∗ =2 = 2 =1 =1 14 Any better?
  • 15. Multiple regressions ESGF 4IFM Q1 2012 More than one explanatory variables = 0 + 1 1 +2 2 +…+ + ε vinzjeannin@hotmail.com Choosing factors can be difficult Much tougher without software 15
  • 16. Variables may not be dependent form each other ESGF 4IFM Q1 2012 Financial methods such APT (Arbitrage Pricing Theory) tries to have pure and independent factors vinzjeannin@hotmail.comUsed a lot in economicsR-Square is very often very poor 16
  • 17. Ratio Investment / GDP , World Bank, developing countries = 19.5−5.8 + 6.3 + 2ℎ − 1.1 − 2 ESGF 4IFM Q1 2012 Let’s discuss… vinzjeannin@hotmail.com • Corruption: current corruption • CorruptionPrediction: future corruption • School: level of education • GDP: GDP • Distortion: how badly policies are run 17
  • 18. Opposite effect of corruption variables Any logic with this? ESGF 4IFM Q1 2012 The current level of corruption decreases investment vinzjeannin@hotmail.com The future level of corruption increases investmentInvestors learn how to live with corruption… 18
  • 19. R-Squared is 0.24, very poor… ESGF 4IFM Q1 2012 How to find the right model? vinzjeannin@hotmail.com• General to specific: this starts off with a comprehensive model, including all the likely explanatory variables, then simplifies it.• Specific to general: this begins with a simple model that is easy to understand, then explanatory variables are added to improve the model’s explanatory power. 19
  • 20. Golden rules ESGF 4IFM Q1 2012 Be logic vinzjeannin@hotmail.com Have the best R-Squared Not over complicate 20
  • 21. Introduction to econometrics What is a model? = + with being a white noise ESGF 4IFM Q1 2012 3 steps vinzjeannin@hotmail.com Identify Fit Forecast 21
  • 22. 3 components Trend Residual Seasonality vinzjeannin@hotmail.com ESGF 4IFM Q1 201222
  • 23. Stationary series are easier to forecast… Transform it! ESGF 4IFM Q1 2012A series is stationary if the mean and the variance are stableWhich one is more likely to be stationary? vinzjeannin@hotmail.com 23
  • 24. Properties of stationary series Same distribution of the following ESGF 4IFM Q1 2012 (1 , 2 , 3 , … , ) (2 , 3 , 4 , … , +1 ) Distribution not time dependent vinzjeannin@hotmail.com Rare occurrence Stationarity accepted if ( ) = Constant in the time 24 ( , − ) Depends only on n
  • 25. About the residuals… White noise! ESGF 4IFM Q1 2012Normality test vinzjeannin@hotmail.com Have an idea with Skewness Kurtosis Proper tests: KS, Durbin Watson, Portmanteau,… 25
  • 26. eps<-resid(TReg)ks.test(eps, "pnorm")layout(matrix(1:4,2,2))plot(TReg) ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 26
  • 27. lag.plot(DATA$Val, 9, do.lines=FALSE) ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 27Differentiation seems to be interesting
  • 28. Check ACF/PACF for autocorrelation vinzjeannin@hotmail.com ESGF 5IFM Q1 2012 28
  • 29. = + 1 −1 + 2 −2 + ⋯ + − + ESGF 5IFM Q1 2012 Parameters of the model White noise vinzjeannin@hotmail.com Auto Regressive model AR(n) 29
  • 30. Estimations ESGF 4IFM Q1 2012 Small sample: Binomial Distribution n! = f ( x)  p x (1  p) ( n x ) x!(n  x)! = (1 − ) vinzjeannin@hotmail.com Large sample: Normal Distribution  np () N , np p 1 n is the size of the sample, x, the number individuals with the particular characteristic 30
  • 31. Estimate a proportion = Binomial Distribution (1 − ) = = ESGF 4IFM Q1 2012 Normal approximation (1 − ) vinzjeannin@hotmail.com~ , Standardisation possible − ∗ = (1 − ) ∗ ~ 0,1Normal approximation works only if 31 ≥ 5 (1 − ) ≥ 5
  • 32. Let’s look for p with a 95% confidence interval 1 < < 2 = 0.95 ESGF 4IFM Q1 2012 Easy solve! vinzjeannin@hotmail.com 32 − 1.96 ∗ ≤ ≤ + 1.96 ∗ = 0.95
  • 33. 52 Heads out of 100 toss…~ ? , ?~ 0.52,0.04996 ESGF 4IFM Q1 201295% confidence interval vinzjeannin@hotmail.com1 = 0.622 = 0.42 33
  • 34. Mean estimationProblem ESGF 4IFM Q1 2012 The SD of the actual population is unknown vinzjeannin@hotmail.com Mean has a Student’s distribution Similarity with normal 34
  • 35. Student’s properties• It is symmetric about its mean• It has a mean of zero• It has a standard deviation and variance greater than 1. ESGF 4IFM Q1 2012• There are actually many t distributions, one for each degree of freedom• As the sample size increases, the t distribution approaches the normal distribution.• It is bell shaped.• The t-scores can be negative or positive, but the probabilities are always positive. vinzjeannin@hotmail.com 35 Normal-ish distribution in a discrete environment with a confidence interval
  • 36. Student’s Statistic S= −1 ESGF 4IFM Q1 2012 − ∗ /2 < < + ∗ /2 = 0.95 vinzjeannin@hotmail.com Degree of freedom n-1 36
  • 37. IPO Premiums IPO1 / 12% IPO2 / 15% IPO3 / 13% IPO4 / 18% ESGF 4IFM Q1 2012 IPO5 / 20% IPO6 / 5% : =13.83% SD: =4.81% vinzjeannin@hotmail.com DF: =5 S: =5.27% t: =2.571 37 1 : 1 =19.36% 2 : 2 =8.30%
  • 38. Is a frequency difference significant? 1 (1 − 1 ) 2 (1 − 2 )1 ~ 1 , 2 ~ 2 , ESGF 4IFM Q1 2012 1 2 = 1 − 2 vinzjeannin@hotmail.com () ⁡ = (1 ) − E(2 ) () ⁡ = (1 ) + V(2 ) Assumption of independence 1 (1 − 1 ) 2 (1 − 2 ) ~ 1 − 2 , + 38 1 2
  • 39. Observations100 Friendly Takeover, 80 success60 Hostiles Takeover, 50 success ESGF 4IFM Q1 2012 Is the difference significant? 95% confidence Friendly 80% Hostiles 83% vinzjeannin@hotmail.com Global frequency 1 1 + 2 2 80 + 50 = = = 81.25% 1 +2 100 + 60 39
  • 40. 1 − 2 ∗ = ∗ = −0.52298 1 1 (1 − ) + 1 2 ESGF 4IFM Q1 2012 If (−1.96 < ∗ < 1.96) = 0.95⁡the frequencies are the same with a 95% confidence interval vinzjeannin@hotmail.com The frequencies are equal Their difference is not significant Actual difference due to fluctuation of samples 40
  • 41. Is a SD difference significant? 2 Total variance 2 Sample variance 2 2 ESGF 4IFM Q1 2012 Total variance Sample variance Fisher Snedecor distribution vinzjeannin@hotmail.com 2 2 ∗ ~( − 1, − 1) 2 2 41
  • 42. You want to test 2 = 2 2 2 ~( − 1, − 1) ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 42
  • 43. 2 2 ~(5,4) vinzjeannin@hotmail.com ESGF 4IFM Q1 201243
  • 44. 95% confidence interval F-Table ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 2If < 6.26 SD are equals (at 95% CI) 44 2
  • 45. Games: Beat the Statistics ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com Is Martingale safe? Bet on 2:1, double when you lose… 45 Risk of ruin?
  • 46. Bet on 2:1 18 ESGF 4IFM Q1 2012 Is this really 2:1? = 0.4865 37 Obvious how casino is making money! vinzjeannin@hotmail.comThe probability of the casino to win is always bigger than theprobability of the player to win! 46
  • 47. You’ll be right with a martingale… Eventually! But when?The 2011 recorded record series is 26 reds in Las Vegas, Nevada ESGF 4IFM Q1 2012You were on the black and hoping the reversal, you begun with $2 At the 27 round you need 227 = $134,217,728 vinzjeannin@hotmail.com And don’t forget you lost already 21 + 22 + ⋯ + 226 = $134,217,726 Casino limit stakes Your pocket may not be deep enough anyway! And if you win at the 27th roll, you made… 47 $2 Quite risky…
  • 48. ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com“No one can possibly win at roulette unless he steals money from the table while the croupier isn’t looking.” — Albert Einstein 48
  • 49. Binomial approach = (1 − )− ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 49
  • 50. $255, $1 flat bet$255, $1 start, martingale double when you lose ESGF 4IFM Q1 2012Ruin in 255 times for flat betRuin in 8 times for martingale vinzjeannin@hotmail.com 1,000,000 times comparison, 100 rounds maximum 50
  • 51. Conclusion ESGF 5IFM Q1 2012 Multiple Regression Econometrics vinzjeannin@hotmail.com Estimations Statistics & Games 51