Professional Documents
Culture Documents
Portfolios
Attaullah Shah
Institute of Management Sciences, Peshawar
Email: attaullah.shah@imsciences.edu.pk
Working Paper
Abstract
In this technical report, I show how to use asm a Stata program to construct J-K
overlapping momentum portfolios. Also, I outline details of the primary functions/
features of the program. The methods used in this program for constructing
momentum portfolios are generally in line with Jegadesh and Titman (1993).
However, the program offers additional features that were suggested/used in more
recent papers. For example, (i) the program offers to calculate one-period as well as
n-periods cumulative holding periods returns; (ii) construct portfolios on the basis
of winners and losers stocks that can be defined using any deciles of their past
returns; (iii) construct momentum portfolios using daily, weekly, or monthly
frequencies; (iv) skip users specified n-periods between formation and holding
periods to control for bid-ask spread or non-synchronous trading and (v) perform ttests on the holding period returns.
Contents
Abstract ........................................................................................................................................... 1
1. Introduction ................................................................................................................................. 3
2. Program Requirements................................................................................................................ 3
3. Program Syntax Format .............................................................................................................. 3
4. Options for Different Time Frequencies ..................................................................................... 4
4.1 Daily Frequency .................................................................................................................... 4
4.2 Weekly Frequency ................................................................................................................ 4
4.3 Converting from Daily to Weekly Frequency ...................................................................... 4
4.4 Monthly Frequency ............................................................................................................... 5
4.5 Converting from Daily to Monthly Frequency ..................................................................... 5
4.5 Converting from Daily to any other Desirable Frequency.................................................... 5
5. Cumulative Periodic Returns ...................................................................................................... 6
6. T-tests Results Reporting ............................................................................................................ 6
7. Skipping Periods between Formation and Holding .................................................................... 7
8. Ranking Deciles .......................................................................................................................... 7
9. Results Directory ........................................................................................................................ 8
10. Reading the Output Files .......................................................................................................... 8
11. Calculation of Formation and Holding Periods Returns ........................................................... 9
11.1 Variables Names for Holding Period Returns .................................................................... 9
11.2 The Missing Rows ............................................................................................................ 10
1. Introduction
In a seminal paper, Jegadesh and Titman (1993) documented evidence of the profitability of
momentum portfolios. They calculated momentum portfolio returns as the difference between
current returns of past winners stocks minus current returns of past losers stocks. For increasing
power of their tests, they used portfolios with overlapping holding periods. Thus, for a given month
m, , they suggested to hold a series of portfolios that are selected in the current month as
well as in the previous K - 1 months, where K is the holding period. Specifically, a strategy
that selects stocks on the basis of returns over the past J months and holds them for K months
(referred as J-month/K-month strategy) is constructed as follows: At the beginning of each
month m, the securities are ranked in ascending order on the basis of their returns in the past
J months. Based on these rankings, ten decile portfolios are formed that equally weight the
stocks contained in the top decile, the second decile, and so on. The top decile portfolio is
called the "losers" decile and the bottom decile is called the "winners" decile. In each month m,
the strategy buys the winner portfolio and sells the loser portfolio, holding this position for K
months.
2. Program Requirements
The program written for momentum portfolio strategy is named as asm. asm has the following
three requirements.
If market returns are not needed, then simply generate rm variable with returns equal to zero, i.e.
gen rm=0
The above command is also applicable to a data that has already been converted to weekly,
monthly, or quarterly frequency and the date variable has spacing of one. If the date variable
shows gaps of weeks, months, or quarters, then the above command will not work. In such cases,
relevant option from the following should be chosen.
With the above code, both stock and market returns will be converted to quarterly frequency. Now asm
can be applied as follows.
asm 6 12
Note that no time related option was used with the above code. The reason is asm without time options
assumes that the date variable increments by a value of one. The above code transforms the date variable
first to quarterly frequency, then with the yq option to a quarterly form that increments by value of one.
You can see it by applying the number format to quarter_id variable i.e.
format %9.0g quarter_id
browse
It will use up to 3 periods of formation and up to 6 periods of holding. The option wgenerate tells the
program that the stocks and market returns are in daily format, and need to be converted into weekly
returns. The option results tells the program that one sample t-test should be applied to the holding
periods momentum portfolio returns. This will generate MS Word files with names
Formation_1.doc, Formation_2.doc, and Formation_3.doc, each one of these files will
contain t-test results for each holding period returns.
8. Ranking Deciles
Jegadesh and Titman (1993) used only top and bottom 10% stocks for ranking winners and losers stocks.
However, subsequent studies also used different deciles, for example, using top and bottom 30% stocks
for ranking of winners and losers stocks. asm program offers the option of selecting any desired
percentage for ranking. See the example given below.
asm 3 6, weekly bottom(0.3) top(0.7)
[Can also be written as asm 3 6, w b(0.3) t(0.7)]
It will use up to 3 periods of formation and up to 6 periods of holding. The option weekly tells the
program that the stocks and market returns are already in weekly format, and do not need to be converted
in to weekly returns. The options bottom (0.3) and top (0.7) tell the program the momentum
portfolio returns should be based on top 30% winners minus bottom 30% losers stocks. The default values
for bottom and top are 10.0001% and 90.0001%, respectively. If users need to specify any other
criteria, the bottom and top values can be changed accordingly.
asm 3 6, monthly directory (Test7)
[can also be written as asm 3 6, m d(test7)]
It will use up to 3 periods of formation and up to 6 periods of holding. The option monthly tells the
program that the stocks and market returns are already in monthly format, and do not need to be
converted in to monthly returns. The options directory tells the program to make a separate directory
for momentum files and any other results file in the users current directory with the name Test7
current date_time
9. Results Directory
asm saves results to a new directory each time it is run. The directory is made in the users current
directory with name structure of Results F# - T# - Current date current time. However, if the director
option is used, the results will be saved to the users specified directory. For example;
asm 3 6, results directory (Test1)
It will use up to 3 periods of formation and up to 6 periods of holding. The option results tells the
program that one sample t-test should be applied on the holding period momentum portfolio returns. The
options directory tells the program to make a separate directory for momentum files and any other
results file in the users current directory with the name Test1 current date_time.
LT#
WML#
Where timevar tracks the period in which the holding returns were calculated, this can be days, weeks,
months, or quarters, depending upon the nature of the data or type of options used. i.e mgenerate, or
wgenerate.
WT# refers to winner stocks returns using # number of holding periods. For example, for one period of
formation, we have the next period i.e. period 2 for holding. Immediately after ranking of stocks on the
basis of one period formation, the equally weighted returns of top 10% stock (ranking is done on the basis
of stock returns in period 1) in the next holding period are recorded in variable WT1. Similarly, using one
period formation and 2 periods of holding, the first two periods are used in ranking and the first holding
period available starts from period 3. This way, the variable WT2 records returns of top 10% stocks in the
holding period that are two periods away from the formation period.
Similarly, LT# refers to loser stocks returns using # number of holding periods. For example, for one
period of formation, we have the next period i.e. period 2 for holding. Immediately after ranking of stocks
on the basis of one period formation, the equally weighted returns of bottom 10% stocks (based on the
ranking in period 1) in the holding periods are recorded in variable LT1. Similarly, using one period
formation and two periods of holding, the first holding period be available is from period 3. This way, the
variable LT2 records returns of bottom 10% stocks in the holding period that are two periods away from
the formation period.
And finally, WML# refers to the LT# minus WT# i.e. return of winner stocks minus returns of losers
stocks.
which were included in top 10% stocks in the formation period in period 1
LT1 = the average returns in holding period (i.e., one period after the formation) of those stocks
which were included in the bottom 10% stocks in the formation period in period 1
WML1 = WT LT
Table 1: Holding period returns using one formation and four holding periods
date
date
WT1
LT1
WML1
WT2
LT2
WML2
1960m1
1
1
WT3
LT3
WML3
1960m2
0.016705
0.029236
-0.01253
1960m3
0.003381
-0.03921
0.042594
-0.04387
0.017505
-0.06137
1960m4
0.039224
-0.0128
0.05202
0.022803
-0.00248
0.025279
-0.00643
0.023637
-0.03007
1960m5
1960m6
0.009822
-0.01022
0.020042
0.090786
-0.09871
-0.18403
0.085317
-0.11556
-0.01649
0.10728
0.021073
0.002225
0.018849
-0.17509
0.059534
-0.12851
-0.19679
0.068281
1960m7
-0.03534
0.004865
-0.04021
-0.03031
0.014989
-0.0453
-0.03507
0.023387
-0.05846
1960m8
-0.05672
-0.02388
-0.03284
-0.02278
-0.07614
0.053362
-0.06324
-0.05961
-0.00363
1960m9
0.050374
10
1960m10
-0.04879
0.002217
0.048157
0.00934
0.029376
-0.02004
0.022209
0.012115
0.010095
-0.06443
0.01564
-0.01844
-0.07776
0.059322
-0.05396
-0.0038
-0.05017
**************