Open-source research software · v2.0.0

Make the portfolio model earn its trust.

Convexfolio gives constrained portfolio experiments a clear boundary: validate the inputs, solve the problem, inspect the diagnostics.

No brokerage connection · no market-data feed · no investment advice

A tiny model, fully visible
LOCAL SOLVER READY
minimisexᵀQxsubject toxᵀv = 1
$1 budget allocationA 64.0%B 36.0%

Deterministic arithmetic in your browser. The Python implementation is documented in the guide.

01validated value objects
02typed failure paths
03polymorphic contracts
04static documentation

The design stance

Useful mathematics needs useful boundaries.

The library is shaped around the moments where quantitative software usually becomes difficult to trust.

01 / INPUTS

Own the data.

Vector and Matrix protect their storage and expose explicit .copy() and .validate() operations.

See the value objects
02 / SOLVERS

Show the failure.

Invalid inputs, infeasible constraints, and failed numerical solves return typed, actionable diagnostics instead of a plausible-looking answer.

See the contracts
03 / SYSTEMS

Compose the parts.

Risk, optimisation, constraints, data sources, and backtests meet through small ABC interfaces with interchangeable implementations.

See the v2 shape

A transparent workflow

From raw inputs to a result you can question.

Convexfolio is deliberately inspectable. Each stage has a boundary, a contract, and a testable outcome.

Walk through the example
  1. 01
    Validate

    Shape, finiteness, conditioning, and configuration policy.

  2. 02
    Constrain

    Budget, position, sector, and leverage rules as explicit objects.

  3. 03
    Optimise

    Closed-form and numerical strategies behind one typed interface.

  4. 04
    Report

    Diagnostics, feasibility, warnings, and a versioned result shape.

Build with evidence

Read the model before you run it.

Start with the guide, inspect the API, and keep the limits visible.

Explore documentation

Scope: Convexfolio does not place trades, connect to brokerages, or provide financial advice.

Understand the limits