Examples¶
Two interactive marimo notebooks build portfolios with the
high-level API. The pages below are static renderings from the latest build. The
sources live in docs/notebooks/, and each carries a PEP 723 header, so you can
open it locally with sliders:
Both notebooks need a MOSEK license.
| Notebook | What it shows |
|---|---|
| Long-only mean-variance | SampleCovariance + MeanVariance with LongOnly, FullyInvested and a per-asset weight cap; the efficient frontier. |
| Cash-neutral factor portfolio | FactorRiskModel + MaximizeReturn with CashNeutral, MaxLeverage, model.max_volatility(...) and an optional market-neutral model.exposure_bounds(...); which limit binds. |
Each notebook ends by checking its portfolio against the cone-level function it
rebuilds (long_only_markowitz / cash_neutral_factor_portfolio).