Open-source · Python 3.12+ · MIT

The lowest-risk way
to split money across options.

Convexfolio takes your prices, expected payoffs, and a risk model — and returns the exact budget split that minimises your risk. Deterministic, reproducible, and built on the closed-form math of arXiv:2601.07991.

$ pip install convexfolio Deterministic to the bit No tracking. No analytics.
convexfolio — print-report
$ convexfolio --command print-report
{
  "method": "variance",
  "weights": { "A": 0.4200, "B": 0.5800 },
  "cost_check": 1.0000,
  "deterministic": true
}
Risk vs. weight Optimum ●
CFVaR₂ closed form
Deterministic
Built on
Research · arXiv 2601.07991 · SciPy SLSQP · Pure Python · MIT

By the numbers

0
Risk measures
Variance, CFVaR₂, CFVaR₃
0
Closed-form solvers
Exact answers, no iteration
0
Reproducible
Byte-identical outputs
0
Command to run
From install to report
Product

One question. An exact answer.

Three first-class solvers, each tuned for a different definition of "risk". Pick the one that matches the math you're trying to do — or let Convexfolio compare all of them in one run.

Variance

The classical measure: minimise how wildly your portfolio value bounces around under the chosen precision matrix. Closed-form, instantaneous, well understood.

Closed form · O(n³)

CFVaR₂

A sharper, faster risk measure with an exact formula — no iteration, no approximation. Drop-in for the variance minimiser when you want a tighter tail.

Closed form · exact

CFVaR₃

The most accurate measure in the family. Solved numerically with SciPy's SLSQP under the same deterministic guarantees as the closed-form solvers.

Numerical · SLSQP
How it works

Define. Solve. Verify.

A tiny, well-typed Python surface. Point Convexfolio at your prices, expected payoffs, and a precision matrix — then choose a risk measure. The optimiser returns the exact budget split that minimises risk.

  1. 01

    Define your problem

    Prices, expected payoffs, and a precision matrix — JSON, YAML, or straight from Python. No proprietary schemas.

  2. 02

    Choose a risk measure

    Variance, CFVaR₂, or CFVaR₃ — or run all three and pick the best fit. Convexfolio returns weights that minimise the chosen measure exactly.

  3. 03

    Verify and adapt

    Every run is byte-identical to the previous one. Spot-check the report, then plug the same primitive into backtests and constraints.

python
import numpy as np
from convexfolio import Variance, Minimize

# Two options · $0.60 and $0.40 · precision matrix below.
precision = np.array([[2.0, 0.1],
                      [0.1, 1.5]])
costs = np.array([0.60, 0.40])

# Find the lowest-risk budget split.
weights = Minimize(Variance(precision), costs).value
print(weights)   # → [1.0591, 0.9113]
stdout [1.0591133 0.91133005]
Features

Built for serious work.

A small, focused API. Every feature is documented, tested, and verified against the math.

Deterministic by design

Same inputs always give byte-identical outputs. A built-in determinism check makes it auditable, not just claimed.

Terminal-first

Run reports in a single command — convexfolio --command print-report. No Python required for the common path.

JSON / YAML config

Describe constraints and settings in a plain text file. Keep your experiments reproducible without code check-ins.

Research-grade math

Implements the closed-form results of arXiv:2601.07991 with a published fidelity report.

Python API

Variance, CFVaR₂, CFVaR₃, Minimize, Backtest, Constraints. Import a primitive, get a result — no ceremony.

Backtests & constraints

Multi-period rebalancing with transaction costs. Sector caps, position limits, and leverage bounds when you need them.

Adoption

Free forever. Built in the open.

Convexfolio is MIT-licensed research software. No paid tiers, no telemetry, no signup. Install it once and it stays yours.

MIT Licensed Python 3.12+ SciPy-powered Docker ready

Read the research, study the implementation, fork it, ship it. Always verify outputs against independent models and current market data — Convexfolio's outputs are illustrative, not investment advice.

$ pip install convexfolio
Successfully installed convexfolio-1.0.0

Optimise your next allocation.

Install Convexfolio, point it at a portfolio, and read the report. Fifteen minutes from pip install to a solved split.