Kunthawat Greethong
7a3cfac19a
feat(ui): rename Simulation→Suggestion, remove forward-test mode entirely (backend routes/store + frontend panel/option), fix stock-list overflow in allocation display
2026-08-29 01:57:13 +07:00
Kunthawat Greethong
b362cc35bf
[verified] Add API tests for /api/v1/learning/factors + configurable history dir
...
Closes reviewer suggestion (deleg_5dd358e3): adds coverage for the factor
readiness endpoint (n_points / learnable / last_value / ordering) and the
min_points 400 validation. FACTOR_HISTORY_DIR is now configurable via app
config so tests (and deploy) can point the history store at a chosen path
instead of a hardcoded data dir. 236 tests pass.
2026-08-27 07:37:01 +07:00
Kunthawat Greethong
d850955c44
[verified] Declarative factor engine + per-symbol stock selection (full-app consistency)
...
- factors.py: FACTORS registry (10 declarative entries: source/fetch/frequency/sign/weight) + normalize/z-score helpers. Add a source = one dict entry, no scoring-function edit.
- themes.THEMES: 13 themes reference FACTORS with per-theme weights (flexible), replacing hardcoded _theme_surprises/_theme_narrative.
- themes.quality_within_theme(): per-symbol quality vs theme cohort (ROE/EPS) -> real stock picking. dashboard board now surprise×quality (BBL 0.5 vs KTB 1.5 in banks).
- board rows carry per-symbol themes[]; /api/v1/themes delegates to RealDashboard.build() -> 13-theme consistency with /api/v1/dashboard (removed 115 lines dead dup logic).
- frontend: deleted THEME_BY_SYMBOL/themeLabelById hardcode; theme column + modal labels+quality all from API. Modal shows surprise×quality=theme_score.
- Tests: 202 OK (quality selection, breakdown quality, themes/dashboard consistency).
- Verified: BBL modal 1.00σ×0.5=0.50σ; KTB 1.5 vs BBL 0.5, PTT 2 themes; 49/49 rows theme from API.
2026-08-26 15:17:41 +07:00
Kunthawat Greethong
c3a1461932
[verified] Add capital-allocation simulation engine + MT5 bridge (both dry-run/gated)
...
- simulation.py: price-series loader (Yahoo snapshot) + allocate_capital 50/20/30 with min-100 shares, bucket3 excludes bucket1, cash fallback
- /api/v1/simulation POST: combines theme 60/40 score + Siamchart dividend + Yahoo price; labels output paper/backtest non-PIT (never validated)
- mt5_bridge.py: MT5 order interface, dry-run default; live dispatch needs MT5_SEND_ORDERS=1 AND approval (Windows-only MetaTrader5)
- 12 new tests (simulation/mt5/api); full suite 184 OK; live verified (1M -> buckets)
2026-08-25 16:24:22 +07:00
Kunthawat Greethong
7643764679
[verified] Add GET /api/v1/themes multi-theme combined board (60% theme / 40% Siamchart)
...
- Aggregates 3 Thai themes: tourism signals (real), auto_credit (TradingEcon car sales YoY), refining_energy (Thai Oil quarterly net profit/EBITDA) via daily cache
- Combines per-symbol theme scores with Siamchart fundamental score (60/40), sorts by combined score, reports per-theme frequency (monthly/quarterly)
- Added test_themes_endpoint (mocked collectors); full suite 172 OK; compileall ok
2026-08-25 15:33:06 +07:00
Kunthawat Greethong
f55ff69c31
[verified] add frozen research runner and durable paper ledger
2026-08-23 14:42:02 +07:00
Kunthawat Greethong
7f7a6145cd
[verified] add SET price snapshot adapter
2026-08-23 12:38:17 +07:00
Kunthawat Greethong
0b47a06238
[verified] add event-study readiness gate
2026-08-23 12:02:22 +07:00
Kunthawat Greethong
d1ba6efc68
[verified] add vintage collector and point-in-time API
2026-08-23 11:11:53 +07:00
Kunthawat Greethong
a113a51589
[verified] add BOT tourism source adapter
2026-08-23 10:19:40 +07:00
Kunthawat Greethong
3e978c5948
[verified] build tourism signal dashboard
2026-08-23 07:41:31 +07:00