An open-source, high-performance financial analytics and risk engine running 100% client-side with zero backend dependencies.
Live Terminal β’ Architecture β’ Benchmark β’ Getting Started β’ TΓΌrkΓ§e DokΓΌmantasyon
Zenith Atlas is an open-source, high-performance financial analytics and risk modeling terminal designed for asset managers, researchers, and individual investors tracking Turkish and global capital markets (1,051 TEFAS mutual funds, Borsa Istanbul equities, FX, commodities, and CBRT macroeconomic indicators).
Operating under a Client-Side Memory Architecture, zero portfolio telemetry or trade data is transmitted to external servers. All factor regressions, Bayesian allocations, and 10,000-path Monte Carlo simulations execute entirely in-browser memory.
All mathematical calculation modules and multi-agent coordination loops are covered and validated by an automated test suite (23 Unit & Benchmark Tests):
| Mathematical Engine / Module | Algorithm & Methodology | Test Status | Execution Latency |
|---|---|---|---|
| Monte Carlo Engine | 10,000-Path Geometric Brownian Motion (GBM) | 100% PASS | 175ms (5-Yr Horizon) |
| Black-Litterman Model | Bayesian Portfolio Equilibrium & View Shrinkage | 100% PASS | 0.21ms |
| Hierarchical Risk Parity (HRP) | Marcos Lopez de Prado ML Tree Clustering | 100% PASS | 0.27ms |
| Fama-French 5-Factor | Multi-Factor Regression & Jensen's Alpha | 100% PASS | 0.38ms |
| Adaptive Circuit Breaker | 3-Tier Drawdown & Volatility State Machine | 100% PASS | < 0.1ms |
| Tax-Loss Harvesting Engine | GVK 67 Exemption & HIFO Tax Shield | 100% PASS | < 0.2ms |
| Multi-Agent Hive Engine | 5 Autonomous Sentinels & Memory Reflector | 100% PASS | Verified |
| Formula Injection Defense | DDE Sanitization (sanitizeCsvCell) |
100% PASS | Verified |
graph TD
subgraph CLIENT [π₯οΈ Modern React 19 + TypeScript Terminal]
UI[User Interface: Dashboard, Funds, Screener, Heatmap, Quant, Strategy, Engine]
WS_CLIENT[Live WebSocket Client]
IDB[(IndexedDB & LocalStorage Portfolio Store)]
subgraph MODULES [βοΈ Modular Quant Engine: 5 Specialized Modules]
A1[SyncSentinel: TEFAS Session & Data Reconciliation]
A2[LeadQuant: Fama-French Alpha & Factor Attribution]
A3[RiskBreaker: Circuit Breaker & Volatility Audit]
A4[TaxHarvester: Withholding & Tax Optimization]
A5[MacroStrategist: CBRT & Inflation Macro Allocation]
end
subgraph ENGINES [π 11 Quantitative Mathematical Engines]
E1[FactorAttributionEngine: Fama-French 5-Factor]
E2[RollingCorrelationEngine: 30D/90D/365D Correlation & PCA]
E3[BlackLittermanEngine: Bayesian Asset Allocation]
E4[HrpEngine: Hierarchical Risk Parity]
E5[MonteCarloEngine: 10,000-Path Simulation]
E6[TaxLossHarvestingEngine: HIFO Tax Shield]
E7[SyntheticStressEngine: Historical & Synthetic Crisis Stress]
E8[SquarifiedTreemapEngine: Finviz-Style Treemap]
E9[VoiceBriefingEngine: Web Speech AI Voice Engine]
E10[P2pLiveSyncEngine: WebRTC & QR Teleport]
E11[FinancialCircuitBreaker: 3-Tier Circuit Breaker]
end
end
subgraph SOURCES [π Official Data Feeds]
S1[Takasbank TEFAS Dataset: 1,051 Funds]
S2[wss://s.canlidoviz.com: Live FX, Gold & BIST]
S3[CBRT & TUIK: Repo Rate %37 & CPI %31.75]
end
S2 -->|Real-Time WebSocket| WS_CLIENT
S1 & S3 -->|Automated Sync & Bundled Data| IDB
WS_CLIENT --> UI
IDB --> MODULES
MODULES --> ENGINES
ENGINES --> UI
- SyncSentinel: Monitors 1,051 TEFAS mutual funds and reconciles daily Takasbank 20:00 session settlement pricing.
- LeadQuant: Computes Fama-French 5-Factor attribution, Jensen's Alpha, Beta, Sharpe, Sortino, and Calmar risk-adjusted performance ratios.
- RiskBreaker: Continuously tracks volatility thresholds and portfolio concentration, enforcing a 3-tier circuit breaker (
HEALTHY,WARNING,TRIPPED). - TaxHarvester: Simulates HIFO tax loss harvesting and optimizes allocations under Turkish Presidential Decree 9075 (0% withholding tax equity funds).
- MacroStrategist: Evaluates macro regimes based on CBRT policy rates and inflation dynamics to recommend asset allocation tilts.
-
Fama-French 5-Factor Decomposition: Decomposes returns across Market (
$\beta$ ), Size (SMB), Value (HML), Profitability (RMW), and Investment (CMA) factors to isolate pure managerial alpha. - Black-Litterman Model: Blends market equilibrium with subjective investor views using Bayesian statistical shrinkage.
- Hierarchical Risk Parity (HRP): Executes machine learning-based hierarchical tree clustering (Marcos Lopez de Prado) for robust diversification without matrix inversion instabilities.
- Monte Carlo Simulation: 10,000-path Geometric Brownian Motion (GBM) projecting 1-to-5-year probabilistic return cones.
- Crisis Stress Testing: Simulates portfolio drawdown under historical shocks: 2008 Global Financial Crisis, 2020 Pandemic Shock, and 2021 Turkish Lira FX Shock.
- Embedded offline database indexing all 1,051 official TEFAS mutual funds.
- Sub-millisecond code lookup auto-populates fund metadata, category classification, and Takasbank settlement pricing.
- Multi-criteria sorting and filtering by AUM, expense ratio, annualized alpha, and category.
- Visualizes 1,051 TEFAS funds and user portfolios via the Bruls-Huizing-van Wijk tiling algorithm using HSL dynamic color scales.
- Generates comprehensive, high-resolution 4-page A4 executive PDF summaries client-side via jsPDF, containing factor attributions, risk metrics, and simulation paths.
- Web Speech API-powered voice engine synthesizing daily portfolio summaries, net asset values, and market opening briefings in Turkish.
- Zero-cloud, camera-based mobile portfolio synchronization via high-density URL hash QR teleportation.
- Mobile-first responsive UI featuring bottom dock navigation, swipeable tabs, and touch drawers.
- Runtime resilience layer preventing white-screen crashes, isolating UI state faults, and enabling graceful local data recovery.
Access the production build directly in your browser with zero setup: π https://cagrik34.github.io/zenith-atlas/
Prerequisites:
- Node.js v20+ (v22+ LTS recommended)
- npm v10+
# 1. Clone repository
git clone https://github.com/Cagrik34/zenith-atlas.git
cd zenith-atlas
# 2. Install dependencies
npm install
# 3. Run automated unit & benchmark tests (23 Tests)
npm test
# 4. Start development server
npm run dev
# 5. Build for production (Strict TypeScript & PWA)
npm run buildzenith-atlas/
βββ .github/workflows/ # GitHub Actions CI/CD test & deployment workflow
βββ public/ # Static PWA assets, manifest, and icons
βββ scripts/ # Python-based data ingestion & sync utilities (sync.py)
βββ src/
β βββ components/ # Modular UI components (Dashboard, Quant, Screener, etc.)
β βββ context/ # React Contexts (Portfolio, Market, AgentHive)
β βββ data/ # Bundled static datasets
β βββ engines/ # 11 Quantitative mathematical analysis engines
β βββ hooks/ # Custom reactive hooks (useAutoSync, useLivePrices)
β βββ styles/ # Enterprise Glassmorphism design system
β βββ types/ # Strict TypeScript definitions
β βββ utils/ # Export formats, math helpers, and storage drivers
β βββ App.tsx # Root Application & Modals
β βββ main.tsx # React 19 Entry Point
βββ tests/ # Vitest Unit & Benchmark test suites (23 Tests)
β βββ benchmark/ # Sub-millisecond performance benchmarks
β βββ unit/ # Quant engines, multi-agent hive & security tests
βββ index.html # HTML5 Entry Document
βββ package.json # Node.js dependencies, scripts & vitest runner
βββ tsconfig.json # Strict TypeScript configuration
βββ vite.config.ts # Vite 6 + manualChunks Rollup optimization
- Client-Side Execution: Portfolio balances, trade histories, and cost positions remain strictly in local browser storage (
IndexedDB/localStorage). - Input Sanitization: Native React 19 DOM escaping safeguards.
- Formula Injection Defense: CSV/Excel export cells sanitized via
sanitizeCsvCellagainst Dynamic Data Exchange (DDE) formula execution (=,+,-,@).
Distributed under the MIT License. See LICENSE for details.
Author: ΓaΔrΔ± Giray KeΕan
Copyright: Β© 2026 ΓaΔrΔ± Giray KeΕan. All Rights Reserved.