Overview
Personal project · Jul 2026– · Data analysis · Pipeline
Built a Korean-market analysis and forecasting system that verifies claims like "tariffs made stocks drop" with numbers: how much, and for how many days.
- Pulled 23 series across prices, flows, and macro daily from KRX (index·flows·sectors), Yahoo Finance (foreign indices·FX), FRED (rates·oil·dollar), and GDELT (news tone), covering 2015 to the present (~2,800 trading days).
- Organized "what happened on which day" into an event DB of 139 events across 11 categories, each with a source URL. Cross-checked them against actual KOSPI moves (e.g. the 2026-06-23 crash at −9.99%).
- Measured how much prices moved beyond normal around each event with a market-model AR/CAR and t-test. A regression stripped out the "Korea follows last night's US market" co-movement, and significance was judged on top.
- Reached 65.2% next-day direction accuracy (+9.1%p over baseline, AUC 0.70). Once the fill model was made realistic the edge disappeared, which demonstrated market efficiency as it is.
- Turned post-event abnormal returns into real trading rules (semiconductor rotation, defense-stock lore, real-estate sector effect). Published which work and which don't, with verdicts.
- Produced a 7-screen analysis dashboard, an M3 status page, and weekly/monthly/annual reports (with strategy signals).
- Ran as a hybrid of daily GitHub Actions (weekdays 18:00 KST) and a local supplement (KRX flows at 18:30), deployed on Vercel.
- Skill: data collection/pipeline design, event study (quantitative analysis)·significance testing, prediction models·realistic backtesting, automation (scheduled CI)·cloud deployment
- Stack: Python·pandas·numpy·scipy·statsmodels·scikit-learn, KRX·yfinance·FRED·GDELT, Mermaid·Material Design 3, GitHub Actions·Vercel
Problem
"News moved the market" is a common claim. But how much and for how long is usually spoken by feel. Simply counting "it rose the next day" can't tell whether the whole market rose that day or the event caused it. And "can you actually make money off that pattern?" is usually answered with a cost-free backtest that shows only the good numbers.
Key point
Strip out the part explained by the whole market's movement, leaving only the abnormal return (AR/CAR) the event created. Then control forecasts and strategies for costs, luck, and look-ahead leakage to judge whether they actually work.
Solution
- Raw pulls are stored untouched in
raw, and preprocessing happens downstream. The logic can change and be reprocessed without re-collecting. - After-close, holiday, and US-announcement events register on the next trading day, so the market-reflection date was corrected to align the windows (about half of the 139 events). The martial-law event flipped from +1.9% (an unrelated pre-declaration daytime rise) to −1.4% once corrected.
- Each index's abnormal return was estimated via a market model (KOSPI ∼ prior-day S&P500). AR was accumulated over the window (−5 to +10 days) into CAR and significance was judged with a t-test. KOSDAQ removes the NASDAQ factor, and 17 sector indices and 8 bellwether stocks extend it to "same-day excess reaction vs the market."
- Features were built on the principle of "only information actually knowable that morning" and validated walk-forward. The backtest applied one-way costs and look-ahead prevention to test whether accuracy converts into an edge.
- Each discovered event pattern was moved into a real trading rule (t+1 entry). Its statistics are re-computed as new events accumulate, with overheat filters and significance downgrades applied.
- Collect→analyze→dashboard→report runs daily via GitHub Actions. Results auto-commit and Vercel redeploys. A Friday review loop source-verifies candidate events into the DB. Weekly/monthly reports were auto-published to this site, 15 in all before the service was retired.
- 1Raw collectionKRX·Yahoo·FRED·GDELT
- 2Date correctionShift to next trading day
- 3Event studyMarket-model AR/CAR + t-test
- 4Forecast·backtestWalk-forward, one-way costs
- 5Strategy re-checkt+1 entry, overheat filter
- 6PublishingDashboard·status page·reports
Result
- Collected 23 series daily and structured 139 source-verified events across 11 categories.
- Judged "did the event really move prices?" quantitatively and by significance with a market-model AR/CAR and t-test. Global crises at −4.23% over ten days (p=0.023) were the surest negative shock. Wars dropped −3.9% on the day, then nearly fully recovered within ten days. Presidential/general elections at +3.95% and the semiconductor cycle at +2.10% (p=0.018) were significant. Rate decisions, US and Korea alike, showed no significant reaction (priced in ahead).
- Reached 65.2% next-day direction (+9.1%p over baseline, AUC 0.70). But decomposing the signal's return gave +0.54% overnight gap and −0.02% intraday after the open. The predictive power is real, but it is already priced in before you can trade. In the v2 backtest every strategy underperformed buy-and-hold. This confirmed the textbook conclusion that "daily public information can't beat the market on timing."
- Semiconductor-event → electronics buying worked only with an overheat filter (89–90% win rate, p≈0.01). The "war means defense stocks" belief was invalid on t+1 entry. Real-estate policy left the market flat but moved construction −3.77%p, a sector event. Daily prediction failed for both market and sectors, and the edge existed only in the window right after a verified event.
- Auto-generated and deployed an M3 status page, a 7-screen dashboard, and periodic reports. The GitHub Actions + local-supplement hybrid ran unattended daily with no single point of failure.
- This methodology (event study·macro·realistic backtest) was later ported into COCOMSS's crypto event analysis.
| Event type | Market reaction | Verdict |
|---|---|---|
| Global crises | −4.23% over ten days | Surest negative shock (p=0.023) |
| Wars | −3.9% on the day | Nearly fully recovers within ten days |
| Presidential/general elections | +3.95% | Rise |
| Semiconductor cycle | +2.10% | Significant (p=0.018) |
| Rate decisions (US·Korea) | No significant reaction | Priced in ahead |
| Real-estate policy | Market flat | Construction −3.77%p |
Retrospective
Turned the belief "news moved the market" into something verifiable via a market model and significance testing. In quantitative analysis, the control that removes co-movement mattered more than any fancy model.
After reaching 65% accuracy, verifying it in a backtest made the edge vanish. Decomposing the return proved the signal is already absorbed into the opening gap. This demonstration of market efficiency was worth more than any pretty performance curve. Confirming "how far it can't be captured" became the basis for trusting the results, more than the claim "it can predict."
Built it as a pipeline that runs itself daily instead of a one-off notebook. Designed the full data flow from collection to correction, analysis, prediction, and publishing. Where the cloud is blocked from KRX flows, a local supplement fills in, a hybrid with no single point of failure. Event-candidate detection → weekly review → automated re-validation put data-quality control inside the operating loop.
Links
The event-study·macro·realistic-backtest methodology was later ported into COCOMSS.
