ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
ESGF 4IFM Q1 2012
    Applied Statistics
Vincent JEANNIN ¨C ESGF 4IFM
          Q1 2012




                              vinzjeannin@hotmail.com
                                    1
ESGF 4IFM Q1 2012
Summary of the session (est. 4.5h)

?   Reminders of last session
?   Multiple regression
?   Introduction to econometrics




                                     vinzjeannin@hotmail.com
?   Estimations
?   Games: beat the statistics




                                           2
Reminders of last session




                            ESGF 4IFM Q1 2012
                            vinzjeannin@hotmail.com
3 Methods

       ? Historical
       ? Parametrical
       ? Monte-Carlo

                                  3
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¡­
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
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%
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
                                                               ?????? = ?????? ? ????????????
ESGF 5IFM Q1 2012
       ??????????????????????????????
?????? =                        Value between -1 and 1
        ???????????? ????????????




                                                     vinzjeannin@hotmail.com
                    Dispersion Regression
            ??????2 =
                       Total Dispersion




                                                           8
vinzjeannin@hotmail.com   ESGF 5IFM Q1 2012
9
vinzjeannin@hotmail.com   ESGF 5IFM Q1 2012
10
Differentiation can happen before the OLS




                                            ESGF 5IFM Q1 2012
                                            vinzjeannin@hotmail.com
                                            11
What do you suggest?
Let¡¯s create a new variable


 ?????????????????????????????? = ln? ??????)
                (




                                       ESGF 5IFM Q1 2012
                                       vinzjeannin@hotmail.com
                              Magic!




                                       12
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
??????                  ??????

?????? =           ???????????? 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?
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
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.com
Used a lot in economics




R-Square is very often very poor
                                                                   16
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
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 investment




Investors learn how to live with corruption¡­

                                                                 18
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
Golden rules




                              ESGF 4IFM Q1 2012
    Be logic




                              vinzjeannin@hotmail.com
    Have the best R-Squared


    Not over complicate




                              20
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
3 components




                              Trend




     Residual
                Seasonality




       vinzjeannin@hotmail.com        ESGF 4IFM Q1 2012
22
Stationary series are easier to forecast¡­ Transform it!




                                                                 ESGF 4IFM Q1 2012
A series is stationary if the mean and the variance are stable


Which one is more likely to be stationary?




                                                                 vinzjeannin@hotmail.com
                                                                 23
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
About the residuals¡­


        White noise!




                                                       ESGF 4IFM Q1 2012
Normality test




                                                       vinzjeannin@hotmail.com
     Have an idea with

           Skewness

           Kurtosis


      Proper tests: KS, Durbin Watson, Portmanteau,¡­
                                                       25
eps<-resid(TReg)
ks.test(eps, "pnorm")
layout(matrix(1:4,2,2))
plot(TReg)




                          ESGF 4IFM Q1 2012
                          vinzjeannin@hotmail.com
                          26
lag.plot(DATA$Val, 9, do.lines=FALSE)




                                            ESGF 4IFM Q1 2012
                                            vinzjeannin@hotmail.com
                                            27
Differentiation seems to be interesting
Check ACF/PACF for autocorrelation




                                     vinzjeannin@hotmail.com   ESGF 5IFM Q1 2012
         28
???????????? = ?????? + ??????1 ?????????????1 + ??????2 ?????????????2 + ? + ???????????? ??????????????????? + ????????????




                                                                     ESGF 5IFM Q1 2012
???????????? Parameters of the model
???????????? White noise




                                                                     vinzjeannin@hotmail.com
   Auto Regressive model


   AR(n)

                                                                     29
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
Estimate a proportion          ??????
                        ?????? =
                               ??????

Binomial Distribution

                        ??????(1 ? ??????)
?????? ?????? = ??????      ?????? ?????? =




                                                                ESGF 4IFM Q1 2012
                            ??????

Normal approximation


          ??????(1 ? ??????)




                                                                vinzjeannin@hotmail.com
??????~?????? ??????,                            Standardisation possible
              ??????
                                                ?????? ? ??????
                                       ?????? ? =
                                                ??????(1 ? ??????)
                                                    ??????

                                       ?????? ? ~?????? 0,1



Normal approximation works only if                              31

???????????? ¡Ý 5     ??????(1 ? ??????) ¡Ý 5
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
52 Heads out of 100 toss¡­

??????~?????? ? , ?

??????~?????? 0.52,0.04996




                            ESGF 4IFM Q1 2012
95% confidence interval




                            vinzjeannin@hotmail.com
??????1 = 0.62


??????2 = 0.42




                            33
Mean estimation



Problem




                                                   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
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
Student¡¯s Statistic

             ??????
     S=         ??????
           ???????1




                                                       ESGF 4IFM Q1 2012
        ??????                       ??????
?????? ?????? ?     ? ????????????/2 < ?????? < ?????? +     ? ????????????/2 = 0.95
         ??????                       ??????




                                                       vinzjeannin@hotmail.com
             Degree of freedom


                     n-1




                                                       36
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%
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
Observations
100 Friendly Takeover, 80 success
60 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
??????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
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
You want to test           ???????????? 2 = ???????????? 2

      ???????????? 2
             2 ~??????(????????????   ? 1, ???????????? ? 1)
      ????????????




                                             ESGF 4IFM Q1 2012
                                             vinzjeannin@hotmail.com
                                             42
???????????? 2
     ???????????? 2
        ~??????(5,4)




                   vinzjeannin@hotmail.com   ESGF 4IFM Q1 2012
43
95% confidence interval F-Table




                                                     ESGF 4IFM Q1 2012
                                                     vinzjeannin@hotmail.com
     ???????????? 2
If              < 6.26   SD are equals (at 95% CI)   44
            2
     ????????????
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?
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.com
The probability of the casino to win is always bigger than the
probability of the player to win!




                                                                 46
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 2012
You 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¡­
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
Binomial approach


?????? ?????? = ???????????? ?????? ?????? ?????? (1 ? ??????)?????????????




                                      ESGF 4IFM Q1 2012
                                      vinzjeannin@hotmail.com
                                      49
$255, $1 flat bet


$255, $1 start, martingale double when you lose




                                                        ESGF 4IFM Q1 2012
Ruin in 255 times for flat bet

Ruin in 8 times for martingale




                                                        vinzjeannin@hotmail.com
       1,000,000 times comparison, 100 rounds maximum




                                                        50
Conclusion




                               ESGF 5IFM Q1 2012
         Multiple Regression

         Econometrics




                               vinzjeannin@hotmail.com
         Estimations

         Statistics & Games




                               51

More Related Content

Applied Statistics III

  • 1. ESGF 4IFM Q1 2012 Applied Statistics Vincent JEANNIN ¨C ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 1
  • 2. ESGF 4IFM Q1 2012 Summary 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.com 3 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 2012 9
  • 10. vinzjeannin@hotmail.com ESGF 5IFM Q1 2012 10
  • 11. Differentiation can happen before the OLS ESGF 5IFM Q1 2012 vinzjeannin@hotmail.com 11 What 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.com Used a lot in economics R-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 investment Investors 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 2012 22
  • 23. Stationary series are easier to forecast¡­ Transform it! ESGF 4IFM Q1 2012 A series is stationary if the mean and the variance are stable Which 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 2012 Normality test vinzjeannin@hotmail.com Have an idea with Skewness Kurtosis Proper tests: KS, Durbin Watson, Portmanteau,¡­ 25
  • 27. lag.plot(DATA$Val, 9, do.lines=FALSE) ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com 27 Differentiation 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,1 Normal 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 2012 95% confidence interval vinzjeannin@hotmail.com ??????1 = 0.62 ??????2 = 0.42 33
  • 34. Mean estimation Problem 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. Observations 100 Friendly Takeover, 80 success 60 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 2012 43
  • 44. 95% confidence interval F-Table ESGF 4IFM Q1 2012 vinzjeannin@hotmail.com ???????????? 2 If < 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.com The probability of the casino to win is always bigger than the probability 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 2012 You 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 2012 Ruin in 255 times for flat bet Ruin 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