Projects
I build and test expected-return models on large U.S. stock-characteristic panels, and the tools that take a model to a portfolio and make that step checkable. My research (PhD in Finance, Imperial College London, 2026) studies regularised and latent-factor estimators on 36 to 153 characteristics built from CRSP/Compustat; I work in Python (NumPy, pandas, SciPy, scikit-learn) and MATLAB. Outside the papers, I helped build the Imperial Student Investment Fund’s Python research and trading platform. Separately, in a personal capacity, I take on independent, project-based advisory work for investment teams; see Independent advisory. Each page states what I built, what the evidence shows and where it stops.
Research tools
Each tool below is a reusable analysis function, demonstrated on one archived research example. The example data are historical; each page shows the function: its inputs, its outputs and where it stops. The Research Toolkit menu collects them, with an overview.
Return-State Behavior Profile
Portfolio behaviour and risk diagnostics
How did a return stream behave in normal months, strong rallies, recoveries, downturns and tail months? From dated strategy and benchmark returns, the function computes conditional returns, downside beta and hit frequencies for each market state, with observation counts and small-sample warnings.
- Example data: an archived systematic long–short U.S. equity strategy backtest, monthly data Apr 2007 – Nov 2025 (224 months); a research case study, not an audited track record, and a configuration selected from several in an earlier study (selection bias not corrected); its signal loadings were estimated on a sample that may overlap the backtest period, so it is not an out-of-sample result.
- Interactive demonstration: 7 return streams (four archived, three built from public market and Treasury-bill returns) × 3 state definitions on the full sample, 21 results computed at build time. Half-sample results are not published, because they would let single months of the private stream be reconstructed.
- Not claimed: future returns, actual trading, or a factor swap on fixed data; a new factor needs a new backtest before these diagnostics apply.
risk diagnostics market-state analysis downside beta tail observation counts
Macro Forecast Evaluation & Regime Diagnostics
Forecast evaluation workbench
How should competing forecasts be judged when economic relationships change? From per-origin forecast records, the function scores models on the same origins, horizon and target, tracks the cumulative loss differential and tests the null of equal predictive accuracy (Diebold–Mariano test), next to a monitor of inflation persistence.
- Example data: UK services inflation, February 2026 research snapshot; ONS monthly data through Dec 2025.
- Interactive demonstration: output version, horizon, model and comparison window switch among results computed at build time from the archived records.
- Not claimed: a forecast, an operational forecasting service, or that one model forecasts better in general.
expanding-window pseudo-out-of-sample evaluation, look-ahead documented forecast benchmark design information timing robustness checks
Start here
Which positions a factor model represents: exposures, hedges and holdings
Hedge a value position with the plain ruler, and 46.10% of it, by squared stock weight, still lines up with the model’s factor loadings.
NA-IPCA toolkit: estimation code with an audit trail
An audit record on every fit, across 618 rolling windows.
Near-identical forecasts, different books: the gap traces to a small fixed ridge in the risk model, so audit the optimiser before crediting the forecast.
Hiring teams: email yang.liu19@imperial.ac.uk for a short walkthrough of the NA-IPCA toolkit code, its test logs and an audit record.
What each project shows
| Skill | Where | Status |
|---|---|---|
| Latent-factor models on a large feature set: exposure measurement, hedging rules, simultaneous inference | The Ruler Matters (working paper) | Measured, in the paper |
| Latent-factor models, rolling out-of-sample design | From forecast to portfolio; the two ruler pages | Measured: 618 rolling months, about 2,000 stocks a month; fixed-window and monthly-refit splits, 2007–2025 |
| Covariance and second-moment estimation: shrinkage, exponentially weighted moving averages (EWMA), eigenvalue filtering | Building the characteristic ruler | Measured, 171 rolling windows |
| Portfolio construction and trading costs | From forecast to portfolio; Universes, trading costs and backtest checks | Measured, before costs plus a cost proxy |
| Research code with release controls and an audit trail | NA-IPCA toolkit | Built, self-certified |
| Financial NLP | NLP proposal | Planned, not run |
| Governance of AI coding assistants in research | ISIF-AIOS design | Designed, v1.0 |
| Econometrics teaching | Teaching notes | Teaching |
Terms used on these pages. To say how much of a stock’s expected return each driver explains, a model must first decide when two combinations of characteristics are really different, and how large each one is; the rule it uses is the ruler (formally, a metric: an inner product on combinations of characteristics). A combination (a direction) gives every stock a score; it is not a portfolio. The plain ruler (the Euclidean or identity metric) judges a direction by its weights alone; the characteristic ruler (the Gram metric, taken from the characteristics’ cross-sectional Gram matrix) judges it by the scores it gives real stocks. A ruler is a measurement convention, not a better model. IPCA (instrumented principal component analysis) is a latent-factor model whose loadings are linear in stock characteristics; NA-IPCA (No-Arbitrage IPCA) rebuilds it on the characteristic ruler and adds a capped intercept, the part of expected return no factor in the model explains.
Machine learning and portfolios
Factor-model forecasts, rolling U.S. backtests and controlled comparisons, followed to holdings, risk and costs.
Which positions a factor model represents: exposures, hedges and holdings
Expanding an IPCA library from 36 to 153 U.S. stock characteristics raises in-sample fit, yet the model’s factors represent momentum and size positions less fully. Measured on the stocks actually held, a hedge built with the plain ruler leaves 46.10% of a value position, by squared stock weight, still lined up with the model’s factor loadings (pp. 4–6). A check to run before trusting a better-fitting model for hedging.
- 225 monthly formation dates, March 2007 to November 2025; models re-estimated each March on the previous 240 months, 19 times (Section II.A, p. 9; Table I, p. 10).
- Three latent factors plus six observed ones (market, size, value, profitability, investment and momentum), with and without a characteristic intercept, on 36 and 153 Jensen–Kelly–Pedersen characteristics in 11 economic groups (Section II.B, p. 11; Table I, p. 10).
- Stocks split permanently into disjoint source and target groups by a fixed hash: the factors are learned on one group and evaluated on the other (p. 9).
- Hedging rules compared at the same characteristic target: the plain-ruler (coefficient) hedge, the loading-neutral hedge measured on current stocks, and a historical minimum-variance hedge (Section V, pp. 24–25).
- Gross holdings, one-way turnover and subsequent variance for every policy, with simultaneous intervals over families of twelve comparisons from a twelve-month block bootstrap (Section II.C, pp. 12–15); turnover measures trading volume, not costs (p. 13).
factor models (IPCA) hedging and exposure control block-bootstrap inference holdings and turnover accounting
From forecast to portfolio
Long–short books on about 2,000 U.S. stocks a month over 618 months, before costs: NA-IPCA with its intercept (alpha) term reaches a Sharpe ratio of 2.49, but 1.12 since October 2007; near-identical forecasts give different books.
portfolio construction backtesting factor models
3 exhibits · related: Same Forecasts, Different Portfolios
Building the characteristic ruler
Stabilising a 153 × 153 matrix in rolling windows
Seven ways to estimate the 153 × 153 Gram matrix of the characteristics (the characteristic ruler), scored on how they split the fit and on numerical conditioning: the stability problem any desk meets with a large rolling covariance matrix.
covariance estimation shrinkage diagnostics
3 exhibits · related: Same Forecasts, Different Portfolios
Universes, trading costs and backtest checks
Where the models’ advantage holds across five stock-size universes; the one-way trading cost at which each model’s average return falls to zero under a turnover proxy (87 to 146 bp; a sensitivity check, not a break-even cost); and a checklist of what each backtest number has and still lacks.
trading costs universes backtest validation
3 exhibits · related: Same Forecasts, Different Portfolios
Same fit, different attribution
A hidden ruler in statistical factor models
Same data, same fit, different attribution: switching the ruler (the metric) moves expected return between the factors and the intercept without changing how well the model fits.
factor models attribution PCA
3 exhibits · related: Geometric Framework, Characteristic-Space Metrics
Estimation tools
Code that other people can rerun and audit.
NA-IPCA toolkit: estimation code with an audit trail
Two Python packages I wrote for IPCA-family factor models: one builds and checks the characteristic ruler (the Gram metric), the other fits the models and writes an audit record for every fit. The 618 rolling windows of the intercept fit in Same Forecasts, Different Portfolios were estimated with this release.
Python numerical linear algebra unit and parity tests reproducibility
3 exhibits · related: Data & Code, Same Forecasts, Different Portfolios
Text and AI
A text-signal research plan, and a workflow in which AI coding assistants work under human review.
Firm- and regime-conditioned NLP alpha
A research plan to make text signals depend on the firm and on observable market conditions, and to deliver calibrated expected-return estimates with a confidence measure instead of a ranking.
NLP probability calibration look-ahead control research design
3 exhibits · Research proposal (PDF, 2 pages, shared for academic use)(opens in a new tab)
AI-assisted research workflow: the ISIF-AIOS design (v1.0)
A one-page workflow design so that students and AI coding assistants work to one standard: each task comes as a versioned job package and must return a hashed record, and a person signs off.
AI coding assistants workflow design provenance
3 exhibits · related: NA-IPCA toolkit
Also: teaching
Teaching notes: Financial Statistics
Lecture summaries and worked solutions I wrote as Graduate Teaching Assistant for Financial Statistics, a graduate econometrics course at Imperial Business School.
econometrics teaching writing
Teaching notes (PDF, 96 pages, 15 MB, shared for academic use)(opens in a new tab)
Returns are before trading costs unless stated. The reports behind these pages are working documents; the papers under Research hold the formal results. NA-IPCA toolkit code is shared on request on the terms set out on Data & Code. Documents marked “PDF, shared for academic use” may be read, cited and used in teaching and research with attribution; for any other use, please ask. Positions and industry roles are on the CV.