Dear Statalists,
I have done a quintile portfolio analysis and there is a declining pattern of equal-weighted monthly alphas between quintile portfolio 1 and quintile portfolio 5. I am trying to calculate value-weighted portfolio alphas based on market cap for each portfolio and month. Most of their codes are the same for both portfolio methods and only the part of calculating excess portfolio returns is different shown below. However, I found an increasing pattern of value-weighted alphas between quintile portfolio 1 and quintile portfolio 5 by using the following codes:
However, when I use the following code and find a consistent declining pattern as equal-weighted portfolio alphas.
May I ask that does anyone know why is like that? What are the major differences between the above two parts of codes? Why I can't get the same pattern by using the first part of codes? Many thanks for your help in advance! 
Here are my codes:
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 100 out of 1410788 observations
Use the count() option to list more
I have done a quintile portfolio analysis and there is a declining pattern of equal-weighted monthly alphas between quintile portfolio 1 and quintile portfolio 5. I am trying to calculate value-weighted portfolio alphas based on market cap for each portfolio and month. Most of their codes are the same for both portfolio methods and only the part of calculating excess portfolio returns is different shown below. However, I found an increasing pattern of value-weighted alphas between quintile portfolio 1 and quintile portfolio 5 by using the following codes:
Code:
bys P ym: asgen vw_exret= exret_m, w(mcap) bys P: reg vw_exret mktrf smb hml
Code:
bys P: reg exret_m mktrf smb hml [aweight = mcap]

Here are my codes:
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(P ym vw_exret exret_m) double(mktrf smb hml) float mcap 4 342 .05436157 .06092979 .0421 -.0076 .0509 6.2 4 343 .05767355 .0754 .0475 .0333 -.0168 6.696 4 344 -.011548947 -.0806963 -.0227 .0613 .0070999999999999995 6.076 4 345 .006385217 .026012246 .005600000000000001 .0096 .0168 6.262 4 346 -.006150517 .01470198 -.0029 -.0263 .0231 6.386 4 347 .06497628 -.016938835 .0479 .0216 -.010700000000000001 6.2 4 348 -.010845808 .0249 -.0125 -.0021 .0226 6.386 4 349 -.03264222 .023226215 -.0331 .0012 .0217 6.572 4 350 .036047593 -.027332077 .033 -.013300000000000001 -.006999999999999999 6.36225 4 351 .007225713 .03311569 .0115 -.028900000000000002 .0172 6.61175 4 352 -.026488435 -.0057 -.0229 -.0177 .0121 6.61175 4 353 .02260741 -.027432077 .0149 .0189 -.014199999999999999 6.36225 5 354 .05359982 .014107844 .061 -.0212 .0053 6.487 5 355 .0014075635 .03236154 -.0225 .0278 .009399999999999999 6.7365 5 356 .028052976 .011077778 .015700000000000002 .0074 .0049 6.7365 5 357 .04849536 .06737407 .0433 -.0055000000000000005 -.014499999999999999 7.2355 5 358 .05732636 -.04238276 .0335 .0004 -.0074 6.986 5 359 -.012244605 .010042856 -.013500000000000002 -.0101 .0218 7.007 5 360 .08421724 .02871429 .07200000000000001 -.04019999999999999 -.0287 7.25725 5 361 .01969332 .26846206 .0144 .004699999999999999 .006999999999999999 9.25925 5 362 .0018891596 -.033527028 -.0076 .003 -.0128 9.043625 5 363 -.029537164 .063622534 -.036699999999999997 -.0326 -.0102 9.6805 5 364 .008222812 .03257368 .0103 -.0128 -.0109 10.062625 5 365 .012511844 .031874683 .0116 -.023799999999999998 .0027 10.34775 5 366 -.08471905 -.02421852 -.0785 -.013000000000000001 .008100000000000001 10.156125 5 367 .02825908 -.011989308 .0111 .0102 .0063 10.09225 5 368 .033395946 .006258228 .0183 .0152 -.0291 10.141625 5 369 -.032637626 -.0069 -.0336 -.0051 -.0252 10.141625 5 370 .0972823 -.01945823 .0842 -.0254 -.0375 10.01325 5 371 -.023722647 .007802564 -.0109 .013999999999999999 -.0202 10.05225 5 372 -.02719226 .018841026 -.019 -.0321 -.0002 10.31 5 373 -.1057502 -.0566 -.1015 -.0359 .0158 9.7945 5 374 -.0701362 .034789473 -.061200000000000004 -.0364 .0077 10.179 5 375 -.04673808 -.019620514 -.0192 -.0553 .0024 10.0485 5 376 .07832105 -.0057 .0635 .0034000000000000002 -.031400000000000004 10.0485 5 377 .031162707 -.004701298 .0246 .0078000000000000005 -.016 10.013 3 378 .04443233 .007957895 .046900000000000004 .0381 -.0183 10.14475 3 379 .071847744 .008187013 .0719 .0394 -.0053 10.2765 3 380 .03454387 -.01593846 .0265 .0391 -.0121 10.013 3 381 -.001912998 .034173682 -.0028000000000000004 .0049 .0137 10.40825 3 382 .0380427 -.0047 .0365 -.0033 -.005600000000000001 10.40825 3 383 -.0418153 .074281015 -.049400000000000006 .0007000000000000001 .0123 11.2665 3 384 .04475927 -.04061429 .0424 -.009399999999999999 -.013000000000000001 10.864125 3 385 .026998766 .13120246 .0232 .0161 -.0078000000000000005 12.3395 3 386 .004083647 .008443479 -.0159 .0165 -.0096 12.3395 3 387 .02995125 .12623478 .0129 .0091 -.0044 13.949 3 388 -.01519494 .13071539 -.04190000000000001 -.0048 -.0192 15.82675 3 389 .1125177 -.01057966 .1084 -.0222 -.0401 15.5875 4 390 -.009907824 -.05512414 -.0059 .0848 .045599999999999995 14.78125 4 391 .0004630688 -.2028 .0109 .0088 .0637 11.825 4 392 -.02554098 .07841819 -.026600000000000002 -.0104 .0366 12.63125 4 393 .02569698 .007438297 .010700000000000001 -.061200000000000004 .043 12.765625 4 394 .003933695 .007726316 .003 .0039000000000000003 .0126 12.9 4 395 -.007550934 -.010908334 -.023399999999999997 -.031 .034 12.63125 4 396 .04167596 .06072979 .0377 -.0043 -.0052 13.4375 4 397 -.009489463 .0374 -.023799999999999998 -.001 -.0102 13.975 4 398 .006254136 .16336153 .011899999999999999 .005600000000000001 -.002 16.125 4 399 .009983153 -.0273 .0102 .0204 -.021 15.721875 4 400 .032877937 -.01939402 .041299999999999996 .0368 -.0148 15.453125 4 401 .004111029 -.017930435 .015300000000000001 .0165 .0254 15.12 1 402 .02786315 -.0023 .009300000000000001 .0203 .0587 15.12 1 403 .010636798 .015657144 .0012 -.034300000000000004 .0642 15.39 1 404 .025319545 .008552631 .023 .0024 .0123 15.31875 1 405 -.02397839 .067775436 -.0305 -.0069 .026099999999999998 16.39375 1 406 .04808808 -.01039672 .028900000000000002 .0195 -.0342 16.259375 1 407 -.00146982 .09997934 .0031 -.0029 .0263 17.985 1 408 -.009923947 -.009975757 -.0034000000000000002 .009399999999999999 .0323 17.84875 1 409 .04174441 -.03303435 .0371 .003 -.004 17.30375 1 410 -.015738498 .06354173 -.0012 .0311 -.0046 18.27425 1 411 .032422014 .027650746 .0141 .014499999999999999 -.015700000000000002 18.81975 1 412 .0003361588 -.016992753 -.0189 -.0141 -.0026 18.547 1 413 .01163809 .08887647 .0165 .012199999999999999 .0060999999999999995 20.047125 3 414 .03906288 -.05011905 .0287 .0011 .021 19.0925 3 415 -.02615417 -.0021 -.0255 .027000000000000003 -.0137 19.0925 3 416 -.03970158 -.006985715 -.0478 -.0098 .013000000000000001 18.81975 3 417 .014786337 -.14762753 .0068000000000000005 -.0092 .0165 16.09225 3 418 -.004657065 .06469661 .0058 -.020099999999999996 .0013 17.18325 3 419 -.025457945 .10420159 -.030299999999999997 -.0048 .0176 18.897375 3 420 .035223477 .06966376 .0282 -.0173 .0058 20.26675 3 421 .033094533 -.030727027 .0401 .013500000000000002 -.0281 19.719 3 422 -.02268692 .034633335 -.0231 .028300000000000002 -.0189 20.45175 3 423 .03231816 -.05785406 .0134 -.0235 -.0176 19.34625 3 424 -.030952735 -.04655714 -.0404 .0027 -.0096 18.517124 3 425 .009814958 -.03783284 .0086 .0004 .0055000000000000005 17.792 3 426 .019585105 -.03545 .018000000000000002 -.0265 .008199999999999999 17.236 3 427 .03732891 -.03020968 .0363 -.0067 .010700000000000001 16.78425 3 428 .02217477 .0017768113 .0219 -.0070999999999999995 -.010700000000000001 16.83 3 429 .030243495 -.0044 .021099999999999997 -.0062 .0226 16.83 3 430 .03204386 .0446 .028999999999999998 -.022000000000000002 .017 17.6715 3 431 .037113477 .05561746 .027200000000000002 .029300000000000003 -.0229 18.5955 3 432 .036696006 -.0045 .037200000000000004 .0209 -.0169 18.5955 3 433 .007194822 -.035003033 .0055000000000000005 .0158 .026699999999999998 18.032 3 434 .04234629 .03945 .0335 -.0206 -.0076 18.81 3 435 -.006548882 -.035003033 -.0152 -.0374 -.0072 18.24 3 436 .0197876 .08955 .039599999999999996 -.011699999999999999 .009000000000000001 19.95 3 437 .005676421 .07795714 .0103 .005600000000000001 .0084 21.384375 1 438 .029102586 -.03096667 .0226 -.0268 .004 20.814125 1 439 .01577219 .00979863 .013300000000000001 .019 -.0138 21.09925 1 440 .03019898 .03224865 .0073 .0129 .0103 21.89942 1 441 .029468754 -.0754402 .0206 .0493 -.0391 20.34806 end format %tm ym1
Listed 100 out of 1410788 observations
Use the count() option to list more
Comment