Skip to content

Open-source · Python 3.10 → 3.14 · Rust core

PyPI Python License: MIT CI Coverage Ruff uv

Portfolio research,
end-to-end, with a Rust core.

Fundcloud is a portfolio-native decision layer that takes you from market data to scored tear sheet in one coherent workflow — ingestion, strategy, simulation, optimisation, and reporting, under a single vocabulary. Newcomers get a fluent .fc accessor for any pandas Series or DataFrame; quants get sklearn-compatible estimators and a Rust-accelerated numeric core verified to ten-decimal parity with its NumPy reference.

Fundcloud library — portfolio research workflow from data to tear sheet
10–50× Rust vs. NumPy, typical panels
1e-10 Rust / NumPy parity
1 wheel abi3-py310, all supported versions
MIT License

Two ways to start

For investors & researchers

Research a portfolio, fast

Pull market data, run a strategy, score the result, and export a tear sheet — without stitching together five libraries or a notebook chain.

  • returns.fc.sharpe() on any pandas Series
  • Daily, weekly, and monthly DCA with adjustable horizons
  • Self-contained HTML, PDF, and Excel tear sheets — or one composed plots.summary() figure
  • Plotly themes (white, dark, ggplot2, seaborn) via fc.set_theme
  • Mean-risk, HRP, and HERC optimisers behind one call

Run the 20-line quickstart

For Python & Rust developers

Integrate the library

A small, composable API that plugs into sklearn pipelines and exposes Rust kernels through PyO3. No global state, no framework lock-in, typed end to end.

  • PurgedKFold, estimators, and scorers that plug into GridSearchCV
  • Backend → Catalog → Backend data layer (YF · CSV · Parquet · DuckDB · in-memory)
  • Single abi3 wheel per platform; pure-Python fallback everywhere else
  • numpy dtype-preserving interfaces, fully type-annotated

Browse the API reference

What's in the box

Data

Pull and cache market data

Grab bars from Yahoo / FMP / Alpha Vantage / Binance, cache them in DuckDB or Parquet with one line. Daily refresh dedupes automatically — no duplicate rows, ever.

Strategies

DCA, Hold, and a base class

Presets with daily, weekly (7-day), and monthly horizons. Subclass BaseStrategy for anything bespoke.

Simulator

One Portfolio, four inputs

run_strategy, run_weights, run_signals, run_orders — every path yields a live Portfolio.

Optimise

Mean-risk, HRP, HERC

Portfolio construction through a thin adapter — swap objectives, constraints, and risk measures without rewriting the pipeline.

Reports

HTML, PDF, Excel

Self-contained HTML tear sheets, WeasyPrint PDFs, and XlsxWriter workbooks with native charts. One call per format.

Speed

Rust kernels, NumPy fallback

Rolling stats, drawdown, Sharpe, VaR, and CVaR compiled via PyO3. Transparent fallback, verified to 1e-10 parity.

60-second check

import pandas as pd
import fundcloud  # registers the .fc accessor

returns = pd.Series([0.012, -0.005, 0.008, -0.010, 0.015])
returns.fc.sharpe(periods_per_year=252)   # annualised Sharpe
returns.fc.max_drawdown()                 # worst peak-to-trough
returns.fc.drawdown_series()              # full drawdown time series

The full DCA-to-tearsheet walkthrough is in Quickstart.

Design principles

  • One vocabulary. Data, Trades, Portfolio mean what they mean in finance. No framework-specific renames to translate.
  • Two doors. Fluent .fc one-liners for exploration, full sklearn estimators for production pipelines — same objects, same numbers.
  • Honest benchmarks. Rust kernels run 10–50× faster than the NumPy fallback on typical panel sizes, and every kernel is tested to 1e-10 agreement with its reference implementation. See Rust kernels for the methodology.
  • Cheap core install. Core pulls only pandas, numpy, scipy, scikit-learn, and plotly. Everything heavy lives behind extras: [pf], [ta], [data], [reports].
  • Reproducible by default. Deterministic simulation, seeded optimisers, and tear sheets that embed the exact parameters used to produce them.

Ready to try it on your own portfolio?

One uv add fundcloud, a Series, and you're running Sharpe and drawdown.


Acknowledgments

Fundcloud builds on the work of several excellent open-source projects. If any of them are useful to you, please consider giving them a star on GitHub.

Project Contribution to Fundcloud License
scikit-learn Estimator, transformer, and CV-splitter contracts throughout BSD-3-Clause
skfolio Portfolio optimisation algorithms and Portfolio/Population objects BSD-3-Clause
TA-Lib 170+ technical indicators via fundcloud[ta] BSD-2-Clause
quantstats Tear-sheet design and pandas-accessor philosophy Apache-2.0
vectorbt Vectorised simulation design Apache-2.0
PyO3 Rust–Python bridge for kernels Apache-2.0 / MIT
uv Fast installation toolchain Apache-2.0 / MIT

Full license attribution lives in the NOTICE file.