[verified] Add Thai Energy/Refining collector (TOP quarterly financials) replacing EIA US crack spread

- energy_thai.py: scrape Thai Oil (TOP) investor financial-highlights -> quarterly + annual EBITDA/Net Profit/Sales (Million Baht), largest Thai refinery
- Thai-specific factor per user (energy must reflect Thai companies, not US EIA proxy); Krungsri was projection-only, TOP gives real quarterly actuals
- Frequency: quarterly (documented in research note)
- 4 tests; full backend suite 156 OK; compileall ok; static scan clean
This commit is contained in:
Kunthawat Greethong
2026-08-25 15:13:36 +07:00
parent 674dcfd48c
commit 3f7fccd25b
4 changed files with 269 additions and 1 deletions

View File

@@ -14,7 +14,8 @@ The US EIA 3-2-1 crack spread is a **US** proxy; the user wants **Thai** refiner
- **TOP (Thai Oil)** analyst-meeting PDFs (`top.listedcompany.com`) — GRM/GIM per quarter, $/bbl.
- **EPPO / MOPH** — Thai retail fuel prices (more frequent, but that's fuel price, not GRM).
**Decision state:** Thai GRM quarterly is the direction; exact source (Krungsri aggregate vs TOP) pending user confirmation.
**Decision (final):** Use **Thai Oil (TOP) quarterly financial highlights** (`investor.thaioilgroup.com/en/financial-information/financial-highlights`) — real quarterly EBITDA/Net Profit/Sales of the largest Thai refinery (Million Baht), scraped from server-rendered HTML. Implemented in `backend/app/energy_thai.py`. This is Thai-specific and replaces both the US EIA crack spread and the Krungsri outlook projection. Frequency: **quarterly**. (Krungsri Research remains a qualitative backdrop; EIA is a US proxy — both superseded by TOP for the factor.)