Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
The dataset viewer is not available for this split.
The number of columns (6012) exceeds the maximum supported number of columns (1000). This is a current limitation of the datasets viewer. You can reduce the number of columns if you want the viewer to work.
Error code:   TooManyColumnsError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

return_y 收益率标签

由掘金 A 股分钟收盘价生成的日频收益率标签。根目录的 return_y.pklreturn_y.parquet 保存相同的 pandas DataFrame:行索引为标签日期(Python date), 列为六位股票代码,值为小数收益率(0.01 表示 1%)。缺失值保留为 NaN。 生成端在上传前逐值精确核对 Pickle 和 Parquet,并在同一次提交中发布两种格式。

每天行情更新完成并通过检查后发布;同名文件随新提交更新,历史版本从提交记录访问。 提交说明记录运行日期和标签截止日期。 交易日以行情目录日期为准。默认起点 2021-12-31 向前扩展 18 个交易日, 并保留扩展后的全部标签;标签截止运行日期之前第二个交易日。 例如运行日期 2026-09-08 对应标签 2021-12-07 至 2026-09-04。

计算口径

沿用源程序的原始 CSV 行序,先按日向前填充价格,再对完整分钟序列做两点滚动均值。 每日按 240 行位置采样;当行序为正常分钟顺序时,T 日标签表示 T+1 日 09:38–09:39 均价买入、T+2 日 09:35–09:36 均价卖出的收益率: (卖价 - 买价) / 买价。计算结果向前移两日并去掉末尾两日。

相对前一交易日最后两分钟均价,买入价绝对涨跌幅超过阈值时被排除: 00/60 开头代码阈值 9.85%,其余代码阈值 19.85%。 8/9 开头代码还沿用原程序的 change < 100 排除条件。 保留原始缺失值和数值运算结果,不额外排序、填零、裁剪收益率或加入交易费用。 股票列为历史数据的并集,因此不同日期可有不同的有效股票数量。

读取

import os
os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
os.environ["NO_PROXY"] = "*"
os.environ["no_proxy"] = "*"

import pandas as pd
from huggingface_hub import hf_hub_download

# 固定提交哈希以复现某一历史版本。
revision = "<commit hash from the dataset history>"
# 仅反序列化你信任的数据源。
pickle_path = hf_hub_download(
    "suncong/ylabels", "return_y.pkl", repo_type="dataset", revision=revision,
)
return_y = pd.read_pickle(pickle_path)
Downloads last month
43