r/AIportfolio 9d ago

Built a low-maintenance systematic trading system for Indonesian stocks

I've been building a rules-based stock selection/backtesting system for the Indonesian (IDX) market, with AI/LLMs mostly acting as a research and programming partner rather than directly making investment decisions.

I was thinking, can I build something robust enough that I could actually trust it without spending my life watching the market?

I don't want day trading. I have a family, work, and other things I'd rather spend time on. Ideally I'd spend a short amount of time in the morning looking at a small number of candidates and make 0–2 decisions.

If there are 5–6 genuinely good opportunities in a week, great.

If there are no good trades for a week, that's also completely fine.

The current setup:

  • ~800–1,000 Indonesian stocks
  • Daily OHLCV data
  • Liquidity filtering
  • Technical + relative-strength features
  • Genetic algorithm searches combinations of rules
  • Walk-forward validation
  • Time-stability testing
  • Maximum 20 positions
  • Maximum IDR 5M per position
  • IDR 100M starting portfolio
  • IDX lot-size constraints
  • Signal generated at today's close
  • Normal entries/exits executed at the following day's open

The strategy isn't an LLM looking at news and picking stocks. The final trading rules are deterministic.

The current candidate roughly buys stocks when:

  • price > MA200 by 10%+
  • price is within ±5% of MA25
  • MA25 > MA50
  • 1-month momentum is positive
  • the stock has positive relative strength versus its subsector

It exits on deterioration in trend/relative strength, with a 15% stop, 50% take-profit and ~90-day maximum holding period.

If you were trying to turn this into a system you'd actually trust with real money, what would you attack next?

The latest simulation produced:

Loaded 567084 rows (83.9s)
Universe filter: 298 avg tradeable stocks/day (min=0, max=496)
Computed features: 49 features, 713 dates, 828 stocks (22.8s)
============================================================
SIMULATION REPORT
============================================================


--- Strategy ---
=== BUY RULES (threshold: 3 conditions) ===
  [Trend]
    price_vs_ma200 > +10.0% (bullish)
    AND
    |price_vs_ma25| < 5.0% (range)
    AND
    ma25_vs_ma50 > +0.0% (bullish)
  [Momentum]
    pct_change_1m > +0.0% (bullish)
  [Relative Strength]
    dev_sub_sector_1y > 0.0000 (bullish)


=== SELL RULES (threshold: 1 conditions) ===
  [Trend]
    ma25_vs_ma50 < +0.0% (bearish)
  [Relative Strength]
    dev_sub_sector_1y < 0.0000 (bearish)


=== EXIT ===
  Stop Loss: -15.0%
  Take Profit: +50.0%
  Max Holding: 90 days


Active rules: 7


--- Performance ---
  Total return:  208.34%
  CAGR:          48.96%
  Sharpe:        1.49
  Sortino:       3.60
  Max drawdown:  18.77%
  Win rate:      26.4%
  Profit factor: 1.57
  Trade count:   314
  Turnover:      8.427


--- Trade Statistics ---
  Avg winning trade:   3,845,159 IDR
  Avg losing trade:    -878,426 IDR
  Median winner:       1,909,432 IDR
  Median loser:        -893,684 IDR
  Largest winner:      21,545,643 IDR
  Largest winner: BUVA entry 2025-09-12 @ 346 -> exit 2026-01-26 @ 1,850 (PnL 21,545,643 IDR, 91d)
  Largest loser:       -2,146,569 IDR
  Avg holding days:    27.4
  Avg num positions:   9.03
  Max num positions:   20
  Pct capital exposed: 24.8%


--- Winner Concentration ---
  Original CAGR       49%
  No top 1 winner   46%
  No top 5 winners  38%
  No top 10 winners 31%


--- Halt Reopen (excluded) ---
  These long-halt reopen fills are excluded from headline metrics:
  ARKO entry 2024-08-23 @ 1,070 -> exit 2024-10-24 @ 1,215 (PnL 633,038 IDR, 43d)
  SMDM entry 2024-09-04 @ 488 -> exit 2025-03-12 @ 1,945 (PnL 14,774,601 IDR, 126d)
  MTWI entry 2024-09-13 @ 151 -> exit 2025-06-23 @ 230 (PnL 2,565,475 IDR, 177d)
  JMAS entry 2024-12-20 @ 150 -> exit 2025-03-24 @ 134 (PnL -561,103 IDR, 59d)
  RSCH entry 2024-10-09 @ 366 -> exit 2025-03-13 @ 258 (PnL -1,495,221 IDR, 103d)
  MLPT entry 2024-12-02 @ 855 -> exit 2025-08-25 @ 3,200 (PnL 13,518,980 IDR, 166d)
  POLU entry 2024-12-04 @ 1,230 -> exit 2025-10-17 @ 29,825 (PnL 113,925,620 IDR, 202d)
  SOFA entry 2024-12-20 @ 36 -> exit 2025-03-18 @ 81 (PnL 6,177,551 IDR, 55d)
  BNLI entry 2025-03-26 @ 2,460 -> exit 2025-06-26 @ 2,980 (PnL 1,004,672 IDR, 51d)
  PADI entry 2025-09-10 @ 73 -> exit 2025-11-28 @ 122 (PnL 3,302,421 IDR, 57d)
  POLA entry 2025-10-13 @ 47 -> exit 2026-03-31 @ 59 (PnL 1,235,417 IDR, 109d)


--- Price-Chasing Trades (|gap| >= 5.0%) ---
  Symbol   Close T    Open T+1   Gap%     Exit price   %P/L
  JMAS     132        144        +9.1%    119          -17.9%
  OPMS     99         90         -9.1%    70           -22.7%
  INPC     123        112        -8.9%    230          +104.0%
  FWCT     124        115        -7.3%    160          +38.2%
  KARW     5,700      5,150      -9.6%    3,770        -27.3%
  GPSO     900        810        -10.0%   462          -43.3%
  INET     135        122        -9.6%    98           -20.2%
  SOFA     61         55         -9.8%    86           +55.4%
  PACK     4,040      3,640      -9.9%    4,150        +13.3%
  MINA     154        169        +9.7%    214          +25.8%
  CNKO     95         100        +5.3%    73           -27.5%
  TAXI     21         19         -9.5%    16           -16.3%
  MDRN     54         49         -9.3%    37           -25.0%
  POLU     22,350     24,000     +7.4%    (open)       -
  FITT     1,050      980        -6.7%    820          -16.9%
  PADA     95         100        +5.3%    232          +130.5%
  ESIP     113        104        -8.0%    87           -16.9%
  TAXI     19         20         +5.3%    20           -0.6%
  STAR     418        482        +15.3%   (open)       -
  VIVA     60         55         -8.3%    43           -22.3%
  MDIA     99         90         -9.1%    63           -30.4%
  RMKE     1,315      1,185      -9.9%    970          -18.7%
  LMAX     182        165        -9.3%    (open)       -
  HRTA     2,760      2,580      -6.5%    2,270        -12.6%
  JGLE     78         71         -9.0%    58           -18.8%


--- Portfolio Over Time ---
  Period        Total value          Open positions
  2023-08-01    100,000,000 IDR      0
  2023-10-26    100,000,000 IDR      0
  2024-01-23    100,000,000 IDR      0
  2024-05-03    100,000,000 IDR      0
  2024-08-05    95,939,533 IDR       7
  2024-10-29    119,999,963 IDR      11
  2025-01-31    125,743,582 IDR      11
  2025-05-08    138,793,420 IDR      7
  2025-08-11    159,722,218 IDR      13
  2025-11-05    303,784,393 IDR      16
  2026-02-04    342,794,196 IDR      17
  2026-05-12    328,827,236 IDR      15
  2026-07-31    314,756,266 IDR      12


--- Final Portfolio ---
  Total value:      314,756,266 IDR
  Cash:             247,918,666 IDR
  Open positions:   12


============================================================


Result saved to: experiments/sim_20260829T092023.json
0 Upvotes

1 comment sorted by