Contributor
Posts: 43

# How to construct monthly rebalanced/overlapping dataset

Hi all,

I'm replicating JT's (2001, JF) 'momentum' strategy and meet a problem about how to exclude stocks with price less than 5. Because this strategy is monthly rebalaced, the problem seems much more complicated than that if portfolio is nonoverlapping. I attached the paper (See P702-703)

There are N stocks in a dataset. For example, stock A's price is 6 at time t, 4 at t+1, 5.5 at t+2, 4.8 at t+3 ...

Time              Stock                     Price                   Return

1985/01            A                           6                        given

1985/02            A                           4

1985/03            A                           5.5

1985/04            A                           4.8

1985/01            B                           6.2

1985/02            B                           5.1

1985/03            B                           4.8

1985/04            B                           6

1985/01            C                           23

1985/02            C                           19

1985/03            C                           20

1985/04            C                           22

........

I know how to calculate the avearge monthly returns rebalanced monthly if no more condition is required. However, now we want to exclude all stocks priced below \$5 at the begining of holding period (e.g., when the begining of the holding period is 1985/01, stock A,B,C's prices are above 5, so they are included in portfolio; for 1985/02, only stock B and C are in portfolio, for 1985/03, A and C, and so on). If the holding period is 3 months, for 1985/04, the rebalanced average monthly return is  1/3(1985/04-02)+1/3(1985/03-1985/01)+1/3(1985/02-1984/12).

If we just use codes 'if price<=5 then delete' at the begining, the result is different from JT(2001), though I got the similar result when I replicate JT (1993) without such price condition. How to construct such monthly rebalanced dataset if condition about price is added?

Thanks

Frequent Contributor
Posts: 80

## Re: How to construct monthly rebalanced/overlapping dataset

data test;

input Time:\$7.    Stock:\$1.                     Price               ;

datalines;

1985/01            A                           6

1985/02            A                           4

1985/03            A                           5.5

1985/04            A                           4.8

1985/01            B                           6.2

1985/02            B                           5.1

1985/03            B                           4.8

1985/04            B                           6

1985/01            C                           23

1985/02            C                           19

1985/03            C                           20

1985/04            C                           22

;

run;

proc sql;

create table want as

select * from test

where stock not in (select distinct stock from test

where price <= 5);

quit;

New Contributor
Posts: 3

## Re: How to construct monthly rebalanced/overlapping dataset

Hello ZZB;
Have you ever solved this problem?
I am facing the same issue. Could you help? please?
Thanks
Discussion stats
• 2 replies
• 1322 views
• 0 likes
• 3 in conversation