{"id":21970210,"url":"https://github.com/pandede/fdrnn","last_synced_at":"2025-04-28T11:20:50.591Z","repository":{"id":166909259,"uuid":"297293486","full_name":"Pandede/FDRNN","owner":"Pandede","description":"Deep direct reinforcement learning for financial signal representation and trading","archived":false,"fork":false,"pushed_at":"2020-10-07T10:10:08.000Z","size":28,"stargazers_count":28,"open_issues_count":0,"forks_count":14,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T09:05:13.918Z","etag":null,"topics":["deep-learning","fdrnn","finance","neural-network","reinforcement-learning","trading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pandede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-21T09:36:54.000Z","updated_at":"2025-03-10T17:25:30.000Z","dependencies_parsed_at":"2023-05-21T16:30:27.129Z","dependency_job_id":null,"html_url":"https://github.com/Pandede/FDRNN","commit_stats":null,"previous_names":["pandede/fdrnn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pandede%2FFDRNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pandede%2FFDRNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pandede%2FFDRNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pandede%2FFDRNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pandede","download_url":"https://codeload.github.com/Pandede/FDRNN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251302769,"owners_count":21567601,"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":["deep-learning","fdrnn","finance","neural-network","reinforcement-learning","trading"],"created_at":"2024-11-29T14:38:00.629Z","updated_at":"2025-04-28T11:20:50.580Z","avatar_url":"https://github.com/Pandede.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FDRNN\nImplementing\n```Deng, Y., Bao, F., Kong, Y., Ren, Z., \u0026 Dai, Q. (2016). Deep direct reinforcement learning for financial signal representation and trading. IEEE transactions on neural networks and learning systems, 28(3), 653-664.```\n\n## Preparation\n1. Prepare the index data as **CSV** file. The file must include column *CloseDiff*, which represents the index difference\n    `CloseDiff[t] = Index[t] - Index[t-1]`. The CSV files must arrange as following directory structure:\n    ```\n   +-- Data\n   |    +-- futures\n   |    |   +-- future_2018-01-01.csv\n   |    |   +-- future_2018-01-02.csv\n   |    |   +-- ...\n   ```\n2. To reduce the training time, it is **strongly recommended** that computing the parameters of fuzzy representation before training. The vanilla index file can be transformed into fuzzy version via applying `FuzzyStreamer` in `handler.py`.\n    ```python\n   from handler import FuzzyStreamer\n   #streamer = FuzzyStreamer(\u003cwindow size\u003e, \u003cfuzzy degree\u003e)\n   streamer = FuzzyStreamer(lag, fuzzy_degree)\n   # streamer.transform(\u003cfolder of original index files\u003e, \u003cfolder of fuzzy index files\u003e)\n   streamer = streamer.transform('./Data/futures/train', './Data/fuzzy_futures/train')\n   ```\n3. Adjust the required parameters in `config.ini`\n    ```ini\n    [default]\n    # Number of training epochs\n    epochs = 1000\n    # Save the model each n epochs\n    save_per_epoch = 20\n    # Transaction cost\n    c = 0.05\n    # Window size\n    lag = 50\n    # Data path\n    data_src = ./Data\n    # Log path\n    log_src = ./Pickle\n    \n    [fddrl]\n    fuzzy_degree = 3\n    ```\n   \n## Run\nRunning FDRNN - The proposed method in the paper\n\n`python main.py`\n\nRunning baseline DDRL - The proposed model without fuzzy representation\n\n`python baseline_ddrl.py`\n\nRunning baseline DRL - The proposed method without fuzzy representation and autoencoder\n\n`python baseline_drl.py`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandede%2Ffdrnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandede%2Ffdrnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandede%2Ffdrnn/lists"}