Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Evaluating Portfolio Performance

From   Sheldon Marker <>
Subject   st: Evaluating Portfolio Performance
Date   Thu, 17 Feb 2011 17:02:46 +0000 (GMT)


I would like to evaluate the performance of different portfolio compositions in 
my panel dataset.

Basically two portfolios should be tested, the one with the top 25% returns in 
the data and the one with the bottom 25% returns. Assuming (e.g.) a one-week 
holding period I cumulated the returns for each date and generated a dummy to 
assign the values to the portfolios:

* get cumulated return for 1 week = 5 days
g adj_return_1w = adj_return + l.adj_return + l2.adj_return + l3.adj_return + 

* dummy winner portfolio
g winner_1w = 0 

* dummy looser portfoliog looser_1w = 0 

* create winner portfolioby date, sort: egen winner_1w_pctile = 
pctile(adj_return_1w), p(75) replace winner_1w = 1 if adj_return_1w >= 
winner_1w_pctile replace winner_1w = 1 if f.adj_return_1w >= f.winner_1w_pctile 
replace winner_1w = 1 if f2.adj_return_1w >= f2.winner_1w_pctile
replace winner_1w = 1 if f3.adj_return_1w >= f3.winner_1w_pctile replace 
winner_1w = 1 if f4.adj_return_1w >= f4.winner_1w_pctile 

* create looser portfolioby date, sort: egen looser_1w_pctile = 
pctile(adj_return_1w), p(25) replace looser_1w = 1 if adj_return_1w <= 
looser_1w_pctile replace looser_1w = 1 if f.adj_return_1w <= f.looser_1w_pctile 
replace looser_1w = 1 if f2.adj_return_1w <= f2.looser_1w_pctile replace 
looser_1w = 1 if f3.adj_return_1w <= f3.looser_1w_pctile replace looser_1w = 1 
if f4.adj_return_1w <= f4.looser_1w_pctile

Now I want to use the rolling window technique to evaluate the performance with 
the CAPM

rollreg adj_return adj_rm if winner_1w == 1, robust move(5) stub(w1_winner)
rollreg adj_return adj_rm if looser_1w == 1, robust move(5) stub(w1_looser)


rollreg tries to regress each timeseries in my panel dataset separately. But 
this doesn't work of course since the portfolio restriction produces huge gaps 
in all timeseries.

Can somebody perhaps tell me how to deal with this problem, so that rollreg (or 
any other command that does the trick) uses all observations within the give 
timeframe that are indicated by the dummy and moves on?

Help will be greatly appreciated, thank you so much!

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index