Skip to main content

Stellar Stats

A Streamlit-based trading statistics dashboard that analyzes backtest and live trading performance with comprehensive metrics and visualizations.

Features

  • Multi-account performance analysis - Compare performance across different trading accounts
  • Benchmark comparison - Compare against market indices with leverage options
  • Flexible time periods - YTD, inception-to-date, or custom date ranges
  • Comprehensive metrics - Performance metrics, drawdown analysis, return distributions
  • Trade analysis - Detailed breakdowns by underlying assets and slippage tracking
  • Round-trip analysis - Extract and analyze complete trading round-trips
  • Investor tracking - Calculate investor-specific returns

Installation

pip install stellar-stats

Usage

Run the Dashboard

stellar-stats run

This launches the Streamlit web interface for interactive analysis.

Run it either inside a data directory containing returns.csv (or returns.hdf / returns.parquet), or in the parent directory of accounts. Optional trade and round-trip files are named trades.csv and round_trips.csv.

Import CFMMC Statements

Install the optional report parser with pip install "stellar-stats[cfmmc]". When developing both repositories locally, install the matching library with pip install -e ../cfmmc-utils.

stellar-stats gen-data-from-cfmmc \
  --data-dir data/account \
  --output-dir output/account \
  --contracts-path contracts.csv

CFMMC parsing, contract normalization, and account/holding data come from cfmmc-utils. This command computes dashboard returns, optional slippage and round trips, and exports returns.csv, margin.csv, and positions.csv. Trade and round-trip CSVs are also generated when trade reports are available. positions.csv lets Account Snapshots show live futures and option holdings.

Import IB Flex Statements

Install the optional XML parser with pip install "stellar-stats[ibflex]". Put annual Flex XML exports in the input directory, named 2025.xml, 2026.xml, etc.

stellar-stats gen-data-from-ibflex --data-dir ibflex --output-dir stats

Each account is exported to stats/IBKR_<account_id>/, including positions.csv for Account Snapshots. Include Open Positions in the Flex query. Holdings appear only on dates explicitly present in that section; missing dates remain unknown. Summary records take precedence over their lots, while lots without a summary are combined by security and direction. Prices retain the quote currency shown in the holdings table; monetary values and PnL use the account's base currency.

Configuration

Create an optional stellar_stats_config.json file to define:

  • Account configurations and data directories
  • Custom benchmark symbols
  • API tokens (Tushare for Chinese market data)

The system will auto-discover account directories if no configuration is provided, which is useful for viewing backtesting results.

Data Sources

  • Local files: CSV/HDF/Parquet files containing returns, trades, round trips, and slippage data
  • Market data: yfinance for global benchmark symbols
  • Chinese markets: Tushare API (requires token configuration)
  • Investor data: Optional investors.csv for investor-specific analysis

License

MIT

Metadata

Release files for stellar-stats 0.8.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stellar-stats 0.8.17
File Size Uploaded Provenance Actions
stellar_stats-0.8.17.tar.gz 83.8 kB Without provenance Details for stellar_stats-0.8.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stellar-stats 0.8.17
File Interpreter ABI Platform Actions
stellar_stats-0.8.17-py3-none-any.whl Python 3 none any Details for stellar_stats-0.8.17-py3-none-any.whl

Total release size: 164.3 kB

Release files / stellar_stats-0.8.17.tar.gz

Download URL stellar_stats-0.8.17.tar.gz
Size 83.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fed0d75108bc677b23f8d5787ffc1126f2783157f09531b56fb436e09e2cb2cc
BLAKE2b-256 checksum
How to use checksums
2c700270972dda7af2c81c2140d859db4ec63065d386ffeb5ad5d427d7f40d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / stellar_stats-0.8.17-py3-none-any.whl

Download URL stellar_stats-0.8.17-py3-none-any.whl
Size 80.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68b70c1af240976e5ae4568215e2bc4396a3a40ac7ff7861980a1cf48e90830f
BLAKE2b-256 checksum
How to use checksums
d10ed792d411cee389720310295adcf45cda829490fd3f4a22e284593f9d355c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Security for stellar-stats 0.8.17

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page