{ "info": { "author": "Dema Ushchapovskyy, Suraj Tirupati", "author_email": "du116@ic.ac.uk", "bugtrack_url": null, "classifiers": [], "description": "## gym-crypto\n\nOpenAI Gym compatible environment for crypto-currency trading.\nThe environment allows to change the currency the bot trades, the granularity of trading \nand starting capital of the agent. More configurability to come in the future. \n\n### Observation Space\n\nThe observation space is a tuple structured as follows:\n\n```(OCHLV, Current Capital, Weight of the capital invested)```\n\nOCHLV represents Open, Close, High, Low prices and Volume respectively. So the total capital invested into\na coin at any time is:\n\n```(Current Capital)*(Weight of the capital invested)```\n\n### Action Space\n\nAction space is a single scalar between -1 and 1, which represents the percentage of the capital\nthat the agent has invested into the currency at the last time step.\n\n-1 representing a full short position and 1 representing a full long position.\n\n### Rewards\n\nThe reward is defined as the total amount of capital that has been gained/lost for that time-step.\nThis number includes the return on the investment as well as the transaction costs.\n\n#### Usage\n\nIn order to train the agent, the enviroment first has to be configured. This example shows how to handle the\ntraining and testing of the agents:\n\n```python\nimport gym\nfrom gym_crypto import configs\n\nenv = gym.make(\"gym-crypto-v0\")\nenv.configure_env(**configs.DEFAULT_CONFIG)\n\n### Train an agent on the environment\n\ntest_config = configs.DEFAULT_CONFIG.update({'start_date':'2019-01-01', 'end_date':'2019-06-01'})\nenv.configure_env(**test_config)\n\ndone = False\nobservation = env.reset()\n\nwhile not done:\n action = agent.predict(observation)\n observation, _, done, _ = env.step(action)\n\nreturns, weights = env.render()\n```\n\nTo get some results from the agent, a ```env.render()``` needs to be called, which will return\nthe capital returns as the first variable and weight allocation as the second variable. More detailed\nresults will be coming in the future.\n\n#### Data\n\nTo futher inspect the data two methods can be called from the ```data_utils``` module.\n\n```python\nfrom gym_crypto.data_utils.data_utils import *\n\ncurrencies = get_avaliable_currencies()\nfull_data = read_data('BTC')\n```\n\nAll data was obtained from the Bitfinex API.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dema-u/gym-crypto", "keywords": "RL,OpenAI,Gym", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gym-crypto", "package_url": "https://pypi.org/project/gym-crypto/", "platform": "", "project_url": "https://pypi.org/project/gym-crypto/", "project_urls": { "Homepage": "https://github.com/dema-u/gym-crypto" }, "release_url": "https://pypi.org/project/gym-crypto/0.0.4/", "requires_dist": [ "gym", "pandas", "numpy" ], "requires_python": "", "summary": "Reinforcement Learning OpenAI Gym environment for crypto-currency trading.", "version": "0.0.4", "yanked": false, "yanked_reason": null }, "last_serial": 6040585, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "adc5350b8364ed0ad9c62965f68cc1ec", "sha256": "3f2fded79ec279bc03674c344458d2582bd1ede16ab65c135b741cab92f49ddb" }, "downloads": -1, "filename": "gym-crypto-0.0.1.tar.gz", "has_sig": false, "md5_digest": "adc5350b8364ed0ad9c62965f68cc1ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1349, "upload_time": "2019-10-23T20:53:49", "upload_time_iso_8601": "2019-10-23T20:53:49.232436Z", "url": "https://files.pythonhosted.org/packages/21/fb/eeea811fd26583c4617d75158013175410c0b0692011e91f604b52c57b70/gym-crypto-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "124cfd721c8a702da994d4b3a74fdca0", "sha256": "90d2a534dd397a5030fe3447aa879a98f23ed1f2d6b66bf8fb6fb94148061186" }, "downloads": -1, "filename": "gym_crypto-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "124cfd721c8a702da994d4b3a74fdca0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3266, "upload_time": "2019-10-24T12:41:14", "upload_time_iso_8601": "2019-10-24T12:41:14.576948Z", "url": "https://files.pythonhosted.org/packages/0c/14/40fee02a8a11feda796e7289905c8907bef7aaceb363b788ce9a46e461dc/gym_crypto-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "71322c1613842996a7a8c2f747d22fc2", "sha256": "682770438b163c95f32e2402798eec30be4f37793b1c99cd8d4bed903f86284f" }, "downloads": -1, "filename": "gym-crypto-0.0.2.tar.gz", "has_sig": false, "md5_digest": "71322c1613842996a7a8c2f747d22fc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2309, "upload_time": "2019-10-24T12:41:16", "upload_time_iso_8601": "2019-10-24T12:41:16.144705Z", "url": "https://files.pythonhosted.org/packages/07/b3/f39ef6c263faf71b2a582b9a1f63eb377c7767634bdf5cc161f351764682/gym-crypto-0.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "136c26d24eceb31ef6c28ddac4c074d1", "sha256": "dbbafeb8763d170c5d82e532c9b6dbadde1b469508ffc7ee9646f204509ebaa4" }, "downloads": -1, "filename": "gym_crypto-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "136c26d24eceb31ef6c28ddac4c074d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7006, "upload_time": "2019-10-24T13:15:53", "upload_time_iso_8601": "2019-10-24T13:15:53.875427Z", "url": "https://files.pythonhosted.org/packages/28/9f/818258c54d585b22a5f3337100e6fb7ac964c045cf6021eb3c52b111bc65/gym_crypto-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "ae61a5e0fdd9680a7d77ade88796b013", "sha256": "ad9c65873be6cce25c15e20c367dd7571d1d85e29a5663b4569f6f364574b8ef" }, "downloads": -1, "filename": "gym-crypto-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ae61a5e0fdd9680a7d77ade88796b013", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3010016, "upload_time": "2019-10-24T13:16:01", "upload_time_iso_8601": "2019-10-24T13:16:01.021578Z", "url": "https://files.pythonhosted.org/packages/5a/3f/ef06cb56787088db02367daca6955ff5882299b5609b674de01845c9fa54/gym-crypto-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "64d50969679d19dfc98969478fb2db80", "sha256": "c032e207bb5f45af4964e36353faf9473f053b9e143428e09fb8b3f58edfaccb" }, "downloads": -1, "filename": "gym_crypto-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "64d50969679d19dfc98969478fb2db80", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3797095, "upload_time": "2019-10-28T10:27:52", "upload_time_iso_8601": "2019-10-28T10:27:52.608402Z", "url": "https://files.pythonhosted.org/packages/29/6c/44c793fb97e5e7f08f28721a48a1980a48f812d0fc613062e6f31178991d/gym_crypto-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "bec566dfb70bd1d5cfb7b7fafcb4959e", "sha256": "2389b338d528c0a84c679dbb02f5e9fae07aa73c067e4e589249577bf56799dc" }, "downloads": -1, "filename": "gym-crypto-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bec566dfb70bd1d5cfb7b7fafcb4959e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3777624, "upload_time": "2019-10-28T10:27:59", "upload_time_iso_8601": "2019-10-28T10:27:59.074066Z", "url": "https://files.pythonhosted.org/packages/ed/34/83078f95f6ae277488001cd66fd8bc89cb67b7291a2ad3f09406689772f7/gym-crypto-0.0.4.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "64d50969679d19dfc98969478fb2db80", "sha256": "c032e207bb5f45af4964e36353faf9473f053b9e143428e09fb8b3f58edfaccb" }, "downloads": -1, "filename": "gym_crypto-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "64d50969679d19dfc98969478fb2db80", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3797095, "upload_time": "2019-10-28T10:27:52", "upload_time_iso_8601": "2019-10-28T10:27:52.608402Z", "url": "https://files.pythonhosted.org/packages/29/6c/44c793fb97e5e7f08f28721a48a1980a48f812d0fc613062e6f31178991d/gym_crypto-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "bec566dfb70bd1d5cfb7b7fafcb4959e", "sha256": "2389b338d528c0a84c679dbb02f5e9fae07aa73c067e4e589249577bf56799dc" }, "downloads": -1, "filename": "gym-crypto-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bec566dfb70bd1d5cfb7b7fafcb4959e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3777624, "upload_time": "2019-10-28T10:27:59", "upload_time_iso_8601": "2019-10-28T10:27:59.074066Z", "url": "https://files.pythonhosted.org/packages/ed/34/83078f95f6ae277488001cd66fd8bc89cb67b7291a2ad3f09406689772f7/gym-crypto-0.0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }