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

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.9
File Size Uploaded Provenance Actions
stellar_stats-0.9.tar.gz 88.2 kB Without provenance Details for stellar_stats-0.9.tar.gz

Built distribution (wheel)

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

Total release size: 173.0 kB

Release files / stellar_stats-0.9.tar.gz

Download URL stellar_stats-0.9.tar.gz
Size 88.2 kB
Tags Source
SHA-256 checksum
How to use checksums
479f10dd2132531ccfa113490b8268492360d35dac5041c844896d38b8c723a5
BLAKE2b-256 checksum
How to use checksums
a06f8e3e24f37b146bb5cbb5127ae4041df9fc0d3c89f3997930770c2f915cc5
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.9-py3-none-any.whl

Download URL stellar_stats-0.9-py3-none-any.whl
Size 84.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eefbce6db1b0abfef50e737d02e1a88a4ae67f04a8698235630381fa0ee3fb76
BLAKE2b-256 checksum
How to use checksums
cdc4de09f0d88e44377e447867adcb7051a47f64d47febe4ce7a14906b9030e0
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.9

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