retro / static /events.js
sankalphs's picture
feat: browser-local engine, Zerodha dashboard, historical events, chatbot, per-user isolation
f316f5a
Raw
History Blame Contribute Delete
6.18 kB
// Retro Alpha — Historical Events Timeline (1994-2004)
// Real events with realistic asset impacts. Each event applies for
// `duration_months` consecutive months (used for the AI insight tone).
const ASSETS = ["cash", "fd", "gov_bonds", "nifty_50", "nifty_it", "real_estate", "crypto", "gold"];
const EVENTS = [
{ year: 1994, month: 5,
headline: "RBI hikes repo rate 50bps to fight inflation",
regime: "rate_hike",
impact: { fd: 0.01, gov_bonds: -0.02, nifty_50: -0.03, nifty_it: -0.05,
real_estate: -0.02, gold: -0.01 },
duration_months: 2 },
{ year: 1994, month: 9,
headline: "SEBI cracks down on broker cartel; trading volumes surge",
regime: "bull_market",
impact: { nifty_50: 0.04, nifty_it: 0.06, gov_bonds: 0.01 },
duration_months: 2 },
{ year: 1995, month: 3,
headline: "Mexican peso crisis spooks emerging markets; FIIs pull out",
regime: "fii_exit",
impact: { nifty_50: -0.05, nifty_it: -0.07, real_estate: -0.02,
fd: 0.005, gov_bonds: 0.01, gold: 0.02 },
duration_months: 2 },
{ year: 1995, month: 8,
headline: "Monsoon revival boosts rural demand; FMCG and auto rally",
regime: "monsoon_shock",
impact: { nifty_50: 0.03, real_estate: 0.02, gold: -0.01, nifty_it: 0.02 },
duration_months: 2 },
{ year: 1996, month: 5,
headline: "United Front govt formed; policy continuity expected",
regime: "election_year",
impact: { nifty_50: 0.02, nifty_it: 0.04, gov_bonds: 0.005, real_estate: 0.01 },
duration_months: 3 },
{ year: 1997, month: 5,
headline: "Thai baht devaluation triggers Asian financial crisis",
regime: "market_crash",
impact: { nifty_50: -0.08, nifty_it: -0.12, real_estate: -0.05,
fd: 0.005, gov_bonds: 0.01, gold: 0.03 },
duration_months: 4 },
{ year: 1997, month: 11,
headline: "Sukh Ram telecom scandal; sentiment sours",
regime: "bear_market",
impact: { nifty_50: -0.04, nifty_it: -0.06, real_estate: -0.01,
gov_bonds: 0.005, gold: 0.01 },
duration_months: 2 },
{ year: 1998, month: 5,
headline: "Pokhran-II nuclear tests; sanctions loom",
regime: "fii_exit",
impact: { nifty_50: -0.10, nifty_it: -0.14, real_estate: -0.04,
fd: 0.01, gov_bonds: 0.015, gold: 0.04 },
duration_months: 3 },
{ year: 1998, month: 8,
headline: "RBI opens asset-reconstruction route; recovery rally begins",
regime: "recovery",
impact: { nifty_50: 0.06, nifty_it: 0.10, real_estate: 0.03,
gov_bonds: 0.005, gold: -0.01 },
duration_months: 3 },
{ year: 1999, month: 5,
headline: "Kargil conflict; oil prices spike 30%",
regime: "high_inflation",
impact: { nifty_50: -0.05, nifty_it: -0.08, real_estate: -0.02,
fd: 0.005, gov_bonds: -0.01, gold: 0.03 },
duration_months: 2 },
{ year: 1999, month: 10,
headline: "Y2K fears and IT boom; Nasdaq crosses 3000",
regime: "tech_boom",
impact: { nifty_50: 0.04, nifty_it: 0.15, real_estate: 0.02,
gov_bonds: -0.005 },
duration_months: 4 },
{ year: 2000, month: 3,
headline: "Dot-com bubble bursts; Nasdaq -78% from peak",
regime: "market_crash",
impact: { nifty_50: -0.12, nifty_it: -0.25, real_estate: -0.04,
fd: 0.01, gov_bonds: 0.02, gold: 0.05 },
duration_months: 6 },
{ year: 2000, month: 9,
headline: "Oil crosses $35/bbl on OPEC supply cuts",
regime: "high_inflation",
impact: { nifty_50: -0.03, nifty_it: -0.05, real_estate: -0.02,
fd: 0.005, gov_bonds: -0.01, gold: 0.02 },
duration_months: 2 },
{ year: 2001, month: 1,
headline: "Gujarat earthquake; insurance sector hammered",
regime: "monsoon_shock",
impact: { nifty_50: -0.04, nifty_it: -0.05, real_estate: -0.01,
fd: 0.005, gov_bonds: 0.01, gold: 0.01 },
duration_months: 2 },
{ year: 2001, month: 9,
headline: "9/11 attacks; global markets halt trading",
regime: "market_crash",
impact: { nifty_50: -0.10, nifty_it: -0.15, real_estate: -0.05,
fd: 0.01, gov_bonds: 0.02, gold: 0.06 },
duration_months: 3 },
{ year: 2001, month: 12,
headline: "Enron collapse exposes global audit fraud",
regime: "bear_market",
impact: { nifty_50: -0.03, nifty_it: -0.05,
fd: 0.005, gov_bonds: 0.01, gold: 0.01 },
duration_months: 2 },
{ year: 2002, month: 4,
headline: "India IT outsourcing boom; TCS and Infosys hit all-time highs",
regime: "tech_boom",
impact: { nifty_50: 0.05, nifty_it: 0.12, real_estate: 0.02 },
duration_months: 4 },
{ year: 2002, month: 8,
headline: "Drought fears; monsoon deficit at 19%",
regime: "monsoon_shock",
impact: { nifty_50: -0.03, nifty_it: -0.02, real_estate: -0.02,
gov_bonds: 0.005, gold: 0.02 },
duration_months: 2 },
{ year: 2003, month: 3,
headline: "Iraq war begins; oil spikes to $40 then retraces",
regime: "high_inflation",
impact: { nifty_50: -0.04, nifty_it: -0.03, real_estate: -0.01,
fd: 0.005, gold: 0.03 },
duration_months: 2 },
{ year: 2003, month: 8,
headline: "India GDP grows 8.4%; foreign capital floods in",
regime: "bull_market",
impact: { nifty_50: 0.07, nifty_it: 0.10, real_estate: 0.04,
fd: 0.005 },
duration_months: 4 },
{ year: 2004, month: 2,
headline: "BJP loses election; Congress-led UPA forms government",
regime: "election_year",
impact: { nifty_50: -0.04, nifty_it: -0.02,
gov_bonds: 0.005 },
duration_months: 2 },
];
function eventForMonth(year, month) {
for (const ev of EVENTS) {
if (ev.year === year && ev.month === month) return ev;
}
return {
year, month,
headline: "Markets trade in tight range; low volatility session",
regime: "stagnation",
impact: {},
duration_months: 1,
};
}
function nextUpcomingEvent(year, month) {
const flat = year * 12 + month;
for (const ev of EVENTS) {
if (ev.year * 12 + ev.month > flat) return ev;
}
return EVENTS[EVENTS.length - 1];
}
window.RetroEvents = { EVENTS, ASSETS, eventForMonth, nextUpcomingEvent };