遇见数据集

mrzdu/oil_WTI_image_dataset_v1

收藏
Hugging Face2026-01-04 更新2026-03-29 收录
官方服务:

资源简介:

--- configs: - config_name: default data_files: - split: train path: data/train-* dataset_info: features: - name: image_png dtype: binary - name: plot_kind dtype: string - name: candle_prefix dtype: 'null' - name: start_idx dtype: int64 - name: end_idx dtype: int64 - name: start_ts dtype: timestamp[us, tz=America/New_York] - name: end_ts dtype: timestamp[us, tz=America/New_York] - name: columns_json dtype: string - name: trend_1d dtype: float64 - name: trend_2d dtype: float64 - name: trend_3d dtype: float64 - name: trend_4d dtype: float64 - name: trend_5d dtype: float64 - name: trend_6d dtype: float64 - name: trend_7d dtype: float64 - name: trend_8d dtype: float64 splits: - name: train num_bytes: 104756892189 num_examples: 2524608 download_size: 97377877184 dataset_size: 104756892189 language: en license: other tags: - finance - time-series - computer-vision - candlestick - parquet task_categories: - image-classification - time-series-forecasting pretty_name: WTI Plots for computer vision projects --- # FINANCE_PROJECT – Plot Image Dataset (Parquet Shards) This dataset contains **Matplotlib-rendered PNG plot images** generated from sliding windows over financial time series features. Each row is one image sample plus **1–8 day trend labels** derived from **CL=F_Close**, where labels are defined at the **last index of the plotted window**. ## Repository Layout The dataset is stored as **Hugging Face–style sharded Parquet files**: - `train-00000-of-00210.parquet` - `train-00001-of-00210.parquet` - … - `train-00209-of-00210.parquet` This is the intended structure. Avoid mixing in raw builder outputs like `part_00000x.parquet` in the same repo, because it makes the dataset view confusing and inconsistent. ## Data Sources (Yahoo Finance) The dataset is built from: - `^OVX` (CBOE Crude Oil Volatility Index) → Close price - `CL=F` (WTI Crude Oil Futures) → OHLCV and derived features Typical generation settings: - Frequency: Daily (`D`) - Date range (example): `2000-01-01` to `2025-01-01` - Window length: `50` ## What Each Row Represents Each row corresponds to: 1. A **sliding window** of length `window` over the dataframe - `end_idx = start_idx + window - 1` 2. A **plot image** generated from a selected feature group - Dark (black) background - Bright, deterministic feature colors 3. **Trend labels** computed from the **window end** (`end_idx`) - Labels belong to the **last index** of the plotted window, not the first. ## Label Definition (1–8 Day Trend) Labels are computed using only `CL=F_Close`. For each horizon `h` in `{1,2,3,4,5,6,7,8}`: - `pct = Close[end_idx + h] / Close[end_idx] - 1` ### Ternary Mode (UP / FLAT / DOWN) With `pct_threshold = 0.002` (0.2%): - `+1` if `pct > +0.002` → UP - ` 0` if `|pct| <= 0.002` → FLAT - `-1` if `pct < -0.002` → DOWN Typical label columns: - `trend_1d, trend_2d, …, trend_8d` Note: Windows near the end of the series are skipped if future values (`end_idx + h`) do not exist. ## Columns (Typical Parquet Schema) Each row typically includes: - `image_png` (bytes): PNG bytes of the plot image. - `plot_kind` (string): Example `"line"` (or `"candle"` if candlesticks are used). - `start_idx` (int): Window start index. - `end_idx` (int): Window end index (labels are defined here). - `start_ts` / `end_ts` (timestamp-like): Start/end timestamps if the index is datetime. - `columns_json` (string): JSON list of plotted feature columns. - `trend_1d … trend_8d` (int): Trend labels (ternary mode: `-1, 0, +1`). Exact columns may vary slightly depending on plotting configuration. ## Feature Groups Each image is generated from a **feature group** consisting of: - A constant column from the CL=F prefix (commonly `CL=F_Close`) - Plus additional columns selected from the dataset to reach a fixed group size (e.g., `k_total=4`) Example (k_total=4): - `[CL=F_Close, ^OVX_Close, CL=F_sma_20, CL=F_rsi_14]` The exact plotted feature list for each sample is stored in `columns_json`. ## Color Mapping Plots use a black background and bright colors. Feature colors are assigned **deterministically** so that the same feature name (e.g., `sma_20`) maps to the same color across different plots and runs. ## Efficient Reading Notes Because `image_png` contains raw PNG bytes, loading the entire dataset into a single pandas DataFrame can consume a lot of RAM. For training and inspection: - Prefer streaming / shard-by-shard reading - Read only required columns (e.g., `image_png` + labels) ## Disclaimer This dataset is derived from market data accessed via Yahoo Finance. Ensure your usage complies with applicable terms and licensing requirements. ---

配置项: - 配置名称:default 数据文件: - 拆分集:train 路径:data/train-* 数据集信息: 特征项: - 名称:image_png,数据类型:二进制(binary) - 名称:plot_kind,数据类型:字符串(string) - 名称:candle_prefix,数据类型:空值(null) - 名称:start_idx,数据类型:64位整型(int64) - 名称:end_idx,数据类型:64位整型(int64) - 名称:start_ts,数据类型:带微秒精度、美国东部时区的时间戳(timestamp[us, tz=America/New_York]) - 名称:end_ts,数据类型:带微秒精度、美国东部时区的时间戳(timestamp[us, tz=America/New_York]) - 名称:columns_json,数据类型:字符串(string) - 名称:trend_1d,数据类型:64位浮点型(float64) - 名称:trend_2d,数据类型:64位浮点型(float64) - 名称:trend_3d,数据类型:64位浮点型(float64) - 名称:trend_4d,数据类型:64位浮点型(float64) - 名称:trend_5d,数据类型:64位浮点型(float64) - 名称:trend_6d,数据类型:64位浮点型(float64) - 名称:trend_7d,数据类型:64位浮点型(float64) - 名称:trend_8d,数据类型:64位浮点型(float64) 拆分集信息: - 名称:train 总字节数:104756892189 样本总数:2524608 下载总大小:97377877184 数据集总大小:104756892189 语言:英语(en) 许可协议:其他(other) 标签: - 金融(finance) - 时间序列(time-series) - 计算机视觉(computer-vision) - 蜡烛图(candlestick) - Parquet(parquet) 任务类别: - 图像分类(image-classification) - 时间序列预测(time-series-forecasting) 友好名称:面向计算机视觉项目的WTI绘图数据集(WTI Plots for computer vision projects) # 金融项目——绘图图像数据集(Parquet分块文件) 本数据集包含**由Matplotlib绘图库(Matplotlib)生成的PNG格式图像**,这些图像基于金融时间序列特征的滑动窗口生成。每条样本对应一张图像,以及从**CL=F_Close(WTI原油期货收盘价)** 衍生出的**1至8日趋势标签**,标签定义在绘图窗口的最后一个索引位置。 ## 仓库布局 本数据集采用**Hugging Face风格的分块Parquet文件**存储: - `train-00000-of-00210.parquet` - `train-00001-of-00210.parquet` - … - `train-00209-of-00210.parquet` 这是标准的存储结构,请避免在同一仓库中混入原始构建输出文件(如`part_00000x.parquet`),否则会导致数据集视图混乱且不一致。 ## 数据来源(雅虎财经Yahoo Finance) 本数据集基于以下数据源构建: - `^OVX`(芝加哥期权交易所原油波动率指数)→ 收盘价 - `CL=F`(WTI原油期货合约)→ 开盘-最高-最低-收盘-成交量(OHLCV)数据及衍生特征 典型的生成配置如下: - 采样频率:每日(`D`) - 日期范围示例:`2000-01-01` 至 `2025-01-01` - 窗口长度:`50` ## 每条样本代表的内容 每条样本对应以下内容: 1. 基于数据集的滑动窗口(长度为`window`) - `end_idx = start_idx + window - 1` 2. 从选定特征组生成的**绘图图像** - 背景为深色(黑色) - 特征颜色明亮且固定 3. **趋势标签**,基于窗口末尾(`end_idx`)计算 - 标签定义在绘图窗口的最后一个索引,而非起始索引。 ## 标签定义(1至8日趋势) 标签仅基于`CL=F_Close`计算得到。 对于`{1,2,3,4,5,6,7,8}`中的每个预测周期`h`: - `pct = Close[end_idx + h] / Close[end_idx] - 1` ### 三元分类模式(上涨/平盘/下跌) 设定阈值`pct_threshold = 0.002`(0.2%): - 若`pct > +0.002` → 标记为`+1`,代表上涨(UP) - 若`|pct| ≤ 0.002` → 标记为`0`,代表平盘(FLAT) - 若`pct < -0.002` → 标记为`-1`,代表下跌(DOWN) 典型的标签列包括: - `trend_1d, trend_2d, …, trend_8d` 注意:若窗口末尾不存在未来值(`end_idx + h`),则会跳过该窗口样本。 ## 数据列(典型Parquet模式) 每条样本通常包含以下字段: - `image_png`(字节型):绘图图像的PNG原始字节流 - `plot_kind`(字符串型):绘图类型,例如`"line"`(折线图),若使用蜡烛图则为`"candle"` - `start_idx`(整型):滑动窗口的起始索引 - `end_idx`(整型):滑动窗口的结束索引(标签定义于此位置) - `start_ts` / `end_ts`(时间戳类型):若索引为日期类型,则对应窗口的起始/结束时间戳 - `columns_json`(字符串型):绘图所用特征列的JSON列表 - `trend_1d … trend_8d`(整型):趋势标签(三元模式:`-1, 0, +1`) 实际字段可能会根据绘图配置略有差异。 ## 特征组 每张图像基于一个**特征组**生成,特征组包含: - 一个来自CL=F前缀的固定特征列(通常为`CL=F_Close`) - 额外从数据集中选取的特征列,以达到固定的特征组大小(例如`k_total=4`) 示例(特征组大小为4): - `[CL=F_Close, ^OVX_Close, CL=F_sma_20, CL=F_rsi_14]` 每个样本的实际绘图特征列表存储在`columns_json`字段中。 ## 颜色映射规则 绘图采用黑色背景,特征颜色明亮。 特征颜色采用**固定映射规则**,即相同的特征名称(例如`sma_20`)在不同绘图及运行中会对应相同的颜色。 ## 高效读取说明 由于`image_png`字段存储原始PNG字节流,将整个数据集加载到单个pandas DataFrame中会占用大量内存。若用于训练或数据检查: - 建议采用流式读取或按分块读取 - 仅读取所需字段(例如`image_png` + 标签列) ## 免责声明 本数据集基于雅虎财经(Yahoo Finance)提供的市场数据衍生而来,请确保您的使用行为符合相关条款及许可要求。

提供机构:
mrzdu
二维码
社区交流群
二维码
科研交流群
商业服务