{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/deep-reinforcement-learning-for-1","title":"Deep Reinforcement Learning for Cryptocurrency Trading: Practical Approach to Address Backtest Overfitting","arxiv_id":"2209.05559","date":"2022-09-12","proceeding":null,"authors":["Berend Jelmer Dirk Gort","Xiao-Yang Liu","Xinghang Sun","Jiechao Gao","Shuaiyu Chen","Christina Dan Wang"],"abstract":"Designing profitable and reliable trading strategies is challenging in the highly volatile cryptocurrency market. Existing works applied deep reinforcement learning methods and optimistically reported increased profits in backtesting, which may suffer from the false positive issue due to overfitting. In this paper, we propose a practical approach to address backtest overfitting for cryptocurrency trading using deep reinforcement learning. First, we formulate the detection of backtest overfitting as a hypothesis test. Then, we train the DRL agents, estimate the probability of overfitting, and reject the overfitted agents, increasing the chance of good trading performance. Finally, on 10 cryptocurrencies over a testing period from 05/01/2022 to 06/27/2022 (during which the crypto market crashed two times), we show that the less overfitted deep reinforcement learning agents have a higher return than that of more overfitted agents, an equal weight strategy, and the S&P DBM Index (market benchmark), offering confidence in possible deployment to a real market.","url_abs":"https://arxiv.org/abs/2209.05559v6","url_pdf":"https://arxiv.org/pdf/2209.05559v6.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"deep-reinforcement-learning-for-1","repo_url":"https://github.com/Burntt/FinRL_Crypto","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"algorithmic-trading","task_name":"Algorithmic Trading"},{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2209.05559","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.05559"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Burntt/FinRL_Crypto","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":13},"by_repo_kind":{"listed":{"samples":13,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9c3fe6a9374df75e","entry":"add_samples_equify_array_length","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"5_pbo.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/5_pbo.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c3fe6a9374df75e"}},{"code_sha256_prefix":"bfcd8b95a88a92f8","entry":"calculate_start_end_dates","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"config_main.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/config_main.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bfcd8b95a88a92f8"}},{"code_sha256_prefix":"bd9ff206dbed2b00","entry":"compute_fold_bounds","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"function_CPCV.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/function_CPCV.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd9ff206dbed2b00"}},{"code_sha256_prefix":"84d4e470e8c98400","entry":"embargo","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"function_CPCV.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/function_CPCV.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"84d4e470e8c98400"}},{"code_sha256_prefix":"53ddf63ca4975d48","entry":"load_saved_data","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"1_optimize_cpcv.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/1_optimize_cpcv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"53ddf63ca4975d48"}},{"code_sha256_prefix":"a4b0cde717d5aa81","entry":"load_validated_model","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"4_backtest.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/4_backtest.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a4b0cde717d5aa81"}},{"code_sha256_prefix":"b56a679309a89ea6","entry":"load_validated_model","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"5_pbo.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/5_pbo.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b56a679309a89ea6"}},{"code_sha256_prefix":"e84ca249d84ebfb7","entry":"main_metric_pbo_analysis","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"5_pbo.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/5_pbo.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e84ca249d84ebfb7"}},{"code_sha256_prefix":"9a79d1f3fd9c514a","entry":"nCr","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"config_main.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/config_main.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9a79d1f3fd9c514a"}},{"code_sha256_prefix":"e6e6d9ed0b7aea01","entry":"purge","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"function_CPCV.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/function_CPCV.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6e6d9ed0b7aea01"}},{"code_sha256_prefix":"22b9e09cfef8550b","entry":"sample_hyperparams","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"1_optimize_cpcv.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/1_optimize_cpcv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"22b9e09cfef8550b"}},{"code_sha256_prefix":"2e0561841040a252","entry":"set_Pandas_Timedelta","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"1_optimize_cpcv.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/1_optimize_cpcv.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2e0561841040a252"}},{"code_sha256_prefix":"83a988b7d6e02ef9","entry":"set_Pandas_Timedelta","repo":"Burntt/FinRL_Crypto","repo_kind":"listed","path":"1_optimize_wf.py","file_url":"https://github.com/Burntt/FinRL_Crypto/blob/HEAD/1_optimize_wf.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83a988b7d6e02ef9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}