1. Introduction
  2. Fama-Macbeth X-Sect Method (1973)
  3. Time-Series Method**
  4. Translating Signals Into Investment Strategies
  5. Simulating World
  6. Further Important Aspects (Meta/Taxes/Factors)

Prerequisites

(There is no great book on the subject. Perhaps the closest is Andrew Ang’s “Asset Management.”)

Major Homework Tasks For Spring-I

Task 0: Learn to Program

Task 1: CRSP

Use CRSP To Create Firm-Size Data Sets (2 Weeks, early summer)

  • This task should be done individually by each and every student.

  • It is easiest to download the relevant data from WRDS first and then writing the program on a laptop.

  • For each stock and year calculate the marketcap on the last day of the year.

  • Calculate the rank of each stock on the last day of the year. (NA if not trading on last day of year)

  • Save your data as a csv data set:

    permno, cusip, ticker, year, yyyymmdd, mktcap, rank(mktcap)

  • Handcheck outliers.

    • For example, which firms had the biggest change in rank from year to year? Does this seem right?
  • Create some test cases, e.g.,

    assert( (permno==10000) and (year==1986) and (rank(mktcap)==223) )

Task 2: Program CRSP

Create Annual Return Data Sets (1 Week, early summer)

  • Write a flexible function that can calculate holding rates of return

    • a holding rate (i.e., compound rate of return) is not the percent change in price. Use the “1 plus” formula.
  • Use this function to create four data sets:

    • Create one data set with annual Jan-Dec buy-and-hold rates of return for all stock-years.
    • Create one data set but starting Jan 10 instead of Jan 1.
    • Do the same, but restrict to stocks that ended the previous year in the top 2,000 stocks.
  • you can alternatively stick all data into one data set

  • Save your result as a csv data set:

    permno, islarge, cusip, ticker, year, mktcap-last-year, rank(mktcap-last-year), yyyymmdd.1, yyyymmdd.T, ret.jan1dec31, ret.jan10dec31

  • Handcheck outliers

    • For example, which firms had the biggest returns in the year? Does this seem right?
    • For example, which firms had the biggest difference in allrjan1dec and allrjan10dec?
  • Create some test cases, e.g.,

    assert( (permno==10000) and (year==1986) and (rank(mktcap)==223) )

Task 3: Compustat

Create a Compustat-based data set (2 weeks, early summer)

  • For each stock and year, pull off the earnings as of June 30.

    • Be careful about how Compustat uses fiscal year.
  • When a stock ends its fiscal year in December, you want to calculate year-to-date earnings.

  • Handcheck a few outliers against SEC or Bloomberg information.

  • Make sure that you have the timing correct for one firm ending fiscal year in March and one ending in October.

  • Create some test cases, e.g.,

    assert( (gvkey==1005) and (year==1986) and (earnings==2.0) )

Finance and Portfolio Basics

Important Finance Data Sources

Warning: Many real-time vendors of cheap financial data introduce survivorship bias by dropping stocks that are no longer trading. They also often forget about dividends.

CRSP is also pretty good at defining what does and does not remain a firm in a merger or name change.

Important: percent changes in price are not rates of return!

Thinking of Stock Return Data

  • Stocks are an irregular of [securities,trading days].

  • Too many stock-days to shoehorn into a regular panel.

    • 1963 is typical start, due to Compustat data availability.
    • 50k stocks (not 5k). 23k (14k) trading days from 1926 (1963).
    • would be about 10GB for daily returns alone in regular panel.
    • but sparse, so more like 2GB.
    • for easy processing, you need 3-5 times as much RAM as data.
  • Annual data is much smaller and fairly easy to handle.

  • you often need to “transpose” the “matrix.”

    • we may want all stocks on a given day [a row?]
    • we may want all days for a given stock [a column?]

Stock Data Questions

  • What fraction of stocks disappear every year?
    • about 10%. Not necessarily negative, due to buyouts.
  • Does this create “survivorship” bias?
    • not on crsp, because most delistings are announced ex-ante, plus they offer a delisting rate of return
  • How should you deal with a \((-90\%, 1000\%)\) return sequence?
    • Was this a price recording blip or not?
  • How do you deal with firms that were not traded for a long time, and then suddenly came back?
    • How does CRSP deal with it?
  • How does stock price data compare to other data? Indexes? Options? Futures? Bonds? Private Equity? Compustat?
    • stocks are typically cleaner and practically marked to market at day’s end.
  • Should you worry about non-normality?
    • Not for stocks. Even though it isn’t perfect.
    • But we aware of non-representativeness, esp with respect to (hard to estimate) rare events.

ASAM

  • Fortunately, ASAM is not a high-activity fund

  • We buy-and-hold roughly for one calendar year.

  • This can also make data handling easier, too.

    • we can work with annual stock returns.
    • we can create them in one first pass
    • we can throw out firms that are too small.
    • oh, and you already created these data sets in your tasks 1 and 2

Finance Questions

What is a Factor?

Other factors are at Ken French’s Online Data.

Definition of Factor

A factor is a time-series of the rate of return on a zero-investment (self-financed) pfio, formed on the basis of an a-priori known signal or characteristic.

What is not a factor?

  • A “characteristic” is not a factor, but something that attaches to a firm-month. For example, IBM’s marketcap was $109.2B in Oct 2018.

  • A “factor-loading” is not a factor. Factor-loadings are like market-betas. They are specific to stocks.

Attribution

  • How could you have a –8% performance but a +6% abnormal performance?
    • your portfolio had a market-beta of 2
    • the market (net of rf) dropped 7%
    • your portfolio (net of rf) dropped 8%
    • and your benchmark model was the CAPM.
  • your total return is the sum of the abnormal return plus the betas times the factor realizations.
    • here, abnormal was +6%
    • due to market was 2*(–7%)
    • and \(6\% + 2\cdot(-7\%)= -8\%\).
  • note that you chose to have stocks with a beta of 2, too!
    • this did not fall from heaven
    • you could have hedged this market-risk
    • in which case, you could have had a market-beta of 0 and just abnormal = normal = 6% rate of return

Signals

What Kind of Stock Investment Strategies Are There?

Investment Strategies

What To Predict: The Period-Ahead Rate of Return

Testing Methods

There are two basic methods to test for cross-sectional signals/ strategies. This will become clear soon.

[Fama-MacBeth]
These are “pooled averages of coefficients from many (monthly) cross-sectional regressions.” They work directly with signals.
[Fama-French]
This is one time-series regression given a strategy’s returns. The difficulty here is that we must define our strategy first.

I will explain them in the next sessions.

In addition, there is a wrong method, which can be useful because it can make quick-and-dirty exploration simpler:

[One Giant Pooled Regression]
Regress future return on your independent variables (signals). - Do trust the T-stats—if you want, mentally divide them by 10. - This should never be used for real, only for exploratory work.