MLR-001 / Technical note

Reinforcement Trading — Part I

A PPO-based experimental environment for sequential EUR/USD trading decisions.

Marcus Lion Research · Source-code review · 2026-12-04 · Version 1.0

Research status: exploratory prototype. No training runs or performance figures have been independently reproduced for this publication.

Source repository →

Abstract

This note documents a custom Gymnasium environment and a Stable-Baselines3 proximal policy optimization (PPO) agent. The implementation uses hourly EUR/USD candles and technical features to explore directional decisions with discrete stop-loss and take-profit choices. The prototype is useful as an experimental starting point, not an investable strategy or production execution system.

1. Experimental specification

Algorithm
PPO, MlpPolicy
Observation
30 hourly rows of features
Action space
19 discrete actions: no trade or 2 directions × 3 stop choices × 3 target choices
Stop / target choices
30, 60, 80 pips
Training budget
100,000 timesteps configured
Training data filename dates
2020-07-01 to 2023-07-15
Testing data filename dates
2023-02-20 to 2025-02-22

Dates reflect the source filenames, not verified dataset contents.

2. Environment and reward

The observation is a rolling window of prior rows. The selected action is evaluated against the next candle using a simplified entry, stop-loss, take-profit and exit model. The reward is calculated in pips; it is not a validated dollar return.

Prototype decision workflowPrevious hourly observations feed a PPO agent, whose discrete action is evaluated using a subsequent candle and a pip-based reward.30-hour windowPPO policyNext-bar rewardMarket features19 actionsPip-based outcomeTraining feedback (conceptual)
Conceptual implementation workflow; not a performance chart.

3. Limitations identified by source review

  • Training and test filenames indicate an overlapping period; dataset contents and splits require verification.
  • Spread, commissions and slippage are not effectively incorporated into the reward.
  • Single-bar evaluation simplifies the position lifecycle and does not establish realistic fills.
  • Long and short intrabar stop/target ambiguity is handled inconsistently.
  • Logged exit prices can differ from assumed stop/target fills; pip rewards are added to nominal equity without position sizing.
  • No explicit fixed experiment seed or conventional benchmark suite is configured in the reviewed training script.
  • No-trade records may enter the trade history.

4. Research next steps

Part II should enforce disjoint chronological splits, realistic execution assumptions, explicit units and position accounting, baseline strategies, reproducible seeds and cost sensitivity. No claim of profitability is made.

Read the proposed validation protocol →

Source references

Source links track the upstream main branch and may change. Verify licensing and dataset rights before redistribution.

← Back to research library