podongchip/kospi-daily-stock-features-2021-2026
KOSPI Stocks Daily Data with Technical & Macro Features ๐ฐ๐ท ํ๊ตญ์ด / ๐บ๐ธ English 2021๋ ๋ถํฐ 2026๋ ๊น์ง KOSPI 948๊ฐ ์ข ๋ชฉ์ ์ผ๋ณ ์์ธ์ ๊ธฐ์ ์ ์งํยท๊ฑฐ์์งํยทํฌ์์ ์๊ธ์ ๊ฒฐํฉํ ๋จธ์ ๋ฌ๋ ํ์ต์ฉ ํ๊ตญ ์ฃผ์ ๋ฐ์ดํฐ์ ์ ๋๋ค. A machine-learningโready Korean stock dataset combining daily prices of 948 KOSPI stocks with technical indicators, macro variables, and investor flows, covering 2021 to 2026. ๐ Contents 1,214,339 rows / 121๋ง ํ (948 stocks / 948๊ฐ ์ข ๋ชฉ) Period / ๊ธฐ๊ฐ: 2021-01-04 ~ 2026-05-29 (์ฝ 5.4๋ ) 60 columns / 60๊ฐ ์ปฌ๋ผโฆ See the full description on the dataset page: https://huggingface.co/datasets/podongchip/kospi-daily-stock-features-2021-2026.
KOSPI Stocks Daily Data with Technical & Macro Features
๐ฐ๐ท ํ๊ตญ์ด / ๐บ๐ธ English
2021๋ ๋ถํฐ 2026๋ ๊น์ง KOSPI 948๊ฐ ์ข ๋ชฉ์ ์ผ๋ณ ์์ธ์ ๊ธฐ์ ์ ์งํยท๊ฑฐ์์งํยทํฌ์์ ์๊ธ์ ๊ฒฐํฉํ ๋จธ์ ๋ฌ๋ ํ์ต์ฉ ํ๊ตญ ์ฃผ์ ๋ฐ์ดํฐ์ ์ ๋๋ค.
A machine-learningโready Korean stock dataset combining daily prices of 948 KOSPI stocks with technical indicators, macro variables, and investor flows, covering 2021 to 2026.
๐ Contents
- 1,214,339 rows / 121๋ง ํ (948 stocks / 948๊ฐ ์ข ๋ชฉ)
- Period / ๊ธฐ๊ฐ: 2021-01-04 ~ 2026-05-29 (์ฝ 5.4๋ )
- 60 columns / 60๊ฐ ์ปฌ๋ผ
๐ ๊ฐ ์ปฌ๋ผ์ ์์ธ ์ค๋ช ยท๋จ์๋ `DATA_DICTIONARY.md` ๋ฅผ ์ฐธ๊ณ ํ์ธ์. See `DATA_DICTIONARY.md` for column-by-column descriptions and units.
๐ Quick Start / ๋น ๋ฅธ ์์
from datasets import load_dataset
ds = load_dataset("podongchip/kospi-daily-stock-features-2021-2026", split="train")
print(ds[0])# pandas ๋ก ๋ฐ๋ก ์ฐ๊ธฐ / load directly with pandas
import pandas as pd
df = pd.read_parquet(
"hf://datasets/podongchip/kospi-daily-stock-features-2021-2026/kospi_data_v1.parquet"
)
# ์ข
๋ชฉ๋ณ ์๊ณ์ด / per-stock time series
samsung = df[df["Code"] == "005930"].sort_values("Date")
print(samsung[["Date", "Close", "RSI14", "Foreign_net"]].tail())โ ๏ธ `Code` ๋ ๋ฐ๋์ ๋ฌธ์์ด๋ก ๋ค๋ฃจ์ธ์ / Always treat `Code` as a string. ์ข ๋ชฉ์ฝ๋๋ ์์๋ฆฌ 0์ด ์๊ณ (000020), ์ฐ์ ์ฃผ๋ ๋์ ์ํ๋ฒณ์ด ๋ถ์ต๋๋ค(์:00088K). ์ซ์๋ก ๋ณํํ๋ฉด ์์๋ฆฌ 0์ด ์ฌ๋ผ์ง๊ฑฐ๋ ์ฐ์ ์ฃผ ์ฝ๋๊ฐ ๊นจ์ง๋๋ค. Stock codes are zero-padded (000020) and preferred shares carry a letter suffix (e.g.00088K). Casting to int drops the leading zeros and breaks preferred-share codes. ๋ณธ ๋ฐ์ดํฐ๋ Parquet ํฌ๋งท์ด๋ผCode๊ฐ ๋ฌธ์์ด๋ก ์ ์ฅ๋์ด ์์ด ๊ทธ๋๋ก ์์ ํฉ๋๋ค. This dataset ships as Parquet, soCodeis stored as a string and stays safe by default.
๐ก Use Cases
- Stock price / return prediction modeling / ์ฃผ๊ฐยท์์ต๋ฅ ์์ธก ๋ชจ๋ธ๋ง
- Quant strategy & factor research / ํํธ ์ ๋ตยทํฉํฐ ๋ฆฌ์์น
- Time-series & financial ML education / ์๊ณ์ดยท๊ธ์ต ML ํ์ต
- Investor flow and macro impact analysis / ์๊ธยท๊ฑฐ์์งํ ์ํฅ ๋ถ์
๐ Notes / ์ฐธ๊ณ
- ์ข ๋ชฉ์ฝ๋(`Code`) / Stock code: 6์๋ฆฌ ๋ฌธ์์ด์ด๋ฉฐ, ์ฐ์ ์ฃผ ๋ฑ์ ๋์ ์ํ๋ฒณ(KยทLยทM ๋ฑ)์ด ๋ถ์ต๋๋ค. ์ ์๋ก ๋ณํํ์ง ๋ง์ธ์. 6-digit string; preferred and special shares carry a trailing letter (K, L, M, โฆ). Do not cast to integer.
- ๊ฒฐ์ธก์น / Missing values: ๊ธฐ์ ์ ์งํ(MA, RSI, MACD ๋ฑ)๋ ๋ฃฉ๋ฐฑ ๊ธฐ๊ฐ์ด ํ์ํ๋ฏ๋ก ๊ฐ ์ข ๋ชฉ์ ์ด๊ธฐ ํ์ ๊ฒฐ์ธก์น(๋น ๊ฐ)๊ฐ ์กด์ฌํฉ๋๋ค. Technical indicators require a lookback window, so early rows per stock contain missing values.
- ๊ฑฐ์์งํ / Macro: ์์ ์ผ ๊ธฐ์ค์ผ๋ก ์ ๋ ฌ๋์ด ์์ผ๋ฉฐ, ์ผ๋ถ ํด์ฅ์ผ ์ฐจ์ด๋ก ์ธํ ๊ฒฐ์ธก์ด ์์ ์ ์์ต๋๋ค. Aligned to trading days; some gaps may exist due to holiday mismatches.
- ์ ๋ ฌ / Ordering:
CodeโDate์์ผ๋ก ์ข ๋ชฉ๋ณ ์๊ณ์ด์ด ์ด์ด์ง๋๋ค. Rows are ordered byCodethenDate, forming per-stock time series. - Look-ahead ์ฃผ์ / No look-ahead: ๋ชจ๋ ์งํ๋ ํด๋น ์ผ์๊น์ง์ ์ ๋ณด๋ก๋ง ๊ณ์ฐ๋ฉ๋๋ค(๋ฏธ๋ ์ ๋ณด ๋ฏธํฌํจ). All features use information up to that date only.
๐๏ธ Data Sources / ๋ฐ์ดํฐ ์ถ์ฒ
- KOSPI ์์ธยทํฌ์์ ์๊ธ (Price & investor flows): ํ๊ตญ๊ฑฐ๋์(KRX) ๊ณต๊ฐ ์์ฅ ๋ฐ์ดํฐ ๊ธฐ๋ฐ์ผ๋ก ๊ฐ๊ณต. Derived from Korea Exchange (KRX) public market data.
- ๊ฑฐ์์งํ (Macro indicators): ํ์จยทํด์ธ ์ง์ยท๋ณ๋์ฑยท๊ธ๋ฆฌ ๋ฑ ๊ณต๊ฐ์ ์ผ๋ก ๊ณตํ๋๋ ์์ฅ ์งํ. Publicly published market indicators (FX rates, global indices, volatility, yields).
๋ณธ ๋ฐ์ดํฐ์ ์ ์ ๊ณต๊ฐ ์์ฅ ๋ฐ์ดํฐ๋ฅผ ๊ธฐ์ ์ ์งํยทํ์ ๋ณ์๋ก ๊ฐ๊ณตํ 2์ฐจ ์ ์๋ฌผ์ ๋๋ค. This dataset is a derived work that processes the above public market data into technical and engineered features.
โ๏ธ License & Disclaimer / ๋ผ์ด์ ์คยท๋ฉด์ฑ
- ๋ณธ ๋ฐ์ดํฐ์ ์ CC BY-NC 4.0 ๋ผ์ด์ ์ค๋ก ์ ๊ณต๋ฉ๋๋ค(๋น์๋ฆฌยท์ถ์ฒํ์). Released under CC BY-NC 4.0 (non-commercial, attribution required).
- ๋ฐ์ดํฐ์ ์ ๊ฐ๊ณตยท๊ตฌ์ฑยทํ์ ๋ณ์ ๋ฐ ํธ์ง์ ๋ํ ๊ถ๋ฆฌ๋ ์ ์์์๊ฒ ์์ต๋๋ค. Rights to the processing, structure, engineered features, and compilation of this dataset belong to its creator.
- ์์ฒ์ด ๋๋ ์์ธยท๊ฑฐ์์งํ ๊ฐ์ ๊ณต๊ฐ ์์ฅ ๋ฐ์ดํฐ์ ๊ธฐ๋ฐํ๋ฉฐ, ๊ฐ ์์ฒ ๋ฐ์ดํฐ์ ๊ถ๋ฆฌ๋ ํด๋น ์ ๊ณต์ฒ์ ์์ต๋๋ค. The underlying price and macro values are based on public market data; rights to the source data remain with their respective providers.
- ๋ณธ ๋ฐ์ดํฐ์ ์ ์ฐ๊ตฌ ๋ฐ ๊ต์ก ๋ชฉ์ ์ผ๋ก ์ ๊ณต๋ฉ๋๋ค. ๋ฐ์ดํฐ์ ์ ํ์ฑยท์์ ์ฑ์ ๋ณด์ฆํ์ง ์์ผ๋ฉฐ, ํฌ์ ํ๋จ์ ๊ทผ๊ฑฐ๋ก ์ฌ์ฉํด ๋ฐ์ํ๋ ์ฑ ์์ ์ฌ์ฉ์์๊ฒ ์์ต๋๋ค. Provided for research and educational purposes. No warranty is given regarding accuracy or completeness; any investment decisions made using this data are solely the user's responsibility.
