Expand description
Numerical kernel for Ledge.
Ledge solves convex QPs whose Hessian is a factor covariance plus a diagonal. Its ADMM x-update uses the Sherman-Morrison-Woodbury identity, so it factors a system sized by factors plus explicit linear constraints rather than by the number of assets.
Structs§
- Batch
Account - One account in a batch: its own portfolio problem plus its per-date steps.
- Benchmark
Record - One measured solver/instance result.
- Benchmark
Runner - Executes the same generated instance through registered adapters.
- Convergence
Diagnostics - Heuristic diagnosis of a solve that stopped before convergence.
- Dual
Certificate - An unbounded-descent certificate of dual infeasibility, normalized to unit infinity norm.
- Dual
Certificate Residuals - Independently recomputed residuals of a
DualCertificate. - Dual
Variables - Dual multipliers associated with each constraint block.
- Factor
Quad - A positive-semidefinite quadratic represented as (Q = F\Omega F^\mathsf{T} + \operatorname{diag}(d)).
- Generated
Instance - Generated problem plus a known feasible reference point.
- KktResiduals
- Infinity-norm KKT diagnostics.
- L1Term
- A piecewise-linear proportional cost
sum_i costs[i] * |x[i] - anchor[i]|added to the smooth objective (for portfolios: exact L1 turnover around the previous weights). - Linear
Constraints - A block of constraints
matrix * x = rhsormatrix * x <= rhs. - Matrix
- A contiguous row-major dense matrix.
- Portfolio
Problem - A mean-variance portfolio problem backed by a factor covariance.
- Portfolio
Sequence - A rolling solve sequence over a fixed portfolio structure.
- Primal
Certificate - A Farkas certificate of primal infeasibility, normalized to unit infinity norm.
- Primal
Certificate Residuals - Independently recomputed residuals of a
PrimalCertificate. - QpProblem
- Standard-form convex QP accepted by Ledge.
- Rebalance
Step - Per-date data changes for one
PortfolioSequence::solve_nextcall. - Solution
- Solver result and diagnostics.
- Solver
- Structure-exploiting convex QP solver.
- Solver
Settings - ADMM settings.
- Synthetic
Config - Configuration for a reproducible synthetic portfolio QP.
- Warm
Start - Optional initial primal and dual iterates.
- Workspace
- Reusable solve state for a fixed problem structure.
Enums§
- Certificate
- Proof that a solve stopped because the problem itself is pathological.
- Factor
Covariance - Factor covariance matrix (\Omega).
- Generator
Error - Synthetic generator errors.
- KktError
- Errors from the standalone KKT checker.
- Matrix
Error - Errors raised while constructing a
Matrix. - Portfolio
Error - Errors from high-level portfolio construction and solution.
- Problem
Error - Input validation errors.
- Solve
Status - Solver termination status.
- Solver
Error - Errors that prevent solver setup.
Traits§
- Comparison
Solver - Solver-neutral adapter for benchmark integrations.
Functions§
- check_
dual_ certificate - Recomputes the defining residuals of a dual infeasibility certificate on the original problem data.
- check_
kkt - Evaluates primal feasibility, stationarity/dual feasibility, and complementarity.
- check_
primal_ certificate - Recomputes the defining residuals of a primal infeasibility certificate on the original problem data.
- generate_
synthetic - Generates a deterministic, feasible, long-only factor-model portfolio QP.
- solve_
batch - Solves every account’s rolling sequence, in parallel over the account
axis when the
rayoncargo feature is enabled (roadmap 3.2). - solve_
mean_ variance_ factor - Solves a factor mean-variance portfolio with optional custom settings.
- solve_
sequence - Solves a whole rolling sequence in one call: one
Solutionper step, in order (roadmap 2.5).
Type Aliases§
- Account
Result - Per-account outcome of
solve_batch: all step solutions in order, or the error that stopped that account.