Repository navigation
feat: joint convex portfolio optimization and Barra risk contracts - #27
Merged
Merged
Conversation
PureSaber
marked this pull request as ready for review
October 14, 2026 16:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Portfolio constraints previously used a faulty bounded-simplex projection and post-hoc turnover interpolation, while the research risk bridge could omit tracking-error inputs. Solve the complete problem against real holdings with CVXPY/OSQP/Clarabel and independently verify every published target.
Adds versioned whole-account allocation, dense or factor-form PIT risk snapshots, absolute/active risk, mature non-overlapping IC forecasts, convex tail-risk and positive-domain ratio objectives, explicit solver failure states, structured diagnostics, and deterministic exact-cash integer repair. The legacy mean–variance implementation is an explicitly selected comparison backend. Existing score configurations keep their declared meaning; fixed historical environments remain the exact reproduction route.
Validation: 529 tests passed, one skipped, 80.78% coverage on a normally installed Python 3.10 environment; Python 3.11 ordinary install also passed 529 tests with 80.76% coverage and pip check. Includes 200 seeded independent SLSQP comparisons, projection KKT checks, the joint-turnover maximum-Sharpe regression, pool-external benchmark and partial-cash cases, inaccurate-result rejection, minimum fees and known unsellable holdings. CI now covers Python 3.10–3.12 on Windows and Linux. Factor-only 200/1,000/6,000-asset benchmark script is included.
Dependencies: PureSaber/quant-data-kit#46 and PureSaber/quant-execution#34. Integer repair is a feasible local search, not a global integer optimality claim. Ratio definitions retain their explicit ratio objective; estimated costs are reported and verified during execution repair.