Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job manager crashed while running this job (missing heartbeats).
Error code:   JobManagerCrashedError

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.

text
string
# Storage for Chapter 4 Baseline Runs
This directory is the extraction target for the local data needed by the
Chapter 4 baseline launcher. In the published repository, the reusable inputs
are packaged as `assets/ch4_baseline_local_data.zip` and should be restored with:
```bash
unzip -q assets/ch4_baseline_local_data.zip -d .
```
Generated run outputs, historical reports, W&B folders, and old LLM response
caches are not kept here.
## Kept Local Inputs
```text
storage/
β”œβ”€β”€ parquet/ # Local daily price data and checksums
β”œβ”€β”€ cache/
β”‚ β”œβ”€β”€ news/ # Cached raw/news-provider article files
β”‚ β”œβ”€β”€ news_by_day/ # Per-symbol daily news files used during backtests
β”‚ β”œβ”€β”€ financials/ # Cached fundamental data
β”‚ β”œβ”€β”€ corporate_actions/ # Dividends and split data
β”‚ └── stock_indicators/ # Cached technical indicator files
└── reports/ # Empty placeholder; new runs write outputs here
```
Current file counts after cleanup:
```text
parquet: 13440
cache/news: 5585
cache/news_by_day: 6010
cache/financials: 63
cache/corporate_actions: 42
cache/stock_indicators: 6783
```
## Not Kept
- `cache/llm/`: old LLM responses from previous runs.
- `reports/backtest/`: old generated backtest outputs.
- `wandb/`: local W&B run artifacts.
New executions of `run.sh` or `launch.sh` may recreate output directories as
needed. Those outputs are run artifacts rather than baseline inputs.
[{"cash_amount": 0.26, "currency": "USD", "declaration_date": "2025-07-31", "dividend_type": "CD", "ex_dividend_date": "2025-08-11", "frequency": 4, "id": "Ed2c9da60abda1e3f0e99a43f6465863c137b671e1f5cd3f833d1fcb4f4eb27fe", "pay_date": "2025-08-14", "record_date": "2025-08-11", "ticker": "AAPL"}, {"cash_amount": 0.26, ...
[{"execution_date": "2020-08-31", "id": "E36416cce743c3964c5da63e1ef1626c0aece30fb47302eea5a49c0055c04e8d0", "split_from": 1, "split_to": 4, "ticker": "AAPL"}, {"execution_date": "2014-06-09", "id": "E91a6b74ca1a9dcbce26a1f34e24ae26ba2c6359822ccf901ecd827f419137654", "split_from": 1, "split_to": 7, "ticker": "AAPL"}, {...
[{"cash_amount": 2.38, "currency": "USD", "declaration_date": "2025-08-01", "dividend_type": "CD", "ex_dividend_date": "2025-08-22", "frequency": 4, "id": "Ede25348e2df38e09ba2e8bbd85f95c31b3bcdc028ba723ee42a4a16a50e3707b", "pay_date": "2025-09-12", "record_date": "2025-08-22", "ticker": "AMGN"}, {"cash_amount": 2.38, ...
[]
[]
[{"execution_date": "2022-06-06", "id": "Ef72af690fef1f9db3fd5382ca3c92c8885ea75761e9cdf54825fc7139bd88c6b", "split_from": 1, "split_to": 20, "ticker": "AMZN"}]
[{"cash_amount": 0.82, "currency": "USD", "declaration_date": "2025-09-24", "dividend_type": "CD", "ex_dividend_date": "2025-10-10", "frequency": 4, "id": "E386ff67875eed82199fd8c537afb26c72429ae7108f92be041602d7d48584cf1", "pay_date": "2025-11-10", "record_date": "2025-10-10", "ticker": "AXP"}, {"cash_amount": 0.82, "...
[]
[{"cash_amount": 2.055, "currency": "USD", "declaration_date": "2019-12-16", "dividend_type": "CD", "ex_dividend_date": "2020-02-13", "frequency": 4, "id": "Ea3b40282185e0d21387578224d3bc5a326cc59b2b590ee2b6e94953a50112c44", "pay_date": "2020-03-06", "record_date": "2020-02-14", "ticker": "BA"}, {"cash_amount": 2.055, ...
[]
[{"cash_amount": 1.51, "currency": "USD", "declaration_date": "2025-06-11", "dividend_type": "CD", "ex_dividend_date": "2025-07-21", "frequency": 4, "id": "E3d6643c32e3b5cb4bb0d383d003591b73570a0e61f00a1fc576a7cdcb23f4a61", "pay_date": "2025-08-20", "record_date": "2025-07-21", "ticker": "CAT"}, {"cash_amount": 1.41, "...
[{"execution_date": "2005-07-14", "id": "E909c2257331a0e29eedb1cfe6cbaf02b3c26afe5bed51a6dcd249c695b7d5c47", "split_from": 1, "split_to": 2, "ticker": "CAT"}]
[{"cash_amount": 0.416, "currency": "USD", "declaration_date": "2025-09-04", "dividend_type": "CD", "ex_dividend_date": "2025-09-17", "frequency": 4, "id": "E82c4ff156ea2560fceb854dac1f78ea4e83b4f12dba68e9b3d1f5dfd4001cfe3", "pay_date": "2025-10-09", "record_date": "2025-09-17", "ticker": "CRM"}, {"cash_amount": 0.416,...
[{"execution_date": "2013-04-18", "id": "Efa28b420bae18ca09bce397cb4e793feb15ffa539ba44311c5baf9c36308f657", "split_from": 1, "split_to": 4, "ticker": "CRM"}]
[{"cash_amount": 4, "currency": "USD", "declaration_date": "2025-07-14", "dividend_type": "CD", "ex_dividend_date": "2025-08-29", "frequency": 4, "id": "E8c774e54799582e7194438a0d008779d33d0ea2dc3046d6d91e46ff0df298b0f", "pay_date": "2025-09-29", "record_date": "2025-08-29", "ticker": "GS"}, {"cash_amount": 3, "currenc...
[]
[{"cash_amount": 2.3, "currency": "USD", "declaration_date": "2025-08-21", "dividend_type": "CD", "ex_dividend_date": "2025-09-04", "frequency": 4, "id": "E77abc6b05cf607904c6a572c89466bb8f88c789042254384a9d0a362399c41f4", "pay_date": "2025-09-18", "record_date": "2025-09-04", "ticker": "HD"}, {"cash_amount": 2.3, "cur...
[]
End of preview.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Chapter 4 Baseline Codebase

This repository is a cleaned baseline-only snapshot for the ten runs used in Chapter 4 of the thesis.

It intentionally excludes the later improvement experiments: discrete target states, Top-K shortlist, frequency experiments, simulated improvement results, and majority voting.

Contents

  • Baseline source code exported from commit 3c05c1afb50afa4734296fce18cc77c776f79c1d.
  • The ten historical Chapter 4 W&B ids and setup metadata in scripts/baseline_runs.json.
  • A single-run entrypoint: run.sh.
  • A ten-run launcher with the same baseline setup as the selected original runs: launch.sh.
  • Local reusable market/news input data packaged as assets/ch4_baseline_local_data.zip.

The raw local data directories are ignored by git after extraction:

stockbench/storage/parquet/
stockbench/storage/cache/news/
stockbench/storage/cache/news_by_day/
stockbench/storage/cache/financials/
stockbench/storage/cache/corporate_actions/
stockbench/storage/cache/stock_indicators/

Old LLM response caches, generated backtest reports, and local W&B outputs are not included.

Setup

Clone the Hugging Face dataset repository:

git clone https://huggingface.co/datasets/stock-agent/chapter4-baseline-clean
cd chapter4-baseline-clean

Restore local price/news data:

unzip -q assets/ch4_baseline_local_data.zip -d .

Data archive checksum:

sha256  3fb0ccdf05aacfeef15c032aa62b956aa6a22a247a0b56145e54b30ea7ce6dbf

Create the conda environment:

conda env create -f environment.yml
conda activate stockagent

Configure the LLM API key. The original runs used the qingyuntop OpenAI-compatible profile. No API key is included in this repository.

export QINGYUNTOP_API_KEY="your key"

Optional W&B configuration:

export WANDB_MODE=offline   # default
# export WANDB_MODE=online  # upload new runs to W&B

Run

Run one baseline:

MODEL=deepseek-v3.1 RUN_PREFIX=DEEPSEEK_V3_1 ./run.sh

Run the ten Chapter 4 baseline setups:

./launch.sh

By default, run.sh uses:

START=2025-03-01
END=2026-02-28
PROFILE=qingyuntop
NEWS_ENABLED=true
DATA_MODE=offline_only
CACHE_MODE=llm_write_only
WANDB_MODE=offline

Reproduction Notes

The manifest records the original W&B ids and original code commit for each selected run. launch.sh does not force those old W&B ids; it runs the same baseline setup and lets the current run generate fresh timestamped ids.

The packaged local input data contains:

parquet: 13440 files
cache/news: 5585 files
cache/news_by_day: 6010 files
cache/financials: 63 files
cache/corporate_actions: 42 files
cache/stock_indicators: 6783 files
Downloads last month
6