User:Devon McCormick/Research/HoldingWinnersSellingLosers3ShortTermReturnPersistence

From J Wiki
Jump to navigation Jump to search

Originally presented 6/10/2007 to the NYC Financial Engineering Meetup. It illustrates the use of J to manipulate data quickly and easily in order to explore topics in quantitative financial research. The previous work is here and the continuation of this is here.

Examining Short-Term Return Persistence

Now we’ll look at how well short-term return for a given period forecasts the following period’s return. We’ll concentrate on only two of our samples at first.

   'dattit seldat inftit selinf'=: selCompleteSets ''
   seltkrs=: (0{"1 selinf)i. 'WOR';'GLW'
   seltkrs{selinf             NB. least and most volatile by px
+----+---------------------------+--------+------+----------+
|WOR |Worthington Industries Inc.|98181110|011600| 1/02/1990|
+----+---------------------------+--------+------+----------+
|GLW |Corning Inc.               |21935010|003532| 1/02/1990|
+----+---------------------------+--------+------+----------+
   adjix=. dattit i. <'Adjust'
   clpxs=. ((dattit i. <'Close'){"1 &> seldat)%adjix{"1 &> seldat
   clvol=. ((dattit i. <'Volume'){"1 &> seldat)*adjix{"1 &> seldat
   $clcrets=. cumret clpxs       NB. We have 245 complete series of 3764 days.
245 3764

We’ll be using the cumulative returns in “clcrets” for these exercises. Cumulative returns are handy to use because we can calculate the return over any period by using only the two cumulative returns at the end-points of the period. Let’s take a look at what these returns look like for 100-day periods:

   cum2pdRet=: 3 : '<:(>:{:y)%>:{.y' NB.* cum2pdRet: cumulative to period return
   ret100dy=. 100 cum2pdRet\"1 ] 64}."1 seltkrs{clcrets
   ('title 100-day Returns;pensize 3;key ',;tkrs,&.>' ') plot ret100dy
   pd 'save png ',DD,'100-dayRets2us.png'
35820

width="876px",height="513px"

However, we’re graphing 100-day returns just because it’s a less cluttered picture. For most of this study we’ll be looking at short periods of around 5 days because this is conveniently short for practical purposes.

Our basic tool for comparing the persistence of period-to-period returns will be the decile square. We make this by dividing a set of returns into deciles, i.e. ten roughly equally-sized groups with the lowest returns in the first decile, the second-lowest in the second, and so on until we have the tenth decile with the highest returns. Once we’ve so categorized the returns, we look at consecutive decile pairs. We show these as a ten by ten table of gray-scaled squares where each square represents the number of observations for the given pair with white for the highest number of observations and black for the lowest number of observations.

   $ret5day=. _5 cum2pdRet\"1](5|1{$clcrets)}.clcrets{~0{seltkrs NB. WOR 5-day rets
752
   graypal100=. makeGrayPal 10^2
   'nobs ixs'=. getNtileObsIxs ret5day;10
   graypal100 viewmat (,nobs) ixs}10 10$0
   10 10$nobs
 9  5  9  6  3  6  9 11  6 11
 6  7  8 10  6  7  7  7 10  7
 3  7  5  8  6 13  4  9 12  8
 7  7  1  5 11 11  6  7  9 11
 3  7  8  7  7  5  7  4  9  4
11 14  8  8  9  9 10  6  7  7
 7  5 10 10  4  5  8  9 10  7
 8  6  8  9  7  8  8  9  5  8
 9  6  9  7  4 13 11  3  4  9
12 11  9  5  4 12  5 11  3  3

This gives a picture, corresponding to the ten by ten table of numbers above, like this: width="804px",height="309px"

Labeled, the decile square would look like this:

DecileSquarelabeled.png

However, it may be more illuminating to look at the labeled table of observation counts that underlies the picture:

5-Day Observations Subsequent Period
Decile # 1 2 3 4 5 6 7 8 9 10
1 9 5 9 6 3 6 9 11 6 11
2 6 7 8 10 6 7 7 7 10 7
3 3 7 5 8 6 13 4 9 12 8
Initial 4 7 7 1 5 11 11 6 7 9 11
Period 5 3 7 8 7 7 5 7 4 9 4
6 11 14 8 8 9 9 10 6 7 7
7 7 5 10 10 4 5 8 9 10 7
8 8 6 8 9 7 8 8 9 5 8
9 9 6 9 7 4 13 11 3 4 9
10 12 11 9 5 4 12 5 11 3 3

So, looking at the first row, we can tell that an initial return period in the first decile (first row - lowest set of returns) was least likely to end up in the fifth decile (fifth column) because the least number of observations in the first row is the three in the fifth column – represented by the darkest (lowest number) square on row 1, column 5 of the preceding picture.

The lowest set of returns in row one was most commonly followed - 11 times in each case - by returns in deciles eight or ten, which represent some of the highest returns.

Looking at a more interesting row, the last one, we see that a return in the top decile (=highest return) was equally likely to be followed - in 12 cases each - either by the bottom (column one) or sixth decile (column six). In general, a top decile return was very seldom followed by a return in either of the top two deciles (columns nine and ten) - with only three observations each for row ten. This tells us that extremely good performance is likely to be followed by underperformance.

Looking at the same for our high-volatility equity, GLW, we see a different pattern of relations between the initial and subsequent return periods: width="890px",height="337px"

Here, the white square in the upper-left corner, corresponding to 16 observations, tells us that a period of low performance is likely to be followed by another such period for this particular asset.

Note that our choice of deciles and 5-day returns are both rather arbitrary. Do the patterns look similar if we consider groupings of nine to eleven, instead of only the decile grouping of ten, and if we look at four to six day return periods?

In the following three by three grouping of decile squares, the rows are groupings of nine, ten, and eleven, respectively whereas the columns use four, five, and six-day return periods, respectively. So, the first square above – for WOR – can be found in the center of the grouping. width="1008px",height="524px"

Here we begin to see the limitations of the visual representations of the decile squares. We probably want to look at numeric summaries representing the average following decile for a given starting decile. This is shown by the weighted average calculated by “wtTile”, as shown here:

NB.* wtTile: weighted ntile given vec of observations/ntile.
wtTile=: 13 : '(+/,y)%~y +/ . * >:i.#y'

Here are the summary numbers for the previous sets of groupings of 9, 10, and 11 for four, five, and six day return periods, respectively:

   WORRets=. clcrets{~0{seltkrs **NB. WOR returns**
   ni=. ntilesOnDDayRets&.> (,<"0&.>9 10 11,&.>/4 5 6),&.><<WORRets
   9 10 11,&.>/4 5 6            **NB. # quantile groupings by # days/return period**
+----+----+----+
|9 4 |9 5 |9 6 |                **NB. 9 groups for 4, 5, and 6-day returns**
+----+----+----+
|10 4|10 5|10 6|                **NB. 10 groups for 4, 5, and 6-day returns**
+----+----+----+
|11 4|11 5|11 6|                **NB. 11 groups for 4, 5, and 6-day returns**
+----+----+----+
   nobs9=. {.&>ni
   ,.>&.>(9$3{.1)<;.1 ]0.01 roundNums &.> wtTile &.> nobs9
+------------------------------------------------------+
|0.62 0.51 0.57 0.55 0.54 0.56  0.6 0.55 0.51          |
|0.58  0.6 0.59 0.59 0.51 0.54 0.54 0.55 0.48          |
|0.59 0.54 0.57 0.55 0.57 0.61 0.55 0.52  0.5          |
+------------------------------------------------------+
| 0.6 0.54 0.55 0.57  0.4 0.68 0.56  0.6 0.52 0.51     |
|0.58 0.56 0.61  0.6 0.45 0.59 0.57 0.55 0.53 0.47     |
|0.58 0.54 0.58 0.55 0.54  0.6 0.58 0.54 0.51  0.5     |
+------------------------------------------------------+
| 0.6 0.54 0.55 0.53 0.55 0.53 0.54 0.56 0.58 0.52 0.49|
|0.56 0.59 0.57 0.62 0.58  0.5 0.53 0.54 0.51 0.55 0.45|
|0.57 0.54 0.58 0.55 0.52 0.57  0.6 0.56 0.52 0.53 0.47|
+------------------------------------------------------+

Which look like this:

width="859px",height="503px" width="860px",height="505px" width="202px",height="16px" width="861px",height="523px"

From the way these graphs slope downward to the right, we see that the highest returns tend to be followed by the worst returns.

The previous work is here and the continuation of this is here.