Announcement

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

  • Adjusted R Square Score Too High from High Frequency Data Analysis of Foreign Exchange

    Hi all,

    I need your help. I'm really new to Stata and still learning about them every day. Currently, I'm researching the impact of invasion on currency exchange.
    My data are hourly exchanges rate (during 6 weeks) between country A against 10 other countries (C). I ran the regression using country A against country 10 as the benchmark (I assume right here is FE).
    Using the time of the invasion as a comparison point, I tried to give the value (T) after the invasion as 1 and before that 0.

    Click image for larger version

Name:	formula.jpg
Views:	1
Size:	3.6 KB
ID:	1664905



    Basically, it's like the above equation.

    However, I notice that the adjusted R squared is 1, which after further searching seems like a sign of a mistake?
    I also tried to introduce another T (snct_t), but still, the adjusted R sq is 0.9999.

    Any idea what I did wrong? I'm very open to any suggestions.
    I also attached my data.


    Code:
    . 
    . use "eurvsall.dta"
    
    . 
    . gen inv_t=.
    inv_t already defined
    r(110);
    
    . 
    . replace inv_t=0 if t<0
    (0 real changes made)
    
    . 
    . replace inv_t=1 if t>=0
    (0 real changes made)
    
    . 
    . reg lnclose ib(last).exccode i.inv_t* ib(last).exccode#i.inv_t*, allbaselevels
    
          Source |       SS       df       MS              Number of obs =    7209
    -------------+------------------------------           F( 19,  7189) =       .
           Model |  17561.4091    19  924.284687           Prob > F      =  0.0000
        Residual |  .728934986  7189  .000101396           R-squared     =  1.0000
    -------------+------------------------------           Adj R-squared =  1.0000
           Total |   17562.138  7208  2.43647863           Root MSE      =  .01007
    
    -------------------------------------------------------------------------------
          lnclose |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
          exccode |
               1  |   .3336737   .0007505   444.58   0.000     .3322024     .335145
               2  |   .2401552   .0007505   319.98   0.000      .238684    .2416265
               3  |  -.0806226   .0007505  -107.42   0.000    -.0820938   -.0791513
               4  |  -.3050372   .0007505  -406.42   0.000    -.3065085   -.3035659
               5  |   4.747329   .0007505  6325.22   0.000     4.745858      4.7488
               6  |   2.181358   .0007505  2906.38   0.000     2.179886    2.182829
               7  |   .4045504   .0007505   539.01   0.000     .4030792    .4060217
               8  |   2.225673   .0007505  2965.43   0.000     2.224202    2.227144
               9  |   2.610229   .0007505  3477.80   0.000     2.608757      2.6117
              10  |          0  (base)
                  |
            inv_t |
               0  |          0  (base)
               1  |  -.0301065     .00075   -40.14   0.000    -.0315767   -.0286362
                  |
    exccode#inv_t |
             1 0  |          0  (base)
             1 1  |  -.0153364   .0010607   -14.46   0.000    -.0174156   -.0132571
             2 0  |          0  (base)
             2 1  |   .0033236   .0010607     3.13   0.002     .0012443    .0054029
             3 0  |          0  (base)
             3 1  |   .0047335   .0010607     4.46   0.000     .0026542    .0068127
             4 0  |          0  (base)
             4 1  |   .0256508   .0010607    24.18   0.000     .0235715      .02773
             5 0  |          0  (base)
             5 1  |   .0069297   .0010607     6.53   0.000     .0048504    .0090089
             6 0  |          0  (base)
             6 1  |   .0093034   .0010607     8.77   0.000     .0072242    .0113827
             7 0  |          0  (base)
             7 1  |  -.0175084   .0010607   -16.51   0.000    -.0195877   -.0154292
             8 0  |          0  (base)
             8 1  |   .0436059   .0010611    41.10   0.000     .0415259    .0456859
             9 0  |          0  (base)
             9 1  |   .0545844   .0010607    51.46   0.000     .0525052    .0566637
            10 0  |          0  (base)
            10 1  |          0  (base)
                  |
            _cons |   .1289188   .0005307   242.92   0.000     .1278784    .1299591
    -------------------------------------------------------------------------------
    
    . 
    . gen sctn_t=.
    (7209 missing values generated)
    
    . 
    . replace sctn_t=0 if t<197
    (5090 real changes made)
    
    . 
    . replace sctn_t=1 if t>=197
    (2119 real changes made)
    
    . 
    . reg lnclose ib(last).exccode i.sctn_t* ib(last).exccode#i.sctn_t*, allbaselevels
    
          Source |       SS       df       MS              Number of obs =    7209
    -------------+------------------------------           F( 19,  7189) =       .
           Model |  17561.2197    19  924.274721           Prob > F      =  0.0000
        Residual |   .91828366  7189  .000127735           R-squared     =  0.9999
    -------------+------------------------------           Adj R-squared =  0.9999
           Total |   17562.138  7208  2.43647863           Root MSE      =   .0113
    
    --------------------------------------------------------------------------------
           lnclose |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ---------------+----------------------------------------------------------------
           exccode |
                1  |   .3303384   .0007085   466.28   0.000     .3289496    .3317272
                2  |   .2403139   .0007085   339.21   0.000     .2389252    .2417027
                3  |  -.0810414   .0007085  -114.39   0.000    -.0824301   -.0796526
                4  |  -.3010054   .0007085  -424.88   0.000    -.3023942   -.2996166
                5  |   4.747368   .0007085  6701.05   0.000     4.745979    4.748757
                6  |   2.182675   .0007085  3080.91   0.000     2.181286    2.184064
                7  |   .4012244   .0007085   566.34   0.000     .3998357    .4026132
                8  |   2.235704   .0007085  3155.76   0.000     2.234315    2.237092
                9  |   2.618945   .0007085  3696.72   0.000     2.617556    2.620334
               10  |          0  (base)
                   |
            sctn_t |
                0  |          0  (base)
                1  |  -.0318213   .0009238   -34.44   0.000    -.0336323   -.0300103
                   |
    exccode#sctn_t |
              1 0  |          0  (base)
              1 1  |  -.0147721   .0013065   -11.31   0.000    -.0173333    -.012211
              2 0  |          0  (base)
              2 1  |   .0051198   .0013065     3.92   0.000     .0025587    .0076809
              3 0  |          0  (base)
              3 1  |   .0094846   .0013065     7.26   0.000     .0069235    .0120457
              4 0  |          0  (base)
              4 1  |   .0299669   .0013065    22.94   0.000     .0274058    .0325281
              5 0  |          0  (base)
              5 1  |   .0116661   .0013065     8.93   0.000      .009105    .0142273
              6 0  |          0  (base)
              6 1  |   .0113628   .0013065     8.70   0.000     .0088017    .0139239
              7 0  |          0  (base)
              7 1  |  -.0185024   .0013065   -14.16   0.000    -.0210635   -.0159413
              8 0  |          0  (base)
              8 1  |   .0401348   .0013076    30.69   0.000     .0375716    .0426981
              9 0  |          0  (base)
              9 1  |   .0633036   .0013065    48.45   0.000     .0607425    .0658648
             10 0  |          0  (base)
             10 1  |          0  (base)
                   |
             _cons |   .1232012    .000501   245.93   0.000     .1222192    .1241833
    --------------------------------------------------------------------------------
    Attached Files
Working...
X