Skip to content
ai-supply.store
ОбзорКатегорииРейтингиСообществоAgent APIFAQ
ВойтиБесплатная регистрация
catalog / Finance / QuantStats — Portfolio Analytics for Quants
▣DatasetFinanceFree

QuantStats — Portfolio Analytics for Quants

Python library for portfolio performance analytics: Sharpe/Sortino/Calmar ratios, drawdown reports, tearsheets.

@ai-supply
Установки140k
⟳ upstream v0.0.81 · updated 6mo ago
↗ Исходный репозиторий
← More FinanceFinance leaderboard →How we grade security →Source ↗
! Grade B · 75/100 · ReviewSecurity assessment
✓No compromise signals2capabilities surfaced1known CVE7of 20 OWASP controls clear
Vulnerable dependenciesCredit-card-like number · expectedEmail addresses present · expected
scanned 18d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

QuantStats — Portfolio Analytics for Quants

QuantStats is the de-facto Python toolkit for quantitative portfolio performance analysis. With a single function call you get Sharpe, Sortino, Calmar, Omega ratios, rolling drawdowns, monthly P&L heatmaps, and full HTML tearsheets — all from a simple returns Series.

Key features

  • 60+ performance and risk metrics (CAGR, VaR, CVaR, Ulcer Index, Kurtosis)
  • One-line HTML tearsheets with interactive Plotly charts
  • Benchmark comparison (e.g., SPY) via yfinance auto-pull
  • Compatible with Pandas, Zipline, Backtrader, and VectorBT
  • Works for daily, hourly, and minute-level returns

Quick start

pip install quantstats
import quantstats as qs
import yfinance as yf

returns = qs.utils.download_returns("AAPL")
qs.reports.html(returns, output="tearsheet.html", benchmark="SPY")
# Opens a full tearsheet in your browser
qs.stats.sharpe(returns)  # → float
npx ai-supply add quantstats-portfolio-analytics

Curated mirror of the open-source QuantStats (Apache-2.0). Get it from the source.

Rating rank
#1
of 15 in Finance
Install rank
#3
of 15 in Finance
Security score
75/100 · B
review
Security rank
#8
of 15 in Finance
Installs
140k
cat avg 85k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Finance leaderboard →
! Security: Review · 7575/100 · grade Bscanned 18d ago
✓ no compromise signals3 risk-surface · 6/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

Data card · high confidence (static)
txt
PII surface: Credit-card-like number, Email addresses present
44 files

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM03Supply Chaincritical
Vulnerable/compromised dependencies, models or archives in the artifact.
•Vulnerable dependencies — 14 known vulnerabilities in: idna@3.9.0, pillow@9.5.0 (CWE-1395)known CVE · -25 pts
⚠LLM02Sensitive Information Disclosurehigh
Secrets, credentials or PII shipped inside the artifact.
•Credit-card-like number — a number passes the Luhn checksum · ranaroussi-quantstats-fbd10da/README.md (CWE-359)expected
•Email addresses present — contains email-like strings · ranaroussi-quantstats-fbd10da/pyproject.tomlexpected
⚠LLM08Vector and Embedding Weaknesseshigh
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
•Credit-card-like number — a number passes the Luhn checksum · ranaroussi-quantstats-fbd10da/README.md (CWE-359)expected
•Email addresses present — contains email-like strings · ranaroussi-quantstats-fbd10da/pyproject.tomlexpected
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
◷LLM10Unbounded ConsumptionRuntime-enforced
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
✓LLM01Prompt InjectionPassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM05Improper Output HandlingPassed
✓LLM06Excessive AgencyPassed
✓LLM07System Prompt LeakagePassed
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chaincritical
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Vulnerable dependencies — 14 known vulnerabilities in: idna@3.9.0, pillow@9.5.0 (CWE-1395)known CVE · -25 pts
⚠ML02Data Poisoninghigh
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
•Credit-card-like number — a number passes the Luhn checksum · ranaroussi-quantstats-fbd10da/README.md (CWE-359)expected
•Email addresses present — contains email-like strings · ranaroussi-quantstats-fbd10da/pyproject.tomlexpected
⚠ML05Model Theftlow
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
•No license signal — no SPDX id or license keyword found · ranaroussi-quantstats-fbd10da/.claude/2026-modernization-plan.mdrisk surface
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
◷ML09Output IntegrityRuntime-enforced
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (4) · hygiene / uncategorized
•Unrecognized file type — '.flake8' is not on the allowlist · ranaroussi-quantstats-fbd10da/.flake8risk surface
•Unrecognized file type — '.gitignore' is not on the allowlist · ranaroussi-quantstats-fbd10da/.gitignorerisk surface
•Unrecognized file type — '.in' is not on the allowlist · ranaroussi-quantstats-fbd10da/MANIFEST.inrisk surface
•Unrecognized file type — '.cfg' is not on the allowlist · ranaroussi-quantstats-fbd10da/setup.cfgrisk surface
✔ verified source · pinned ranaroussi-quantstats-fbd10da
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/quantstats-portfolio-analytics/check). Click a policy:

Consume QuantStats — Portfolio Analytics for Quants programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/quantstats-portfolio-analytics

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/quantstats-portfolio-analytics/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add quantstats-portfolio-analytics

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/quantstats-portfolio-analytics/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "quantstats-portfolio-analytics" })
OpenAPI spec →
vlatest
! Security: Review · 751mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

Бесплатные AI-возможности с проверкой безопасности — skills, MCP, плагины, агенты, датасеты и другое. У каждой своя оценка безопасности и контроль актуальности, и всё создано как для людей, так и для агентов.

api · v3.1status · all green
Контакты
support@ai-supply.storesecurity@ai-supply.store
Каталог
  • Обзор
  • Категории
  • Рейтинги
  • Бенчмарки
  • Безопасность
  • Scan a repo
Сообщество
  • Сообщество
  • FAQ
Для агентов
  • Быстрый старт (60s)
  • Авторизовать агента
  • Agent API
  • Спецификация OpenAPI
Для разработчиков
  • Опубликовать
  • Панель управления
Аккаунт
  • Создать аккаунт
  • Войти
  • Настройки
Правовые документы
  • Условия использования
  • Соглашение издателя
  • Правила допустимого использования
  • Конфиденциальность