Simulator Data as of 2026-11-30
Set your forward-looking assumptions for Indonesian equity valuations (P/E and Dividend Yield ), the risk-free sovereign benchmark (10Y SBN Yield ), and headline inflation (CPI YoY ). The lab computes implied earnings yield, equity risk premium (ERP = 1/PE − 10Y SBN), real yields, the empirical percentile across all 203 months (2010-01 → 2026-11) , and the historical distribution of forward 12-month IHSG returns (2010-01 → 2025-11) inside the matched ERP quintile. Everything runs locally in your browser on data/frozen/erp_monthly.csv and data/frozen/erp_quintiles.csv.
Show code
erpMonthly = FileAttachment ("data/frozen/erp_monthly.csv" ). csv ({typed : true })
erpQuintiles = FileAttachment ("data/frozen/erp_quintiles.csv" ). csv ({typed : true })
erpSummary = FileAttachment ("data/frozen/erp_summary.csv" ). csv ({typed : true })
gold = "var(--accent)"
teal = "var(--chart-teal)"
green = "var(--chart-positive)"
grey = "var(--muted)"
red = "var(--error)"
grid = "var(--line)"
Show code
viewof assumedPe = Inputs. range ([8.0 , 24.0 ], {
value : 9.0 ,
step : 0.1 ,
label : "Assumed IHSG / MSCI Indonesia P/E (×)"
})
viewof assumedDy = Inputs. range ([2.0 , 7.0 ], {
value : 3.8 ,
step : 0.1 ,
label : "Assumed Equity Dividend Yield (%)"
})
viewof assumedSbn = Inputs. range ([5.0 , 10.0 ], {
value : 7.7 ,
step : 0.05 ,
label : "Assumed 10Y SBN Yield (%)"
})
viewof assumedCpi = Inputs. range ([1.5 , 6.0 ], {
value : 3.3 ,
step : 0.1 ,
label : "Headline CPI YoY Assumption (%)"
})
Show code
function computeErpLab (rows, qRows, pe, dy, sbn, cpi) {
const eyPct = 100.0 / pe;
const erpPct = eyPct - sbn;
const erpBps = erpPct * 100.0 ;
const divSpreadPct = dy - sbn;
const divSpreadBps = divSpreadPct * 100.0 ;
const realEyPct = eyPct - cpi;
const realSbnPct = sbn - cpi;
// Empirical percentile across all 203 months
const erpValues = rows. map (d => d. erp_pct ). filter (v => v != null && ! Number . isNaN (v));
const leCount = erpValues. filter (v => v <= erpPct). length ;
const percentile = (leCount / erpValues. length ) * 100.0 ;
// Match ERP quintile from frozen erp_quintiles
const onlyErpQ = qRows
. filter (d => d. metric === "erp" )
. sort ((a, b) => a. quintile_rank - b. quintile_rank );
let matchedQ = onlyErpQ[onlyErpQ. length - 1 ];
for (const q of onlyErpQ) {
if (erpPct <= q. spread_max_pct ) {
matchedQ = q;
break ;
}
}
if (erpPct < onlyErpQ[0 ]. spread_min_pct ) matchedQ = onlyErpQ[0 ];
// Historical rows in matched quintile for distribution view
const bucketRows = rows. filter (
d => d. erp_quintile === matchedQ. quintile_label && d. ihsg_fwd_12m_ret_pct != null
);
// Stocks vs bonds comparison bars
const compareBars = [
{metric : "Equity Earnings Yield (1/PE)" , val : eyPct, kind : "Equities" },
{metric : "10Y SBN Yield" , val : sbn, kind : "Bonds" },
{metric : "Equity Dividend Yield" , val : dy, kind : "Equities" },
{metric : "Real Earnings Yield" , val : realEyPct, kind : "Equities (Real)" },
{metric : "Real 10Y SBN Yield" , val : realSbnPct, kind : "Bonds (Real)" }
];
// Empirical distribution sorted for gauge strip
const histSorted = [... erpValues]. sort ((a, b) => a - b). map ((v, i) => ({
rankPct : ((i + 1 ) / erpValues. length ) * 100.0 ,
erpPct : v
}));
return {
eyPct,
erpPct,
erpBps,
divSpreadPct,
divSpreadBps,
realEyPct,
realSbnPct,
percentile,
matchedQ,
bucketRows,
compareBars,
histSorted,
nTotal : erpValues. length
};
}
sim = computeErpLab (erpMonthly, erpQuintiles, assumedPe, assumedDy, assumedSbn, assumedCpi)
Show code
md `**Implied Equity Valuation:** Earnings Yield ** ${ sim. eyPct . toFixed (2 )} %** (from ** ${ assumedPe. toFixed (1 )} ×** P/E) · **Nominal ERP:** ** ${ sim. erpBps >= 0 ? "+" : "" }${ sim. erpBps . toFixed (0 )} bps** (** ${ sim. erpPct >= 0 ? "+" : "" }${ sim. erpPct . toFixed (2 )} %**) · **Historical Rank (2010–2026):** ** ${ sim. percentile . toFixed (1 )} th percentile**
**Cash-Carry & Real Yields:** Dividend Spread (DY − 10Y SBN) ** ${ sim. divSpreadBps >= 0 ? "+" : "" }${ sim. divSpreadBps . toFixed (0 )} bps** ( ${ assumedDy. toFixed (1 )} % vs ${ assumedSbn. toFixed (2 )} %) · **Real Earnings Yield:** ** ${ sim. realEyPct >= 0 ? "+" : "" }${ sim. realEyPct . toFixed (2 )} %** vs **Real 10Y SBN:** ** ${ sim. realSbnPct >= 0 ? "+" : "" }${ sim. realSbnPct . toFixed (2 )} %**
**Matched Historical ERP Bucket ( ${ sim. matchedQ . quintile_label } , n = ${ sim. matchedQ . n_months } months):** Historical Forward 12M IHSG Price Return Median ** ${ sim. matchedQ . fwd_12m_median_pct >= 0 ? "+" : "" }${ sim. matchedQ . fwd_12m_median_pct . toFixed (1 )} %** (IQR ** ${ sim. matchedQ . fwd_12m_p25_pct . toFixed (1 )} %** to ** ${ sim. matchedQ . fwd_12m_p75_pct . toFixed (1 )} %** · Mean ** ${ sim. matchedQ . fwd_12m_mean_pct >= 0 ? "+" : "" }${ sim. matchedQ . fwd_12m_mean_pct . toFixed (1 )} %** ± 1.96× ${ sim. matchedQ . fwd_12m_nw_se_pct . toFixed (1 )} % NW SE · Positive 12M Win Rate ** ${ sim. matchedQ . fwd_12m_win_rate_pct . toFixed (1 )} %**)`
Show code
Plot. plot ({
title : "Stocks vs Bonds Yield Comparison Under Your Assumptions (%)" ,
subtitle : "Gold = nominal/real equity metrics · Teal = 10Y SBN sovereign benchmark" ,
style : {background : "transparent" , color : "var(--ink)" , fontFamily : "Satoshi, Arial, sans-serif" },
width : 780 ,
height : 260 ,
marginLeft : 195 ,
grid : true ,
x : {label : "Annualized Yield (%) →" , domain : [0 , 14 ]},
y : {label : null , domain : sim. compareBars . map (d => d. metric )},
marks : [
Plot. ruleX ([0 ], {stroke : grid}),
Plot. barX (sim. compareBars , {
y : "metric" ,
x : "val" ,
fill : d => d. kind . startsWith ("Bonds" ) ? teal : gold,
tip : true
}),
Plot. text (sim. compareBars , {
y : "metric" ,
x : "val" ,
text : d => d. val . toFixed (2 ) + "%" ,
dx : 6 ,
textAnchor : "start" ,
fill : "var(--ink)"
})
]
})
Show code
Plot. plot ({
title : `Historical ERP Percentile Curve (2010–2026, n = ${ sim. nTotal } months)` ,
subtitle : `Teal = historical empirical CDF · Gold dot = your implied ERP ( ${ sim. erpBps >= 0 ? "+" : "" }${ sim. erpBps . toFixed (0 )} bps → ${ sim. percentile . toFixed (1 )} th pct) · Red line = Nov 2026 cutoff (+337 bps)` ,
style : {background : "transparent" , color : "var(--ink)" , fontFamily : "Satoshi, Arial, sans-serif" },
width : 780 ,
height : 280 ,
grid : true ,
x : {label : "Equity Risk Premium (1/PE − 10Y SBN, %) →" },
y : {label : "Historical Percentile (%)" , domain : [0 , 102 ]},
marks : [
Plot. ruleX ([0 ], {stroke : grid}),
Plot. ruleX ([3.3724 ], {stroke : red, strokeDasharray : "4,4" , strokeWidth : 1.8 }),
Plot. lineY (sim. histSorted , {x : "erpPct" , y : "rankPct" , stroke : teal, strokeWidth : 2.5 , tip : true }),
Plot. dot ([{erpPct : sim. erpPct , rankPct : sim. percentile }], {
x : "erpPct" ,
y : "rankPct" ,
fill : gold,
r : 6.5
})
]
})
Show code
Plot. plot ({
title : "Forward 12-Month IHSG Price Return by Starting ERP Quintile (2010–2025)" ,
subtitle : "Gold dot = median · Teal bar = 25th–75th percentile IQR · Grey whiskers = Newey-West 95% CI around mean" ,
style : {background : "transparent" , color : "var(--ink)" , fontFamily : "Satoshi, Arial, sans-serif" },
width : 780 ,
height : 280 ,
grid : true ,
x : {label : null , domain : erpQuintiles. filter (d => d. metric === "erp" ). map (d => d. quintile_label )},
y : {label : "Forward 12M IHSG Return (%)" },
marks : [
Plot. ruleY ([0 ], {stroke : grid}),
Plot. ruleX (erpQuintiles. filter (d => d. metric === "erp" ), {
x : "quintile_label" ,
y1 : "fwd_12m_ci95_lo_pct" ,
y2 : "fwd_12m_ci95_hi_pct" ,
stroke : grey,
strokeWidth : 1.8
}),
Plot. barY (erpQuintiles. filter (d => d. metric === "erp" ), {
x : "quintile_label" ,
y1 : "fwd_12m_p25_pct" ,
y2 : "fwd_12m_p75_pct" ,
fill : d => d. quintile_label === sim. matchedQ . quintile_label ? gold : teal,
fillOpacity : d => d. quintile_label === sim. matchedQ . quintile_label ? 0.55 : 0.3 ,
tip : true
}),
Plot. dot (erpQuintiles. filter (d => d. metric === "erp" ), {
x : "quintile_label" ,
y : "fwd_12m_median_pct" ,
fill : gold,
r : 5.5
})
]
})
How the model works
Implied Earnings Yield & Nominal ERP: Given your P/E assumption \(P/E\) and 10-year sovereign yield \(y_{\text{10Y}}\) , the lab computes \(\text{EY} = 100 / (P/E)\) and \(\text{ERP} = \text{EY} - y_{\text{10Y}}\) . Both nominal and real earnings yields subtract the same headline CPI assumption when comparing against real bond yields, so \(\text{ERP}_{\text{real}} = \text{ERP}_{\text{nominal}}\) when inflation expectations apply symmetrically.
Historical Percentile Gauge: Compares your implied ERP against all 203 monthly observations from 2010-01 through 2026-11, built from WorldPERatio (MSCI Indonesia / EIDO trailing P/E) and DJPPR primary-dealer 10Y SUN benchmark yields.
Matched Quintile Forward Return Lookup: Maps your ERP into the corresponding empirical quintile from 2010-01 → 2025-11 (n = 191 overlapping 12-month windows) and reports the median, interquartile range (IQR), positive-year frequency, and Newey-West (lag = 12) HAC 95% confidence interval around the mean.
Limits of this simulator
Price return only (IHSG ^JKSE): Forward 12-month IHSG returns exclude cash dividends (~1%–5% historically on EIDO), whereas 10Y SBN yields represent gross coupon-plus-pull-to-par nominal carry.
Weak short-horizon predictability: Across 2010–2025, starting ERP has near-zero linear predictive power over a 12-month window (p = 0.585 with Newey-West HAC errors), so wide ERPs describe a valuation buffer rather than a 12-month timing signal.
Trailing vs forward earnings: Static P/E sliders assume current trailing earnings hold; if earnings contract during a recession, realized earnings yield falls below the headline multiple.
← Back to the study · Story · Case study