asm | J-K  Momentum Portfolios in Stata

A large number of research papers have provided pervasive evidence in support of the momentum strategy. In a seminal paper, Jagadesh and Titman (1993) show that buying past winners stock and selling past loser stocks (a zero-investment momentum portfolio) yields significant positive returns over a three to twelve months period. Following them, a large number of studies report similar results for both local and international markets (see, e.g, Geert, 1998). Even today, this area attracts researchers in a variety of ways and investment avenues. One common problem with momentum portfolios construction is the extensive labor work using conventional spreadsheet programs such as MS Excel, specifically constructing portfolios in an overlapping fashion. To overcome this issue, I have written an easy to use Stata® program, asm.ado, that offers a large number of options which have been used in the momentum literature. This program employs well-known momentum portfolio strategies as suggested in Jagadesh and Titman (1993) and many other options suggested in subsequent papers. This program is equally useful for academics and practitioners. The program offers the following features:

1.Formation Period | J-Period Portfolios
asm.ado makes portfolios of stocks in the formation period based on stocks previous J-months/ weeks/ periods cumulative returns or cumulative market excess returns.

2. Portfolios’ Ranking | Ranking Deciles

The formation period portfolios can be formed on any given deciles of stock returns such as top and bottom 10%, 20%, or 30% stocks or any other user-defined ranking criteria. The default option is top 10% winner stocks and bottom 10% loser stocks

3. Holding Period | K-Period Portfolios
The holding period stock returns or market excess stock returns can be calculated up to any number of J-periods, given that J+K does not exceed the total number of periods in the data set. This process is repeated in overlapping fashion until all available periods are exhausted.

4. Skip Periods | Skip Periods between J and K
The program offers the skip option i.e. skipping n-number of periods/weeks/months between formation and holding periods for estimating holding period returns. This option is included to control for non-synchronous trading or bid-ask spread features of stocks.

5. File Output | Returns to winners and losers
The program creates Formation_#.dta files that contain returns of winners and losers stocks in holding periods. So depending upon the number of formation period specified, the program will create # number of files, each containing returns of a specified number of holding periods.

6. Cumulative Returns | Cumulative holding returns
With the option cumulative, the program calculates cumulative returns from 1 up to N in the holding periods for winners minus losers portfolios. The default is to calculate only given nth period returns for the momentum portfolio in the holding period. The cumulative feature is in line with some of the recent papers on momentum.

7.  t-tests Results | File output
With the option results, the program tests the winners minus losers portfolio returns in the holding periods with one-sample t-tests and saves the results to a Word file in the results directory.

8. Newey Results | MS Word File output
With the option newewy, the program tests the winners minus losers portfolio returns in the holding periods with one-sample t-tests, adjusting the standard errors for overlapping periods formation and holdings. This option can be used instead of t-tests.

9. Weekly and Monthly | Converting from daily to weekly or monthly
If users have daily frequency data, the data can be converted to the weekly frequency with wgenerate option or to the monthly frequency with mgenerate option. If the data is already in weekly or monthly frequency, then options weekly or monthly are used. Further, different workarounds are possible to make momentum portfolios on any other desired frequency.

10. Program Manual | Examples and Explanations
asm.ado program manual and examples are included in a PDF file as well as on this page.
Program Manual can be downloaded in PDF. There is also a video tutorial on how to install and use this program

Program Pricing

The program is available for a nominal price of $79, a six months single-user license and for $200 for institutional users. A discount of 20% is given to students. Payments can be made through Paypal / Debit Card / Credit Card or Bank Transfer. Please note the above price is exclusive of any transaction/fund transfer fee. Contact for any other purchase information at