-
FinRobot: An Open-Source AI Agent Platform for Financial Applications using Large Language Models
Authors:
Hongyang Yang,
Boyu Zhang,
Neng Wang,
Cheng Guo,
Xiaoli Zhang,
Likun Lin,
Junlin Wang,
Tianyu Zhou,
Mao Guan,
Runjia Zhang,
Christina Dan Wang
Abstract:
As financial institutions and professionals increasingly incorporate Large Language Models (LLMs) into their workflows, substantial barriers, including proprietary data and specialized knowledge, persist between the finance sector and the AI community. These challenges impede the AI community's ability to enhance financial tasks effectively. Acknowledging financial analysis's critical role, we aim…
▽ More
As financial institutions and professionals increasingly incorporate Large Language Models (LLMs) into their workflows, substantial barriers, including proprietary data and specialized knowledge, persist between the finance sector and the AI community. These challenges impede the AI community's ability to enhance financial tasks effectively. Acknowledging financial analysis's critical role, we aim to devise financial-specialized LLM-based toolchains and democratize access to them through open-source initiatives, promoting wider AI adoption in financial decision-making. In this paper, we introduce FinRobot, a novel open-source AI agent platform supporting multiple financially specialized AI agents, each powered by LLM. Specifically, the platform consists of four major layers: 1) the Financial AI Agents layer that formulates Financial Chain-of-Thought (CoT) by breaking sophisticated financial problems down into logical sequences; 2) the Financial LLM Algorithms layer dynamically configures appropriate model application strategies for specific tasks; 3) the LLMOps and DataOps layer produces accurate models by applying training/fine-tuning techniques and using task-relevant data; 4) the Multi-source LLM Foundation Models layer that integrates various LLMs and enables the above layers to access them directly. Finally, FinRobot provides hands-on for both professional-grade analysts and laypersons to utilize powerful AI techniques for advanced financial analysis. We open-source FinRobot at \url{https://github.com/AI4Finance-Foundation/FinRobot}.
△ Less
Submitted 27 May, 2024; v1 submitted 23 May, 2024;
originally announced May 2024.
-
Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models
Authors:
Boyu Zhang,
Hongyang Yang,
Tianyu Zhou,
Ali Babar,
Xiao-Yang Liu
Abstract:
Financial sentiment analysis is critical for valuation and investment decision-making. Traditional NLP models, however, are limited by their parameter size and the scope of their training datasets, which hampers their generalization capabilities and effectiveness in this field. Recently, Large Language Models (LLMs) pre-trained on extensive corpora have demonstrated superior performance across var…
▽ More
Financial sentiment analysis is critical for valuation and investment decision-making. Traditional NLP models, however, are limited by their parameter size and the scope of their training datasets, which hampers their generalization capabilities and effectiveness in this field. Recently, Large Language Models (LLMs) pre-trained on extensive corpora have demonstrated superior performance across various NLP tasks due to their commendable zero-shot abilities. Yet, directly applying LLMs to financial sentiment analysis presents challenges: The discrepancy between the pre-training objective of LLMs and predicting the sentiment label can compromise their predictive performance. Furthermore, the succinct nature of financial news, often devoid of sufficient context, can significantly diminish the reliability of LLMs' sentiment analysis. To address these challenges, we introduce a retrieval-augmented LLMs framework for financial sentiment analysis. This framework includes an instruction-tuned LLMs module, which ensures LLMs behave as predictors of sentiment labels, and a retrieval-augmentation module which retrieves additional context from reliable external sources. Benchmarked against traditional models and LLMs like ChatGPT and LLaMA, our approach achieves 15\% to 48\% performance gain in accuracy and F1 score.
△ Less
Submitted 4 November, 2023; v1 submitted 6 October, 2023;
originally announced October 2023.
-
Instruct-FinGPT: Financial Sentiment Analysis by Instruction Tuning of General-Purpose Large Language Models
Authors:
Boyu Zhang,
Hongyang Yang,
Xiao-Yang Liu
Abstract:
Sentiment analysis is a vital tool for uncovering insights from financial articles, news, and social media, sha** our understanding of market movements. Despite the impressive capabilities of large language models (LLMs) in financial natural language processing (NLP), they still struggle with accurately interpreting numerical values and gras** financial context, limiting their effectiveness in…
▽ More
Sentiment analysis is a vital tool for uncovering insights from financial articles, news, and social media, sha** our understanding of market movements. Despite the impressive capabilities of large language models (LLMs) in financial natural language processing (NLP), they still struggle with accurately interpreting numerical values and gras** financial context, limiting their effectiveness in predicting financial sentiment. In this paper, we introduce a simple yet effective instruction tuning approach to address these issues. By transforming a small portion of supervised financial sentiment analysis data into instruction data and fine-tuning a general-purpose LLM with this method, we achieve remarkable advancements in financial sentiment analysis. In the experiment, our approach outperforms state-of-the-art supervised sentiment analysis models, as well as widely used LLMs like ChatGPT and LLaMAs, particularly in scenarios where numerical understanding and contextual comprehension are vital.
△ Less
Submitted 21 June, 2023;
originally announced June 2023.
-
Mastering Pair Trading with Risk-Aware Recurrent Reinforcement Learning
Authors:
Weiguang Han,
Jimin Huang,
Qianqian Xie,
Boyi Zhang,
Yanzhao Lai,
Min Peng
Abstract:
Although pair trading is the simplest hedging strategy for an investor to eliminate market risk, it is still a great challenge for reinforcement learning (RL) methods to perform pair trading as human expertise. It requires RL methods to make thousands of correct actions that nevertheless have no obvious relations to the overall trading profit, and to reason over infinite states of the time-varying…
▽ More
Although pair trading is the simplest hedging strategy for an investor to eliminate market risk, it is still a great challenge for reinforcement learning (RL) methods to perform pair trading as human expertise. It requires RL methods to make thousands of correct actions that nevertheless have no obvious relations to the overall trading profit, and to reason over infinite states of the time-varying market most of which have never appeared in history. However, existing RL methods ignore the temporal connections between asset price movements and the risk of the performed trading. These lead to frequent tradings with high transaction costs and potential losses, which barely reach the human expertise level of trading. Therefore, we introduce CREDIT, a risk-aware agent capable of learning to exploit long-term trading opportunities in pair trading similar to a human expert. CREDIT is the first to apply bidirectional GRU along with the temporal attention mechanism to fully consider the temporal correlations embedded in the states, which allows CREDIT to capture long-term patterns of the price movements of two assets to earn higher profit. We also design the risk-aware reward inspired by the economic theory, that models both the profit and risk of the tradings during the trading period. It helps our agent to master pair trading with a robust trading preference that avoids risky trading with possible high returns and losses. Experiments show that it outperforms existing reinforcement learning methods in pair trading and achieves a significant profit over five years of U.S. stock data.
△ Less
Submitted 1 April, 2023;
originally announced April 2023.
-
Select and Trade: Towards Unified Pair Trading with Hierarchical Reinforcement Learning
Authors:
Weiguang Han,
Boyi Zhang,
Qianqian Xie,
Min Peng,
Yanzhao Lai,
Jimin Huang
Abstract:
Pair trading is one of the most effective statistical arbitrage strategies which seeks a neutral profit by hedging a pair of selected assets. Existing methods generally decompose the task into two separate steps: pair selection and trading. However, the decoupling of two closely related subtasks can block information propagation and lead to limited overall performance. For pair selection, ignoring…
▽ More
Pair trading is one of the most effective statistical arbitrage strategies which seeks a neutral profit by hedging a pair of selected assets. Existing methods generally decompose the task into two separate steps: pair selection and trading. However, the decoupling of two closely related subtasks can block information propagation and lead to limited overall performance. For pair selection, ignoring the trading performance results in the wrong assets being selected with irrelevant price movements, while the agent trained for trading can overfit to the selected assets without any historical information of other assets. To address it, in this paper, we propose a paradigm for automatic pair trading as a unified task rather than a two-step pipeline. We design a hierarchical reinforcement learning framework to jointly learn and optimize two subtasks. A high-level policy would select two assets from all possible combinations and a low-level policy would then perform a series of trading actions. Experimental results on real-world stock data demonstrate the effectiveness of our method on pair trading compared with both existing pair selection and trading methods.
△ Less
Submitted 5 February, 2023; v1 submitted 25 January, 2023;
originally announced January 2023.
-
Efficient and Accurate Calibration to FX Market Skew with Fully Parameterized Local Volatility Model
Authors:
Dongli Wu,
Bufan Zhang,
Xiao Lin
Abstract:
When trading American and Asian options in the FX derivatives market, banks must calculate prices using a complex mathematical model. It is often observed that different models produce varying prices for the same exotic option, which violates the non-arbitrage requirement of derivative risk management. To address this issue, we have studied a fully parameterized local volatility model for pricing…
▽ More
When trading American and Asian options in the FX derivatives market, banks must calculate prices using a complex mathematical model. It is often observed that different models produce varying prices for the same exotic option, which violates the non-arbitrage requirement of derivative risk management. To address this issue, we have studied a fully parameterized local volatility model for pricing American/Asian options. This model, when implemented using a grid or Monte-Carlo numerical method, can be efficiently and accurately calibrated to FX market skew volatilities. As a result, the model can provide reliable prices for exotic options during daily trading activities.
△ Less
Submitted 21 April, 2023; v1 submitted 22 November, 2022;
originally announced November 2022.
-
On the Aggregation of Probability Assessments: Regularized Mixtures of Predictive Densities for Eurozone Inflation and Real Interest Rates
Authors:
Francis X. Diebold,
Minchul Shin,
Boyuan Zhang
Abstract:
We propose methods for constructing regularized mixtures of density forecasts. We explore a variety of objectives and regularization penalties, and we use them in a substantive exploration of Eurozone inflation and real interest rate density forecasts. All individual inflation forecasters (even the ex post best forecaster) are outperformed by our regularized mixtures. From the Great Recession onwa…
▽ More
We propose methods for constructing regularized mixtures of density forecasts. We explore a variety of objectives and regularization penalties, and we use them in a substantive exploration of Eurozone inflation and real interest rate density forecasts. All individual inflation forecasters (even the ex post best forecaster) are outperformed by our regularized mixtures. From the Great Recession onward, the optimal regularization tends to move density forecasts' probability mass from the centers to the tails, correcting for overconfidence.
△ Less
Submitted 30 June, 2022; v1 submitted 21 December, 2020;
originally announced December 2020.