Empirical Asset Pricing via Machine Learning
Shihao Gu et al. (3 authors), 2020 · The Review of Financial Studies
What the paper asks for.
A 3-layer feed-forward neural network (NN3, hidden widths 32-16-8) trained on cross-sectionally rank-normalized firm characteristics produces monthly excess-return forecasts whose top-vs-bottom decile equal-weighted long-short portfolio earns a positive risk-adjusted spread.
- Type
- ml
- Implementation
- pandas
- Rebalance
- monthly
- Long-short
- yes
- Data
- One-command fetcher for WRDS-sourced task data
- Operational scope
- The paper-defined methodological core is retained; the fixed instruction instantiates only the data mappings, interfaces, and evaluation conventions needed for execution.
- 01 Data loading
- 02 Feature engineering
- 03 Model fitting
- 04 Signal generation
- 05 Portfolio construction
- 06 Execution
23 properties · 80 attempts.
Each row is one requirement the strategy must satisfy. The bar reports the share of observed checker verdicts that pass; missing checker output is not converted into a property verdict.
- A1no backfillstage · data loading76/79
- A2no global normalizestage · feature eng73/79
- A3no future data accessstage · feature eng77/79
- A4causal consistencystage · signal gen74/79
- A5no survivorship biasstage · portfolio79/79
- A6train test temporal orderstage · model fit79/79
- A7data frequency alignmentstage · data loading79/79
- A8transaction timingstage · execution78/79
- A9signal delay teststage · signal gen78/79
- A10e2e metric consistency75/79
- B1nn3 architecture 32 16 8§§2.2.4 “and 16 neurons, respectively; NN3 has three hidden layers with 32, 16, and 8 neurons, respectively;”provenance · paper-explicitstage · model fit49/79
- B2feature cross sectional rank to neg1 pos1§§3.1, footnote 29 “We cross-sectionally rank all stock characteristics period-by-period and map these ranks into the [-1,1] interval”provenance · paper-explicitstage · feature eng51/79
- B3missing chars imputed cross sectional median§§3.1, footnote 30 “Another issue is missing characteristics, which we replace with the cross-sectional median at”provenance · paper-explicitstage · feature eng77/79
- B4target variable one month excess return§§3.1 “the average number of stocks per month exceeding 6,200. [28] We also obtain the Treasury-bill rate to”provenance · paper-explicitstage · model fit72/79
- B5decile sort n quantiles 10§§3.4.2 “one-month-ahead out-of-sample stock return predictions for each method. We then sort stocks into”provenance · paper-explicitstage · signal gen73/79
- B6long top decile short bottom decile§§3.4.2 “Finally, we construct a zero-net-investment portfolio that buys the highest expected return stocks”provenance · paper-explicitstage · signal gen73/79
- B7equal weighting within legs§§3.4.2 / Table A.9 “to those of Table 7, but the Sharpe ratios are substantially higher. For example, the long-short”provenance · paper-explicitstage · portfolio75/79
- B8monthly rebalance frequency§§3.4.2 “of portfolios to directly exploit machine learning forecasts. At the end of each month, we calculate”provenance · paper-explicitstage · portfolio55/79
- B9annual refit with expanding or rolling window§§3.1 “machine learning algorithms are computationally intensive, we avoid recursively refitting models each”provenance · paper-explicitstage · model fit74/79
- B10evaluation period 2010 2019§Section 3.1 “We divide the 60 years of data into 18 years of training sample (1957-1974), 12 years of validation sample (1975-1986), and the remaining 30 years (1987-2016) for out-of-sample testing.”provenance · benchmark-specifiedstage · data loading69/79
- B11r2 oos no demeaning zero benchmark§§2.7 (Performance Evaluation) “A subtle but important aspect of our _R_ [2] metric is that the denominator is the sum of squared”provenance · paper-explicitstage · model fit79/79
- B12prediction directional sanity§Sections 2.2.4, 3.1, and 3.5 “The models produce one-month-ahead excess-return predictions used to sort stocks cross-sectionally.”provenance · paper-inferredstage · model fit74/79
- B13sp sign convention§Section 2.2.4 “The last group includes valuation ratios and fundamental signals, such as earnings-to-price (ep), sales-to price (sp).”provenance · paper-explicit18/79
The lowest-passing observed requirement is sp sign convention: 18 of 79 observed checker verdicts pass. The full property list above shows whether errors concentrate in domain-level validity or the paper-specific strategy logic.