Open-source · Python 3.10 → 3.14 · Rust core
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.
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) viafc.set_theme - Mean-risk, HRP, and HERC optimisers behind one call
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 intoGridSearchCVBackend → Catalog → Backenddata layer (YF · CSV · Parquet · DuckDB · in-memory)- Single
abi3wheel per platform; pure-Python fallback everywhere else numpydtype-preserving interfaces, fully type-annotated
What's in the box¶
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.
DCA, Hold, and a base class¶
Presets with daily, weekly (7-day), and monthly horizons. Subclass BaseStrategy for anything bespoke.
One Portfolio, four inputs¶
run_strategy, run_weights, run_signals, run_orders — every path yields a live Portfolio.
Mean-risk, HRP, HERC¶
Portfolio construction through a thin adapter — swap objectives, constraints, and risk measures without rewriting the pipeline.
HTML, PDF, Excel¶
Self-contained HTML tear sheets, WeasyPrint PDFs, and XlsxWriter workbooks with native charts. One call per format.
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,Portfoliomean what they mean in finance. No framework-specific renames to translate. - Two doors. Fluent
.fcone-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.