Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/source/envs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,50 @@
Overview
=================================================

In recent years, financial reinforcement learning (FinRL) with deep reinforcement learning (DRL)
has shown huge potentials in obtaining profitable trading strategies in complex market conditions.
The inherently noisy and complex real-world markets makes DRL a compelling approach to adapt
and learn the optimal trading strategy. However, to effectively learn from the noisy market data,
market environments are essential to provide a close-to-real simulation of complex markets.

Despite the importance, many open-source market environments have remained outdated and in-
consistently maintained. Differences in data sources and API design hinder reproducibility and
makes it difficult to integrate and test agents across environments. Moreover, community initiatives
such as FinRL Contests require standardized market environments to ensure fair and reproducible
evaluation of agents. The challenges highlights the demand to organize current open-source market
environments


.. image:: ../image/Market_Environments.png
:width: 100%
:align: center

.. [1] AminHP. *gym-anytrading: A collection of OpenAI Gym environments for reinforcement learning-based trading.*, 2025.
URL https://github.com/AminHP/gym-anytrading. GitHub repository, MIT license. Accessed 2025-08-20.

.. [2] ClementPerroud. *Gym-Trading-Env: A simple, easy, customizable Gymnasium environment for trading.*, GitHub repository, 2025.
URL https://github.com/ClementPerroud/Gym-Trading-Env. Accessed 2025-08-20.

.. [3] drlove2002. *"reliance.csv" from TradingGym repository: Stock price dataset for reinforcement learning environment.*, GitHub file in drlove2002/TradingGym repository, 2025.
URL https://github.com/drlove2002/TradingGym/blob/master/trading_gym/data/reliance.csv. Accessed 2025-08-20.

.. [4] kh-kim. *stock_market_reinforcement_learning: Stock trading environment using OpenAI Gym with deep Q-learning and policy gradient.*, GitHub repository, 2025.
URL https://github.com/kh-kim/stock_market_reinforcement_learning. Accessed 2025-08-20.

.. [5] Xiao-Yang Liu, Ziyi Xia, Jingyang Rui, Jiechao Gao, Hongyang Yang, Ming Zhu, Christina Wang, Zhaoran Wang, and Jian Guo.
*FinRL-Meta: Market environments and benchmarks for data-driven financial reinforcement learning.*
*Advances in Neural Information Processing Systems*, volume 35, pages 1835–1849, 2022.

.. [6] Shuo Sun, Molei Qin, Wentao Zhang, Haochong Xia, Chuqiao Zong, Jie Ying, Yonggang Xie, Lingxuan Zhao, Xinrun Wang, and Bo An.
*TradeMaster: A holistic quantitative trading platform empowered by reinforcement learning.*
*Advances in Neural Information Processing Systems*, volume 36, pages 59047–59061, 2023.

.. [7] tensortrade-org. *TensorTrade: An open-source reinforcement learning framework for trading.*, GitHub repository, 2021.
URL https://github.com/tensortrade-org/tensortrade/tree/master. Accessed 2025-08-20.

.. [8] Xiao Yang, Weiqing Liu, Dong Zhou, Jiang Bian, and Tie-Yan Liu.
*Qlib: An AI-oriented quantitative investment platform.*, 2020.
URL https://arxiv.org/abs/2009.11189.



4 changes: 2 additions & 2 deletions docs/source/envs/stock/gymanytrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ At each timestep, the environment performs the following updates:
1. **Decode Actions (Discrete)**

The action for each asset is a discrete flag:
``0`` = **SELL/close long**, ``1`` = **BUY/open (or add to) long**.
Current position flags are kept in ``self.position`` (``0`` = flat, ``1`` = long).
``0`` = **SELL/close long**, ``1`` = **BUY/open long**.
Current position flags are kept in ``self.position`` (``0`` = short, ``1`` = long).

.. code-block:: python

Expand Down
Binary file added docs/source/image/Market_Environments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ FinRL Contest 2023: `Contest Website <https://open-finance-lab.github.io/finrl-c
intro/agent

.. toctree::
:caption: Environments
:caption: Market Environments
:hidden:
:maxdepth: 2

Expand Down