Simulator Data as of 2026-11-30
Pick an instrument (SRBI 6M/9M/12M or SBN 2Y/5Y/10Y), an entry regime from the frozen 2023–2026 market history, a holding period, and your assumptions for USD/IDR movement and FX hedging cost. Everything runs locally in your browser on the study’s frozen CSVs (carry_benchmarks.csv, srbi_auctions.csv, daily_macro.csv).
Show code
benchmarks = FileAttachment ("data/frozen/carry_benchmarks.csv" ). csv ({typed : true })
auctions = FileAttachment ("data/frozen/srbi_auctions.csv" ). csv ({typed : true })
daily = FileAttachment ("data/frozen/daily_macro.csv" ). csv ({typed : true })
gold = "var(--accent)" ; teal = "var(--chart-teal)" ; grey = "var(--muted)" ; red = "var(--error)" ; grid = "var(--line)"
Show code
viewof regime = Inputs. select (
["Nov 2026 Cutoff" , "2026 Peak Stress (Jun)" , "Late-2025 Low" , "2026 Full-Year Median" ],
{value : "Nov 2026 Cutoff" , label : "Entry regime (historical snapshot)" }
)
viewof instrument = Inputs. select (
["SRBI 12M" , "SRBI 9M" , "SRBI 6M" , "SBN 2Y (SBSN)" , "SBN 5Y (SUN)" , "SBN 10Y (SUN)" ],
{value : "SRBI 12M" , label : "Instrument" }
)
viewof holdMonths = Inputs. radio ([3 , 6 , 9 , 12 ], {
value : 12 ,
label : "Holding period (months)"
})
viewof yieldOverrideBps = Inputs. range ([- 150 , 150 ], {
value : 0 ,
step : 5 ,
label : "Yield adjustment (bps vs regime)"
})
viewof fxMovePct = Inputs. range ([- 10 , 15 ], {
value : 5.0 ,
step : 0.25 ,
label : "USD/IDR spot move over holding period (+ = IDR weakens, %)"
})
viewof hedgeCostAnn = Inputs. range ([0 , 6 ], {
value : 2.25 ,
step : 0.1 ,
label : "Annualized FX hedge / implied swap cost (%)"
})
Show code
function runCarryModel (benchRows, dailyRows, aucRows, selRegime, selInst, hMonths, adjBps, fxPct, hedgeAnn) {
const regimeRows = benchRows. filter (d => d. regime === selRegime);
const picked = regimeRows. find (d => d. instrument === selInst) || regimeRows[0 ];
const entryYieldAnn = Math . max (0 , (picked. yield_pct || 0 ) + adjBps / 100 );
const sbn2yYield = picked. sbn_2y_yield_pct ;
const biRate = picked. bi_rate_pct ;
const tFrac = hMonths / 12 ;
// Simple money-market / par accrual return over holding period (ignores SBN mark-to-market duration gain/loss)
const idrRetPct = entryYieldAnn * tFrac;
const fxFactor = 1 + fxPct / 100 ;
const usdUnhedgedRetPct = ((1 + idrRetPct / 100 ) / fxFactor - 1 ) * 100 ;
const usdUnhedgedAnnPct = (Math . pow (1 + usdUnhedgedRetPct / 100 , 1 / tFrac) - 1 ) * 100 ;
const hedgeDragPct = hedgeAnn * tFrac;
const usdHedgedRetPct = idrRetPct - hedgeDragPct;
const usdHedgedAnnPct = entryYieldAnn - hedgeAnn;
// Breakeven USD/IDR move (%) that sets USD unhedged return = 0%
const breakevenFxPct = idrRetPct;
const breakevenFxAnnPct = entryYieldAnn;
// Empirical rolling USD/IDR move series matching holding period from daily_macro
const colMap = {
3 : "usdidr_3m_chg_pct" ,
6 : "usdidr_6m_chg_pct" ,
9 : "usdidr_6m_chg_pct" ,
12 : "usdidr_12m_chg_pct"
};
let histMoves = [];
if (hMonths === 9 ) {
// Compute exact 189-trading-day rolling change directly from usdidr
const px = dailyRows. map (d => d. usdidr ). filter (v => v != null );
for (let i = 189 ; i < px. length ; i++ ) {
histMoves. push (((px[i] / px[i - 189 ]) - 1 ) * 100 );
}
} else {
const col = colMap[hMonths];
histMoves = dailyRows. map (d => d[col]). filter (v => v != null && ! Number . isNaN (v));
}
const sorted = [... histMoves]. sort ((a, b) => a - b);
const nHist = sorted. length ;
const worseThanBreakeven = sorted. filter (v => v > breakevenFxPct). length ;
const pctWorseBreakeven = nHist > 0 ? (worseThanBreakeven / nHist) * 100 : 0 ;
const pctAtOrBelowAssumed = nHist > 0 ? (sorted. filter (v => v <= fxPct). length / nHist) * 100 : 0 ;
const histMedianFx = nHist > 0 ? d3. quantile (sorted, 0.5 ) : 0 ;
const histP90Fx = nHist > 0 ? d3. quantile (sorted, 0.9 ) : 0 ;
// Compare all instruments in selected regime
const comparison = regimeRows. map (r => {
const y = Math . max (0 , (r. yield_pct || 0 ) + (r. instrument === selInst ? adjBps / 100 : 0 ));
const idrR = y * tFrac;
const usdU = ((1 + idrR / 100 ) / fxFactor - 1 ) * 100 ;
const usdH = idrR - hedgeDragPct;
return {
instrument : r. instrument ,
yield_pct : y,
spread_vs_bi_bps : (y - biRate) * 100 ,
spread_vs_sbn2y_bps : (y - sbn2yYield) * 100 ,
idr_ret_pct : idrR,
usd_unhedged_pct : usdU,
usd_hedged_pct : usdH,
breakeven_fx_pct : idrR
};
});
// 12M SRBI vs 2Y SBN & BI Rate historical path
const auc12 = aucRows
. filter (d => d. tenor_m === 12 && d. awarded_way_pct != null )
. map (d => ({
date : new Date (d. auction_date ),
srbi12 : d. awarded_way_pct ,
sbn2y : d. sbn_2y_yield_pct ,
bi_rate : d. bi_rate_pct ,
spread_bps : d. spread_vs_sbn2y_bps
}));
return {
picked,
entryYieldAnn,
sbn2yYield,
biRate,
spreadVsBiBps : (entryYieldAnn - biRate) * 100 ,
spreadVsSbn2yBps : (entryYieldAnn - sbn2yYield) * 100 ,
idrRetPct,
usdUnhedgedRetPct,
usdUnhedgedAnnPct,
usdHedgedRetPct,
usdHedgedAnnPct,
breakevenFxPct,
breakevenFxAnnPct,
histMoves : histMoves. map (v => ({fx_move : v})),
nHist,
pctWorseBreakeven,
pctAtOrBelowAssumed,
histMedianFx,
histP90Fx,
comparison,
auc12
};
}
sim = runCarryModel (benchmarks, daily, auctions, regime, instrument, holdMonths, yieldOverrideBps, fxMovePct, hedgeCostAnn)
Show code
md `** ${ instrument} ** ( ${ regime} , as of ${ sim. picked . as_of_date } ) · Entry yield ** ${ sim. entryYieldAnn . toFixed (2 )} %** (** ${ sim. spreadVsBiBps >= 0 ? "+" : "" }${ sim. spreadVsBiBps . toFixed (0 )} bps** vs BI Rate · ** ${ sim. spreadVsSbn2yBps >= 0 ? "+" : "" }${ sim. spreadVsSbn2yBps . toFixed (0 )} bps** vs 2Y SBN)
Over ** ${ holdMonths} M**: IDR return **+ ${ sim. idrRetPct . toFixed (2 )} %** · USD unhedged return ** ${ sim. usdUnhedgedRetPct >= 0 ? "+" : "" }${ sim. usdUnhedgedRetPct . toFixed (2 )} %** ( ${ sim. usdUnhedgedAnnPct >= 0 ? "+" : "" }${ sim. usdUnhedgedAnnPct . toFixed (2 )} % ann.) · USD hedged return ** ${ sim. usdHedgedRetPct >= 0 ? "+" : "" }${ sim. usdHedgedRetPct . toFixed (2 )} %** ( ${ sim. usdHedgedAnnPct >= 0 ? "+" : "" }${ sim. usdHedgedAnnPct . toFixed (2 )} % ann.) · Zero-return USD/IDR breakeven **+ ${ sim. breakevenFxPct . toFixed (2 )} %** (exceeded in ** ${ sim. pctWorseBreakeven . toFixed (1 )} %** of ${ sim. nHist } historical ${ holdMonths} M windows; your ${ fxMovePct >= 0 ? "+" : "" }${ fxMovePct. toFixed (2 )} % FX move sits at the ** ${ sim. pctAtOrBelowAssumed . toFixed (0 )} th** percentile).`
Show code
Plot. plot ({
title : `Breakeven (+ ${ sim. breakevenFxPct . toFixed (2 )} %) vs historical ${ holdMonths} -month USD/IDR moves (Sep 2023 – Nov 2026)` ,
subtitle : `Gold dashed = zero-USD-return breakeven · Teal solid = your assumed FX move ( ${ fxMovePct >= 0 ? "+" : "" }${ fxMovePct. toFixed (2 )} %) · Median = ${ sim. histMedianFx >= 0 ? "+" : "" }${ sim. histMedianFx . toFixed (2 )} %` ,
style : {background : "transparent" , color : "var(--ink)" , fontFamily : "Satoshi, Arial, sans-serif" },
width : 780 ,
height : 320 ,
grid : true ,
x : {label : `Rolling ${ holdMonths} -month USD/IDR move (% · positive = rupiah depreciation) →` },
y : {label : "Historical trading-day windows" },
marks : [
Plot. rectY (
sim. histMoves ,
Plot. binX (
{y : "count" , fill : d => (d[0 ]. fx_move > sim. breakevenFxPct ? red : grid)},
{x : "fx_move" , thresholds : 28 }
)
),
Plot. ruleX ([0 ], {stroke : grey, strokeWidth : 1 }),
Plot. ruleX ([sim. breakevenFxPct ], {stroke : gold, strokeWidth : 2.5 , strokeDasharray : "5,4" }),
Plot. ruleX ([fxMovePct], {stroke : teal, strokeWidth : 2.5 }),
Plot. ruleY ([0 ], {stroke : grid})
]
})
Show code
Plot. plot ({
title : "12M SRBI auction yield vs 2Y SBN benchmark and BI Rate (Sep 2023 – Nov 2026)" ,
subtitle : `Selected regime anchor ( ${ sim. picked . as_of_date } ) marked in gold · Source: Bank Indonesia & DJPPR` ,
style : {background : "transparent" , color : "var(--ink)" , fontFamily : "Satoshi, Arial, sans-serif" },
width : 780 ,
height : 310 ,
grid : true ,
x : {label : null },
y : {label : "Annualized yield (%)" , domain : [4.3 , 8.2 ]},
marks : [
Plot. lineY (sim. auc12 , {x : "date" , y : "bi_rate" , stroke : grey, strokeWidth : 1.5 , curve : "step-after" }),
Plot. lineY (sim. auc12 , {x : "date" , y : "sbn2y" , stroke : teal, strokeWidth : 2 }),
Plot. lineY (sim. auc12 , {x : "date" , y : "srbi12" , stroke : gold, strokeWidth : 2.5 , tip : true }),
Plot. ruleX ([new Date (sim. picked . as_of_date )], {stroke : gold, strokeDasharray : "4,4" , strokeWidth : 1.5 }),
Plot. dot ([{date : new Date (sim. picked . as_of_date ), y : sim. entryYieldAnn }], {x : "date" , y : "y" , fill : gold, r : 5 })
]
})
Instrument Comparison in Selected Regime
Show code
Inputs. table (
sim. comparison . map (d => ({
Instrument : d. instrument ,
"Entry Yield (%)" : d. yield_pct . toFixed (2 ) + "%" ,
"vs BI Rate" : (d. spread_vs_bi_bps >= 0 ? "+" : "" ) + d. spread_vs_bi_bps . toFixed (0 ) + " bps" ,
"vs 2Y SBN" : (d. spread_vs_sbn2y_bps >= 0 ? "+" : "" ) + d. spread_vs_sbn2y_bps . toFixed (0 ) + " bps" ,
[` ${ holdMonths} M IDR Ret` ]: "+" + d. idr_ret_pct . toFixed (2 ) + "%" ,
[` ${ holdMonths} M USD Unhedged` ]: (d. usd_unhedged_pct >= 0 ? "+" : "" ) + d. usd_unhedged_pct . toFixed (2 ) + "%" ,
[` ${ holdMonths} M USD Hedged` ]: (d. usd_hedged_pct >= 0 ? "+" : "" ) + d. usd_hedged_pct . toFixed (2 ) + "%" ,
"FX Breakeven" : "+" + d. breakeven_fx_pct . toFixed (2 ) + "%"
})),
{layout : "auto" }
)
How the model works
This calculator decomposes carry into three transparent accounting pieces over holding horizon \(T = h / 12\) years (where \(h \in \{3, 6, 9, 12\}\) months):
IDR accrual return: \(R_{\text{IDR}} = y \cdot T\) , where \(y\) is the selected regime’s annualized yield plus any user basis-point adjustment.
Unhedged USD return: \(R_{\text{USD,unhedged}} = \frac{1 + R_{\text{IDR}}}{1 + \Delta\text{FX}} - 1\) , where \(\Delta\text{FX} > 0\) denotes rupiah depreciation (USD/IDR rising). Setting \(R_{\text{USD,unhedged}} = 0\) yields the exact zero-return FX depreciation breakeven \(\Delta\text{FX}^* = R_{\text{IDR}}\) .
Hedged USD return: \(R_{\text{USD,hedged}} \approx R_{\text{IDR}} - c_{\text{hedge}} \cdot T\) , where \(c_{\text{hedge}}\) is the annualized FX swap / DNDF hedging cost.
Empirical FX distribution: Rolling \(h\) -month percentage changes in USD/IDR are computed directly from the 767 daily observations in data/frozen/daily_macro.csv (2023-09-15 → 2026-11-30). Across 515 rolling 12-month windows in this sample, USD/IDR appreciated in fewer than 10% of windows (10th percentile \(+0.36\%\) ), with a median 12M depreciation of \(+4.94\%\) and a 90th percentile of \(+9.48\%\) .
Limits of this simulator
Accrual-only return for SBN: The SBN 2Y/5Y/10Y rows evaluate yield carry at par and do not model mark-to-market duration gains or losses if secondary bond yields shift before maturity, whereas SRBI held to maturity has zero duration risk at expiry.
No tax or transaction friction: Withholding tax on interest/discount (10% for domestic SBN under PP 91/2021 vs 20% general interest/foreign treaty rates) and bid-ask spreads on secondary SRBI/FX swaps are excluded.
Sample-specific FX regime: The historical rolling FX distribution spans Sep 2023 – Nov 2026, a strong-USD period in which the rupiah weakened from Rp 15,368 to Rp 18,395 per USD; it does not capture rupiah-appreciation cycles like 2019 or 2020–2021.
← Back to the study · Story · Case study