Announcement

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

  • How to construct equal weighted portfolio using Stata

    Hi,

    I have date and returns for 5 factors in different columns.
    I need to construct a equally weighted portfolio based on above 5 factors.
    How can i do that using Stata.

    Thanks,
    Priyanka

  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Also, remember we're mostly not from your research area so many who might help you won't know what you mean by equally weighted portfolio.

    There have been many postings on Statalist on setting up portfolios. Read them, work with the suggestions and repost if you can't solve your problem

    Comment


    • #3
      Hi,

      Thanks for your suggestion Phil Bromiley.

      Below is my data.

      Equal weighted portfolio is a type of weighting that gives the same weight, or importance, to each stock in a portfolio. The smallest companies are given equal weight to the largest companies in an equal-weight portfolio. This allows all of the companies to be considered on an even playing field.

      That said, the portfolio will give 1/5th weight to each return and calculate the return for the portfolio.


      ​​​​​​​input str10 Date float(AQR_BAB_Equity_Global AQR_BAB_Equity_Global_Ex_USA AQR_BAB_Equity_Europe AQR_BAB_Equity_NorthAmerica AQR_BAB_Equity_Pacific)
      "02/01/1989" .0007867895 .001352248 .004919968 -.0006278603 .0003611961
      "02/02/1989" -.0031137664 -.0044603357 -.002768874 -.0003766088 -.005150041
      "02/03/1989" -.004062445 -.005494362 -.0031879554 -.0011646717 -.006404157
      "02/06/1989" -.0010285538 -.002384932 .0022835757 .001752499 -.004143994
      "02/07/1989" -.0040509882 -.004746705 -.003431897 -.00243625 -.005416218
      "02/08/1989" -.0019795732 -.004321589 -.001226259 .002626217 -.005530933
      "02/09/1989" .005862428 .007329591 .006759886 .002826773 .007732463
      "02/10/1989" -.003496174 -.004982997 .0044093532 -.00003545 -.008746514
      "02/13/1989" -.003198736 -.0037226356 .006633747 -.0017380102 -.007747027
      "02/14/1989" .0001658694 .0000616569 -.0021568062 .0008016996 .0005407099
      "02/15/1989" -.0022028731 -.0030282165 .0014358504 -.0006382364 -.004648347
      "02/16/1989" -.001387111 -.0022116846 .002598997 -.0001431173 -.0037366885
      "02/17/1989" -.0009880133 -.0011811402 .0006003275 -.0009047604 -.001627015
      "02/20/1989" -.0010432986 -.001420137 -.002668862 -.0002543799 -.001028876
      "02/21/1989" .0021941515 .002786594 .0001852932 .0009712226 .0038229746
      "02/22/1989" -.0000819854 -.001820971 .004846304 .003292127 -.0043387916
      "02/23/1989" .0015774486 .0024200534 .003252931 -.0003414424 .0023787876
      "02/24/1989" .0007991435 .0000415491 .0001274379 .0023348264 -.000083895
      "02/27/1989" .001146104 .0018117513 -.0004398451 -.0002864123 .0027833006
      "02/28/1989" .0020971023 .0008463088 -.002504547 .0044858474 .0020230606
      "03/01/1989" -.0007366916 -.0004965425 -.0043040025 -.0011820717 .0007811802
      "03/02/1989" -.002509591 -.0019515642 -.0028514725 -.003721061 -.0015748732
      "03/03/1989" -.0001122012 -.0011044692 -.002603637 .0017177513 -.0005022125
      "03/06/1989" -.000655545 -.001408178 -.003350594 .001010302 -.0008703194
      "03/07/1989" -.0009675246 -.002909652 .0007932373 .0032387844 -.004409595
      "03/08/1989" -.0029298475 -.003735715 -.0010601341 -.0013510362 -.0046409676
      "03/09/1989" .0013836744 .0010249089 .003201842 .001651085 .0005820355
      "03/10/1989" .0003856974 -.0020108677 -.0000972641 .005521677 -.002969405
      "03/13/1989" -.0011235705 -.0008317061 -.0009474664 -.0018360268 -.0006913889
      "03/14/1989" -.0013584843 -.003338647 -.0011795845 .00290595 -.004363721
      "03/15/1989" -.002766068 -.003819119 .0005515562 -.0002877745 -.005627763
      "03/16/1989" -.0012286665 -.003052135 .0023149177 .002459728 -.005030728
      "03/17/1989" .001622281 -.0008404422 .005039711 .006288259 -.00285296
      "03/20/1989" -.0013243207 -.0019849013 .002538939 .0003588034 -.0038749615
      "03/21/1989" -.0011291571 -.000860771 -.003585947 -.0015448706 .000034324
      "03/22/1989" .000328402 -.0005717525 .0025571964 .002034477 -.0016710454
      "03/23/1989" -.0015237886 -.0019059188 .0006124052 -.0005264954 -.0029913145
      "03/24/1989" .001128892 .0018256 -.0003924028 -.0002896004 .002685137
      "03/27/1989" -.004609295 -.006267191 -.0006116964 -.0013603034 -.008344337
      "03/28/1989" -.0008611235 -.0020159194 -.003815973 .001262732 -.0013387273
      "03/29/1989" -.0018830036 -.0036257934 .002006073 .0016434687 -.005809768
      "03/30/1989" .0021717728 .001709069 -.0019202793 .0028624344 .0031337214
      "03/31/1989" .0006551816 .0009040592 -.00318697 .0000687432 .0024495786
      "04/03/1989" .002428773 .003241789 .0001477153 .0004597631 .0046411767
      "04/04/1989" .00136184 .002019344 .0005540447 .000033446 .002589782
      "04/05/1989" -.0008777527 -.0007421228 .0015136193 -.0009607733 -.0016620617
      "04/06/1989" .0017915434 .0022664387 .0021080715 .0007924912 .002387178
      "04/07/1989" -.0011736925 -.0006448797 .0022772753 -.0021793623 -.0016827107
      "04/10/1989" .003535967 .0037975344 .0023083691 .0027494626 .0045276075
      "04/11/1989" -.0019651789 -.0011330073 -.00440063 -.003359453 -.0001188847
      "04/12/1989" .0021787703 .002872929 -.001347552 .0008504563 .0043565165
      "04/13/1989" .0026734474 .003012263 .001227885 .0021170531 .0035702705
      "04/14/1989" -.0008081042 -.0012991696 -.003122235 -.0000293498 -.0005434541
      "04/17/1989" .0009837364 .0004170314 -.0006964903 .0019720106 .0008781284
      "04/18/1989" -.0000356324 .0016076186 .0021235186 -.003189605 .0014227192
      "04/19/1989" .0015142373 .0017851004 .0008679158 .0009660372 .0021220322
      "04/20/1989" .0040157917 .004292841 .006432464 .003219512 .003729189
      "04/21/1989" .0015512788 .0031712744 .0008365584 -.001827574 .0041542146
      "04/24/1989" -.001522534 -.003202669 -.0010611156 .00187885 -.0040380843
      "04/25/1989" -.002879645 -.005380695 -.0002000007 .0021246288 -.007300256
      "04/26/1989" -.0041493876 -.005487586 -.003037572 -.0014285804 -.006453169
      "04/27/1989" -.0004237771 -.0015336586 -.002980278 .002026386 -.0012533867
      "04/28/1989" -.0001198985 -.0014360647 -.0000639297 .002754391 -.00217735
      "05/01/1989" .0003299733 .0013253754 .0003785377 -.0017123958 .0018153694
      "05/02/1989" .002441122 .003565852 .0014806004 .0004901883 .0042205267
      "05/03/1989" -.0012224878 -.0005837714 -.0016896353 -.002363996 -.0002193514
      "05/04/1989" -.0003980058 -.0005838631 -.001893055 .0001586509 -.0002633683
      "05/05/1989" -.0003989331 3.9303e-06 .0001477945 -.0010734565 -.0001042848
      "05/08/1989" .002931937 .0032833954 .002470574 .0021995916 .003632121
      "05/09/1989" .005825907 .00847003 .0003792738 .0003295127 .011789178
      "05/10/1989" .00040967 .0017101823 .002975792 -.002138018 .0013275302
      "05/11/1989" -.00284402 -.002917263 .0006345643 -.002497437 -.0043347282
      "05/12/1989" -.0008347923 -.0001017791 -.002682628 -.002223619 .0008258566
      "05/15/1989" -.0007926361 -.0015989243 -.0009917766 .0009738342 -.0019862505
      "05/16/1989" .0025341506 .003193952 .0003503623 .0011549005 .0043064356
      "05/17/1989" -.0025314156 -.0020514152 -.0033719076 -.003251228 -.001716401
      "05/18/1989" .0012334724 .0021185463 -.004446172 -.0004062401 .0044274377
      "05/19/1989" .0022864826 .004834117 -.003227578 -.002841701 .0078800665
      "05/22/1989" .0011693178 .001364291 .0006051971 .0007162069 .001685069
      "05/23/1989" .0005669275 -.0010366867 -.00138307 .00388113 -.0010835803
      "05/24/1989" -.004378295 -.00686216 -.0016727207 .0007909552 -.008973742
      "05/25/1989" .001085742 .0004205659 -.0027006115 .0021269445 .0016719657
      "05/26/1989" -.002505059 -.00377337 -.001918349 .000228016 -.004661228
      "05/29/1989" -.0019465657 -.0027612564 .0002561226 -.000274225 -.003918283
      "05/30/1989" .001023874 .0001186092 .003518338 .0029139086 -.0012148973
      "05/31/1989" .006578827 .010153935 .0020251756 -.0004059096 .013238963
      "06/01/1989" .004699773 .008655656 .000883901 -.00258933 .01188469
      "06/02/1989" .003367794 .0040698694 .0035248294 .0019036657 .0044575934
      "06/05/1989" .0012765516 -.0000725908 -.0003769955 .0038529525 -.000138896
      "06/06/1989" -.0042931647 -.008535175 -.003691865 .0032462596 -.010422758
      "06/07/1989" -.003409043 -.005684122 -.0031881584 .0009074332 -.006921114
      "06/08/1989" -.0016653775 -.002050134 -.0014502254 -.0007539065 -.002474231
      "06/09/1989" -.0020630783 -.0036151146 -.0002578601 .0012029106 -.005343824
      "06/12/1989" .001730899 .0035209695 .001254834 -.0015880633 .0045872573
      "06/13/1989" .0008058127 .0002469036 .00248686 .0017930625 -.0006018668
      "06/14/1989" -.0007209273 -.0022967698 -.0025310966 .0019224683 -.0021845012
      "06/15/1989" .003715114 .00398811 .0014739493 .0032185074 .004938534
      "06/16/1989" .002748851 .0036789884 .0002761751 .0006288228 .005363253
      "06/19/1989" .005136385 .007581518 -.001489623 .0005056333 .011264914
      "06/20/1989" .002845456 .004933238 .003094011 -.0006435454 .005528295
      end

      Comment

      Working...
      X