feat: major codebase audit — 21 routers, 37 services, 12 pages fully documented

- Add missing numpy, scipy, dbnomics to requirements.txt (fixes ImportError on fresh install)
- Sync claude.md with actual codebase: §3 file structure (37 services, 21 routers),
  §5 API endpoints (92 routes), §6 frontend pages (12), §13 TODO status
- Update README.md with current architecture (92 API routes, 21 routers, 37 services),
  multi-asset overview, research grid, macro dashboard, screener+backtest,
  multi-jurisdiction filings, and 2026-03-26 changelog entry
- Add new routers: dart, edinet, fmp, macro, research
- Add new services: cache, dart_fetcher, dart_filing_service, economic_calendar,
  ecos_fetcher, edinet_filing_service, fmp_client, global_macro_quadrant,
  kpi_history_service, macro_cycle, macro_fetcher, oecd_cycle,
  peer_comparison_service, research_dashboard, smart_money_service, yield_fx_service
- Add new frontend: macro page, screener+backtest, research grid components,
  overview (Equity/ETF/Commodity), filings (SEC/DART/EDINET), error boundaries
- Remove 6 unused services: copilot_context, crypto_fetcher, fx_fetcher,
  gemini_analysis, market_data, technical_analysis
- Remove obsolete docs: .agent/, AGENT.md, ATLAS_EVALUATION.md, docs/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shawnkim1997
2026-03-26 21:39:07 +00:00
co-authored by Claude Opus 4.6
parent 38c56a5a43
commit 51cbaf7f8d
98 changed files with 7999 additions and 2399 deletions
+35 -1
View File
@@ -6,7 +6,9 @@ and provides the static lookup tables for companies and sectors.
"""
from enum import Enum
from typing import List, Tuple
from typing import List, Literal, Optional, Tuple
FilingJurisdiction = Literal["SEC", "DART", "EDINET"]
# ---------------------------------------------------------------------------
# Company reference data
@@ -130,6 +132,38 @@ def get_global_ticker(ticker: str, market: str) -> str:
return t
def infer_filing_jurisdiction(ticker: str) -> FilingJurisdiction:
"""Route Filings UI: Korean listings use DART, Japanese use EDINET, else SEC."""
t = (ticker or "").strip().upper()
if t.endswith(".KS") or t.endswith(".KQ"):
return "DART"
if t.endswith(".T"):
return "EDINET"
return "SEC"
def korean_stock_code_from_ticker(ticker: str) -> Optional[str]:
"""Return 6-digit KRX stock code from ``005930.KS`` / ``005930.KQ``, else None."""
t = (ticker or "").strip().upper()
if not (t.endswith(".KS") or t.endswith(".KQ")):
return None
base = t.rsplit(".", 1)[0].strip()
if base.isdigit() and len(base) == 6:
return base
return None
def japanese_sec_code_from_ticker(ticker: str) -> Optional[str]:
"""Return EDINET 5-digit security code from ``7203.T`` → ``72030`` (4-digit + 0)."""
t = (ticker or "").strip().upper()
if not t.endswith(".T"):
return None
base = t.rsplit(".", 1)[0].strip()
if base.isdigit() and len(base) == 4:
return base + "0"
return None
def infer_market_from_ticker(ticker: str) -> str:
"""Guess the market label from a ticker's suffix.