This repository implements cardinality-constrained portfolio models to investigate whether optimizing a limited set of holdings changes the probability of underperforming the value-weighted market or Treasury bills, and how the answer depends on the risk measure and eligible universe. No empirical investment result has been produced; the planned evaluation requires a licensed CRSP extract that includes delisted firms. Nothing here is investment advice.
The repository implements mean–variance, perspective mean–variance, absolute-deviation, CVaR, restricted index-tracking and third-central-moment formulations. Public benchmark results test the implementation; empirical comparisons await the licensed extract.
A concentrated portfolio holds a small part of the equity market. Its performance depends on the names selected, the weights assigned and the rebalancing rule. Index sampling seeks to track a benchmark with fewer holdings; tracking error measures variation in returns relative to that benchmark. Active Share measures the difference in portfolio weights from the index. Canakgoz and Beasley (2009), Cremers and Petajisto (2009).
Long-horizon stock wealth is positively skewed: a small group of firms accounts for the market's net wealth creation above Treasury bills. Omitting delisted firms introduces survivorship bias into an evaluation of stock selection. Rebalancing also changes the distribution of compound returns, so a small rebalanced portfolio and a small buy-and-hold portfolio answer different questions. Bessembinder (2018), Farago and Hjalmarsson (2023).
The project compares risk measures and eligible universes. It makes no claim of priority over the existing literature.
| Model | Criterion | Reference route | Independent check |
|---|---|---|---|
| F1 | mean–variance | SCIP | continuous KKT frontier; pinned cutting-plane bounds |
| F1p | perspective reformulation of F1 | SCIP | objective agreement with F1 |
| F2 | mean absolute deviation | HiGHS | deviation recomputed from returns |
| F3 | CVaR | HiGHS | sorted losses with a fractional tail atom |
| F4 | lexicographic regression tracking, zero costs | HiGHS | regression and tracking error from returns |
| F5 | mean, variance and third central moment | SCIP | pinned small-support lattice value |
The model states the equations and source restrictions. F4 has no identical target in the paper's transaction-cost table. F5's default central-moment coefficients do not give a literal CRRA Taylor expansion about unit wealth.
Validation records the gates and checks; benchmark tables are generated from result bundles carrying the code revision, input hashes, parameters, solver certificate and host. A limit is reported with its achieved gap. Open issues identifies unavailable empirical evidence.
One Rust crate, pf, with HiGHS and SCIP as its solvers. No commercial solver is required.
Building HiGHS needs CMake and a C++ compiler; SCIP's bindings need libclang. The build
downloads SCIP's prebuilt library.
cargo test --locked
cargo run --release -- bench --run --only g1-port1 --time 10
cargo run --release -- bench --run --only rq5-port1-K5 --time 60 --missing
cargo run --release -- bench
bench without --run regenerates the benchmark table from admitted bundles. Bundles require
a committed, clean tree and a binary built from it; Markdown-only changes do not dirty code
identity. --missing reuses only admitted bundles with matching code, parameters and inputs.
--jobs sets parallel cases; each completed case is saved. The manual GitHub Actions workflow
runs one case per job and uploads its bundles.
OR-Library data are included with their MIT notice and SHA-256 pins. They are survivor
universes and support computational validation only. pf fetch downloads the French
risk-free file; CRSP data must remain outside the repository. Data defines
the accepted schema and delisting treatment.
pf boot --crsp PATH runs the Bessembinder replication; pf oos --crsp PATH runs the
empirical comparisons. Both require the licensed extract and follow the
pre-registration. Synthetic fixtures test arithmetic, selection timing and
numerical properties only.
Code: MIT. OR-Library data: separate MIT notice.