myst: html_meta: description: >- Multi-asset portfolio construction and rolling backtesting in Python, with offline examples, constrained optimization, covariance models and analytics.
optimalportfolios
Author: Artur Sepp / First recorded: 2023-07-08
Implemented in OptimalPortfolios. Software citation: CITATION.cff.
Production multi-asset portfolio construction and rolling backtesting in Python — constrained optimisation from supplied alphas, covariances and constraints to dated target weights and solver outcomes.
The completed-output guide identifies the result, its units, dates, status and explicit export boundary. Factor-model construction belongs to FactorModels; sparse estimation to FactorLasso; general risk, stress testing and reporting to QIS. OP retains explicit EWMA and signal utilities and rolling orchestration.
Install: pip install optimalportfolios · Import: optimalportfolios · Status: Stable
Papers: Sepp, A. (2023), Optimal Allocation to Cryptocurrencies in Diversified Portfolios, Risk Magazine · Sepp, A., Ossa, I. and Kastenholz, M. (2026), Robust Optimization of Strategic and Tactical Asset Allocation for Multi-Asset Portfolios, The Journal of Portfolio Management 52(4) · Sepp, A., Hansen, E. and Kastenholz, M. (2026), Capital Market Assumptions and Strategic Asset Allocation Using Multi-Asset Tradable Factors · Sepp, A. and Kastenholz, M. (2026), The Convexity Premium of Portfolio Overlays, Journal of Investment Management. See Statement of need for what each paper contributes and Citation for the BibTeX entries.
Documentation: optimalportfolios.readthedocs.io · analytics gallery · production quickstart
Why optimalportfolios
PyPortfolioOpt, Riskfolio-Lib, and skfolio all provide substantial portfolio
optimisation capabilities. Their documented design centres emphasise, respectively,
compact classical allocation, breadth across risk measures and portfolio families,
and scikit-learn-compatible model selection. optimalportfolios is organised around
a different primary abstraction: a dated state transition from estimates and current
holdings to constrained targets and realised backtests.
The completed OP object is an allocation and its audit: supplied alphas and covariance → optimise under constraints → inspect target weights, solver status and feasibility. A separate QIS operation simulates execution and produces reports. Rolling orchestration supports incomplete data, mixed-frequency assets and illiquid positions.
Key differentiators
- Production multi-asset pipeline. Factor-model covariance, risk-budgeted strategic allocation, alpha signals, tracking-error-constrained tactical allocation and a rolling backtest share one dated roll-forward state, with equities rebalancing monthly and alternatives quarterly. See the ROSAA case study.
- Supplied risk inputs. A dated covariance can come from any upstream model. FactorModels supplies a complete factor model using FactorLasso; OP consumes the selected covariance. The HCGL ownership handoff explains availability.
- Cluster-aware risk allocation. Clusters, sectors or asset classes become asset-level risk budgets, static or dated, and canonical HRP runs from a supplied linkage. See hierarchical risk parity and cluster risk budgets.
- Prepared expected returns. Forecasts and alphas enter the selected objective directly. FM GLS inference and CMA diagnostics are separate upstream workflows, complete before optimisation; see their GLS and CMA ownership handoffs.
- Drift-aware rolling backtests. Turnover limits and cost penalties act on the drifted
holdings rather than the previous target (
OptimiserConfig.use_drifted_weights_0, defaultTrue). See rolling backtests. - Incomplete and illiquid histories. Assets enter when their history suffices, missing prices get zero weight, and rebalancing indicators freeze illiquid positions. See incomplete histories and frozen positions.
- Research-backed. The reference implementation of the ROSAA framework in The Journal of Portfolio Management; every number on the methodology pages is asserted by a script that CI runs. See research papers.
When to use it — and when not
Use optimalportfolios when you need a dated roll-forward pipeline from point-in-time covariance
and alpha estimates to constrained targets, scheduled rebalancing, and drift-aware backtests with
transaction costs across incomplete or mixed-frequency multi-asset panels.
The solvers use quadratic and conic objectives (variance, tracking error, Sharpe ratio,
diversification ratio, CARA utility). Choose another package when the core problem is a
non-quadratic risk measure such as CVaR, MAD, or drawdown constraints; the
package comparison
points to Riskfolio-Lib and skfolio for those workflows and records the versioned evidence for the
field comparison. Use factorlasso directly when you need its standalone sparse multi-output
factor-model estimator rather than portfolio construction. Each solver lives in its own module and
plugs into the rolling backtester through one dispatch function; the
software-design guide
explains these boundaries.
Installation
Install from PyPI:
pip install optimalportfolios
Upgrade with:
pip install --upgrade optimalportfolios
Clone the repository with:
git clone https://github.com/ArturSepp/OptimalPortfolios.git
The core package supports Python >=3.11; pyproject.toml is the source of truth for dependency
floors, and the installation guide describes the locked environment.
Optional extras keep network-data and reporting integrations out of the core installation:
| Extra | Adds |
|---|---|
data |
yfinance for free-data example loaders. |
reports |
pybloqs for HTML/PDF report backends. |
riskbudget |
quadprog projection backend for risk-budgeting solves (8.0.0 development series). |
docs |
Sphinx, Furo and MyST for documentation builds. |
For both runtime integrations, install optimalportfolios[data,reports]. In the unreleased
8.0.0 development series, risk-budgeting solves require
pip install "optimalportfolios[riskbudget]". This installs the existing GPL-licensed
quadprog projection backend; OP's first-party source remains MIT. Ordinary imports,
supplied-input optimisation with other solvers, and the offline quickstart use the base
installation. See installation and dependency licences. There is no
jupyter or dev extra; tests and static checks are the PEP 735 test and lint dependency
groups described under Testing.
Table of contents
- Why optimalportfolios
- Installation
- Statement of need
- Overview
- Five-minute quickstart
- Examples
- Testing
- Changelog
- Feedback & contributing
- Acknowledgments
- Citation
- Ecosystem
- License
- Disclaimer
Statement of need
Multi-asset allocation in production is a dated state transition: point-in-time estimates and
current holdings go in, constrained targets, solver outcomes and a realised backtest come out, and
the next date starts from the drifted result. optimalportfolios implements that transition for
panels with incomplete histories, mixed rebalancing frequencies and illiquid positions, with the
covariance and expected returns supplied by upstream models rather than estimated inside the
optimiser. The papers below define the methods; the package is their reference implementation,
and every number on the methodology pages is asserted by a script that CI runs.
| Paper | Implemented analytics | Where |
|---|---|---|
| Sepp, A. (2023), Optimal Allocation to Cryptocurrencies in Diversified Portfolios, Risk Magazine, October 2023, 1–6, SSRN 4217841 | The four allocation methods of the paper, run offline on the replication design | papers/crypto_allocation_risk_2023, cryptocurrency case study |
| Sepp, A., Ossa, I. and Kastenholz, M. (2026), Robust Optimization of Strategic and Tactical Asset Allocation for Multi-Asset Portfolios, The Journal of Portfolio Management, 52(4), 86–120 | The ROSAA framework: factor-model covariance, risk-budgeted strategic allocation, alpha signals, tracking-error-constrained tactical allocation and the rolling backtest on one dated roll-forward state | papers/robust_optimisation_jpm_2026, ROSAA case study |
| Sepp, A., Hansen, E. and Kastenholz, M. (2026), Capital Market Assumptions and Strategic Asset Allocation Using Multi-Asset Tradable Factors, SSRN 6785958 | Strategic allocation from capital market assumptions on a supplied factor-model covariance; the factor model itself is prepared upstream in FactorModels | CMA strategic allocation, supplied risk inputs |
| Sepp, A. and Kastenholz, M. (2026), The Convexity Premium of Portfolio Overlays, Journal of Investment Management, forthcoming | The Section II coverage-floor allocation: fixed-core maximum Sharpe ratio with a named linear row | papers/smart_diversification_joim_2026, overlay page, smart diversification case study |
Overview
| Subpackage | What it holds | Articles |
|---|---|---|
covar_estimation |
EWMA covariance estimation; factor models are prepared upstream in FM | covariance estimators, supplied risk inputs |
alphas |
Momentum, low-beta, carry, residual and managers' alpha signals, AlphasData, profiling and diagnostics |
alpha signals, signal diagnostics |
optimization |
The rolling dispatcher, the general, risk-allocation, SAA and TAA solvers, Constraints, OptimiserConfig and solver diagnostics |
choosing an objective, constraints, solver outcomes, risk budgeting, HRP and cluster budgets, rolling backtests |
universe |
UniverseData and its transforms, such as unsmoothing |
universe data |
utils |
Risk contributions, benchmark betas, weight drift, NaN filtering, Gaussian mixtures | risk contributions and betas |
reports |
Result plots, marginal backtests and optional PyBloqs reports | analytics gallery |
The software-design guide draws the module imports, and the API reference lists every public object.
OP produces constrained target weights and solver outcomes from supplied alphas and
covariances. PortfolioOptimisationResult can inspect those weights on their own,
with a supplied covariance matrix, or with a QIS RiskModel and prepared diagnostic
tables. Neither factormodels nor factorlasso is an OP dependency.
Factor model construction and GLS inference belong to FactorModels; statistical
estimation belongs to FactorLasso. See the breaking migration contract.
Architecture: completed outputs across the stack.
factorlasso is the domain-agnostic sparse
factor-model estimator, with sign constraints, prior-centered regularisation and HCGL clustering;
it produces statistical estimates. factormodels constructs definitions and NAVs,
fits the asset universe through FL and completes the dated loading/covariance model.
OP receives supplied alphas and covariances and produces constrained weights. QIS
provides general risk/stress analytics, backtesting and reporting. Each completed
object can be inspected before its separate downstream use.
Analytics at a glance
| Area | Current user-facing analytics |
|---|---|
| Alpha construction | Momentum, low beta, risk-adjusted carry, managers alpha, residual momentum, residual reversal and rolling EWMA means; fixed-group and time-varying cluster scoring are supported. |
| Alpha evaluation | Rank-portfolio profiling, cross-backtests, AlphasData, IC/IR panels, component diagnostics and comparison tables. |
| Covariance inputs | Current/rolling EWMA or supplied covariance matrices, including completed FM estimates. |
| Cluster inputs | Supplied static or dated cluster mappings and prepared scores. Lineage and statistical clustering remain in FactorLasso; OP aliases are removed. |
| General optimisation | Minimum variance, quadratic utility, maximum Sharpe, maximum diversification, CARA Gaussian-mixture utility and minimum tracking error. |
| Risk allocation | Constrained risk budgeting, point-in-time group risk budgets, date-varying rolling budgets, group Euler-risk attribution and external-linkage hierarchical risk parity. |
| SAA and TAA optimisation | Minimum variance at target return, maximum return at target volatility, alpha over tracking error and alpha at target portfolio return. |
| Constraints and implementation | Instrument/group bounds, exposure, turnover, tracking error, target return/volatility, benchmark-relative sector/style/beta limits, frozen holdings and current-to-model eligibility corridors. |
| Solver controls and diagnostics | One covariance factorization per compatible CVXPY solve, input-contract validation, structured OptimizationOutcome/ConstraintResidual output, infeasibility diagnosis and run-level warning summaries. |
| Portfolio and risk results | PortfolioOptimisationResult provides weights/trades, volatility, turnover, tracking error, factor/residual risk, group attribution, factor exposures, efficient-frontier data and report tables using qis.RiskModel. |
| Universe, backtest and reporting | Validated UniverseData, metadata/group-loadings persistence and transforms, drift-aware rolling weights, transaction-cost backtests through qis, efficient-frontier plots, marginal portfolio backtests and optional PyBloqs HTML/PDF reports. |
This table groups the analytics by workflow. The exact package-root import inventory and callable signatures are maintained in the API reference.
Five-minute quickstart
The production quickstart is the authoritative source for the first-use workflow. It runs entirely offline on the multi-asset fixture shipped in the wheel and writes no files:
pip install optimalportfolios
python examples/getting_started/production_quickstart.py
For a zero-setup trial, open the mechanically checked mirror in Colab. The notebook installs the latest PyPI release, prints its version, and adds no notebook dependency to the package.
The script uses a documented six-asset slice, a point-in-time 24-month EWMA covariance estimator, quarterly constrained minimum-variance weights, a one-month implementation lag, and 10 basis points of transaction costs. It prints the data range, rolling-weight dimensions, final weights, final NAV, and measured runtime. The rendered quickstart documentation includes this same file directly, so the example and documentation cannot drift.
A minimal executable example
The script above remains the authoritative first-use workflow. The shorter version below exists so that the README's own code is executed rather than trusted:
import qis
from optimalportfolios import (
Constraints,
EwmaCovarEstimator,
PortfolioObjective,
compute_rolling_optimal_weights,
)
from optimalportfolios.tests.data.multiasset import load_multiasset_data
prices = load_multiasset_data().prices.iloc[-120:, :4]
time_period = qis.TimePeriod(prices.index[0], prices.index[-1])
# estimate covariance → optimise → get rolling weights
estimator = EwmaCovarEstimator(returns_freq='ME', span=24, rebalancing_freq='QE')
covar_dict = estimator.fit_rolling_covars(prices=prices, time_period=time_period)
weights = compute_rolling_optimal_weights(prices=prices,
portfolio_objective=PortfolioObjective.MAX_DIVERSIFICATION,
constraints=Constraints(is_long_only=True),
time_period=time_period,
covar_dict=covar_dict)
# backtest with transaction costs
portfolio = qis.backtest_model_portfolio(prices=prices.loc[weights.index[0]:], weights=weights,
rebalancing_costs=0.001, ticker='MaxDiv')
print(f"assets: {list(weights.columns)}")
print(f"rebalance dates: {len(weights.index)}")
print(f"long only: {bool((weights >= -1e-6).all().all())}")
print(f"fully invested: {bool(weights.sum(axis=1).round(6).eq(1.0).all())}")
print(f"nav name: {portfolio.nav.name}")
assets: ['Global Bonds', 'Global IG Bonds', 'US Treasuries', 'US TIPs']
rebalance dates: 39
long only: True
fully invested: True
nav name: MaxDiv
readme_test.py executes the block above and diffs its output against that
result fence, so this example cannot drift from what the package actually
does. Structural facts are asserted rather than weights: a solver-version change
may move an allocation by 1e-9, but it must not change the rebalance schedule,
break long-only, or stop the book being fully invested.
The committed multi-asset fixture keeps this example offline. The same pipeline supports price panels with NaNs and different start dates, while preserving roll-forward estimation (no hindsight bias) and drift-aware turnover accounting.
Examples
The examples/ folder is organised by purpose. The
examples and recipes guide maps every task to its article, canonical
script and standalone examples, with each example's offline, network or local-data lane:
examples/
├── getting_started/ Canonical offline quickstart and its notebook mirror
├── data/ Shared Yahoo loaders and local universe builders
├── solvers/ Objective-specific examples
├── backtests/ Complete rolling workflows
├── comparisons/ Comparisons of methods or configurations, including the drift policy
├── covar_estimation/ Covariance and factor-model examples
├── alphas/ Signal profiling
├── reports/ Manually prepared portfolio reports
├── docs/ Canonical scripts of the documentation pages
└── figures/ Existing documentation previews
Recommended reading order for newcomers
- Quickstart — the smallest offline portfolio workflow.
examples/backtests/multiasset_saa.py— another offline workflow with group metadata and objective choices.examples/data/universe.pyandexamples/backtests/minimal_backtest.py— downloaded prices and reporting.examples/solvers/min_variance.pyandexamples/solvers/minimum_tracking_error.py— covariance-based construction.examples/solvers/tracking_error.py— benchmark-relative allocation with a signal.examples/comparisons/optimisers.py— how objectives differ on the same universe.
Highlighted examples
The previews in this section are offline teaching exhibits on a fixed synthetic sample ending 31 December 2025, produced by the scripts named with each; the shared provenance record records their inputs, configuration, software versions and visual review.
Optimal portfolio backtest
examples/backtests/minimal_backtest.py fetches eight
ETFs, estimates an EWMA covariance, solves maximum diversification each quarter, backtests with
transaction costs and writes a qis factsheet.
Customised reporting
PortfolioData from qis plots NAV, weights and
return scatters. The preview from portfolio_reports.py
shows quarterly target weights and realised trading costs.
Parameter sensitivity backtest
examples/comparisons/parameter_sensitivity.py
backtests one method across estimation parameters; the preview from
span_sensitivity.py compares five EWMA spans.
Multi-optimiser cross-backtest
examples/comparisons/optimisers.py runs several objectives
through compute_rolling_optimal_weights(); the preview from
optimiser_comparison.py compares minimum
variance, maximum diversification and equal risk budgets on shared inputs.
Multi-covariance-estimator backtest
examples/comparisons/covar_estimators.py backtests one
objective with several covariance estimators; the preview from
covariance_comparison.py compares six estimators
on one known-factor simulation, which does not establish an estimator ranking.
From method to implementation
| Method | Documentation page | Canonical script |
|---|---|---|
| ROSAA: risk-budgeted SAA and tracking-error-constrained TAA on one roll-forward state | ROSAA case study | examples/docs/app_rosaa_multi_asset_allocation.py |
| Optimal allocation to cryptocurrencies: the four methods of the paper | cryptocurrency case study | examples/docs/app_crypto_allocation.py |
| CMA-based strategic allocation on a supplied factor-model covariance | CMA strategic allocation | examples/docs/app_cma_strategic_allocation.py |
| Coverage-floor overlay allocation (convexity premium, Section II) | overlay page, smart diversification case study | examples/docs/overlay_tail_floor.py, examples/docs/app_smart_diversification_overlays.py |
Drift-aware turnover under a binding budget (use_drifted_weights_0 True vs False) |
turnover and transaction costs | examples/comparisons/drift_policy.py |
Testing
uv sync --locked --group test
uv run --no-sync pytest
uv run --locked --only-group lint ruff check --select TID251,TID253,ICN,F src/optimalportfolios/
After installing pytest, verify an installed wheel with python -m pytest --pyargs optimalportfolios.
readme_test.py executes the minimal example above and diffs its output against the result
fence. Tests that need an optional extra skip rather than fail, so a core install stays green.
CONTRIBUTING.md
describes the contributor environment.
Changelog
Release history is maintained in CHANGELOG.md.
Feedback & contributing
- Bug: use the bug-report form with the package version, Python/platform, a minimal public-data reproducer, and expected versus actual output.
- Feature: use the feature-request form and describe the user goal, current workaround, and smallest useful API. In particular: which constraint, report, or portfolio workflow cannot be expressed today?
- Question or methodology: search or open an issue and name the paper, example, or convention involved.
- Contribution: follow CONTRIBUTING.md; focused work is listed under
good first issueandhelp wanted.
Project decisions, maintenance expectations, release policy, and best-effort support routes are documented in GOVERNANCE.md.
Acknowledgments
- Thomas Schmelzer, creator of Jebel-Quant/rhiza, for substantial contributions to test coverage, cross-platform CI/CD, dependency auditing, example validation, packaging, and built-wheel verification.
Citation
A machine-readable citation is available in CITATION.cff.
If you use optimalportfolios in your research, please cite it as:
@software{sepp2026optimalportfolios,
author={Sepp, Artur},
title={optimalportfolios: point-in-time multi-asset portfolio construction and rolling backtesting in Python},
year={2026},
version={9.0.1},
url={https://github.com/ArturSepp/OptimalPortfolios}
}
@article{sepp2023,
title={Optimal allocation to cryptocurrencies in diversified portfolios},
author={Sepp, Artur},
journal={Risk Magazine},
pages={1--6},
month={October},
year={2023},
url={https://ssrn.com/abstract=4217841}
}
@article{sepp2026rosaa,
author={Sepp, Artur and Ossa, Ivan and Kastenholz, Mika},
title={Robust Optimization of Strategic and Tactical Asset Allocation for Multi-Asset Portfolios},
journal={The Journal of Portfolio Management},
volume={52},
number={4},
pages={86--120},
year={2026}
}
@article{sepphansenkastenholz2026,
title={Capital Market Assumptions and Strategic Asset Allocation Using Multi-Asset Tradable Factors},
author={Sepp, Artur and Hansen, Emilie H. and Kastenholz, Mika},
journal={The Journal of Portfolio Management},
note={Forthcoming},
year={2027}
}
@article{seppkastenholz2026convexity,
title={The Convexity Premium of Portfolio Overlays},
author={Sepp, Artur and Kastenholz, Mika},
journal={Journal of Investment Management},
year={2026}
}
Ecosystem
This package is part of an open-source Python stack for quantitative finance. The ArturSepp profile is the canonical catalogue:
| Package | Purpose |
|---|---|
qis |
Performance analytics, backtesting, and factsheet reporting |
optimalportfolios (this package) |
Portfolio construction and rolling backtesting |
factorlasso |
Sparse factor-model estimation |
bbg-fetch |
Bloomberg data in pandas DataFrames |
option-chain-analytics |
Point-in-time option-chain data and queries |
vanilla-option-pricers |
Numba-vectorised BSM and Bachelier pricing |
stochvolmodels |
Stochastic-volatility pricing and calibration |
trendfollowing |
Closed-form trend-following analytics |
privateassets |
Multi-factor PME for private assets |
goal-based-allocation |
Goal-based allocation under regime-switching jump-diffusions |
Within the stack, optimalportfolios directly depends on qis for analytics and reporting.
factormodels and factorlasso are separately installed upstream tools, not dependencies; see
supplied risk inputs for the
factormodels availability note.
License
MIT — see LICENSE.txt.
Disclaimer
optimalportfolios is distributed FREE & WITHOUT ANY WARRANTY under the MIT License. See
LICENSE.txt in the
release for details. Use the routes in Feedback & contributing for
bugs, feature requests and methodology questions.
Metadata
Release files for optimalportfolios 9.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| optimalportfolios-9.0.1.tar.gz | 794.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| optimalportfolios-9.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.7 MB
Release files / optimalportfolios-9.0.1.tar.gz
| Download URL | optimalportfolios-9.0.1.tar.gz |
|---|---|
| Size | 794.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feefcae36b21be33de879a420102e18fa08d761b8acb776f10ac12e64c8e5173
|
|
BLAKE2b-256 checksum How to use checksums |
db4b8d893aeba482e0ab8b40077874b778fc956eb021e7519bd8ee47dadaa171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / optimalportfolios-9.0.1-py3-none-any.whl
| Download URL | optimalportfolios-9.0.1-py3-none-any.whl |
|---|---|
| Size | 950.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bb800c177fbbe269497d1e6cd6b678cd8d77359e8b313000c9cf5d87ad8600d
|
|
BLAKE2b-256 checksum How to use checksums |
9d761cd79c3546b55f368a41b5daa32c0a354f8173d1acc7e8a978f14a67d381
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for optimalportfolios 9.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for optimalportfolios-9.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.