algo-stat
Quant analysis in 3 lines. A self-contained Python toolkit for market data, metrics, charts, Monte Carlo, backtesting, ML, macro, options, mortgage, and Alpaca paper trading.
algo-stat = library + CLI + REST API + Streamlit dashboard
Install (local laptop)
cd algo-stat
python -m venv .venv && source .venv/bin/activate
pip install -e ".[all,test,dev]" # all = trading + ml-deep
cp .env.example .env # add FRED_API_KEY (free, optional)
API keys?
yfinanceneeds none. FRED needs a free key (signup: https://fred.stlouisfed.org/docs/api/api_key.html). Alpaca only if you want paper trading.
3-line analyses (Jupyter / Python REPL)
import algo_stat as a; a.use_dark()
a.report(a.fetch("NVDA", period="1y"), ticker="NVDA")
import algo_stat as a
a.compare(["AAPL","MSFT","NVDA","GOOGL"], period="2y").show()
import algo_stat as a
a.MonteCarlo("NVDA").simulate(n=1000, days=252).plot()
import algo_stat as a
bt = a.Backtester("NVDA", period="2y").run(a.SMACrossover(20, 50))
print(bt.stats); bt.plot()
More examples in notebooks/quickstart.py.
CLI
algo-stat quote NVDA
algo-stat analyze NVDA --period 1y --chart
algo-stat compare AAPL,MSFT,NVDA,GOOGL --period 2y --chart
algo-stat montecarlo NVDA --n 1000 --days 252 --chart
algo-stat backtest NVDA --fast 20 --slow 50 --chart
algo-stat mortgage 300000 60000 0.055 --years 25
algo-stat macro cpi --years 10
algo-stat serve # FastAPI on :8000
algo-stat dashboard # Streamlit on :8501
REST API
algo-stat serve
# → open http://127.0.0.1:8000/docs (Swagger UI)
Endpoints:
| Method | Path | Purpose |
|---|---|---|
| GET | /health |
health check |
| GET | /quote/{ticker} |
fundamental snapshot |
| GET | /prices/{ticker} |
OHLCV tail |
| GET | /performance/{ticker} |
CAGR / Sharpe / VaR / MDD |
| GET | /compare?tickers=... |
normalized growth |
| POST | /montecarlo |
GBM simulation summary |
| POST | /backtest/sma |
SMA crossover stats |
| POST | /mortgage |
mortgage summary |
| GET | /macro/{series} |
FRED series |
| POST | /options/black-scholes |
option pricing |
Streamlit dashboard
algo-stat dashboard
7 tabs: Performance · Compare · Monte Carlo · Backtest · Mortgage · Macro · Options.
Package layout
algo_stat/
data/ market.py · macro.py · universe.py
metrics/ returns.py · performance.py · risk.py
charts/ theme.py · price.py · compare.py · correlation.py · fundamentals.py
derivatives/ montecarlo.py · options.py
backtest/ engine.py · strategies.py
ml/ pca.py · regression.py · classifier.py
property/ mortgage.py
trading/ alpaca_client.py
cli.py api.py dashboard.py report.py config.py
Tests
pytest -q
Credits
© 2026 Squid Consultancy Group Ltd — Elastic License 2.0.
Metadata
Release files for algorithm-stat 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| algorithm_stat-0.1.2.tar.gz | 64.6 kB | Without provenance | Details for algorithm_stat-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| algorithm_stat-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for algorithm_stat-0.1.2-py3-none-any.whl |
Total release size: 150.7 kB
Release files / algorithm_stat-0.1.2.tar.gz
| Download URL | algorithm_stat-0.1.2.tar.gz |
|---|---|
| Size | 64.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47daa4f85e88926122b66f31c33f0f84da19fdbac614e3ac5b77cfdcf4588df9
|
|
BLAKE2b-256 checksum How to use checksums |
c586f15c3a19719bccffc261f1d78f3aaddaf0bf8be67e69fed5cea43aa3898c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / algorithm_stat-0.1.2-py3-none-any.whl
| Download URL | algorithm_stat-0.1.2-py3-none-any.whl |
|---|---|
| Size | 86.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d5701618447bf667e7a495234ecbc463eb43793f0a5fc58f79e001bd34bbbab
|
|
BLAKE2b-256 checksum How to use checksums |
946a577ce0a85b2a2ca565cf4c02d5c42c9e8de9a48b909db3fd197793487c74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for algorithm-stat 0.1.2
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.