Kuramoto synchronization · Ricci curvature flow · Free-energy thermodynamics · Cryptobiosis
Physics-first quantitative infrastructure with 57 machine-checkable invariants. Every signal traces back to peer-reviewed science. Every clamp traces back to a law.
GeoSync distils validated mechanisms from computational neuroscience, differential geometry, thermodynamics, and synchronization theory into a rigorous, production-oriented algorithmic infrastructure.
|
The core question: when do markets synchronize? The Kuramoto order parameter
When |
┌─────────────────────────────────────────────────────┐
│ G E O S Y N C │
│ Geometric Market Intelligence │
└─────────────┬───────────────────┬───────────────────┘
│ │
┌───────────────────┼───────────────────┼───────────────────┐
│ │ │ │
┌────────▼────────┐ ┌───────▼────────┐ ┌────────▼────────┐ ┌───────▼────────┐
│ DATA INGESTION │ │ FEATURE STORE │ │ STRATEGY ENGINE │ │ RISK MANAGER │
│ CCXT · Alpaca │ │ Redis · Feast │ │ Policy Router │ │ TACL · Gates │
│ Polygon · WS │ │ Parquet · PG │ │ Walk-Forward │ │ Kill Switch │
└────────┬────────┘ └───────┬────────┘ └────────┬────────┘ └───────┬────────┘
│ │ │ │
└──────────────────┼────────────────────┼──────────────────┘
│ │
┌────────────▼────────────────────▼────────────┐
│ EXECUTION FABRIC │
│ OMS · Smart Routing · Capital Optimizer │
│ Paper Trading · Compliance · Audit Trail │
└──────────────────────┬───────────────────────┘
│
┌──────────────────────▼───────────────────────┐
│ OBSERVABILITY STACK │
│ Prometheus · OpenTelemetry · 400-day Audit │
│ Reliability Tests · Deterministic Replay │
└──────────────────────────────────────────────┘
| Module | Path | Lang | Purpose |
CORE | core/indicators/ | Python | 50+ geometric and technical indicators — Kuramoto, Ricci, entropy, fractal, Hurst |
KURAMOTO | core/kuramoto/ | Python | RK4 · JAX/GPU · Sparse · Adaptive · Delayed · SecondOrder simulation engines |
BACKTEST | backtest/ | Python | Event-driven engine, walk-forward, Monte Carlo, property-based validation |
EXECUTION | execution/ | Python | OMS, smart routing, Kelly/MV sizing, compliance, paper trading |
RUNTIME | runtime/ | Python | Live orchestration, kill switch, CNS stabilizer, recovery agent |
TACL | tacl/ | Python | Thermodynamic autonomic control — free energy descent, protocol hot-swap |
NEURO | core/neuro/ | Python | Dopamine TD-learning, serotonin ODE stability, GABA inhibition gate, cryptobiosis survival |
OBSERVE | observability/ | Python | Prometheus, OpenTelemetry, structured audit logging, dashboards |
ACCEL | rust/geosync-accel/ | Rust | High-performance compute kernels for hot-path acceleration |
UI | ui/dashboard/ | TypeScript | React web interface — canonical interactive dashboard |
GeoSync is a verified physical system, not a test-coverage theatre. The physics kernel (.claude/physics/) defines 57 machine-checkable invariants across 15 modules. Every test is a mathematical witness of a specific physical law, not a line-coverage artefact.
┌──────────────────────────────────────┐
│ 57 INVARIANTS · 15 MODULES │
│ Every assert derives its tolerance │
│ from the law's formula, not from │
│ a magic literal. │
└──────────┬───────────────────────────┘
│
┌─────────────────────┼─────────────────────────┐
│ │ │
┌───────▼────────┐ ┌───────▼────────┐ ┌────────────▼──────────┐
│ GENERATORS │ │ SUSTAINERS │ │ PROTECTORS │
│ Kuramoto (K1-7)│ │ ECS (FE1-2) │ │ GABA (GABA1-5) │
│ Dopamine (DA1-7)│ │ Serotonin tonic│ │ Serotonin veto (5HT7)│
│ HPC (HPC1-2) │ │ (5HT1-6) │ │ Cryptobiosis (CB1-8) │
│ Kelly (KELLY1-3)│ │ Thermo (TH1-2)│ │ │
└────────────────┘ └───────────────┘ └───────────────────────┘
Protectors have unconditional priority over Generators. A system without a gradient cannot use a gradient. See CLAUDE.md §0 for the full gradient ontology.
| Metric | Value |
|---|---|
| Physics invariants | 57 across 15 modules (P0: 37, P1: 17, P2: 3) |
| Grounded witnesses | 67 tests with INV-* docstrings and 5-field error messages |
| C1/C2 code audit | 0 undocumented physics clamps in core/ |
| CI gate | physics-kernel-gate.yml — self-check + L1-L5 validation + C1/C2 audit |
| OOS walk-forward alpha | +78% vs equal-weight, drawdown -53% (5/5 folds protected) |
Key invariants:
| ID | Law | Module |
|---|---|---|
INV-K2 |
K < K_c ⟹ R → 0 (subcritical decay, ε = 3/√N) | Kuramoto |
INV-5HT7 |
stress ≥ 1 OR |drawdown| ≥ 0.5 → veto | Serotonin |
INV-CB1 |
DORMANT ⟹ multiplier == 0.0 EXACTLY | Cryptobiosis |
INV-FE1 |
Free energy non-increasing under active inference | ECS |
INV-DA7 |
∂δ/∂r = 1 (RPE linear in reward) | Dopamine |
INV-RC1 |
Ollivier-Ricci κ ≤ 1 (universal upper bound) | Ricci |
Kuramoto |
Ricci Flow |
Entropy |
Fractal |
Hurst |
Multi-Scale |
The governing brain of system stability. Every autonomous change must respect Monotonic Free Energy Descent.
Free Energy F = U − T·S
where U = Σᵢ wᵢ · penalty(metricᵢ) internal energy
T = 0.60 control temperature
S = stability headroom entropy term
Envelope: F ≤ 1.35 (12% safety margin)
Rest: F = 1.00 (stabilised baseline)
Kill: F > 1.35 (emergency halt)
|
Monitored Metrics
|
Safety State Machine |
Protocol Hot-Swap — dynamic switching between RDMA, CRDT, gRPC, Shared Memory, Gossip with admissibility guards. Any swap that increases F beyond tolerance triggers automatic reversion within 30s.
git clone https://github.com/neuron7xLab/GeoSync.git
cd GeoSync
python -m venv .venv && source .venv/bin/activate
make installfrom core.indicators.kuramoto_ricci_composite import GeoSyncCompositeEngine
import numpy as np, pandas as pd
index = pd.date_range("2024-01-01", periods=720, freq="5min")
prices = 100 + np.cumsum(np.random.normal(0, 0.6, 720))
volume = np.random.lognormal(9.5, 0.35, 720)
bars = pd.DataFrame({"close": prices, "volume": volume}, index=index)
engine = GeoSyncCompositeEngine()
snapshot = engine.analyze_market(bars)
print(f"Phase: {snapshot.phase.value}")
print(f"Confidence: {snapshot.confidence:.3f}")
print(f"Entry: {snapshot.entry_signal:.3f}")=== GeoSync Market Analysis ===
Phase: transition
Confidence: 0.893
Entry: 0.000
from core.kuramoto import KuramotoConfig, run_simulation
cfg = KuramotoConfig(N=50, K=3.0, dt=0.01, steps=1000, seed=42)
result = run_simulation(cfg)
print(f"Trajectory: {result.phases.shape}") # (1001, 50)
print(f"Final R: {result.order_parameter[-1]:.4f}")from backtest.event_driven import EventDrivenBacktestEngine
from core.indicators import KuramotoIndicator
indicator = KuramotoIndicator(window=80, coupling=0.9)
prices = 100 + np.cumsum(np.random.default_rng(42).normal(0, 1, 500))
def signal(series):
order = indicator.compute(series)
s = np.where(order > 0.75, 1.0, np.where(order < 0.25, -1.0, 0.0))
s[:min(indicator.window, s.size)] = 0.0
return s
result = EventDrivenBacktestEngine().run(prices, signal, initial_capital=100_000)tp-kuramoto simulate --N 50 --K 3.0 --steps 2000 --seed 42
geosync-server --allow-plaintext --host 127.0.0.1 --port 8000Six specialized integrators for every scale:
| Engine | Method | Use Case |
|---|---|---|
| Standard | RK4 | General-purpose, N < 10K |
| JAX | XLA-compiled | GPU/TPU acceleration |
| Sparse | O(E) coupling | Large networks, sparse topology |
| Adaptive | Dormand-Prince / LSODA | Error-controlled step size |
| Delayed | DDE | Time-delayed coupling |
| SecondOrder | Inertia + damping | Swing equations, power grids |
Standard ODE: dθᵢ/dt = ωᵢ + (K/N) · Σⱼ≠ᵢ sin(θⱼ − θᵢ)
Adjacency ODE: dθᵢ/dt = ωᵢ + K · Σⱼ Aᵢⱼ sin(θⱼ − θᵢ)
Order Parameter: R(t) = |1/N · Σⱼ exp(iθⱼ)| ∈ [0, 1]
| Parameter | Default | Description |
|---|---|---|
N |
10 | Coupled oscillators (int >= 2) |
K |
1.0 | Global coupling strength |
omega |
N(0,1) | Natural frequencies (rad/time) |
dt |
0.01 | RK4 integration step |
steps |
1000 | Integration steps |
adjacency |
None | Weighted coupling matrix |
theta0 |
U(0, 2pi) | Initial phases |
seed |
None | RNG seed for reproducibility |
10,051 collected · 681 passing · 71% line coverage · 57 physics invariants · 67 witnesses · 0 mypy errors
| Unit tests/unit/ |
Integration tests/integration/ |
Property tests/property/ |
Fuzz tests/fuzz/ |
Contract tests/contracts/ |
Mutation mutmut |
pytest tests/ # full suite
pytest tests/ -m "not slow" # fast feedback
pytest tests/property/ # hypothesis-driven
mutmut run --use-coverage # mutation testing
cd ui/dashboard && npm test # UI smokeCI Merge Gates: ruff, mypy (strict), bandit, pip-audit, CodeQL, Semgrep, TruffleHog, CycloneDX SBOM generation.
Design targets — NOT measured results. See METRICS_CONTRACT.md.
Backtesting throughput 1M+ bars/second
Order latency < 5 ms (exchange-dependent)
Signal generation < 1 ms (cached indicators)
Memory steady-state ~ 200 MB live trading
Hot-path budget > 30% → Rust accelerator fallback
Framework NIST SP 800-53 · ISO 27001 (design aligned)
Encryption AES-256 at rest · TLS 1.3 in transit
Secrets HashiCorp Vault · AWS Secrets Manager
Auth JWT + MFA for admin operations
Compliance GDPR · CCPA · SEC · FINRA patterns
Audit 400-day immutable append-only log
Supply chain pinned SHA actions · dependency hash verification
CVE target < 7-day remediation
Type safety mypy strict · Pydantic 2.0 · 0 type errors
# Docker Compose (dev/staging)
cp .env.example .env && docker compose up -d
# Kubernetes (production)
terraform -chdir=infra/terraform/eks apply -var-file=environments/production.tfvars
kubectl apply -k deploy/kustomize/overlays/productionConfiguration via Hydra — conf/, config/, configs/, envs/, .env. Override anything from CLI:
geosync run strategy.capital=200000 data.timeframe=4h NUMERICAL NumPy 2.3 · SciPy 1.16 · Pandas 2.3 · Numba 0.60
ML PyTorch 2.1 · scikit-learn · Optuna
GRAPH NetworkX 3.5
API FastAPI 0.120 · Strawberry GraphQL
DATABASE PostgreSQL + SQLAlchemy 2.0 · Alembic
CACHE Redis 7.0
MESSAGING Apache Kafka (aiokafka)
OBSERVABILITY Prometheus · OpenTelemetry
CONFIGURATION Hydra-core 1.3 · OmegaConf 2.3
VALIDATION Pydantic 2.12 · Pandera 0.20
INFRASTRUCTURE Docker · Kubernetes · Helm · Terraform
ACCELERATION Rust (geosync-accel) · CuPy (GPU optional)
QUALITY ruff · black · mypy · pytest · Hypothesis · mutmut
VERSION v0.1.0 Pre-Production Beta
CORE ENGINE stable production-ready
INDICATORS stable 50+ geometric + technical
BACKTESTING stable event-driven, walk-forward
LIVE TRADING beta active development
DASHBOARD alpha early preview
DOCUMENTATION 85% 170+ files
Roadmap
Q1 2026 v1.0 production release
Q2 2026 options & derivatives support
Q3-Q4 2026 multi-asset portfolio optimization
Path to v1.0: 98% coverage gate activation, dashboard auth hardening, external security audit, P99 benchmark suite, SBOM publication.
|
Getting Started Architecture |
Operations Research |
Institutional Overview | Roadmap | Security Framework | Contributing | Full Documentation
git clone https://github.com/neuron7xLab/GeoSync.git && cd GeoSync
python -m venv .venv && source .venv/bin/activate
make dev-install
make test # core test suite
make lint # ruff + mypy + bandit
make format # black + isort
make audit # security audit
make golden-path # full workflow demo
make help # all commandsContributing Guide | Code of Conduct | Good First Issues
If you use GeoSync in academic research, industry reports, or derivative work, please cite it. A machine-readable manifest lives in CITATION.cff; GitHub renders a ready-to-copy citation in the sidebar of the repository page.
@software{geosync_2026,
title = {GeoSync: Geometric Market Intelligence Platform},
author = {Vasylenko, Yaroslav},
year = {2026},
version = {1.0.0},
url = {https://github.com/neuron7xLab/GeoSync},
license = {MIT}
}Trading financial instruments involves substantial risk of loss. GeoSync provides quantitative research infrastructure and execution tooling — it does not constitute investment advice, and no component guarantees profitable performance. Live trading modules are in pre-production beta. Backtested results do not guarantee future performance. Users bear full regulatory responsibility.