{"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/alphafin-benchmarking-financial-analysis-with","title":"AlphaFin: Benchmarking Financial Analysis with Retrieval-Augmented Stock-Chain Framework","arxiv_id":"2403.12582","date":"2024-03-19","proceeding":null,"authors":["Xiang Li","Zhenyu Li","Chen Shi","Yong Xu","Qing Du","Mingkui Tan","Jun Huang","Wei Lin"],"abstract":"The task of financial analysis primarily encompasses two key areas: stock trend prediction and the corresponding financial question answering. Currently, machine learning and deep learning algorithms (ML&DL) have been widely applied for stock trend predictions, leading to significant progress. However, these methods fail to provide reasons for predictions, lacking interpretability and reasoning processes. Also, they can not integrate textual information such as financial news or reports. Meanwhile, large language models (LLMs) have remarkable textual understanding and generation ability. But due to the scarcity of financial training datasets and limited integration with real-time knowledge, LLMs still suffer from hallucinations and are unable to keep up with the latest information. To tackle these challenges, we first release AlphaFin datasets, combining traditional research datasets, real-time financial data, and handwritten chain-of-thought (CoT) data. It has a positive impact on training LLMs for completing financial analysis. We then use AlphaFin datasets to benchmark a state-of-the-art method, called Stock-Chain, for effectively tackling the financial analysis task, which integrates retrieval-augmented generation (RAG) techniques. Extensive experiments are conducted to demonstrate the effectiveness of our framework on financial analysis.","url_abs":"https://arxiv.org/abs/2403.12582v1","url_pdf":"https://arxiv.org/pdf/2403.12582v1.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":"alphafin-benchmarking-financial-analysis-with","repo_url":"https://github.com/alphafin-proj/alphafin","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"financial-analysis","task_name":"Financial Analysis"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"rag","task_name":"RAG"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"},{"task_slug":"stock-trend-prediction","task_name":"Stock Trend Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.12582","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.12582"}},"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/alphafin-proj/alphafin","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":"ead545623508d83f","entry":"ChatGLMPrompt","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/stockgpt_inf.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/stockgpt_inf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ead545623508d83f"}},{"code_sha256_prefix":"2248cd4dec2910c0","entry":"func_KDJ","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/utils.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2248cd4dec2910c0"}},{"code_sha256_prefix":"6b6675f9754b292b","entry":"getGtUpDown","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/dataprocess_stockgpt.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/dataprocess_stockgpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b6675f9754b292b"}},{"code_sha256_prefix":"3152b4abfc0fdf19","entry":"getPredUpDownLoose","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/dataprocess_stockgpt.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/dataprocess_stockgpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3152b4abfc0fdf19"}},{"code_sha256_prefix":"4f97d2c0dc39c95a","entry":"getPredUpDownStrict","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/dataprocess_stockgpt.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/dataprocess_stockgpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f97d2c0dc39c95a"}},{"code_sha256_prefix":"b36a61737dc8ac84","entry":"get_close_data","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/utils.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/utils.py","link_basis":"first_harvest_node","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":"b36a61737dc8ac84"}},{"code_sha256_prefix":"d7adeac35a649b32","entry":"get_ret_stats","repo":"alphafin-proj/alphafin","repo_kind":"official","path":"src/stage1_trend_prediction/utils.py","file_url":"https://github.com/alphafin-proj/alphafin/blob/HEAD/src/stage1_trend_prediction/utils.py","link_basis":"first_harvest_node","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":"d7adeac35a649b32"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}