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.
- load_price_snapshot picked the last snapshot by filename (lexicographic),
selecting a stale 9-symbol collection over the full 50-symbol universe. Now
picks the snapshot with the latest source.retrieved_at.
- allocate_capital profit buckets now also require momentum > 0 (a falling-price
name is not 'ทำกำไร'), while momentum/theme_signal stay Optional so the PIT
backtest path (which doesn't provide them) still allocates.
- Suggestion now allocates across all 50 SET50 names (B1: BGRIM,TTB; B2: BANPU;
B3: ADVANC,SCB,LH).
- Regression tests for both. Full suite 374 green.
Owner rule: a stock that should be bought for profit is one whose PRICE is
likely to rise in the next 3-6 months — not one with high EPS growth (BTS had
EPS +137% yet flat/falling price). The old selection ranked buckets 1/2 by
(60/40 theme+siamchart where siamchart was EPS-growth dominated).
- themes.price_trend_score(): blend of ~3/6/12-month price momentum, z-scored
across the universe (heavier 3/6m weight per the 3-6 month tenure).
- allocate_capital: buckets 1/2 rank by momentum, gated on theme_signal > 0
(mean surprise across the symbol's themes). theme_signal=None (backtest path)
is not gated so PIT backtest still allocates. Bucket 3 unchanged (yield top).
- suggestion endpoint passes real momentum + theme_signal from the live board.
- Verified: bucket 1 now picks CRC/BEM (dividend + rising price); falling-price
PTT/MINT go to bucket 3 by yield, not bucket 1. Full suite 372 green (3 new
momentum/theme-gate tests).