CompletedData Analysis / Pipeline  ~4 min read

'Stock Research' — Korean Market Event Analysis & Forecasting

A system that measures 'how much news and policy actually moved the Korean market' with numbers, not gut feel. It collected KRX·Yahoo·FRED·GDELT daily and analyzed 139 source-verified events via a market-model event study (AR/CAR + t-test), publishing a dashboard, status page, and weekly/monthly reports. It reached 65.2% next-day direction accuracy (+9.1%p) yet honestly demonstrates market efficiency: the edge vanishes once the backtest is made realistic. It ran daily via GitHub Actions and deployed on Vercel.

Event StudyData PipelineMarket AnalysisForecastingAutomation

At a glance

65.2%Next-day direction accuracy

Context
Personal project · Jul 2026
My role
Data Analysis / Pipeline
Problem
People often say news moved stock prices, but how much and for how long is usually a guess.
Outcome
Analyzed 139 source-verified events with a market model to judge which truly moved prices, and showed the prediction's excess return vanishes once costs are counted.
'Stock Research' — Korean Market Event Analysis & Forecasting

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

  1. Raw pulls are stored untouched in raw, and preprocessing happens downstream. The logic can change and be reprocessed without re-collecting.
  2. 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.
  3. 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."
  4. 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.
  5. 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.
  6. 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.
Analysis pipeline
  1. 1
    Raw collection
    KRX·Yahoo·FRED·GDELT
  2. 2
    Date correction
    Shift to next trading day
  3. 3
    Event study
    Market-model AR/CAR + t-test
  4. 4
    Forecast·backtest
    Walk-forward, one-way costs
  5. 5
    Strategy re-check
    t+1 entry, overheat filter
  6. 6
    Publishing
    Dashboard·status page·reports
Raw pulls are stored untouched, so logic changes are reprocessed without re-collecting.

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 typeMarket reactionVerdict
Global crises−4.23% over ten daysSurest negative shock (p=0.023)
Wars−3.9% on the dayNearly 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 reactionPriced in ahead
Real-estate policyMarket flatConstruction −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.

Related

Operations증시 리서치 — Korean-market event analysis & forecasting · market-model AR/CAR + t-test · a pipeline that ran daily, unattended, via GitHub ActionsJournalEnding Stock Research, and the 49 Days of Failures No One SawJournalHow a Monthly Report Went Out With a Future DateJournalStock Reports Move to Free MembershipJournalHow Much Stocks Move on Earnings Day, Confirmed on the Third Try

2 more — see all under 증시 리서치 in Operations ›