Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Skewness adjusted t-test

    Dear all,

    I'm required to do a skewness adjusted t-test on stock return data. I have daily log returns for 952 firms over a period of 488 trading days.
    The skewness is -1.75 found using:
    Code:
    sum r, detail
    I installed the skewt package, which gave me the outcome:
    Code:
    . skewt tbhar
    (463,624 observations deleted)
    
        tbhar- stats from the sample
    
        N coefficient  = 30.85449724108302
        S-coefficient  = -.0645222099403743
        G-coefficient  = -.4476181276901068
        Sample mean    = -.0069934897938696
    but I'm unsure on how to proceed.

    Normally I would have calculated the ttest using:
    Code:
    ttest tbhar==0
    Which gives me the mean, st error, st dev, t-stat, and probability, as shown below.

    Code:
    ttest tbhar==0
    
    One-sample t test
            
    Variable      Obs        Mean    Std. Err.   Std. Dev.    [95% Conf. Interval]
            
    tbhar      952   -.0069935    .0035129    .1083889    -.0138874   -.0000996
            
    mean = mean(tbhar)        t =  -1.9908
    Ho: mean = 0    degrees    of freedom =      951
    
    Ha: mean < 0    Ha: mean != 0    Ha: mean > 0
    Pr(T < t) = 0.0234         Pr(T > t) = 0.0468    Pr(T > t) = 0.9766
    I hope someone can help me with the next step after the skewt test.

    Edit:
    If I run:
    Code:
     hallt tbhar, bs reps(100) size(2) saving ("X:\My Documents\final bs.dta")
    (Basically copying the example in the help file)

    I get:

    Code:
    . hallt tbhar, bs reps(100) size(2) saving ("X:\My Documents\final bs.dta")
    (463,624 observations deleted)
    
        tbhar- stats from the sample
    
        N coefficient  = 30.85449724108302
        S-coefficient  = -.0645222099403743
        G-coefficient  = -.4476181276901068
        Sample mean    = -.0069934897938696
    
    (running hallt on estimation sample)
    
    Warning:  Because hallt is not an estimation command or does not set e(sample),
              bootstrap has no way to determine which observations are used in
              calculating the statistics and so assumes that all observations are
              used.  This means that no observations will be excluded from the
              resampling because of missing values or other reasons.
    
              If the assumption is not true, press Break, save the data, and drop
              the observations that are to be excluded.  Be sure that the dataset in
              memory contains only the relevant data.
    
    Bootstrap replications (100)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    ..................................................    50
    ..................................................   100
    
    Bootstrap results                               Number of obs     =        952
                                                    Replications      =        100
    
          command:  hallt tbhar
            _bs_1:  r(ratio_tbhar)
    
    ------------------------------------------------------------------------------
                 |   Observed   Bootstrap                         Normal-based
                 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _bs_1 |  -2.012445   1.042519    -1.93   0.054    -4.055744    .0308536
    ------------------------------------------------------------------------------
    
    .
    But I'm not sure how to interpret this.
    Last edited by Tess Lankhorst; 02 Jan 2018, 11:44.

  • #2
    Originally posted by Tess Lankhorst View Post
    Normally I would have calculated the ttest using:
    Code:
    ttest tbhar==0
    skewt and hallt seem to be user-written commands. You've seen their help files, and so maybe you can answer a question for me: if your null hypothesis is that the mean of tbhar is zero, then what's the advantage of this skewness adjusted t-test that you're required to do over just bootstrapping the mean using the official Stata command bootstrap, and seeing whether the (say, percentile) confidence interval includes zero?
    Code:
    set seed `=strreverse("1424177")'
    bootstrap mean = r(mean), reps(10000) nodots nowarn: summarize tbhar, meanonly
    estat bootstrap, all
    By the way, you say that the coefficient of skewness for variable r is -1.75? What is it for tbhar?

    Comment


    • #3
      Thank you for your reply Joseph Coveney

      I'm following Barber, Lyon & Tsai (1999) "Improved methods for tests of long-run abnormal stock returns" where they state adjusting for skewness is important as it is almost always present in stock returns.
      I did a skewness test on tbhar as you asked, and here are the results:

      Code:
      sktest tbhar
       
                          Skewness/Kurtosis tests for Normality
                                                                ------ joint ------
          Variable |        Obs  Pr(Skewness)  Pr(Kurtosis) adj chi2(2)   Prob>chi2
      -------------+---------------------------------------------------------------
             tbhar |        952     0.0000        0.0000       62.86         0.0000
      I realised I should have used a panel data test for skewness, and performed those on r and tbhar as well:

      Code:
      xtsktest r
      (running _xtsktest_calculations on estimation sample)
       
      Bootstrap replications (50)
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
      ..................................................    50
       
      Tests for skewness and kurtosis                 Number of obs     =    463,623
                                                      Replications      =         50
       
                                     (Replications based on 952 clusters in firm_id)
      ------------------------------------------------------------------------------
                   |   Observed   Bootstrap                         Normal-based
                   |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
        Skewness_e |  -.0000101   2.63e-06    -3.86   0.000    -.0000153   -4.99e-06
        Kurtosis_e |   7.68e-06   2.57e-06     2.99   0.003     2.65e-06    .0000127
        Skewness_u |   1.32e-10   1.21e-10     1.08   0.279    -1.06e-10    3.69e-10
        Kurtosis_u |   1.12e-12   4.85e-13     2.30   0.021     1.67e-13    2.07e-12
      ------------------------------------------------------------------------------
      Joint test for Normality on e:        chi2(2) =  23.83    Prob > chi2 = 0.0000
      Joint test for Normality on u:        chi2(2) =   6.48    Prob > chi2 = 0.0391
      ------------------------------------------------------------------------------
      
      xtsktest tbhar
      (running _xtsktest_calculations on estimation sample)
       
      Bootstrap replications (50)
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
      ..................................................    50
       
      Tests for skewness and kurtosis                 Number of obs     =        952
                                                      Replications      =         50
       
                                     (Replications based on 952 clusters in firm_id)
      ------------------------------------------------------------------------------
                   |   Observed   Bootstrap                         Normal-based
                   |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
        Skewness_e |          0  (omitted)
        Kurtosis_e |          0  (omitted)
        Skewness_u |  -.0005691   .0002607    -2.18   0.029    -.0010801    -.000058
        Kurtosis_u |   .0002814   .0001171     2.40   0.016     .0000518     .000511
      ------------------------------------------------------------------------------
      Joint test for Normality on e:        chi2(2) =      .    Prob > chi2 =     .
      Joint test for Normality on u:        chi2(2) =  10.53    Prob > chi2 = 0.0052
      ------------------------------------------------------------------------------
      tbhar is calculated using:
      Code:
      by firm_id: egen bh_r=total(ln(bhar_r)) if evt_window==1
      replace bh_r=exp(bh_r)
       
      by firm_id: egen bh_er=total(ln(bhar_er)) if evt_window==1
      replace bh_er=exp(bh_er)
       
      by firm_id: gen tbhar=bh_r-bh_er if dif==30
      Where I calculate the product of the stock returns by firm_id, minus the product of the expected stock return by firm_id to come to the buy-and-hold abnormal return.

      I'm a complete beginner unfortunately and don't know what seed means, nor how bootstrapping works and how to implement it.

      May I ask how you came to the numbers for seed and reps in the code above?

      I modified the code above by setting reps to 50. The original code still was not finished running after 2.5 hours (I'm using StataSE 15)

      This is the result:

      Code:
       set seed `=strreverse("1424177")'
      
      .
      . bootstrap mean = r(mean), reps(50) nodots nowarn: summarize tbhar, meanonly
      
      Bootstrap results                               Number of obs     =    464,576
                                                      Replications      =         50
      
            command:  summarize tbhar, meanonly
               mean:  r(mean)
      
      ------------------------------------------------------------------------------
                   |   Observed   Bootstrap                         Normal-based
                   |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
              mean |  -.0069935   .0035682    -1.96   0.050    -.0139871    1.27e-07
      ------------------------------------------------------------------------------
      
      .
      . estat bootstrap, all
      
      Bootstrap results                               Number of obs     =    464,576
                                                      Replications      =         50
      
            command:  summarize tbhar, meanonly
               mean:  r(mean)
      
      ------------------------------------------------------------------------------
                   |    Observed               Bootstrap
                   |       Coef.       Bias    Std. Err.  [95% Conf. Interval]
      -------------+----------------------------------------------------------------
              mean |  -.00699349  -.0006302   .00356824   -.0139871   1.27e-07   (N)
                   |                                       -.015593  -.0018913   (P)
                   |                                       -.015593  -.0018913  (BC)
      ------------------------------------------------------------------------------
      (N)    normal confidence interval
      (P)    percentile confidence interval
      (BC)   bias-corrected confidence interval
      
      .
      But, as mentioned before, I'm not sure how to interpret this or what to do with it.

      Comment


      • #4
        I guess a question I had was with an N of 952 (independent?) firms, won't the CLT take care of skewness carrying over into the t-statistic?

        Comment


        • #5
          The firms are listed firms on the UK market and firms in the Euro Stoxx 600, I'm not sure as to what CLT means?

          Comment


          • #6
            Sorry, central limit theorem. The sampling distribution of the mean from a skewed population distribution tends to a normal a N gets larger, say N > 100. Doing a t-test on smaller skewed samples certainly does result in shifted t-statistics and confidence limits, but depending on amount of skewness, the CLT should lead to not having to worry about using the t-test versus skewness adjusted t-test.

            https://en.wikipedia.org/wiki/Central_limit_theorem

            Comment


            • #7
              I am not familiar with the user-written software you are using; however, many years ago, I did publish (in the STB) a couple of alternative just for skew data; go to:

              https://www.stata.com/bookstore/indi...lletin-issues/

              and download (free) STB-26 and STB-28; look for articles by me; I have not used any of these in many years so don't know whether they will work under your version of Stata (but they may work with the -version- command)

              Comment


              • #8
                Originally posted by Tess Lankhorst View Post
                I did a skewness test on tbhar as you asked
                I didn't ask for a skewness test. I asked what the coefficient of skewness is. From the results of whatever command you're using, it looks like the coefficient of skewness is 0.00, assuming that you're using the command correctly and that I'm interpreting "Observed Coef." correctly. Maybe you could just take that back to whoever is requiring a skewness adjusted t-test.
                Last edited by Joseph Coveney; 03 Jan 2018, 22:23.

                Comment


                • #9
                  Seems as if this question has come up on the list before, at least once. See the thread starting at this post. It may be that the method in Rich Goldstein's johnson command is the same as what has become popular in the finance community. Toward David Airey's point, Stas Kolenikov's response to a related question on CrossValidated may be relevant, too.

                  Comment


                  • #10
                    Dear @Tess Lankhorst
                    I am also working on BHARs and need to do skewness adjusted t-test of BHARs. As you have worked on this, can you please guide me on how to perform this test in stata.
                    Your guidance will be highly appreciated.

                    Comment


                    • #11
                      Tess Lankhorst hasn't visited since 10 Jan 2018. Tess asked the question and others gave good answers, so why in effect go back to #1?

                      Comment


                      • #12
                        Agreed. I should have asked this question in general and not to a specific person.

                        Comment


                        • #13
                          My point is not that you directed your question to the OP; it's that there are good answers to the question already.

                          Comment

                          Working...
                          X