Hi all,
I am using Stata/MP 17.0 for Mac to conduct research for a dissertation in finance. I get the error "system limit exceeded - see manual" after running the following code:
Some background info on my research: I have three different sample groups, each with (1) 88 stocks/firms; (2) 391 stocks/firms; (3) ±1,400 stocks/firms. For each stock/firm, I had daily stock prices which I used to calculate daily stock returns and later averaged per month to obtain average monthly returns. I want to look at (average) monthly stock returns over a specified period of time after an Initial Public Offering (IPO), with the periods I look at being 1yr post-IPO, 2yrs post-IPO, 3 yrs post-IPO, and potentially 4 and 5 yrs post-IPO, for each sample group. So, as I go sample group by sample group and expand the period I look at, my dataset grows quite a lot.
I ran the above-mentioned code for my sample group of 88 stocks for years 1, 2, and 3 post-IPO, with the latest having the largest dataset(17 vars and 3,131 obs) and the code provided me with the table.csv file from which I can observe the constants that I need to make an inference on stock performance.
However, the code already gives me the error when I look at my second sample group and focus on 1 year post-IPO (dataset has 17 vars and 5,068 observations), which makes me see that I will clearly also get the same error when I look at the other years and especially when I focus on the third sample group, which is much larger.
My question is whether my approach to run this regression is wrong and how I can solve the issue of the regression not running properly. My code at the also asks for output to be put in a .csv file, so that I can see the regression constants and can also later conduct a t-test on the mean and a Wilcoxon Signed Rank Test on the median.
A part of my dataset looks as follows:
Thank you in advance.
Best,
Daniela
I am using Stata/MP 17.0 for Mac to conduct research for a dissertation in finance. I get the error "system limit exceeded - see manual" after running the following code:
Code:
eststo clear foreach var of varlist monthlyret_avg { bysort GVKEY: eststo: reg `var' mktrf_avg, robust // CAPM model, regression on market excess returns } esttab _all using table.csv, replace // gives all the constants
I ran the above-mentioned code for my sample group of 88 stocks for years 1, 2, and 3 post-IPO, with the latest having the largest dataset(17 vars and 3,131 obs) and the code provided me with the table.csv file from which I can observe the constants that I need to make an inference on stock performance.
However, the code already gives me the error when I look at my second sample group and focus on 1 year post-IPO (dataset has 17 vars and 5,068 observations), which makes me see that I will clearly also get the same error when I look at the other years and especially when I focus on the third sample group, which is much larger.
My question is whether my approach to run this regression is wrong and how I can solve the issue of the regression not running properly. My code at the also asks for output to be put in a .csv file, so that I can see the regression constants and can also later conduct a t-test on the mean and a Wilcoxon Signed Rank Test on the median.
A part of my dataset looks as follows:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str6 GVKEY str28 CompanyName float DataDate int(DateAnnouncedFiled DateCompletedIssued) float(PriceClose Date1yrspostIPO dailyreturn seconddate monthlyret_avg mktrf smb hml rf mktrf_avg smb_avg hml_avg) "005072" "ALLY FINANCIAL INC" 19822 18717 19822 27.35 20187 . 651 .0006844087 .0077 -.0014 -.0058 0 .0007733332 -.0015133333 .00010666668 "005072" "ALLY FINANCIAL INC" 19844 18717 19822 24.01 20187 -.10975154 652 .004732545 .0019 .0008 -.0004 0 .0006571429 -.0006428572 -.00027619046 "005072" "ALLY FINANCIAL INC" 19876 18717 19822 27.696 20187 .17555177 653 .010493434 .0012 -.0011 .0018 0 .000947619 .0010333334 -.0001 "005072" "ALLY FINANCIAL INC" 19905 18717 19822 27.58 20187 -.001448259 654 .003606246 .0068 .0002 -.0013 0 -.0009227273 -.0006272727 .00017272726 "005072" "ALLY FINANCIAL INC" 19936 18717 19822 22.9 20187 -.15498157 655 .011782242 -.0057 -.0014 .0001 0 .0009142857 -.00026190476 -.00034285715 "005072" "ALLY FINANCIAL INC" 19968 18717 19822 24.93 20187 -.08580858 656 .0041619786 0 -.0009 -.002 0 -.001504762 -.0013857143 -.0003952381 "005072" "ALLY FINANCIAL INC" 19997 18717 19822 26.94 20187 .1888791 657 .015276432 -.0101 .0026 .0028 0 .00019565213 -.00018695647 -.0012086957 "005072" "ALLY FINANCIAL INC" 20030 18717 19822 26.44 20187 .1856503 658 .007193587 -.0054 -.0002 -.0013 0 .000963158 -.0010894737 -.0007894737 "005072" "ALLY FINANCIAL INC" 20058 18717 19822 23.2 20187 -.12154484 659 .005221442 -.0054 -.0031 .0023 0 -.0006545454 .00075 .00004090908 "005072" "ALLY FINANCIAL INC" 20090 18717 19822 23.65 20187 -.11918066 660 .014994562 -.0047 -.0007 .0024 0 -.000965 .00005500002 -.00128 "005072" "ALLY FINANCIAL INC" 20121 18717 19822 26.39 20187 .3831237 661 .03144014 .0088 -.0054 .0068 0 .003036842 -.00028421052 -.00023157896 "005072" "ALLY FINANCIAL INC" 20149 18717 19822 20.17 20187 -.23972863 662 .021882765 .0024 -.0017 -.0031 0 -.00048636374 .0006227273 -.0003590909 "005072" "ALLY FINANCIAL INC" 20179 18717 19822 26.68 20187 .2920097 663 .035230886 -.0008 .0011 .0038 0 .0025 -.00015000005 -.0005166666 "007146" "MCCORMICK & CO INC" 16272 16190 16272 36.07 16637 .002780052 534 -.0005880678 0 -.0005 -.0018 0 -.0015333333 -.001311111 .00013333332 "007146" "MCCORMICK & CO INC" 16285 16190 16272 35.4 16637 -.006176233 535 -.0013120285 .0017 -.0026 .0028 .0001 .00018181815 -.0003363636 .0005681818 "007146" "MCCORMICK & CO INC" 16315 16190 16272 33.75 16637 -.004130994 536 .000646024 .0041 .0015 -.0016 .0001 .0008333333 .0006047619 .00016190475 "007146" "MCCORMICK & CO INC" 16345 16190 16272 34.75 16637 -.0008625296 537 .0008028804 .0127 -.0041 -.0005 .0001 .0012190476 .00023809524 .00005238094 "007146" "MCCORMICK & CO INC" 16376 16190 16272 35.59 16637 .0016887524 538 .000657037 .0002 -.0016 .0011 .0001 .0022666666 .0009904762 .00057142857 "007146" "MCCORMICK & CO INC" 16406 16190 16272 37 16637 .01369863 539 .0013012178 .0113 -.0043 -.0026 .0001 .001609091 -.000022727285 .00022272726 "007146" "MCCORMICK & CO INC" 16439 16190 16272 38 16637 -.015544003 540 -.0008567806 -.0055 -.0018 .0005 .0001 -.0009849999 .000905 .000745 "007146" "MCCORMICK & CO INC" 16468 16190 16272 37.2 16637 .0008071723 541 .0006073343 .0057 -.0017 0 .0001 .0015736843 .0000736842 .0008 "007146" "MCCORMICK & CO INC" 16496 16190 16272 37.98 16637 -.00026328338 542 -.001978265 .004 -.0018 .0011 .0001 -.000940909 -.00020000002 .0007318182 "007146" "MCCORMICK & CO INC" 16527 16190 16272 34.24 16637 -.01297195 543 -.0000432439 -.0029 .0011 .0022 .0001 -.0012333333 -.0004666667 4.761906e-06 "007146" "MCCORMICK & CO INC" 16558 16190 16272 34.79 16637 .00578204 544 -.0004130791 .0033 -.0006 .0014 .0001 .0006952381 -.0004142857 -.00008571428 "007146" "MCCORMICK & CO INC" 16588 16190 16272 34 16637 .0008830962 545 -.0008398356 .0063 -.0032 -.0004 .0001 .00056363636 .0008227273 .0007272727 "007146" "MCCORMICK & CO INC" 16618 16190 16272 32.65 16637 -.0009179553 546 .0018016102 -.0019 -.0023 .0011 .0001 .0021461537 7.692316e-06 -.00024615385 "008101" "SEALY CORP" 16898 16617 16897 17.5 17262 . 555 -.006391576 -.0093 .003 -.0003 .0002 .0008666667 .0003533334 .0005666667 "008101" "SEALY CORP" 16922 16617 16897 16.08 17262 .008150478 556 -.008648473 -.002 .0002 .0023 .0002 -.0019272726 -.0011863636 .00052272726 "008101" "SEALY CORP" 16953 16617 16897 13.77 17262 .04874336 557 .0009275395 .0067 -.0045 .002 .0002 -.0001954545 -.0007181818 .000031818185 "008101" "SEALY CORP" 16985 16617 16897 13.22 17262 -.003767912 558 .0016763605 .0058 0 -.003 .0002 -.00019 -.001535 .00126 "008101" "SEALY CORP" 17014 16617 16897 13.32 17262 -.0248902 559 .00053446135 -.0032 .0002 .0004 .0002 .0009826088 .00008695653 -.0003173913 "008101" "SEALY CORP" 17045 16617 16897 13.54 17262 -.01741653 560 -.002487694 .005 -.0018 -.0007 .0002 .00008500006 -.000805 .000325 "008101" "SEALY CORP" 17076 16617 16897 13.1 17262 .003062784 561 .0034506384 .0011 -.0008 .0026 .0002 .001490909 .0002181818 -.0001681818 "008101" "SEALY CORP" 17106 16617 16897 14.1 17262 .002132245 562 .002744129 -.0033 -.0049 .0004 .0002 .0010666667 .00009999998 .00019047617 "008101" "SEALY CORP" 17136 16617 16897 14.88 17262 0 563 -.000302129 -.0006 .002 .0001 .0002 .000955 -.00004499999 .000685 "008101" "SEALY CORP" 17169 16617 16897 14.5 17262 -.016949153 564 .0009169973 -.0047 -.0002 .0016 .0002 -.000055 .00037 .00005499999 "008101" "SEALY CORP" 17199 16617 16897 15.32 17262 .02065286 565 .008043348 .0008 0 .0012 .0002 -.0008277778 .0007611111 .0004166667 "008101" "SEALY CORP" 17226 16617 16897 17.06 17262 -.01158753 566 .0006494002 -.0069 .0013 .0015 .0002 .0008227273 .00010454546 .0002090909 "008101" "SEALY CORP" 17258 16617 16897 17.88 17262 .022883274 567 -.0046365825 .0009 -.0014 .0009 .0002 .0039999997 -.00085 -.0003 "012246" "ANCHOR GLASS CONTAINER CORP" 15973 15943 15972 16.8 16337 . 524 -.008728145 -.01 -.0065 -.0011 0 -.004225 -.0001499999 -.00015 "012246" "ANCHOR GLASS CONTAINER CORP" 15979 15943 15972 16.6 16337 .014669912 525 -.0005378712 .0188 -.0069 .0032 0 .0024913044 .000326087 .0010391304 "012246" "ANCHOR GLASS CONTAINER CORP" 16012 15943 15972 16.21 16337 .003715137 526 -.0056227 .0038 -.0025 .0035 0 .0008736842 -.00003684211 .00005263157 "012246" "ANCHOR GLASS CONTAINER CORP" 16040 15943 15972 14.53 16337 .005536327 527 .004901186 .0122 -.0034 .0012 0 .0025 -.00075 .00040454546 "012246" "ANCHOR GLASS CONTAINER CORP" 16072 15943 15972 15.7 16337 -.01875001 528 -.00028845275 .0051 .0034 .003 0 .0011600001 .001255 .000785 "012246" "ANCHOR GLASS CONTAINER CORP" 16103 15943 15972 15.82 16337 .003807073 529 .00022179964 .0011 -.0017 -.0007 0 .0008789473 -.00006315786 .0003263158 "012246" "ANCHOR GLASS CONTAINER CORP" 16131 15943 15972 16.08 16337 .020952376 530 .00010191871 .0099 .0001 .0009 0 .000021739157 .001604348 .0001869565 "012246" "ANCHOR GLASS CONTAINER CORP" 16162 15943 15972 15.11 16337 -.036352083 531 .0013764444 .0082 .0012 0 0 -.0010047619 -.0001809524 -.000795238 "012246" "ANCHOR GLASS CONTAINER CORP" 16194 15943 15972 16 16337 0 532 -.0012983178 .0048 -.0033 -.0016 0 .00035 -.00079 .00014000003 "012246" "ANCHOR GLASS CONTAINER CORP" 16223 15943 15972 15.55 16337 .004522006 533 -.006159011 -.001 .0045 -.0025 0 .001338095 .0010142857 .00044285716 "012246" "ANCHOR GLASS CONTAINER CORP" 16253 15943 15972 13.5 16337 -.0022172753 534 .002343352 -.0062 .0023 .0014 0 -.001652381 -.0007285714 .0011904762 "012246" "ANCHOR GLASS CONTAINER CORP" 16285 15943 15972 13.99 16337 -.009206807 535 -.02219136 .0017 -.0026 .0028 .0001 .00018181815 -.0003363636 .0005681818 "012246" "ANCHOR GLASS CONTAINER CORP" 16315 15943 15972 8.45 16337 .013189407 536 -.0044768443 .0041 .0015 -.0016 .0001 .0005562499 .00050624995 .00006874999 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15183 15158 15182 13.15 15547 . 498 -.00532317 .0055 -.0026 -.0001 .0001 .004033333 -.003833333 -.0006 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15188 15158 15182 13 15547 -.000768657 499 .004966333 .0081 .0033 -.0022 .0001 -.0019391305 .000926087 .0018 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15222 15158 15182 13.92 15547 -.0333333 500 -.0018881356 -.0008 -.0098 .0051 .0001 -.004933333 -.003446667 .0012333334 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15249 15158 15182 13.7 15547 -.014388476 501 -.005263009 -.0041 .0015 -.0011 .0001 .0011478261 .001704348 -.002152174 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15280 15158 15182 12.5 15547 .020408163 502 -.008049059 .014 -.0084 -.004 .0001 .002514286 -.00026666667 -.0007714286 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15312 15158 15182 10.26 15547 -.004849679 503 .00884358 -.0106 -.0011 .0032 .0001 .000415 .000064999986 .000645 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15342 15158 15182 11.94 15547 -.021311494 504 -.00132301 .0034 .002 -.0034 .0001 -.0013619047 .0003476191 .0008333334 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15375 15158 15182 11.39 15547 -.03063827 505 -.000931414 -.0146 .006 .0058 .0001 -.00006666672 -.0005388889 .0018333334 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15400 15158 15182 11.47 15547 -.0043402943 506 .003549851 .0156 -.0068 -.0023 .0001 .0024 .000665 .00027499997 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15431 15158 15182 12.34 15547 .0032520294 507 .0029962384 .0013 -.0004 -.0022 .0001 -.0011181819 .0016863636 .002468182 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15461 15158 15182 13.05 15547 -.003055765 508 .0012642216 .0071 -.0026 .0005 .0001 .00023181822 -.00004090913 .0014318182 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15494 15158 15182 13.72 15547 .020074384 509 .0004433551 -.0107 .004 .0072 .0001 -.00276 .000995 .00112 "013657" "ALLIANCE HEALTHCARE SVCS INC" 15522 15158 15182 13.91 15547 .03037036 510 -.0020564082 -.0107 -.0017 .0088 .0001 -.007326316 .0010789473 .0006684211 "014275" "FIRST REPUBLIC BANK" 18605 18590 18604 27.92 18969 . 611 .002870377 .0033 0 .0042 0 .001675 .0012875 .000425 "014275" "FIRST REPUBLIC BANK" 18630 18590 18604 28.98 18969 -.004807737 612 .001174559 .0069 -.0018 .0053 0 .00117 -.0009 .001385 "014275" "FIRST REPUBLIC BANK" 18660 18590 18604 29.12 18969 -.02051795 613 -.0008400775 .0013 .0008 -.0011 0 .0011555555 -.00005 .00022777777 "014275" "FIRST REPUBLIC BANK" 18687 18590 18604 29.06 18969 -.006495745 614 .0025161055 -.0074 .0048 -.0011 0 -.00025217395 .0006130435 -.0006695652 "014275" "FIRST REPUBLIC BANK" 18718 18590 18604 30.72 18969 -.006146895 615 .0007819707 .0072 -.0056 .0005 0 .002205 -.00036 -.000895 "014275" "FIRST REPUBLIC BANK" 18749 18590 18604 31.6 18969 .007974481 616 .0017490104 .0001 -.0042 .001 0 -.0009380953 -.0003333333 -.0006238095 "014275" "FIRST REPUBLIC BANK" 18779 18590 18604 31.88 18969 -.011472894 617 .00018703275 -.0144 .0038 -.0016 0 -.0006454544 -.0002227272 .0002318182 "014275" "FIRST REPUBLIC BANK" 18809 18590 18604 31 18969 -.039653 618 -.006429162 .0101 -.0027 .0017 0 -.000965 .000485 -.0010599999 "014275" "FIRST REPUBLIC BANK" 18840 18590 18604 28.51 18969 .006709058 619 -.0040444434 -.0067 .0044 -.002 0 -.003126087 -.0003434783 -.000847826 "014275" "FIRST REPUBLIC BANK" 18871 18590 18604 24.71 18969 -.03098043 620 -.0042812056 -.0062 -.0023 -.0031 0 -.003509524 -.000952381 .0005238096 "014275" "FIRST REPUBLIC BANK" 18903 18590 18604 22.48 18969 -.02936098 621 .00918702 -.0293 -.0047 -.0023 0 .004704762 -.000952381 -.0008142857 "014275" "FIRST REPUBLIC BANK" 18932 18590 18604 26.87 18969 -.029963896 622 .0013527754 -.0322 .0039 -.0061 0 -.0009952381 -.0005523809 -.0003238095 "014275" "FIRST REPUBLIC BANK" 18962 18590 18604 28.41 18969 .0010571067 623 .002784434 .0007 -.0023 -.0022 0 -.001283333 .0003333334 .0005 "014555" "ACELITY HOLDINGS INC -REDH" 16125 16070 16124 40.4 16489 . 529 -.00039010835 -.0015 .0035 -.0017 0 .0008 .00205 .0007 "014555" "ACELITY HOLDINGS INC -REDH" 16131 16070 16124 40.47 16489 .002974046 530 .004867367 .0099 .0001 .0009 0 .000021739157 .001604348 .0001869565 "014555" "ACELITY HOLDINGS INC -REDH" 16162 16070 16124 44.41 16489 -.00981045 531 .003741423 .0082 .0012 0 0 -.0010047619 -.0001809524 -.000795238 "014555" "ACELITY HOLDINGS INC -REDH" 16194 16070 16124 49.9 16489 .030991735 532 .00026623195 .0048 -.0033 -.0016 0 .00035 -.00079 .00014000003 "014555" "ACELITY HOLDINGS INC -REDH" 16223 16070 16124 48.19 16489 -.006391781 533 .001491864 -.001 .0045 -.0025 0 .001338095 .0010142857 .00044285716 "014555" "ACELITY HOLDINGS INC -REDH" 16253 16070 16124 49.8 16489 -.002004054 534 -.004791092 -.0062 .0023 .0014 0 -.001652381 -.0007285714 .0011904762 "014555" "ACELITY HOLDINGS INC -REDH" 16285 16070 16124 47.1 16489 .04853073 535 .004915224 .0017 -.0026 .0028 .0001 .00018181815 -.0003363636 .0005681818 "014555" "ACELITY HOLDINGS INC -REDH" 16315 16070 16124 50.71 16489 .01888685 536 .002699706 .0041 .0015 -.0016 .0001 .0008333333 .0006047619 .00016190475 "014555" "ACELITY HOLDINGS INC -REDH" 16345 16070 16124 52.2 16489 -.006660295 537 -.0023817224 .0127 -.0041 -.0005 .0001 .0012190476 .00023809524 .00005238094 "014555" "ACELITY HOLDINGS INC -REDH" 16376 16070 16124 55.65 16489 .1167971 538 .01198072 .0002 -.0016 .0011 .0001 .0022666666 .0009904762 .00057142857 "014555" "ACELITY HOLDINGS INC -REDH" 16406 16070 16124 63.2 16489 -.0034688965 539 .0087510515 .0113 -.0043 -.0026 .0001 .001609091 -.000022727285 .00022272726 "014555" "ACELITY HOLDINGS INC -REDH" 16439 16070 16124 75.48 16489 -.010747047 540 -.007730437 -.0055 -.0018 .0005 .0001 -.0009849999 .000905 .000745 "014555" "ACELITY HOLDINGS INC -REDH" 16469 16070 16124 63.69 16489 -.020153867 541 .002045046 .0034 .0026 .0011 .0001 .001007143 5.197113e-12 .0007142858 "015252" "TRIMAS CORP" 17304 17015 17303 11.75 17668 . 568 .008234091 .0057 -.003 .0001 .0002 .0015 .000611111 -.0002888889 "015252" "TRIMAS CORP" 17318 17015 17303 12.5 17668 -.0031897896 569 -.0016270283 .0057 .0005 .0001 .0002 -.0003666667 .00049999997 9.523817e-06 "015252" "TRIMAS CORP" 17349 17015 17303 11.96 17668 -.009933765 570 -.001222393 .0082 .0009 -.0016 .0002 -.001190476 .00011428574 -.0004190476 "015252" "TRIMAS CORP" 17379 17015 17303 11.88 17668 .01106384 571 .001961631 -.007900001 -.0053 -.0014 .0002 -.0004260869 -.0015869566 -.00020869565 "015252" "TRIMAS CORP" 17413 17015 17303 13.32 17668 .08645999 572 .0045540193 .0055 -.0021 -.0007 .0002 .0022631579 -.0011473685 -.0008368421 "015252" "TRIMAS CORP" 17440 17015 17303 13.84 17668 .04295401 573 .008459121 .0072 -.0008 -.0001 .0001 .001373913 .0003695652 -.0012608696 "015252" "TRIMAS CORP" 17471 17015 17303 15.6 17668 -.024999976 574 -.016860815 -.0172 .0021 -.0038 .0002 -.0022190476 -.001604762 -.00024761906 "015252" "TRIMAS CORP" 17503 17015 17303 11.14 17668 .0036036 575 -.001463241 -.0024 .0011 .0013 .0001 -.000825 -.000385 .00041 "015252" "TRIMAS CORP" 17533 17015 17303 10.07 17668 -.04910297 576 -.01909106 -.0039 .0059 .0003 .0001 -.0022428571 -.0007285714 .0015809523 end format %td DataDate format %td DateAnnouncedFiled format %td DateCompletedIssued format %td Date1yrspostIPO format %tm seconddate
Best,
Daniela