Empirical asset-pricing and systematic-signal research in Python.
I build research pipelines that turn monthly equity data into testable signals: define an information set, construct portfolios, measure risk and return, and evaluate whether the result survives a benchmark model. The repository is organized to make the research questions, implementation choices, and empirical results easy to review.
Question: Does a standard winner-minus-loser signal survive a clean portfolio-construction workflow?
What I built:
- A stock-level 12–2 momentum signal using grouped rolling returns and within-month quintile ranks.
- Lagged price and market-cap screens to keep the investment universe free of look-ahead bias.
- Equal-weighted and value-weighted portfolios, breadth checks, and a long-short spread.
Result: In the stored notebook output, the equal-weighted winner-minus-loser portfolio earns 1.2% per month over 735 months with a t-statistic of 7.11.
Question: Do expensive-to-borrow stocks underperform, and does analyst disagreement help explain the cross-section?
What I built:
- A merge of stock returns, loan fees, analyst forecasts, and factor returns.
- Lagged signals and independent fee/dispersion double sorts to align variables with the investment date.
- Long-short spreads and four-factor time-series regressions.
Result: The high-fee minus low-fee spread is −2.17% per month with a t-statistic of −5.13. Its four-factor alpha is −2.4% per month with a t-statistic of −5.09 in the stored regression output.
Question: Does disagreement in earnings forecasts predict subsequent returns, and can market beta explain the result?
What I built:
- Monthly alignment of analyst and equity data at the security-month level.
- A lagged forecast-dispersion signal with price screens and cross-sectional quintiles.
- Portfolio return analysis and CAPM regressions for the full 1980–2024 sample.
Result: Average portfolio returns decline from 1.31% per month in the lowest-dispersion portfolio to 0.73% in the highest. The high-minus-low spread has a CAPM alpha of −0.884 percentage points per month (t=−6.37).
Open the analyst-dispersion study
Question: Do beta, size, and book-to-market explain differences in expected returns?
What I built:
- Period-by-period Fama–MacBeth cross-sectional regressions on monthly U.S. equity data from 1929–1963.
- Lagged characteristics, transformed size and book-to-market variables, and time-series inference on estimated risk premia.
- A comparison of the full specification with the beta-only CAPM.
Result: In the full specification, beta has weak explanatory power (t=0.67), while log market equity (t=−5.09) and log book-to-market (t=2.72) are priced in the stored output.
Open the cross-sectional CAPM study
- Signal design: lagged information sets, rolling windows, cross-sectional ranks, breakpoints, and investability screens
- Portfolio research: equal- and value-weighted portfolios, long-short spreads, breadth, return distributions, and factor exposure
- Econometrics: OLS, CAPM, four-factor regressions, Fama–MacBeth estimation, fixed effects, t-tests, and clustered inference
- Data engineering: joins across stock, analyst, lending, and factor panels using Pandas
- Stack: Python, Jupyter, Pandas, NumPy, SciPy, Matplotlib, and
statsmodels
| Path | Purpose |
|---|---|
research/ |
Portfolio-ready research questions and signal studies |
research/signals/ |
Momentum, short-selling, and analyst-dispersion signals |
research/asset-pricing/ |
CAPM, factor pricing, and cross-sectional tests |
methods/ |
Reusable workflows for merges, portfolios, regressions, and asset-pricing tests |
data/ |
Local market, factor, short-selling, and analyst-forecast inputs |
references/ |
Supporting readings and research notes |
For a fast review, start with the short-lending study, then compare it with the momentum study and the cross-sectional CAPM test. Each featured notebook begins with its research question, design, and data inputs before the implementation.
git clone https://github.com/aordaz3/Quant.git
cd Quant
jupyter labThe main studies use the CSVs in data/. Some notebooks retain references to original external stock panels or factor files; those inputs are identified in the opening cells.
This is an academic research portfolio, not a live trading system or investment advice. Results are historical, sample-dependent, and intended to demonstrate research design, implementation discipline, and empirical reasoning.