fix(suggestion): profit buckets require combined_score > 0 (owner rule)

Owner: a stock with a NEGATIVE overall (combined) score must not be recommended
in the profit buckets, even with positive momentum + theme. BGRIM/TTB had
combined -0.029/-0.066 yet still landed in bucket 1.

- allocate_capital profit_pool now gates on combined_score > 0 (in addition to
  momentum>0 + theme>0), still ranking by momentum within that pool.
- Verified: bucket 1 now picks PTTGC (+0.209, mom +1.85) instead of BGRIM/TTB;
  BANPU in bucket 2; ADVANC/SCB/LH in bucket 3 by yield. Full suite 377 green.
This commit is contained in:
Kunthawat Greethong committed 2026-08-31 19:00:14 +07:00
1 parent 5b8a10c730
commit 54776d5647
3 files changed
+31 -5

No files matched your search

@@ -156,3 +156,15 @@ constants + inline formula repeated in 3 places to a single declarative source:
already weighted 0.5 inside the formula.
- Added tests: raw score formula incl. momentum term; momentum raises siamchart
score given identical fundamentals. Full suite 376 green.
## Profit buckets now require a positive combined score (owner rule — 2026-08-31)
The owner flagged that BGRIM/TTB still got recommended in bucket 1 even though
their combined score was negative (-0.029 / -0.066): the profit pool only gated
on momentum>0 + theme>0, so a stock with good price trend but weak fundamentals
(EPS/yield lagging the cohort) could still be suggested.
- `allocate_capital` profit_pool now ALSO requires `combined_score > 0` — a stock
whose overall score is negative is never recommended in buckets 1/2, while
still ranking by momentum within that gated pool.
- Verified: suggestion now picks PTTGC (combined +0.209, mom +1.85) in bucket 1
instead of BGRIM/TTB; BANPU in bucket 2 (combined +0.70); ADVANC/SCB/LH in
bucket 3 by yield. Full suite 377 green.