I'm Altamis, a software engineer from Indonesia. I build payment systems, apps and Storave, and I'm curious about everything between code and people.
Nov 2026 to now · experiment, in simulation
The bet
This month I let Claude help me trade Indonesian stocks, as an experiment. The idea was simple: ride the window-dressing momentum into month-end. So far it's working, and I'm calling it luck.
Luck isn't a system. This notebook is how I'd build one properly: what the research says, how the agent should think, the numbers it must obey, and where it must never be trusted. It runs in simulation first. Nothing here is investment advice.
Don't be the exit
On the IDX, news is rarely what it looks like. Good news can be the moment a big holder starts handing shares to the crowd. Prices often move before the story, and the story arrives just in time for someone to sell into it.
| News | Money before it | Likely reading |
| Good | Quiet buying, flat price | Real: someone knew and accumulated |
| Good | Price already up, holders selling | Distribution: the news is the exit |
| Bad | Big brokers absorbing, price holds | Shakeout: weak hands out |
| Bad | Selling spreads, bids vanish | Real: step aside |
So the most expensive mistake isn't missing a rally. It's being the buyer a bandar needed. Every part of this design exists to avoid that.
Two minds and a referee
- Data, 24/7: news, prices, flows, ownership, weekends too
- Analyst: Claude Opus: writes a plan with evidence
- Referee: plain code: limits and IDX rules (veto, logged)
- Executor: DeepSeek: places only what was approved
- Broker: orders through MCP
- Journal: fills, alerts, retros
Loop: what happened becomes tomorrow's evidence
The executor never sees news or chat, so a planted story can't reach the hand that places orders. A rule in code can be tested; a rule in a prompt can be talked out of.
The referee's limits
| Rule | v1 limit |
| Risk per trade | 1% of equity, from entry to stop |
| Per position | 20% of equity at most; one position per stock |
| Total exposure | 80% of equity: 50% for trading (at most 5 positions), 30% for the 3-year book |
| Daily loss | 2%: stop for the day |
| Drawdown | 5%: risk halved; 8%: stop until reviewed by hand |
| Orders | limit orders only, always with a stop, no averaging down |
| IDX checks | price inside ARA/ARB, valid tick, 100-share lots, cash for T+2, no special-monitoring board |
| Evidence | every link cited; at least one tier A or B source |
| Kill switch | one command cancels everything |
Costs are about 0.6% per round trip with fees, tax and slippage, so a trade must expect clearly more than that to be worth taking.
What the research says
- 1 · Design beats model · The agent's design matters more than the model underneath. Reasoning models don't trade better.
- 2 · Returns aren't skill · Over a month, returns barely track how well an agent works.
- 3 · No edge yet · Fleets of LLM trading agents ran six months live without a directional edge.
- 4 · Backtests leak · A model has read what came after the backtest date. Test rules in code; judge the agent after its cutoff.
- 5 · Sell rules first · Institutions buy with skill but sell worse than random. Exits are set before entry.
- 6 · Window dressing is narrow · Strongest at quarter-ends and year-end; it tends to reverse when the new period starts.
The chain
The analyst works top-down, like a committee of a technocrat, an economist and a ten-year IDX investor.
- World, then Indonesia: dollar, China, commodities, policy
- Regime gate: risk-on, neutral or risk-off (off: park)
- Sector: its own model and tilt (tilt < 0: park)
- Size: can one player move it? (micro: drop)
- Owner: who really controls it (opaque: park)
- News: true, and from whom? (rumour: park)
- Money: who bought before, who sells now (distribution: park)
- Chart: on VWAP, checked for paint
- Plan: entry, stop, exit date, proof it's wrong
Loop: a new fact re-enters at the step it touches
Parked, not rejected
No "no" is final. A stock that fails a step waits with a condition that wakes it. The crawler checks the conditions every time new data lands.
| Parked at | Wakes when |
| Regime | the gate is back to neutral or better |
| Sector | the sector's driver momentum turns up |
| Owner | new monthly ownership data clears the doubt |
| News | a filing or a tier A or B source confirms it |
| Money | the cohort's inventory stops falling and bids absorb |
| Plan | price returns to the entry zone before the exit date |
An open position can be woken too, the other way: when a new fact contradicts a link in its chain, the trade goes back to that step, and if the link breaks, it exits by rule.
The world first
Indonesia is a small, commodity-exporting market that foreigners can leave in a day, so the top-down starts outside.
- Global money: the Fed, US real yields, the dollar
- Global growth: US, China, Europe, Japan
- Commodities and trade: coal, nickel, CPO, oil; tariffs
- EM money: fund flows, MSCI weights, peer rotation
- Indonesia: rupiah, foreign flow, bonds, BI
| China speeding up | China slowing |
| Dollar weaker | best: flows and metals | flows only: banks |
| Dollar stronger | exporters only | worst: defensives |
Six global readings (dollar, US real yields, VIX, China, the export basket, EM flows) score −6 to +6. At −3 the gate is capped at half size; at −5 it closes, however calm Indonesia looks.
Reading Indonesia
Six readings, each scored −1, 0 or +1, set the tactical gate for the weeks ahead.
| Reading | Risk-off when |
| IHSG | below its 50-day average |
| Foreign flow | net selling over 5 days |
| Rupiah | weakening over 5 days |
| BI rate | hiking, or a hike priced in |
| US yields, dollar | both rising |
| Issues | high-severity Indonesian news in the last 3 days |
sum −6 … −2 → G = 0 no new longs
sum −1 … +1 → G = 0.5 half size
sum +2 … +6 → G = 1 full size
position size = base size × G
News isn't only market news. A protest, a minister replaced, a commodity levy or a regional election can all move the IDX, and the crawler reads them on weekends too.
Three years out
A slower gate reads the political cycle and how cheap the market is after a long fall. In late November 2026 the IHSG sat around 5,150–5,340, after about Rp100 trillion of foreign net selling this year.
| Year | Phase | Watch |
| 2027 | Implementation | programmes deliver or show their cost; deficit vs. the 3% cap |
| 2028 | Pre-election | spending and populist measures; bond yields; the rupiah |
| 2029 | Election | candidates, coalitions, the economic team |
S = cheapness vs. 10 years + equity risk premium
+ depth of the fall + foreign selling slowing
+ political phase − institutional risk
When S ≥ 2, a slow book buys 12 monthly tranches of 2.5%, mostly an LQ45 ETF, up to 30% of equity, no leverage. One thesis break (fiscal rule, BI independence, index downgrade, bank earnings) stops buying; two trigger a sale review.
Sector by sector
A bank is compared with banks, a coal miner with coal miners. Each sector has its own earnings model, its own lead indicator and its own way to be valued.
| Sector | Drives earnings | Lead indicator |
| Big banks | loans, NIM, cost of credit | deposit rates, BI path |
| Staples | volume, input costs, rupiah | wheat, CPO, sugar prices |
| Telco | data revenue, ARPU | operator price moves |
| Property | marketing sales, mortgages | mortgage rates, VAT incentive |
| Coal | price, volume, royalties | Newcastle, China demand |
| Nickel | LME, mining quotas | RKAB approvals |
| CPO | price, levy, biodiesel | weather 6–12 months back |
| Small caps | flow and narrative | ownership changes |
Within a sector, stocks are ranked by z-scores against their peers, and the sector's tilt (+1, 0, −1) comes from where we are in the cycle and which policy levers just moved.
Can one player move it?
| Tier | Market cap | Who moves it | Use |
| Big | ≥ Rp50tn | foreign and local funds, index flows | main universe |
| Mid | Rp5–50tn | local funds, some foreign | if liquid, healthy float |
| Small | Rp1–5tn | bandar groups, retail | watch only |
| Micro | < Rp1tn | one or two players | excluded |
price impact ≈ σ_daily × √(Q ÷ ADV_20)
if Q = Rp20bn moves it more than 5%,
the stock is movable by one player
When one player can move a stock, its chart is that player's decision, not the market's. The agent then reads the player, not the chart.
Who really owns it
- The stock: holders above 1%, published monthly
- A holder that is a company: its own shareholders, from the company registry
- Their owners: and theirs, path by path
- The end: a person, the state, a regulated fund, or a wall (wall: treat as insider)
Free float on paper isn't free float in practice. Holders that share directors, addresses, funding or timing with the controller are counted as friends, not the public. Since 2026 the exchange also flags each controller's affiliates, which makes this possible from public data.
Governance flags (pledged shares, related-party deals, frequent rights issues, auditor changes) add up to a score: 8 or more is excluded, 5 to 7 trades at half size.
People, power and policy
Then the agent asks who these people are. Are they in the news? Do they hold public office, or did they? Does the current policy regime help or hurt this company's revenue?
| Level | Connection | Effect |
| 0 | none found | none |
| 1 | donor, adviser, family of an official | note it |
| 2 | former official, party role | price can react to politics |
| 3 | sitting official or close family | size cut; exits on political news |
A policy is scored by stage, from rumour to draft, signed, and enforced, and by how much revenue it touches. A political connection is a risk to price, not a reason to buy: it helps until the politics turn, and then everyone sells at once.
Reading the bandar
Everyone reads the same broker summary, including the bandar, who plays against it: rotating brokers, splitting orders, moving shares off-screen. So the agent reads differently.
- 1 · Follow the inventory · Group brokers by how they behave, then estimate what the group holds, at what cost, and how fast that's changing.
- 2 · Think like their CFO · A group holding stock has a cost, funding, deadlines and a need for buyers. Those constraints predict its next move.
- 3 · Distrust the chart · Closes get marked, breakouts get painted, stops get hunted.
- 4 · Read every layer · Order book, single trades, brokers, off-screen blocks, investor types, ownership and hype, together.
The agent only reads these patterns to stay out of the way. It never coordinates trades, places misleading orders or spreads stories.
The cycle
- Accumulation: quiet absorption, shakeout, test and lock (shakeout turns real: markdown)
- Markup: ignition, run, pause then run again (ignition fails: back)
- Distribution: churn at the top, exit on a story, failed push (fresh buyers: re-markup)
- Markdown: breakdown, forced selling, exhaustion (nobody returns: dead)
Loop: exhaustion becomes the next accumulation
The agent gives each stock a probability for each of the twelve sub-phases, not one label. Rules first; later a hidden Markov model learns them from data. It buys in late accumulation or early markup, and the distribution flag turns on when the estimated inventory falls while the story gets louder.
Seven layers of money
| Layer | Shows what broker codes don't |
| Order book | bids that keep refilling, walls that appear and vanish |
| Single trades | one actor splitting orders into identical lots |
| Brokers | which buyer meets which seller, again and again |
| Off-screen | negotiated blocks at prices far from the market |
| Investor types | foreign vs. local, institution vs. individual |
| Ownership | new ≥1% holders, pledges, rights issues, warrants |
| Hype | when the story peaks against the flow |
exit pressure = inventory ÷ days to sell it
× funding stress × deadlines × profit vs. target
high exit pressure + rising hype = the next move is distribution
Painted charts
| What you see | What's often behind it |
| strong close near the high | a few orders in the last minutes |
| breakout on high volume | trades between related brokers |
| wick below support, then recovery | stops hunted, then bought |
| MA cross exactly on time | price nudged across a watched level |
| locked at ARA at the close | a late bid, pulled the next morning |
Paint = z(close vs VWAP) + z(share of gain in last 15 min)
+ z(closing auction share) + z(level magnetism)
+ z(wash-trade share) − z(breadth of the breakout)
So the agent computes momentum and moving averages on VWAP, not the close, and ignores technical signals when Paint is above 2. A clean breakout with high Paint and a selling cohort is read as distribution.
Three desks, three speeds
- Monthly desk: regime, sector tilts, universe, risk budget
- Weekly desk: watchlist of 15, plans for next week
- Daily desk: brief, watch, execute, journal
Loop: shocks and drawdowns escalate straight to the monthly desk
| Desk | Risk budget | Per trade | Positions | Longest hold |
| Monthly | 50% | 1% | 2 | 3 months |
| Weekly | 35% | 0.75% | 2 | 4 weeks |
| Daily | 15% | 0.5% | 1 | 3 days |
Daily: 06:00 overnight digest, 08:00 pre-open brief, a check every 30 minutes, 16:30 close review. Weekly: review Friday, plan Sunday. When desks disagree, the slower one wins.
Retros, the long journal
- Trade closes
- Trade retro: the same day: was it right for its reason?
- Weekly review: patterns across trades
- Monthly review: thresholds to retune
- Yearly retro: every December, the whole year
Loop: a rule changes only after the same lesson appears in three retros
| Right reason | Wrong reason |
| Win | skill | luck: never repeated |
| Loss | variance: rules stay | mistake: lesson logged |
Long holdings get an invest retro every month: is the thesis still true, or am I holding out of habit, or out of the loss? The original thesis is copied, never rewritten.
Where it stands
Today it's a design and a simulation, plus one lucky month. Next: record order-book and trade data (its history can't be downloaded later), build the referee with a test for every rule, and run the year-end window in simulation.
I'll judge it the way the research says to: after costs, against simply holding the LQ45, over several quarter-ends, and on whether each trade was right for the reason it gave. Every threshold here is a first guess, and every reading becomes a hypothesis to test, because no edge stays secret for long.