Announcement

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

  • regress the same independent time series variables on each panel

    Hi statalisters
    I am going to calculate the residuals from EGARCH model for each company to compute the standard deviation of residuals for each company (panel)
    I have three time series independent variables. each is complete and consists of 200 observations and want to regress them against each panel from the dependent one (the dependent is panel 200 time points and 2088 firms". "looping using the same observations of the independent and use different panel for the dependent each time" In other words, I want to fix the same independent variables in all EGARCH and change only the dependent each time to use the observations of the dependent belong to the following panel and so on.
    In other words, I want my first regression to be

    arch returns mktrf SMB HML if id==1 , earch(1) egarch(1)
    and the second one will be the same except using the returns of the second panel and the third will be the same except using the returns of the third panel and so on till i finish 2088 panels

    here is a small sample if my data and the way of setting (i have time variable and panel variable)

    input float(id returns SMB HML mktrf)
    1 -11.151515 -2.2382624 .4518271 2.26
    1 13.77899 2.3433826 -2.7514324 1.33
    1 8.633094 1.106418 1.0299275 .73
    1 -3.239741 5.333519 -3.702847 2.06
    1 14.285714 2.911956 -2.739344 2.36
    1 4.6875 -2.740549 -2.2713015 -1.14
    1 10.541045 -5.820807 4.430209 -5.97
    1 4.810127 2.9001956 -2.1319022 2.76
    1 19.73684 -.007637183 -2.645491 5.02
    1 3.296703 -1.50192 1.0523652 .86
    1 -2.659574 -3.629962 .6442674 6.25
    1 -.533333 3.467854 3.958202 -1.7
    1 -1.608579 -.9766766 -2.865544 4.99
    1 6.478873 -4.593571 4.96722 -.49
    1 -18.414322 -1.555714 3.510212 -5.03
    1 15.67398 -6.493771 .5108788 4.04
    1 6.775068 9.918304 -5.239732 6.74
    1 -5.181347 .5862162 -.8625144 4.1
    1 -13.934426 -1.0128304 -.7239342 7.33
    1 20.257235 7.398891 1.6254376 -4.15
    1 28.475937 1.8310946 .756231 5.35
    1 12.59105 -2.4508116 -1.2311492 -3.8
    1 20.2 -6.336085 2.544591 2.98
    1 -2.329451 -1.1205255 -.8665166 1.32
    1 -8.517888 -3.0823665 -1.9120054 .15
    1 -50.67505 .6439686 .3383765 7.03
    1 -1.085418 -.15901716 -3.51255 4.76
    1 -11.450382 -.9652972 2.1861134 .73
    1 67.24138 -2.0155404 -.18698525 -3.07
    1 -7.216495 -7.118085 -7.520288 3.18
    1 21.52778 -7.961112 -1.7431357 -2.46
    1 -13.900862 -6.341659 .5287399 -16.08
    1 2.628285 .03358968 -8.834009 6.15
    1 -19.14634 .4392631 6.046391 7.13
    1 -19.332405 4.3881574 -3.8904605 6.1
    1 -3.62069 -4.487304 -6.433276 6.16
    1 -7.839721 2.0881655 -2.496774 3.5
    1 14.859438 -5.334937 -2.721245 -4.08
    1 .524476 -1.1243354 -8.81052 3.45
    1 -4.695652 6.420864 6.709959 4.33
    1 -25.36765 3.548169 6.949412 -2.46
    1 20.93596 .8716612 -2.7120745 4.77
    1 -19.34827 3.074622 -1.9390762 -3.47
    1 -4.292929 -1.364687 -2.3041184 -1.38
    1 26.91293 4.250344 -1.6836834 -2.81
    1 19.95842 -3.0048516 -6.493091 6.13
    1 7.279029 6.052834 -4.89089 3.37
    1 15.831987 7.41185 -4.0126905 7.72
    1 -1.312336 4.917301 -.56832767 -4.74
    1 -33.59736 15.521524 -26.17497 2.45
    1 -25.84493 -14.66277 12.607206 5.2
    1 12.064343 -4.5761967 8.384338 -6.4
    1 6.326034 1.9128653 .7734435 -4.42
    1 -2.28833 7.752117 -19.764885 4.64
    1 -9.601874 -1.572749 12.24717 -2.51
    1 2.849741 .3939558 -5.97026 7.03
    1 15.869018 4.4888024 2.4440646 -5.45
    1 .869565 -.074298285 2.4448156 -2.76
    1 37.284485 -1.5808455 12.828352 -10.72
    1 18.053375 5.869763 9.916326 1.19
    1 7.978723 -7.602592 18.7826 3.13
    1 69.79866 6.394565 7.272977 -10.05
    1 -43.2398 3.937033 10.12917 -7.26
    1 -41.68207 3.4723265 -9.619989 7.94
    1 6.022187 9.447039 -2.264044 .72
    1 37.81764 7.157274 4.661578 -1.94
    1 11.968562 -6.847993 1.0164733 -2.13
    1 22.580645 1.4011184 3.2781196 -6.46
    1 16.28788 -9.0615425 5.871483 -9.25
    1 -7.491857 10.72014 -9.396211 2.46
    1 -30.985914 4.033714 -1.7173657 7.54
    1 -32.338306 7.563811 2.2184682 1.61
    1 26.47059 -.06502911 .6993363 -1.44
    1 -15.11628 -.14024942 .25148177 -2.29
    1 -37.328766 7.827937 -.8366251 4.24
    1 14.01093 8.333906 4.4294753 -5.2
    1 -14.723927 -4.907973 1.3810486 -1.38
    1 -20.56856 1.0251492 3.570562 -7.21
    1 3.157897 -6.2574 -4.5322313 -8.18
    1 -16.122448 -4.7151465 -.04583877 .5
    1 -18.478258 1.6369543 -1.0011082 -10.35
    1 10.399996 -4.0158134 -7.015924 7.84
    1 8.212564 7.835046 3.058433 5.96
    1 42.41072 -2.899629 4.6829357 -5.76
    1 -6.269594 .6383933 -1.8447014 -2.57
    1 -19.73244 -1.5701616 .16291857 -1.88
    1 27.291664 1.9096388 -2.949774 1.09
    1 -5.56465 5.120932 2.435094 8.22
    1 -3.639515 10.16439 7.434109 6.05
    1 -18.669127 1.9451013 -3.362454 1.42
    1 2.500003 3.807448 2.913566 2.35
    1 7.641919 .54233366 -.8440563 2.34
    1 -20.081133 2.3345742 4.513561 -1.24
    1 7.081213 1.5517427 .9360932 6.08
    1 28.75 -2.666812 -2.1736033 1.35
    1 -10.097087 4.843633 -.13474119 4.29
    1 -8.639311 -1.550557 .3419315 2.15
    1 -.945626 2.579258 2.579469 1.4
    1 17.446299 -5.987915 -3.0824256 -1.32
    1 5.669575 -2.1689422 .915616 -1.83
    1 -5.576923 .4199519 1.672237 1.17
    1 -4.887979 -7.464518 5.071144 1.86
    1 19.999996 -.26883465 3.034544 -4.06
    1 3.684211 3.882688 -.0016477555 .08
    1 21.82741 2.049222 1.4188266 1.6
    1 3.172414 3.611497 3.404722 1.43
    1 9.2246 1.0382502 -1.2493355 4.54
    1 -5.982903 -1.1211882 -.6879337 3.43
    1 -19.261824 -1.627978 .9536579 -2.76
    1 .857142 -2.8746696 1.870346 1.89
    1 -12.889516 -3.647442 -1.4782875 -1.97
    1 -.614446 4.657075 -2.0318992 -2.61
    1 -3.400306 4.6846633 .9482778 3.65
    1 -21.12 2.5839336 .018172503 .57
    1 -8.519262 -.3889057 .9438565 3.92
    1 -6.430165 .54952717 .100318 -1.22
    1 1.470587 -.9305272 .17834795 .49
    1 7.246382 1.9476655 -.09998143 -2.02
    1 -6.081081 -.1999179 -.410763 3.61
    1 -11.990407 6.839678 1.075318 -.25
    1 -2.45232 .8020797 -.3807647 3.04
    1 -.558659 2.469377 2.449507 -.3
    1 -11.51685 .9582642 3.148264 1.46
    1 16.190475 -3.2173 2.1402364 .73
    1 -.819671 -1.8030342 .3235521 -3.57
    1 -3.95778 -4.631225 2.728379 -.35
    1 -6.868132 2.2796483 -1.4670253 -.78
    1 20.353975 -2.725906 -.20239723 2.03
    1 -5.637255 1.7066797 .18904495 1.84
    1 -6.233767 .599547 .6288986 3.23
    1 -.277008 -.6735392 3.231115 1.71
    1 26.3889 -1.0619256 -2.151921 .87
    1 2.1978 2.289512 .1979628 1.4
    1 10.107522 .7639145 .3924535 -1.96
    1 6.944443 -2.2187293 -2.6557 .68
    1 -16.326525 -.3335389 2.1627197 3.49
    1 13.52549 .3215615 .8441625 3.24
    1 -7.617185 -3.5986836 -2.7400045 -1.96
    1 -6.131077 1.9437873 -3.5308 -3.73
    1 3.521118 .4436928 -3.8081694 .92
    1 10.204088 .50304556 -6.715467 3.22
    1 -13.991775 -3.019177 -1.8844032 1.8
    1 2.23881 3.399432 -2.2837214 -4.83
    1 -4.866181 -1.951408 4.897825 -.87
    1 -1.023023 -2.1645489 3.858493 -6.36
    1 1.033597 -.58827144 1.4677434 -3.09
    1 3.069057 -.963577 1.0981948 -.93
    1 16.129023 .8720689 -1.3873596 4.6
    1 -11.752131 -2.82032 -1.7492063 1.86
    1 -3.147702 4.32838 -1.423043 -8.44
    1 -6.25 -1.0461148 1.7903104 -.77
    1 39.15493 2.609858 .6448457 1.53
    1 -1.214574 -4.756718 -4.847512 -9.24
    1 -11.68033 4.7503633 -4.5612965 -17.23
    1 4.872391 1.980261 1.5572448 -7.86
    1 -8.628316 1.4519715 3.004251 1.74
    1 -30.87886 -5.079965 -.6881678 -8.12
    1 -30.39514 2.2454748 3.122322 -10.1
    1 4.366819 4.833651 17.611708 8.95
    1 5.439325 1.5190474 3.056315 10.19
    1 -15.87302 3.729494 -3.7140646 5.21
    1 -11.32075 3.2939785 -.4511137 .43
    1 11.578943 -1.1098449 2.1283154 7.72
    1 9.905663 2.8459246 2.0262146 3.33
    1 17.167387 -5.586765 -2.2128682 4.08
    1 -13.362067 -3.3826256 -2.0256305 -2.59
    1 13.432835 4.803412 .7627878 5.56
    1 3.555552 2.417136 1.284681 2.75
    1 -7.112974 .9803599 3.361793 -3.36
    1 39.18918 2.742736 .3258035 3.4
    1 31.06797 4.6609044 .08148906 6.31
    1 5.10949 -.4494575 .13221025 2
    1 9.490737 .3496032 -2.592491 -7.89
    1 -20.295984 -.14834166 1.549809 -5.56
    1 15.384613 -2.9768155 -3.2034464 6.93
    1 20.22989 2.360508 -1.794295 -4.77
    1 -1.720844 1.5017577 -.2301898 9.54
    1 43.38522 3.774201 -.16986275 3.88
    1 1.763909 3.5581725 .24109125 .6
    1 -1.062422 -2.632218 .6285104 6.82
    1 1.059602 2.5636685 .6942521 1.99
    1 .524246 2.531797 -1.34741 3.49
    2 5.714286 1.444051 -2.716812 .45
    2 6.081081 -1.0350094 .7011179 2.9
    2 -16.56051 -1.1485633 -.6427278 -1.27
    2 5.511811 -3.619072 -4.48918 -1.75
    2 2.238806 -4.964158 -.2380595 -2.36
    2 18.978102 -4.0486846 -3.153793 -5.99
    2 20.253164 3.105765 .9798808 -7.59
    2 -7.894737 -.8387822 -.1582913 11.35
    2 -5.780347 -.27420163 3.400982 -.28
    2 3.384615 2.2958205 3.9887905 .74
    2 -4.166667 -2.005987 -4.599459 5.05
    2 14.906832 -.7256613 -2.1968036 4.42
    2 -10.659898 -1.8026018 -1.478053 3.11
    2 -38.63636 .6443136 -3.1114945 -.85
    2 16.990292 3.7809606 -1.8170675 -6.19
    2 -7.053942 -4.1107845 1.3724067 3.89
    2 -28.57143 -.4606912 -.17814445 .79
    2 -10.027473 1.826555 -1.603779 2.55
    2 24.58015 -2.355324 4.4000816 2.73
    2 11.764706 -.7175763 1.90101 -1.76
    2 -24.561403 2.508785 3.514937 .78
    2 -16.27907 .986661 4.834257 1.18
    2 -27.77778 -.17691155 2.8120005 5.57
    2 11.538462 .7742693 -.3653766 1.29
    2 -1.39211 -1.860084 .4619933 4.03
    2 -16.470589 2.489413 .6899269 1.56
    2 5.633804 2.488582 1.417376 2.8
    2 -.319484 2.0626495 -2.646436 -1.2
    2 -29.038465 -.7213553 -2.5282695 5.65
    2 1.355019 2.5901675 -.04507709 -2.71
    2 27.005344 -4.908375 3.392666 3.77
    2 -14.526314 1.2144206 -1.6199777 4.18
    2 .57471 -1.4248588 .4068598 3.12
    2 29.71429 .4787387 -1.1549063 2.81
    2 -14.34865 .03978141 .7793741 -3.32
    2 -16.01763 -1.5590897 6.325492 4.65
    2 -3.937008 -4.840122 3.839979 .43
    2 -25.08196 -1.4510443 -.11438549 -.19
    2 -28.371096 4.275532 -2.480185 2.06
    2 -.903614 -6.117807 .9007202 2.61
    2 6.534959 1.0155158 -.6752317 -2.04
    2 12.60053 -3.811473 -.6703405 4.23
    2 -7.142851 .04083993 -.0018862616 -1.97
    2 14.884618 -.02555931 -.011580653 2.52
    2 -24.785187 .016534345 .020916123 2.55
    2 -30.860535 .01436003 -.035370424 -.06
    2 8.583693 -.015908575 -.03394542 -3.11
    2 22.33202 .02553672 -.008388526 6.13
    2 13.276835 -.04274475 .003459619 -1.12
    2 -10.699583 -.005744055 -.0113133 .59
    2 3.686632 .026743596 -.016615406 1.36
    2 -1.200002 -4.5039024 -1.9399352 -1.53
    2 -18.758434 .5600551 2.682251 1.54
    2 -1.495009 -1.77611 4.6925716 -6.04
    2 1.180433 .20604737 -3.355757 -3.07
    2 8.611107 4.80538 -.007307068 7.75
    2 -2.813295 -2.2386727 1.26762 .56
    2 12.47369 . . -2.17
    2 10.76924 . . .
    2 -14.062507 . . .
    2 1.464651 . . .
    2 -15.928326 . . .
    2 -4.558902 . . .
    2 17.639511 . . .
    2 -8.342425 . . .
    2 -14.515168 . . .
    2 10.297165 . . .
    2 14.285713 . . .
    2 -.493422 . . .
    2 20.716255 . . .
    2 -12.140574 . . .
    2 4.727272 . . .
    2 22.69364 . . .
    2 -18.053886 . . .
    2 -1.668294 . . .
    2 12.906313 . . .
    2 -7.324307 . . .
    2 -19.73504 . . .
    2 -12.122938 . . .
    2 -9.002587 . . .
    2 7.943261 . . .
    2 1.590592 . . .
    2 3.403676 . . .
    2 -39.69717 . . .
    2 3.711792 . . .
    2 28 . . .
    2 -1.292406 . . .
    2 16.612108 . . .
    2 -23.7193 . . .
    2 -11.585364 . . .
    2 9.517242 . . .
    2 -23.27366 . . .
    2 -22.97297 . . .
    2 28.46004 . . .
    2 6.373294 . . .
    2 -.860831 . . .
    2 4.341537 . . .
    2 0 . . .
    2 13.45354 . . .
    2 12.836176 . . .
    2 -4.442035 . . .
    2 23.92291 . . .
    2 3.385177 . . .
    2 -7.079648 . . .
    2 28.26087 . . .
    2 -3.601697 . . .
    2 13.99268 . . .
    2 -12.911392 . . .
    2 -8.793605 . . .
    2 17.928288 . . .
    2 -14.932432 . . .
    2 24.78157 . . .
    2 68.11971 . . .
    2 8.900926 . . .
    2 11.904764 . . .
    2 -9.36805 . . .
    2 71.513664 . . .
    2 -.858022 . . .
    2 -5.99369 . . .
    2 -4.170665 . . .
    2 -1.400704 . . .
    2 12.270583 . . .
    2 -15.133114 . . .
    2 -23.004955 . . .
    2 16.29736 . . .
    2 -4.056551 . . .
    2 -7.751442 . . .
    2 32.777786 . . .
    2 22.50388 . . .
    2 5.089292 . . .
    2 25.27612 . . .
    2 3.085791 . . .
    2 7.358491 . . .
    2 11.306387 . . .
    2 15.026313 . . .
    2 -23.71111 . . .
    2 32.420097 . . .
    2 2.781607 . . .
    2 19.324535 . . .
    2 8.434864 . . .
    2 -4.165946 . . .
    2 -12.770556 . . .
    2 18.61042 . . .
    2 26.88284 . . .
    2 -6.456422 . . .
    2 7.585417 . . .
    2 6.727578 . . .
    2 5.038911 . . .
    2 15.280607 . . .
    2 26.25568 . . .
    2 23.64289 . . .
    2 -16.356394 . . .
    2 -2.277118 . . .
    2 -22.130066 . . .
    2 -19.96619 . . .
    2 6.991976 . . .
    2 18.065147 . . .
    2 -16.170567 . . .
    2 -2.193385 . . .
    2 -13.3433 . . .
    2 -.184818 . . .
    2 -.093525 . . .
    2 -.083681 . . .
    2 -.088115 . . .
    2 .039577 . . .
    2 -.102724 . . .
    2 -.084974 . . .
    2 -.133518 . . .
    2 -.10471 . . .
    2 -32.58197 . . .
    2 4.3313046 . . .
    2 -13.204746 . . .
    2 -12.90043 . . .
    2 -9.343942 . . .
    2 -4.7149158 . . .
    3 10 . . .
    3 -17.045456 . . .
    3 42.46575 . . .
    3 0 . . .
    3 -14.018692 . . .
    3 4.891304 . . .
    3 18.134714 . . .
    3 -9.649123 . . .
    3 -15.929204 . . .
    3 -9.473684 . . .
    3 3.488372 . . .
    3 0 . . .
    3 -5 . . .
    3 -1.265823 . . .
    3 -5.194805 . . .
    3 0 . . .
    3 26.369864 . . .
    3 -4.494382 . . .
    3 -20 . . .
    3 -2.985075 . . .
    3 -30.76923 . . .
    3 2.222222 . . .
    3 17.045456 . . .
    3 -25.24272 . . .
    3 5.194805 . . .
    3 -19.753086 . . .
    3 -35.384617 . . .
    3 30.95238 . . .
    3 30.90909 . . .
    3 39.44444 . . .
    3 -17.928288 . . .
    3 42.71845 . . .
    3 -26.71233 . . .
    3 -54.20561 . . .
    3 -37.7551 . . .
    3 27.272726 . . .
    3 15.47619 . . .
    3 -43.29897 . . .
    3 16.363636 . . .
    3 10.500002 . . .
    3 76.92308 . . .
    3 89.58334 . . .
    3 -40.52198 . . .
    3 13.163976 . . .
    3 -57.64463 . . .
    3 -13.658536 . . .
    3 29.9435 . . .
    3 -9.565219 . . .
    3 -34.615383 . . .
    3 -58.08824 . . .
    3 78.94736 . . .
    3 -30.40441 . . .
    3 -4.208485 . . .
    4 -8.898307 . . .
    4 -39.6124 . . .
    4 .598793 . . .
    4 -16.097557 . . .
    4 16.860462 . . .
    4 10.199 . . .
    4 -11.51241 . . .
    4 3.316329 . . .
    4 36.796 . . .
    4 -41.0796 . . .
    4 -6.832299 . . .
    4 39.61605 . . .
    4 -4.624999 . . .
    4 17.265194 . . .
    4 -14.321922 . . .
    4 -2.810652 . . .
    4 16.590557 . . .
    4 9.170848 . . .
    4 42.69275 . . .
    4 -22.66129 . . .
    4 -7.820646 . . .
    4 24.77375 . . .
    4 -14.687216 . . .
    4 8.926676 . . .
    4 15.60976 . . .
    4 -17.066895 . . .
    4 -12.511854 . . .
    4 8.342367 . . .
    4 -6.700001 . . .
    4 7.482303 . . .
    4 -12.417683 . . .
    4 8.485499 . . .
    4 218.01978 . . .
    5 -13.56467 . . .
    5 -16.423359 . . .
    5 -36.24454 . . .
    5 23.28767 . . .
    5 8.333333 . . .
    5 5.128205 . . .
    5 -1.463415 . . .
    5 7.978723 . . .
    5 -27.5 . . .
    5 14.94253 . . .
    5 39 . . .
    5 19.23077 . . .
    5 -19.35484 . . .
    5 -14.4 . . .
    5 -16.82243 . . .
    5 -25.8427 . . .
    5 19.84436 . . .
    5 -7.792208 . . .
    5 10.56338 . . .
    5 -13.375796 . . .
    5 5.714286 . . .
    5 29.054054 . . .
    5 -20.95238 . . .
    5 -28.91566 . . .
    5 5.508475 . . .
    5 -2.811245 . . .
    5 -39.66942 . . .
    5 -10.344828 . . .
    5 -12.820513 . . .
    5 -36.764706 . . .
    5 -90.90909 . . .
    5 37.5 . . .
    5 -36.363636 . . .
    5 42.85714 . . .
    5 -7.200003 . . .



    how can I sort this out?
    Last edited by Muhammed Shaker; 06 May 2016, 13:54.

  • #2
    You should write a loop I assume, for example:
    Code:
    forval i = 1/2088 {      
              arch returns mktrf SMB HML if id==`i'  , earch(1) egarch(1) 
              di
         }
    Hope it helps

    Comment


    • #3
      Applying arch to 2088 panels, the challenge is substantial. Even if you apply the loop as suggested in #2, above, there will be many instances where Stata will complain that "flat log likelihood encountered, cannot find uphill direction". You can try your luck applying the loop and predict residuals using e(sample) option in the predict command.
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment


      • #4
        I'm going to give it one more try:

        Code:
        Code:
        input float(id returns SMB HML mktrf)
        1 -11.151515 -2.2382624 .4518271 2.26
        1 13.77899 2.3433826 -2.7514324 1.33
        1 8.633094 1.106418 1.0299275 .73
        1 -3.239741 5.333519 -3.702847 2.06
        1 14.285714 2.911956 -2.739344 2.36
        1 4.6875 -2.740549 -2.2713015 -1.14
        2 5.714286 1.444051 -2.716812 .45
        2 6.081081 -1.0350094 .7011179 2.9
        2 -16.56051 -1.1485633 -.6427278 -1.27
        2 16.990292 3.7809606 -1.8170675 -6.19
        2 -14.062507 . . .
        2 1.464651 . . .
        2 -15.928326 . . .
        2 -4.558902 . . .
        2 17.639511 . . .
        end
        I am substantially shortening your data to highlight a few things. As you can see, your data on SMB HML mktrf extend beyond panel 1. You say you have a time variable. Do you have a time variable for returns (call it ret_time) AND a time variable for the independent variables (call it iv_time)? If so, you will want to break us the dataset and re-merge it:

        Code:
        preserve
        keep panel returns ret_time
        rename ret_time time
        sort panel time
        save returns.dta
        restore
        keep SMB HML mktrf iv_time
        rename iv_time time
        sort time
        save independents.dta
        
        clear
        
        use returns.dta
        
        merge m:1 time using independents
        save full_data.dta
        Now you can use the loops and/or statsby to accomplish your analyses.

        If you do not have two time variables, then how do you know which observations on the independent variables match which observations on the dependent variable?
        Stata/MP 14.1 (64-bit x86-64)
        Revision 19 May 2016
        Win 8.1

        Comment


        • #5
          It is easy to construct two time variable. will try and get back to you
          my supervisor and well known professor of financial econometrics advise me to -rolling regression-. what is your opinion Carol?
          this should help running 2088 regression (equal to the number of stocks) and then should be able to generate residuals for each stock
          Last edited by Muhammed Shaker; 07 May 2016, 08:37.

          Comment


          • #6
            Since your supervisor is acquainted with your substantive goals, I would defer to his/her advice.
            Stata/MP 14.1 (64-bit x86-64)
            Revision 19 May 2016
            Win 8.1

            Comment


            • #7
              Dear Attaullah,

              yes, I have the same problem of “... can’t find uphill direction”.

              I tried different garch, egarch, with different distribution. The problem still cannot be addressed.

              I want to predict conditional varience.

              You mention about e(sample) at the end of prediction, I searched stata help, but can’t understand this code.

              Many thanksfor any help!

              Comment

              Working...
              X