Skip to content
SergeyGer edited this page Nov 23, 2026 · 10 revisions

TopoMarket

TopoMarket is a personal open-source research application that shows how the shape of US equity returns changes over time and tests whether those changes precede a sharp fall in the S&P 500. For each available US market close the application computes a topological anomaly score; the owner can trace a reading back to the returns that produced it, replay a historical episode one session at a time, and compare warnings with simpler indicators.

The forecast target is fixed before evaluation: a fall of at least 10% from the selected close within the next 20 index sessions. A working dashboard and a positive forecasting result are separate release decisions; the application can ship with an experimental score.

Status

Step Scope Acceptance State
1 Runnable scaffold: package, CLI, Streamlit shell, demo/private profiles, synthetic fixtures A1 Delivered - release v0.1.0
2 Local seed import: adapters, hash registry, parser reports, normalized tables A2 Delivered - release v0.2.0
3 Refresh and recovery: HTTPS sources, validation, atomic snapshots, revisions A3 Delivered - release v0.3.0
4 Persistent homology: windows, H0/H1, midrank anomaly score A4 Delivered - release v0.4.0
5 Industry explorer: 60x12 cloud and Mapper graph A5 Delivered - release v0.5.0
6 Chronological evaluation: labels, alerts, uncertainty, private ledger A6 Delivered - release v0.6.0
7 Interactive dashboard: four screens, selection, accessibility A7 Delivered - release v0.7.0
8 Package and rehearse the public release: release checks, lock, artifacts, walkthrough A8 Delivered - release v0.8.0

All eight implementation steps are delivered: Steps 1-8 have green checks, protected-branch merges and release tags v0.1.0 ... v0.8.0. Work is tracked in GitHub Issues and milestones (one per step).

Quickstart

git clone https://github.com/SergeyGer/TopoMarket.git
cd TopoMarket
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip
pip install -e ".[dev]"

pytest -q
ruff check .
python -m compileall -q src tests app.py

topomarket demo                       # synthetic, offline, no credentials
streamlit run app.py -- --profile demo

# refresh fixed provider sources and publish an atomic snapshot (private profile)
topomarket import --input-dir /path/to/seed/raw --output-dir /path/to/data
topomarket refresh --data-dir /path/to/data
topomarket sources --data-dir /path/to/data

# compute the causal topological anomaly score (frozen default config)
topomarket topology --data-dir /path/to/data --out scores.csv

# industry explorer payload (cloud + Mapper graph) for a window end date
topomarket industries --data-dir /path/to/data --date 2020-03-16 --out industry.json

# chronological evaluation + evidence wording (+ optional private ledger)
topomarket evaluate --data-dir /path/to/data --report-out evaluation.json

# interactive dashboard (optional [ui] extra)
pip install -e ".[ui]"
streamlit run app.py -- --profile demo

# public synthetic walkthrough fixture (replay + alert inspection, no key)
streamlit run app.py -- --profile private --data-dir showcase

Key links

Data and licensing

The public demo uses project-generated synthetic data only (seed 42, manifest-marked). Private market data, snapshots and exports are never committed. Code is MIT licensed; provider data terms are described in NOTICE and Security and data notices.

Clone this wiki locally