Skip to content
Projetos

Sobre

A reproducibility lab for trading AI: published RL and LLM trading claims re-tested under a pre-registered protocol, with a causal benchmark and a live track.

Negócios e finanças

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
-2
em 7 dias
-2
em 15 dias
-2
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

RL-pricing: a reproducibility lab for trading AI

Published trading-AI claims, re-tested under one pre-registered protocol.
Every verdict is published next to the authors' reply, including the verdicts against our own paper.

tests bench PyPI arXiv site License: MIT

Verdicts · R0: our own paper · Findings · Leaderboard · Quick start · Submit a policy · Site

How RL-pricing works: a claim is pre-registered, tested at three levels on one causal engine, judged by a fixed rule, sent to its authors and published with their reply

Three public instruments back every verdict: a causal backtesting benchmark, a live track scored only on market data that did not exist when a policy was published, and a ledger of decisions committed before each US market open.

In the press: Five Years After His Trading-AI Paper, a Bay Area Engineer Put It on Trial, SF Bay Area Times, October 2026.

Verdicts

Report Claim Level Claimed Ours (95% interval) Verdict
r0-wang-zhang-2026 ddpg-annual-return (annual_return) L2 55.5% 24.6% [17.3%, 31.9%] ✗ does not hold
r0-wang-zhang-2026 ddpg-sharpe (sharpe) L2 1.38 1.16 [0.93, 1.39] ◐ partly holds
r0-wang-zhang-2026 td3-sharpe (sharpe) L2 1.37 1.10 [0.69, 1.52] ◐ partly holds
r0-wang-zhang-2026 sac-sharpe (sharpe) L2 1.33 1.23 [1.07, 1.39] ◐ partly holds
r0-wang-zhang-2026 ppo-sharpe (sharpe) L2 1.09 1.17 [0.90, 1.44] ◐ partly holds
r0-wang-zhang-2026 a2c-sharpe (sharpe) L2 0.82 1.09 [0.91, 1.27] ◐ partly holds
r0-wang-zhang-2026 lstm-max-drawdown (max_drawdown) L2 -9.6% -26.5% [-29.4%, -23.7%] ? inconclusive
r0-wang-zhang-2026 lstm-sharpe (sharpe) L2 1.19 0.75 [0.39, 1.12] ? inconclusive

Verdicts: ✅ holds, ◐ partly holds, ✗ does not hold, ? inconclusive. How a verdict is decided.

Next up

Report Claim under test Due
R1 FinRL ensemble (Yang et al., ICAIF 2020): Sharpe 1.30 vs the DJIA's 0.47, 2016–2020 2026-12-01
R2 TradingAgents backtest: Sharpe 5.6–8.2 on AAPL, GOOGL, AMZN in 2024 Q1, replicated with a check for whether the models remember that period 2027-01-05
R3 TradingAgents run live on the same three stocks for three months, each decision committed before the open; first fill 2026-10-29 (pre-registration, addendum) 2027-02-15
R5 FinRL-DeepSeek (Benhenda, 2025): LLM-scored news makes CPPO better and PPO worse on the Nasdaq-100, 2019–2023, from two runs (pre-registration) 2027-01-26
R6 A frozen Claude Sonnet 5.5 allocates the nine US sector ETFs live against equal weight, under its own cost cap (pre-registration) 2027-03-01
R7 Our own paper's v1 again (arXiv:2609.31870v1, as in R0), from committed records only: an analysis-only re-reading for arXiv v2, with no new runs (pre-registration) 2026-12-18

Nominate a claim: open an issue titled Nominate: <paper> with the quoted claim and a link to the code. Authors get each draft seven days before publication.

How the lab works

  • Pre-registered. Each report's test plan is committed before anything runs; the commit time is the evidence that the plan came first.
  • Three levels. L1 replicates with the authors' code and setup. L2 re-tests under this repository's protocol: next-open fills, fees, at least five seeds, survivorship-free data. L3 tries new windows and, for anything that can run daily, the live ledger.
  • Verdicts by rule: holds, partly holds, does not hold, or inconclusive, decided by thresholds fixed in the pre-registration (rules and template).
  • LLM agents only count live. Their historical backtests can be contaminated by training data. The ledger commits each decision before the open, and scoring checks the commit against GitHub's own run records.
  • Evidence is committed. Each report ships its per-seed results, input hashes and one command that reproduces them.

R0: our own paper

Full report: reports/r0-wang-zhang-2026/report.md.

Our preprint (Wang & Zhang, arXiv:2609.31870) reported DDPG with a 55.51% annual return and Sharpe 1.38 on 20 large-cap stocks in 2019–2020, with TD3 and SAC close behind. Those are single runs on a universe fixed on 2021-05-16, after the test window, by a rule the 2021 records describe two ways (top market capitalisation, top performance). The paper lists survivorship bias and the missing run-to-run variability as limitations, in a paragraph first written in 2026.

We re-ran it three ways, 5 seeds per agent, same 20 stocks, same 2019–2020 window, 0.1% fees:

  • Share env + crash rule: the paper's 2021 share-trading environment as changed in 2026 (#65, #80: fee-inclusive buys, next-open fills), run through python main.py --mode train with that script's default rule that sells everything when a market-turbulence index spikes. Table 4 came from the 2021 notebooks, which used no such rule.
  • Share env, no rule: the same with --no-turbulence.
  • Benchmark: this repository's paper-2021 task (portfolio weights, no hand-coded exits).

Sharpe ratio, mean ± sd over 5 seeds [best seed]:

Agent Reported (1 run) Share env + crash rule Share env, no rule Benchmark
DDPG 1.38 1.16 ± 0.19 [1.43] 1.06 ± 0.18 [1.24] 0.70 ± 0.17 [0.97]
TD3 1.37 1.10 ± 0.34 [1.37] 1.00 ± 0.30 [1.37] 0.70 ± 0.21 [1.01]
SAC 1.33 1.23 ± 0.13 [1.42] 1.23 ± 0.18 [1.49] 0.66 ± 0.26 [0.82]
PPO 1.09 1.17 ± 0.21 [1.32] 0.95 ± 0.21 [1.21] 0.98 ± 0.04 [1.02]
A2C 0.82 1.09 ± 0.15 [1.27] 0.97 ± 0.15 [1.16] 1.03 ± 0.01 [1.05]
LSTM forecast 1.19 – – 0.75 ± 0.29 [1.08]
1/N buy and hold – 1.10 1.10 1.11

What holds up and what doesn't:

  • The 55.51% return does not. The best of the 50 share-environment runs earned 46.0% a year and the median 26.1%. Holding the 20 stocks in equal weight earned 29.7%. The 55.51% was one unseeded 2021 run, made after the replay buffer was changed from 100,000 to 10,000; the earlier configurations had each been scored on the test window.
  • The reported Sharpe ratios of DDPG, TD3 and SAC sit near the top of our seed ranges. Values like the reported 1.33–1.38 show up as the best seed for most agents. The paper's trained-once rows come from one 2021 session, not a pick per seed.
  • The crash rule is not learning. With it on, the environment, not the agent, sold every position in at least five episodes from January 2019, and all 25 runs sat in cash on the same five sessions of March 2020. With the rule on, A2C's and TD3's mean Sharpe (1.0934, 1.1028) are already below 1/N's 1.1049; switching it off drops DDPG's and PPO's below it too, and SAC's stays above.
  • SAC is the one survivor, but not a significant one. Without the rule its seed-averaged Sharpe is 1.32 against 1/N's 1.10, alpha 7.5% a year against 1/N (annualised linearly). Over a two-year window that is not significant (bootstrap p = 0.133, alpha t = 1.6).
  • The benchmark environment flips the picture. There the same agents trail 1/N. Which difference drives that is open: share counts versus weights, the features, or the share environment's per-trade limits.

Per-seed results, equity curves, commands and the input-data hash are in reports/r0-wang-zhang-2026/evidence/.

Benchmark findings

Per-seed Sharpe ratios of every strategy against 1/N

Historical track, test windows 2018–2025 (US ETFs) and 2023–2025 (crypto), 5 seeds per learned entry:

  • No Stable-Baselines3 or LSTM policy beats 1/N buy-and-hold here. All 33 such entries across the four tasks (SB3 agents with default and tuned hyperparameters, CVaR-PPO, the LSTM forecast) have a lower seed-averaged Sharpe ratio than holding every asset in equal weight. Only 5 of their 165 individual seeds do better, so cherry-picking one would make a publishable-looking result.
  • Decision Transformer and CQL beat 1/N, on crypto only. Their ΔSharpe is +0.59 (p = 0.002) and +0.44 (p = 0.022), with all five seeds of each ahead. Neither survives a Holm correction over the 45 learned entries, which needs p < 0.0011. On the two US tasks no offline-RL entrant (BC, IQL, CQL, Decision Transformer) is significantly ahead (best p = 0.44).
  • Tuning doesn't close the gap. A declared sweep of 8 configurations each for PPO and SAC, selected on validation data only, picks configurations that still trail 1/N on every task. SAC's choice helps on the US tasks and collapses on crypto (Sharpe 0.07 ± 0.49). The deflated Sharpe column accounts for the 8 trials.
  • The off-policy agents churn themselves to death. SAC, TD3 and DDPG turn over 46–326× their equity per year. On the US tasks their alpha against 1/N is negative, with t-statistics down to −2.8.
  • A2C rediscovers 1/N. Its five seeds on US sectors land at Sharpe 0.67 ± 0.01 against 1/N's 0.68: the softmax policy learns to stay close to equal weights.
  • The largest win is not RL. In crypto, long-only minimum variance beats 1/N (ΔSharpe +0.86, bootstrap p < 0.001).

Better configurations are what the leaderboard is for: submit one, and state how many you tried.

Leaderboard

Track Task # Strategy Sharpe Return CAGR Max DD ΔSharpe vs 1/N DSR
historical crypto-majors 1 Minimum variance 1.64 597.2% 90.9% -33.3% +0.86 (p<0.001) 1.00
historical crypto-majors 2 Decision Transformer 1.25 ± 0.20 410.4% 68.9% -33.9% +0.59 (p=0.002) 0.89
historical crypto-majors 3 CQL 1.21 ± 0.09 297.8% 58.1% -34.1% +0.44 (p=0.022) 0.82
historical crypto-majors 7 1/N buy and hold ◆ 0.78 134.0% 32.7% -44.5% – 0.91
historical us-multi-asset 1 1/N buy and hold ◆ 0.73 96.8% 8.9% -26.6% – 0.98
historical us-multi-asset 2 Momentum (top 3) 0.72 112.1% 9.9% -23.7% -0.01 (p=0.506) 0.98
historical us-multi-asset 3 1/N monthly rebalance 0.69 84.7% 8.0% -25.8% -0.04 (p=0.827) 0.97
historical us-multi-asset 4 IQL 0.68 ± 0.07 69.8% 6.8% -23.3% -0.04 (p=0.714) 0.77
historical us-sectors 1 1/N monthly rebalance 0.69 140.9% 11.6% -36.7% +0.01 (p=0.449) 0.97
historical us-sectors 2 1/N buy and hold ◆ 0.68 138.5% 11.5% -35.5% – 0.97
historical us-sectors 3 A2C 0.67 ± 0.01 119.0% 10.3% -34.3% -0.01 (p=0.650) 0.97
historical paper-2021 (re-evaluation) – Momentum (top 3) 1.31 121.1% 48.6% -30.4% +0.20 (p=0.240) 0.96
historical paper-2021 (re-evaluation) – 1/N buy and hold ◆ 1.11 68.9% 29.9% -29.4% – 0.94
historical paper-2021 (re-evaluation) – 1/N monthly rebalance 1.04 60.6% 26.7% -29.5% -0.07 (p=0.777) 0.93
historical paper-2021 (re-evaluation) – A2C 1.03 ± 0.01 56.7% 25.1% -28.2% -0.08 (p=0.825) 0.92
live crypto-majors (published 2026-10-14, 49 scored sessions) 1 LSTM forecast -3.74 ± 0.39 -19.0% -78.8% -24.5% +1.73 (p=0.132) 0.04
live crypto-majors (published 2026-10-14, 49 scored sessions) 2 Minimum variance -5.15 -26.2% -89.6% -29.1% +0.45 (p=0.350) 0.01
live crypto-majors (published 2026-10-14, 49 scored sessions) 3 Trend following (200d SMA) -5.17 -16.4% -73.7% -18.7% +0.43 (p=0.266) 0.01
live crypto-majors (published 2026-10-14, 49 scored sessions) 9 1/N buy and hold ◆ -5.60 -31.8% -94.2% -33.3% – 0.01
live crypto-majors (published 2026-10-16, 47 scored sessions) 1 PPO (tuned) -5.36 ± 0.35 -27.3% -91.5% -28.7% +0.16 (p=0.241) 0.00
live crypto-majors (published 2026-10-16, 47 scored sessions) 2 SAC (tuned) -5.37 ± 0.33 -29.2% -93.1% -31.6% +0.09 (p=0.393) 0.00
live crypto-majors (published 2026-10-16, 47 scored sessions) 3 1/N buy and hold ◆ -5.60 -31.3% -94.6% -33.4% – –
live crypto-majors (published 2026-11-02, 30 scored sessions) 1 Decision Transformer -5.36 ± 0.45 -10.3% -62.9% -12.3% -0.16 (p=0.738) 0.00
live crypto-majors (published 2026-11-02, 30 scored sessions) 2 1/N buy and hold ◆ -5.69 -23.6% -96.2% -27.6% – –
live crypto-majors (published 2026-11-02, 30 scored sessions) 3 IQL -5.79 ± 0.11 -22.8% -95.7% -26.4% -0.11 (p=0.907) 0.00
live us-multi-asset (published 2026-10-14, 34 scored sessions) 1 Minimum variance -0.02 -0.1% -0.4% -1.9% +0.97 (p=0.400) 0.50
live us-multi-asset (published 2026-10-14, 34 scored sessions) 2 Momentum (top 3) -0.60 -3.4% -22.7% -13.4% +0.40 (p=0.343) 0.41
live us-multi-asset (published 2026-10-14, 34 scored sessions) 3 TD3 -0.60 ± 1.19 -1.0% -6.5% -6.7% +0.58 (p=0.216) 0.44
live us-multi-asset (published 2026-10-14, 34 scored sessions) 7 1/N buy and hold ◆ -1.00 -2.4% -16.2% -7.3% – 0.36
live us-multi-asset (published 2026-10-16, 32 scored sessions) 1 1/N buy and hold ◆ -1.08 -2.4% -17.7% -7.3% – –
live us-multi-asset (published 2026-10-16, 32 scored sessions) 2 PPO (tuned) -1.12 ± 0.11 -2.3% -17.0% -6.8% -0.04 (p=0.617) 0.04
live us-multi-asset (published 2026-10-16, 32 scored sessions) 3 SAC (tuned) -1.22 ± 0.10 -2.5% -18.0% -6.7% -0.13 (p=0.921) 0.03
live us-multi-asset (published 2026-11-02, 21 scored sessions) 1 Decision Transformer -0.96 ± 0.24 -1.4% -15.4% -5.5% +0.11 (p=0.376) 0.08
live us-multi-asset (published 2026-11-02, 21 scored sessions) 2 IQL -1.05 ± 0.05 -1.8% -19.8% -6.9% +0.07 (p=0.425) 0.07
live us-multi-asset (published 2026-11-02, 21 scored sessions) 3 Behaviour cloning -1.09 ± 0.20 -1.6% -17.8% -5.9% +0.03 (p=0.470) 0.07
live us-multi-asset (published 2026-11-02, 21 scored sessions) 4 1/N buy and hold ◆ -1.11 -2.0% -21.8% -7.4% – –
live us-sectors (published 2026-10-14, 34 scored sessions) 1 Inverse volatility 1.04 2.3% 18.0% -7.0% +0.32 (p=0.084) 0.65
live us-sectors (published 2026-10-14, 34 scored sessions) 2 DDPG 0.86 ± 0.61 2.2% 18.3% -8.6% +0.23 (p=0.367) 0.64
live us-sectors (published 2026-10-14, 34 scored sessions) 3 1/N buy and hold ◆ 0.72 1.5% 11.6% -7.1% – 0.60
live us-sectors (published 2026-10-16, 32 scored sessions) 1 1/N buy and hold ◆ 0.58 1.1% 9.2% -7.1% – –
live us-sectors (published 2026-10-16, 32 scored sessions) 2 SAC (tuned) 0.57 ± 0.17 1.0% 8.1% -6.5% -0.02 (p=0.581) 0.11
live us-sectors (published 2026-10-16, 32 scored sessions) 3 PPO (tuned) 0.45 ± 0.05 0.8% 6.1% -6.5% -0.13 (p=0.841) 0.10
live us-sectors (published 2026-11-02, 21 scored sessions) 1 IQL -0.15 ± 0.49 -0.4% -4.5% -5.9% +0.23 (p=0.263) 0.11
live us-sectors (published 2026-11-02, 21 scored sessions) 2 CVaR-PPO -0.28 ± 0.10 -0.6% -6.7% -6.4% +0.14 (p=0.194) 0.11
live us-sectors (published 2026-11-02, 21 scored sessions) 3 CQL -0.37 ± 0.80 -0.8% -8.7% -5.0% -0.05 (p=0.543) 0.10
live us-sectors (published 2026-11-02, 21 scored sessions) 5 1/N buy and hold ◆ -0.41 -0.9% -10.4% -7.2% – –
ledger us-aapl (decisions from 2026-10-23, 27 scored sessions) 1 1/N buy and hold ◆ 0.87 2.1% 21.1% -4.9% – –
ledger us-aapl (decisions from 2026-10-23, 27 scored sessions) 1 Ledger canary (1/N) 0.87 2.1% 21.1% -4.9% +0.00 (p=1.000) 0.61
ledger us-aapl (decisions from 2026-10-28, 24 scored sessions) 1 1/N buy and hold ◆ 0.47 0.9% 9.6% -4.9% – –
ledger us-aapl (decisions from 2026-10-28, 24 scored sessions) 1 TradingAgents 0.47 0.9% 9.6% -4.9% +0.00 (p=1.000) 0.56
ledger us-amzn (decisions from 2026-10-28, 24 scored sessions) 1 1/N buy and hold ◆ 1.68 6.2% 88.7% -9.8% – –
ledger us-amzn (decisions from 2026-10-28, 24 scored sessions) 2 TradingAgents -2.16 -8.6% -60.9% -14.8% -3.84 (p=0.953) 0.25
ledger us-googl (decisions from 2026-10-28, 24 scored sessions) 1 1/N buy and hold ◆ 0.59 1.6% 18.2% -11.2% – –
ledger us-googl (decisions from 2026-10-28, 24 scored sessions) 2 TradingAgents -0.99 -1.5% -15.1% -3.1% -1.57 (p=0.674) 0.39

Full tables: leaderboard/LEADERBOARD.md.

Why trust these numbers

This benchmark Common in RL-trading papers
Execution Decide at the close, fill at the next open, proportional fees Fill at the same close used to decide; often no fees
Universe Fixed ETFs; crypto top-10 by volume before the data starts, delistings included Today's index members, back-tested into the past
Randomness 5 seeds per learned policy (3 on the live track), mean ± sd, every seed plotted One run
Model selection Validation window before the test; declared trials deflate the Sharpe Tuned on the test period
Out-of-sample Live track: frozen policy, scored only on sessions after its public freeze One fixed historical window
Metrics One implementation for everyone; beta and alpha against 1/N Per-paper definitions

The live track is the part nobody can overfit. A policy is fitted on all data available today and its artifacts are committed with SHA-256 hashes. A CI job on main then stamps the time the freeze became public (leaderboard/publications.json, which pull requests may not edit), and from then on it is scored monthly on sessions that start after that stamp.

Quick start

Python 3.10 or newer:

git clone https://github.com/BichengWang/RL-pricing.git
cd RL-pricing
python -m venv .venv && source .venv/bin/activate
python -m pip install -e .

rl-pricing bench tasks                       # list tasks
rl-pricing bench run --task synthetic --submission momentum --out-root /tmp/board
rl-pricing bench run --task synthetic --submission ppo --seeds 2 --out-root /tmp/board
rl-pricing bench leaderboard --out-root /tmp/board --no-readme

The synthetic task is offline random walks with no edge by construction. Real tasks download data on first use (rl-pricing bench data us-sectors) into datasets/bench/. PPO takes one to two minutes per seed on a laptop CPU.

pip install rl-pricing installs the same commands without the reference submissions or the published records. Point --submissions-root at your own directory of submissions; the PyPI page walks through one. Changes between releases are in CHANGELOG.md.

Submit a policy

A policy maps the history up to today's close to long-only target weights, which fill at the next open. Here is a complete one:

# submissions/low-vol-half/policy.py
import numpy as np

from rl.bench.policy import Policy


class LowVolHalf(Policy):
    """Equal-weight the calmer half of the listed assets."""

    def act(self, view):
        closes = view.history.window(64).close
        vol = np.nanstd(np.diff(np.log(closes), axis=0), axis=0)
        vol = np.where(view.listed & np.isfinite(vol), vol, np.inf)
        keep = np.argsort(vol)[: max(1, view.listed.sum() // 2)]
        weights = np.zeros(len(view.tickers))
        weights[keep] = 1 / len(keep)
        return weights
{
  "name": "Low-vol half",
  "kind": "other",
  "policy": "policy.py:LowVolHalf",
  "trials": 3,
  "authors": ["Your Name"],
  "description": "Equal-weight the half of the assets with the lowest 63-day volatility."
}

Learning policies implement fit(history, validation_start, seed) as well: train on sessions before validation_start, select on the rest, and set stochastic = True to be evaluated over several seeds. They also implement save/load so the frozen live version can be restored. See rl/bench/policies/sb3.py for a full example. Set trials honestly to the number of configurations you tried. Add "tasks": ["us-ndx80"] to an entrant that only belongs to one task: it is then neither run nor frozen on the others.

Then:

  1. rl-pricing bench validate, rl-pricing bench check-causal --task synthetic --submission <id> (lookahead check, also run by CI on each non-LLM submission a pull request changes) and rl-pricing bench run --task <task> --submission <id> locally.
  2. Open a pull request with submissions/<id>/ only: CI writes every record under leaderboard/ and rejects pull requests that edit them. It checks that the submission builds, has no lookahead and the baselines reproduce.
  3. On merge, CI computes your historical records on every task with a live track and freezes the policy on today's data (or publishes your committed freeze from rl-pricing bench freeze); the monthly job scores it live from then on. A later change to the submission recomputes its records; editing only description, authors or url does not.

Tasks

Task Universe Test window Fee per side Why it is survivorship-free
us-sectors 9 SPDR sector ETFs 2018–2025 5 bps all listed since 1998
us-multi-asset SPY, QQQ, IWM, EFA, EEM, TLT, IEF, LQD, GLD, VNQ 2018–2025 5 bps all listed since 2004
crypto-majors top 10 Binance USDT pairs by Q2-2018 volume 2023–2025 10 bps chosen before the data starts; BCC and EOS delist mid-sample
paper-2021 the 2021 paper's 20 large caps 2019–2020 10 bps it is not: shown as a re-evaluation, not ranked
us-ndx80 FinRL-DeepSeek's 80 Nasdaq-100 names Yahoo still serves 2019–2023 10 bps it is not: shown as a re-evaluation, not ranked
synthetic 5 random walks 2018–2019 10 bps offline demo

Each task trains before its validation window, selects on validation, and reports the test window. Definitions live in rl/bench/tasks.py.

How scoring works

  • Execution (rl/bench/engine.py): targets set at close t fill at open t+1 with fees solved exactly on traded notional. Weights are long-only and sum to at most one; the rest is cash at 0%. A delisted holding is sold at its last close. RL agents train in a gym environment that uses the same Account, so training and evaluation accounting are identical.
  • Metrics (rl/bench/scoring.py): Sharpe, CAGR, max drawdown, annual turnover, and beta/alpha against 1/N (Newey-West t). ΔSharpe against 1/N comes with a paired stationary-bootstrap p-value. The deflated Sharpe ratio (Bailey & López de Prado) accounts for declared trials. Full definitions are in leaderboard/LEADERBOARD.md.
  • Records: every run stores its daily equity curve per seed, data SHA-256 and software versions under leaderboard/, so all metrics can be recomputed. Each record also names the commit checked out when it ran (git rev-parse HEAD), which misses uncommitted changes: the oldest historical records name 68c03c7, which predates rl/bench. Schema 2 records (from 2.0.0) also store code.code_sha256, a hash of the policy's source and of every rl.bench module it imports, uncommitted edits included.

Data

US tasks use Yahoo Finance prices and dividends, downloaded to a local cache. Yahoo's terms prohibit redistribution, so the repository ships no prices, only derived results. Prices are adjusted for dividends forward from each task's first session rather than taken from Yahoo's adjusted close, whose last digits change between identical requests. A past session therefore keeps its prices as new sessions arrive, and replaying the same window reproduces its data hash; a changed hash means Yahoo revised its history. Crypto uses Binance Vision daily klines, each archive verified against Binance's SHA-256 checksum. Binance Vision data is licensed CC BY-NC-SA 4.0; the crypto results here derive from it, with attribution, for non-commercial research.

Limitations

  • Fees are proportional; spread, market impact and borrowing costs are not modeled, and cash earns nothing.
  • Daily bars only; adjusted prices model reinvested distributions rather than exact exchange fills.
  • Eight-year and three-year test windows are a few market regimes, which is why the live track exists.
  • Reference RL agents use one feature set (rl/bench/features.py), and only PPO and SAC get a hyperparameter sweep (8 configurations each); they are a floor, not the best RL can do.

Training toolkit

The original FinRL-style training pipeline (share trading, portfolio allocation, LSTM forecaster, rolling ensemble via python main.py --mode ...) is still available and documented in docs/toolkit.md.

Development

pip install -e ".[test,lint]"
python -m pytest        # offline: synthetic data and fixtures
ruff check .

Use type(scope): title for pull request titles. The PR template asks for a short summary and verification results.

The site is built from this repository by mkdocs.yml and deployed on every push to main. To preview it: pip install -r docs/requirements.txt && mkdocs serve.

Citing

GitHub's "Cite this repository" uses CITATION.cff. The original study is Wang & Zhang, Deep Reinforcement Learning for Equity Trading: Benchmarking Actor-Critic Methods with Forward Retraining, arXiv:2609.31870 (local PDF of an earlier version, compiled 2026-09-24).

@software{rl_pricing,
  author  = {Wang, Bicheng and Zhang, Xinyi},
  title   = {{RL-pricing}: an honest, live-forward-tested benchmark for reinforcement learning portfolio policies},
  version = {2.0.0},
  year    = {2026},
  url     = {https://github.com/BichengWang/RL-pricing}
}

License

MIT; see LICENSE. The training toolkit's environment, preprocessing and training code are adapted from the MIT-licensed FinRL library.

Explore projetos relacionados

Carregando…