{"id":20393770,"url":"https://github.com/entrpn/fingym","last_synced_at":"2025-04-12T12:05:51.847Z","repository":{"id":57429651,"uuid":"235254423","full_name":"entrpn/fingym","owner":"entrpn","description":"A tool for developing reinforcement learning algorithms focused in stock prediction","archived":false,"fork":false,"pushed_at":"2022-05-04T16:14:56.000Z","size":21719,"stargazers_count":17,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T21:09:28.918Z","etag":null,"topics":["artificial-intelligence","artificial-intelligence-algorithms","evolution-strategies","evolutionary-algorithms","evolutionary-strategy","python","q-learning","reinforcement-agents","reinforcement-learning","reinforcement-learning-environments","reinforcement-learning-playground","stock-market","stock-price-prediction"],"latest_commit_sha":null,"homepage":"http://entrpn.com/fingym/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entrpn.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-21T04:17:26.000Z","updated_at":"2025-02-21T06:47:30.000Z","dependencies_parsed_at":"2022-08-26T02:42:11.882Z","dependency_job_id":null,"html_url":"https://github.com/entrpn/fingym","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrpn%2Ffingym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrpn%2Ffingym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrpn%2Ffingym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrpn%2Ffingym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entrpn","download_url":"https://codeload.github.com/entrpn/fingym/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565061,"owners_count":21125415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","artificial-intelligence-algorithms","evolution-strategies","evolutionary-algorithms","evolutionary-strategy","python","q-learning","reinforcement-agents","reinforcement-learning","reinforcement-learning-environments","reinforcement-learning-playground","stock-market","stock-price-prediction"],"created_at":"2024-11-15T03:50:05.129Z","updated_at":"2025-04-12T12:05:51.817Z","avatar_url":"https://github.com/entrpn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FinGym\n**********\n\n.. image:: https://badge.fury.io/py/fingym.svg\n    :target: https://badge.fury.io/py/fingym\n\n**Fingym is a toolkit for developing reinforcement learning algorithms tailored specifically for stock market trading.**  This is the ``fingym`` open-source library, which gives you access to a standardized set of environments.\n\n`See What's New section below \u003c#what-s-new\u003e`_\n\n``fingym`` makes no assumptions about the structure of your agent, and is compatible with any numerical computation library, such as TensorFlow or Theano. You can use it from Python code.\n\nIf you're not sure where to start, we recommend beginning with the\n`docs \u003chttps://entrpn.github.io/fingym/\u003e`_ on our site.\n\n.. contents:: **Contents of this document**\n   :depth: 2\n\nBasics\n======\n\nThere are two basic concepts in reinforcement learning: the\nenvironment (namely, the outside world) and the agent (namely, the\nalgorithm you are writing). The agent sends `actions` to the\nenvironment, and the environment replies with `observations` and\n`rewards` (that is, a score).\n\nThe core `fingym` interface is `Env \u003chttps://github.com/entrpn/fingym/blob/master/gym/envs/env.py\u003e`_, which is\nthe unified environment interface. There is no interface for agents;\nthat part is left to you. The following are the ``Env`` methods you\nshould know:\n\n- `reset(self)`: Reset the environment's state. Returns `observation`.\n- `step(self, action)`: Step the environment by one timestep. Returns `observation`, `reward`, `done`, `info`.\n\nSupported systems\n-----------------\n\nWe currently support Python 3.5 -- 3.7. \n\nInstallation\n============\n\nYou can perform a minimal install of ``fingym`` with:\n\n.. code:: shell\n\n    git clone git clone https://github.com/entrpn/fingym\n    cd fingym\n    pipenv shell\n    pipenv install -e .\n\nIf you prefer, you can do a minimal install of the packaged version directly from PyPI:\n\n.. code:: shell\n\n    pip install fingym\n    \nEnvironments\n============\n\nSee the `fingym site \u003chttps://entrpn.github.io/fingym/#environments\u003e`_.\n\nObservations\n============\n\nSee the `fingym site \u003chttps://entrpn.github.io/fingym/#observations\u003e`_.\n\nActions\n=======\n\nSee the `fingym site \u003chttps://entrpn.github.io/fingym/#spaces\u003e`_.\n\nExamples\n========\n\nSee the ``examples`` directory.\n\n- Run `examples/agents/buy_and_hold_agent.py \u003chttps://github.com/entrpn/fingym/blob/master/gym/examples/agents/buy_and_hold_agent.py\u003e`_ to run a simple buy and hold agent.\n- Run `examples/agents/random_agent.py \u003chttps://github.com/entrpn/fingym/blob/master/gym/examples/agents/random_agent.py\u003e`_ to run a simple random agent.\n- Run `examples/agents/dqn_agent.py \u003chttps://github.com/entrpn/fingym/blob/master/gym/examples/agents/dqn_agent.py\u003e`_ to run a dqn agent.\n- Run `examples/agents/evolutionary_agent.py \u003chttps://github.com/entrpn/fingym/blob/master/gym/examples/agents/evolutionary_agent.py\u003e`_ to run a generic algorithm.\n- Run `examples/agents/evolutionary_agent_w_crossover.py \u003chttps://github.com/entrpn/fingym/blob/master/gym/examples/agents/evolutionary_agent_w_crossover.py\u003e`_ to run a generic algorithm using crossover.\n\nTesting\n=======\n\nIf you cloned this repo, add fingym to python path:\n\n\u003e\u003e export PYTHONPATH=$PYTHONPATH:/path/to/fingym/fingym\n\nWe are using `pytest \u003chttp://doc.pytest.org\u003e`_ for tests. You can run them via:\n\n.. code:: shell\n\n    pytest\n\n\n.. _See What's New section below:\n\nWhat's new\n==========\n- 2020-02-05: First release. 3 year spy intraday minute steps. 10 year daily steps.\n- 2020-02-26: More environments from different symbols.\n- 2020-04-14: Renamed package from `gym` to `fingym`\n- 2020-05-01: Added random walk environments and alphavantage environment.\n- 2020-05-07: Added IEX environment with caching to reduce consumption of message quotes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrpn%2Ffingym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentrpn%2Ffingym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrpn%2Ffingym/lists"}