-
Deficiency of Large Language Models in Finance: An Empirical Examination of Hallucination
Authors:
Haoqiang Kang,
Xiao-Yang Liu
Abstract:
The hallucination issue is recognized as a fundamental deficiency of large language models (LLMs), especially when applied to fields such as finance, education, and law. Despite the growing concerns, there has been a lack of empirical investigation. In this paper, we provide an empirical examination of LLMs' hallucination behaviors in financial tasks. First, we empirically investigate LLM model's…
▽ More
The hallucination issue is recognized as a fundamental deficiency of large language models (LLMs), especially when applied to fields such as finance, education, and law. Despite the growing concerns, there has been a lack of empirical investigation. In this paper, we provide an empirical examination of LLMs' hallucination behaviors in financial tasks. First, we empirically investigate LLM model's ability of explaining financial concepts and terminologies. Second, we assess LLM models' capacity of querying historical stock prices. Third, to alleviate the hallucination issue, we evaluate the efficacy of four practical methods, including few-shot learning, Decoding by Contrasting Layers (DoLa), the Retrieval Augmentation Generation (RAG) method and the prompt-based tool learning method for a function to generate a query command. Finally, our major finding is that off-the-shelf LLMs experience serious hallucination behaviors in financial tasks. Therefore, there is an urgent need to call for research efforts in mitigating LLMs' hallucination.
△ Less
Submitted 27 November, 2023;
originally announced November 2023.
-
Can GPT models be Financial Analysts? An Evaluation of ChatGPT and GPT-4 on mock CFA Exams
Authors:
Ethan Callanan,
Amarachi Mbakwe,
Antony Papadimitriou,
Yulong Pei,
Mathieu Sibue,
Xiaodan Zhu,
Zhiqiang Ma,
Xiaomo Liu,
Sameena Shah
Abstract:
Large Language Models (LLMs) have demonstrated remarkable performance on a wide range of Natural Language Processing (NLP) tasks, often matching or even beating state-of-the-art task-specific models. This study aims at assessing the financial reasoning capabilities of LLMs. We leverage mock exam questions of the Chartered Financial Analyst (CFA) Program to conduct a comprehensive evaluation of Cha…
▽ More
Large Language Models (LLMs) have demonstrated remarkable performance on a wide range of Natural Language Processing (NLP) tasks, often matching or even beating state-of-the-art task-specific models. This study aims at assessing the financial reasoning capabilities of LLMs. We leverage mock exam questions of the Chartered Financial Analyst (CFA) Program to conduct a comprehensive evaluation of ChatGPT and GPT-4 in financial analysis, considering Zero-Shot (ZS), Chain-of-Thought (CoT), and Few-Shot (FS) scenarios. We present an in-depth analysis of the models' performance and limitations, and estimate whether they would have a chance at passing the CFA exams. Finally, we outline insights into potential strategies and improvements to enhance the applicability of LLMs in finance. In this perspective, we hope this work paves the way for future studies to continue enhancing LLMs for financial reasoning through rigorous evaluation.
△ Less
Submitted 12 October, 2023;
originally announced October 2023.
-
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.
-
DeRisk: An Effective Deep Learning Framework for Credit Risk Prediction over Real-World Financial Data
Authors:
Yancheng Liang,
Jiajie Zhang,
Hui Li,
Xiaochen Liu,
Yi Hu,
Yong Wu,
**yao Zhang,
Yongyan Liu,
Yi Wu
Abstract:
Despite the tremendous advances achieved over the past years by deep learning techniques, the latest risk prediction models for industrial applications still rely on highly handtuned stage-wised statistical learning tools, such as gradient boosting and random forest methods. Different from images or languages, real-world financial data are high-dimensional, sparse, noisy and extremely imbalanced,…
▽ More
Despite the tremendous advances achieved over the past years by deep learning techniques, the latest risk prediction models for industrial applications still rely on highly handtuned stage-wised statistical learning tools, such as gradient boosting and random forest methods. Different from images or languages, real-world financial data are high-dimensional, sparse, noisy and extremely imbalanced, which makes deep neural network models particularly challenging to train and fragile in practice. In this work, we propose DeRisk, an effective deep learning risk prediction framework for credit risk prediction on real-world financial data. DeRisk is the first deep risk prediction model that outperforms statistical learning approaches deployed in our company's production system. We also perform extensive ablation studies on our method to present the most critical factors for the empirical success of DeRisk.
△ Less
Submitted 7 August, 2023;
originally announced August 2023.
-
FinGPT: Democratizing Internet-scale Data for Financial Large Language Models
Authors:
Xiao-Yang Liu,
Guoxuan Wang,
Hongyang Yang,
Daochen Zha
Abstract:
Large language models (LLMs) have demonstrated remarkable proficiency in understanding and generating human-like texts, which may potentially revolutionize the finance industry. However, existing LLMs often fall short in the financial field, which is mainly attributed to the disparities between general text data and financial text data. Unfortunately, there is only a limited number of financial te…
▽ More
Large language models (LLMs) have demonstrated remarkable proficiency in understanding and generating human-like texts, which may potentially revolutionize the finance industry. However, existing LLMs often fall short in the financial field, which is mainly attributed to the disparities between general text data and financial text data. Unfortunately, there is only a limited number of financial text datasets available, and BloombergGPT, the first financial LLM (FinLLM), is close-sourced (only the training logs were released). In light of this, we aim to democratize Internet-scale financial data for LLMs, which is an open challenge due to diverse data sources, low signal-to-noise ratio, and high time-validity. To address the challenges, we introduce an open-sourced and data-centric framework, Financial Generative Pre-trained Transformer (FinGPT), that automates the collection and curation of real-time financial data from 34 diverse sources on the Internet, providing researchers and practitioners with accessible and transparent resources to develop their FinLLMs. Additionally, we propose a simple yet effective strategy for fine-tuning FinLLM using the inherent feedback from the market, dubbed Reinforcement Learning with Stock Prices (RLSP). We also adopt the Low-rank Adaptation (LoRA, QLoRA) method that enables users to customize their own FinLLMs from general-purpose LLMs at a low cost. Finally, we showcase several FinGPT applications, including robo-advisor, sentiment analysis for algorithmic trading, and low-code development. FinGPT aims to democratize FinLLMs, stimulate innovation, and unlock new opportunities in open finance. The codes have been open-sourced.
△ Less
Submitted 14 November, 2023; v1 submitted 19 July, 2023;
originally announced July 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.
-
FinGPT: Open-Source Financial Large Language Models
Authors:
Hongyang Yang,
Xiao-Yang Liu,
Christina Dan Wang
Abstract:
Large language models (LLMs) have shown the potential of revolutionizing natural language processing tasks in diverse domains, sparking great interest in finance. Accessing high-quality financial data is the first challenge for financial LLMs (FinLLMs). While proprietary models like BloombergGPT have taken advantage of their unique data accumulation, such privileged access calls for an open-source…
▽ More
Large language models (LLMs) have shown the potential of revolutionizing natural language processing tasks in diverse domains, sparking great interest in finance. Accessing high-quality financial data is the first challenge for financial LLMs (FinLLMs). While proprietary models like BloombergGPT have taken advantage of their unique data accumulation, such privileged access calls for an open-source alternative to democratize Internet-scale financial data.
In this paper, we present an open-source large language model, FinGPT, for the finance sector. Unlike proprietary models, FinGPT takes a data-centric approach, providing researchers and practitioners with accessible and transparent resources to develop their FinLLMs. We highlight the importance of an automatic data curation pipeline and the lightweight low-rank adaptation technique in building FinGPT. Furthermore, we showcase several potential applications as step** stones for users, such as robo-advising, algorithmic trading, and low-code development. Through collaborative efforts within the open-source AI4Finance community, FinGPT aims to stimulate innovation, democratize FinLLMs, and unlock new opportunities in open finance. Two associated code repos are \url{https://github.com/AI4Finance-Foundation/FinGPT} and \url{https://github.com/AI4Finance-Foundation/FinNLP}
△ Less
Submitted 9 June, 2023;
originally announced June 2023.
-
FinRL-Meta: Market Environments and Benchmarks for Data-Driven Financial Reinforcement Learning
Authors:
Xiao-Yang Liu,
Ziyi Xia,
**gyang Rui,
Jiechao Gao,
Hongyang Yang,
Ming Zhu,
Christina Dan Wang,
Zhaoran Wang,
Jian Guo
Abstract:
Finance is a particularly difficult playground for deep reinforcement learning. However, establishing high-quality market environments and benchmarks for financial reinforcement learning is challenging due to three major factors, namely, low signal-to-noise ratio of financial data, survivorship bias of historical data, and model overfitting in the backtesting stage. In this paper, we present an op…
▽ More
Finance is a particularly difficult playground for deep reinforcement learning. However, establishing high-quality market environments and benchmarks for financial reinforcement learning is challenging due to three major factors, namely, low signal-to-noise ratio of financial data, survivorship bias of historical data, and model overfitting in the backtesting stage. In this paper, we present an openly accessible FinRL-Meta library that has been actively maintained by the AI4Finance community. First, following a DataOps paradigm, we will provide hundreds of market environments through an automatic pipeline that collects dynamic datasets from real-world markets and processes them into gym-style market environments. Second, we reproduce popular papers as step** stones for users to design new trading strategies. We also deploy the library on cloud platforms so that users can visualize their own results and assess the relative performance via community-wise competitions. Third, FinRL-Meta provides tens of Jupyter/Python demos organized into a curriculum and a documentation website to serve the rapidly growing community. FinRL-Meta is available at: https://github.com/AI4Finance-Foundation/FinRL-Meta
△ Less
Submitted 6 November, 2022;
originally announced November 2022.
-
Deep Reinforcement Learning for Cryptocurrency Trading: Practical Approach to Address Backtest Overfitting
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…
▽ More
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.
△ Less
Submitted 31 January, 2023; v1 submitted 12 September, 2022;
originally announced September 2022.
-
A Survey of Quantum Computing for Finance
Authors:
Dylan Herman,
Cody Googin,
Xiaoyuan Liu,
Alexey Galda,
Ilya Safro,
Yue Sun,
Marco Pistoia,
Yuri Alexeev
Abstract:
Quantum computers are expected to surpass the computational capabilities of classical computers during this decade and have transformative impact on numerous industry sectors, particularly finance. In fact, finance is estimated to be the first industry sector to benefit from quantum computing, not only in the medium and long terms, but even in the short term. This survey paper presents a comprehen…
▽ More
Quantum computers are expected to surpass the computational capabilities of classical computers during this decade and have transformative impact on numerous industry sectors, particularly finance. In fact, finance is estimated to be the first industry sector to benefit from quantum computing, not only in the medium and long terms, but even in the short term. This survey paper presents a comprehensive summary of the state of the art of quantum computing for financial applications, with particular emphasis on stochastic modeling, optimization, and machine learning, describing how these solutions, adapted to work on a quantum computer, can potentially help to solve financial problems, such as derivative pricing, risk modeling, portfolio optimization, natural language processing, and fraud detection, more efficiently and accurately. We also discuss the feasibility of these algorithms on near-term quantum computers with various hardware implementations and demonstrate how they relate to a wide range of use cases in finance. We hope this article will not only serve as a reference for academic researchers and industry practitioners but also inspire new ideas for future research.
△ Less
Submitted 27 June, 2022; v1 submitted 8 January, 2022;
originally announced January 2022.
-
FinRL-Meta: A Universe of Near-Real Market Environments for Data-Driven Deep Reinforcement Learning in Quantitative Finance
Authors:
Xiao-Yang Liu,
**gyang Rui,
Jiechao Gao,
Liuqing Yang,
Hongyang Yang,
Zhaoran Wang,
Christina Dan Wang,
Jian Guo
Abstract:
Deep reinforcement learning (DRL) has shown huge potentials in building financial market simulators recently. However, due to the highly complex and dynamic nature of real-world markets, raw historical financial data often involve large noise and may not reflect the future of markets, degrading the fidelity of DRL-based market simulators. Moreover, the accuracy of DRL-based market simulators heavi…
▽ More
Deep reinforcement learning (DRL) has shown huge potentials in building financial market simulators recently. However, due to the highly complex and dynamic nature of real-world markets, raw historical financial data often involve large noise and may not reflect the future of markets, degrading the fidelity of DRL-based market simulators. Moreover, the accuracy of DRL-based market simulators heavily relies on numerous and diverse DRL agents, which increases demand for a universe of market environments and imposes a challenge on simulation speed. In this paper, we present a FinRL-Meta framework that builds a universe of market environments for data-driven financial reinforcement learning. First, FinRL-Meta separates financial data processing from the design pipeline of DRL-based strategy and provides open-source data engineering tools for financial big data. Second, FinRL-Meta provides hundreds of market environments for various trading tasks. Third, FinRL-Meta enables multiprocessing simulation and training by exploiting thousands of GPU cores. Our codes are available online at https://github.com/AI4Finance-Foundation/FinRL-Meta.
△ Less
Submitted 2 March, 2022; v1 submitted 13 December, 2021;
originally announced December 2021.
-
FinRL: Deep Reinforcement Learning Framework to Automate Trading in Quantitative Finance
Authors:
Xiao-Yang Liu,
Hongyang Yang,
Jiechao Gao,
Christina Dan Wang
Abstract:
Deep reinforcement learning (DRL) has been envisioned to have a competitive edge in quantitative finance. However, there is a steep development curve for quantitative traders to obtain an agent that automatically positions to win in the market, namely \textit{to decide where to trade, at what price} and \textit{what quantity}, due to the error-prone programming and arduous debugging. In this paper…
▽ More
Deep reinforcement learning (DRL) has been envisioned to have a competitive edge in quantitative finance. However, there is a steep development curve for quantitative traders to obtain an agent that automatically positions to win in the market, namely \textit{to decide where to trade, at what price} and \textit{what quantity}, due to the error-prone programming and arduous debugging. In this paper, we present the first open-source framework \textit{FinRL} as a full pipeline to help quantitative traders overcome the steep learning curve. FinRL is featured with simplicity, applicability and extensibility under the key principles, \textit{full-stack framework, customization, reproducibility} and \textit{hands-on tutoring}.
Embodied as a three-layer architecture with modular structures, FinRL implements fine-tuned state-of-the-art DRL algorithms and common reward functions, while alleviating the debugging workloads. Thus, we help users pipeline the strategy design at a high turnover rate. At multiple levels of time granularity, FinRL simulates various markets as training environments using historical data and live trading APIs. Being highly extensible, FinRL reserves a set of user-import interfaces and incorporates trading constraints such as market friction, market liquidity and investor's risk-aversion. Moreover, serving as practitioners' step** stones, typical trading tasks are provided as step-by-step tutorials, e.g., stock trading, portfolio allocation, cryptocurrency trading, etc.
△ Less
Submitted 6 November, 2021;
originally announced November 2021.
-
FinRL-Podracer: High Performance and Scalable Deep Reinforcement Learning for Quantitative Finance
Authors:
Zechu Li,
Xiao-Yang Liu,
Jiahao Zheng,
Zhaoran Wang,
Anwar Walid,
Jian Guo
Abstract:
Machine learning techniques are playing more and more important roles in finance market investment. However, finance quantitative modeling with conventional supervised learning approaches has a number of limitations. The development of deep reinforcement learning techniques is partially addressing these issues. Unfortunately, the steep learning curve and the difficulty in quick modeling and agile…
▽ More
Machine learning techniques are playing more and more important roles in finance market investment. However, finance quantitative modeling with conventional supervised learning approaches has a number of limitations. The development of deep reinforcement learning techniques is partially addressing these issues. Unfortunately, the steep learning curve and the difficulty in quick modeling and agile development are impeding finance researchers from using deep reinforcement learning in quantitative trading. In this paper, we propose an RLOps in finance paradigm and present a FinRL-Podracer framework to accelerate the development pipeline of deep reinforcement learning (DRL)-driven trading strategy and to improve both trading performance and training efficiency. FinRL-Podracer is a cloud solution that features high performance and high scalability and promises continuous training, continuous integration, and continuous delivery of DRL-driven trading strategies, facilitating a rapid transformation from algorithmic innovations into a profitable trading strategy. First, we propose a generational evolution mechanism with an ensemble strategy to improve the trading performance of a DRL agent, and schedule the training of a DRL algorithm onto a GPU cloud via multi-level map**. Then, we carry out the training of DRL components with high-performance optimizations on GPUs. Finally, we evaluate the FinRL-Podracer framework for a stock trend prediction task on an NVIDIA DGX SuperPOD cloud. FinRL-Podracer outperforms three popular DRL libraries Ray RLlib, Stable Baseline 3 and FinRL, i.e., 12% \sim 35% improvements in annual return, 0.1 \sim 0.6 improvements in Sharpe ratio and 3 times \sim 7 times speed-up in training time. We show the high scalability by training a trading agent in 10 minutes with $80$ A100 GPUs, on NASDAQ-100 constituent stocks with minute-level data over 10 years.
△ Less
Submitted 6 November, 2021;
originally announced November 2021.
-
Explainable Deep Reinforcement Learning for Portfolio Management: An Empirical Approach
Authors:
Mao Guan,
Xiao-Yang Liu
Abstract:
Deep reinforcement learning (DRL) has been widely studied in the portfolio management task. However, it is challenging to understand a DRL-based trading strategy because of the black-box nature of deep neural networks. In this paper, we propose an empirical approach to explain the strategies of DRL agents for the portfolio management task. First, we use a linear model in hindsight as the reference…
▽ More
Deep reinforcement learning (DRL) has been widely studied in the portfolio management task. However, it is challenging to understand a DRL-based trading strategy because of the black-box nature of deep neural networks. In this paper, we propose an empirical approach to explain the strategies of DRL agents for the portfolio management task. First, we use a linear model in hindsight as the reference model, which finds the best portfolio weights by assuming knowing actual stock returns in foresight. In particular, we use the coefficients of a linear model in hindsight as the reference feature weights. Secondly, for DRL agents, we use integrated gradients to define the feature weights, which are the coefficients between reward and features under a linear regression model. Thirdly, we study the prediction power in two cases, single-step prediction and multi-step prediction. In particular, we quantify the prediction power by calculating the linear correlations between the feature weights of a DRL agent and the reference feature weights, and similarly for machine learning methods. Finally, we evaluate a portfolio management task on Dow Jones 30 constituent stocks during 01/01/2009 to 09/01/2021. Our approach empirically reveals that a DRL agent exhibits a stronger multi-step prediction power than machine learning methods.
△ Less
Submitted 18 December, 2021; v1 submitted 7 November, 2021;
originally announced November 2021.
-
FinRL: A Deep Reinforcement Learning Library for Automated Stock Trading in Quantitative Finance
Authors:
Xiao-Yang Liu,
Hongyang Yang,
Qian Chen,
Runjia Zhang,
Liuqing Yang,
Bowen Xiao,
Christina Dan Wang
Abstract:
As deep reinforcement learning (DRL) has been recognized as an effective approach in quantitative finance, getting hands-on experiences is attractive to beginners. However, to train a practical DRL trading agent that decides where to trade, at what price, and what quantity involves error-prone and arduous development and debugging. In this paper, we introduce a DRL library FinRL that facilitates b…
▽ More
As deep reinforcement learning (DRL) has been recognized as an effective approach in quantitative finance, getting hands-on experiences is attractive to beginners. However, to train a practical DRL trading agent that decides where to trade, at what price, and what quantity involves error-prone and arduous development and debugging. In this paper, we introduce a DRL library FinRL that facilitates beginners to expose themselves to quantitative finance and to develop their own stock trading strategies. Along with easily-reproducible tutorials, FinRL library allows users to streamline their own developments and to compare with existing schemes easily. Within FinRL, virtual environments are configured with stock market datasets, trading agents are trained with neural networks, and extensive backtesting is analyzed via trading performance. Moreover, it incorporates important trading constraints such as transaction cost, market liquidity and the investor's degree of risk-aversion. FinRL is featured with completeness, hands-on tutorial and reproducibility that favors beginners: (i) at multiple levels of time granularity, FinRL simulates trading environments across various stock markets, including NASDAQ-100, DJIA, S&P 500, HSI, SSE 50, and CSI 300; (ii) organized in a layered architecture with modular structure, FinRL provides fine-tuned state-of-the-art DRL algorithms (DQN, DDPG, PPO, SAC, A2C, TD3, etc.), commonly-used reward functions and standard evaluation baselines to alleviate the debugging workloads and promote the reproducibility, and (iii) being highly extendable, FinRL reserves a complete set of user-import interfaces. Furthermore, we incorporated three application demonstrations, namely single stock trading, multiple stock trading, and portfolio allocation. The FinRL library will be available on Github at link https://github.com/AI4Finance-LLC/FinRL-Library.
△ Less
Submitted 2 March, 2022; v1 submitted 18 November, 2020;
originally announced November 2020.
-
Knowledge Discovery in Cryptocurrency Transactions: A Survey
Authors:
Xiao Fan Liu,
Xin-Jian Jiang,
Si-Hao Liu,
Chi Kong Tse
Abstract:
Cryptocurrencies gain trust in users by publicly disclosing the full creation and transaction history. In return, the transaction history faithfully records the whole spectrum of cryptocurrency user behaviors. This article analyzes and summarizes the existing research on knowledge discovery in the cryptocurrency transactions using data mining techniques. Specifically, we classify the existing rese…
▽ More
Cryptocurrencies gain trust in users by publicly disclosing the full creation and transaction history. In return, the transaction history faithfully records the whole spectrum of cryptocurrency user behaviors. This article analyzes and summarizes the existing research on knowledge discovery in the cryptocurrency transactions using data mining techniques. Specifically, we classify the existing research into three aspects, i.e., transaction tracings and blockchain address linking, the analyses of collective user behaviors, and the study of individual user behaviors. For each aspect, we present the problems, summarize the methodologies, and discuss major findings in the literature. Furthermore, an enumeration of transaction data parsing and visualization tools and services is also provided. Finally, we outline several future directions in this research area, such as the current rapid development of Decentralized Finance (De-Fi) and digital fiat money.
△ Less
Submitted 2 October, 2020;
originally announced October 2020.
-
Encompassing Tests for Value at Risk and Expected Shortfall Multi-Step Forecasts based on Inference on the Boundary
Authors:
Timo Dimitriadis,
Xiaochun Liu,
Julie Schnaitmann
Abstract:
We propose forecast encompassing tests for the Expected Shortfall (ES) jointly with the Value at Risk (VaR) based on flexible link (or combination) functions. Our setup allows testing encompassing for convex forecast combinations and for link functions which preclude crossings of the combined VaR and ES forecasts. As the tests based on these link functions involve parameters which are on the bound…
▽ More
We propose forecast encompassing tests for the Expected Shortfall (ES) jointly with the Value at Risk (VaR) based on flexible link (or combination) functions. Our setup allows testing encompassing for convex forecast combinations and for link functions which preclude crossings of the combined VaR and ES forecasts. As the tests based on these link functions involve parameters which are on the boundary of the parameter space under the null hypothesis, we derive and base our tests on nonstandard asymptotic theory on the boundary. Our simulation study shows that the encompassing tests based on our new link functions outperform tests based on unrestricted linear link functions for one-step and multi-step forecasts. We further illustrate the potential of the proposed tests in a real data analysis for forecasting VaR and ES of the S&P 500 index.
△ Less
Submitted 15 September, 2020;
originally announced September 2020.
-
Towards Earnings Call and Stock Price Movement
Authors:
Zhiqiang Ma,
Grace Bang,
Chong Wang,
Xiaomo Liu
Abstract:
Earnings calls are hosted by management of public companies to discuss the company's financial performance with analysts and investors. Information disclosed during an earnings call is an essential source of data for analysts and investors to make investment decisions. Thus, we leverage earnings call transcripts to predict future stock price dynamics. We propose to model the language in transcript…
▽ More
Earnings calls are hosted by management of public companies to discuss the company's financial performance with analysts and investors. Information disclosed during an earnings call is an essential source of data for analysts and investors to make investment decisions. Thus, we leverage earnings call transcripts to predict future stock price dynamics. We propose to model the language in transcripts using a deep learning framework, where an attention mechanism is applied to encode the text data into vectors for the discriminative network classifier to predict stock price movements. Our empirical experiments show that the proposed model is superior to the traditional machine learning baselines and earnings call information can boost the stock price prediction performance.
△ Less
Submitted 23 August, 2020;
originally announced September 2020.
-
Neural Network-based Automatic Factor Construction
Authors:
Jie Fang,
Jianwu Lin,
Shutao Xia,
Yong Jiang,
Zhikang Xia,
Xiang Liu
Abstract:
Instead of conducting manual factor construction based on traditional and behavioural finance analysis, academic researchers and quantitative investment managers have leveraged Genetic Programming (GP) as an automatic feature construction tool in recent years, which builds reverse polish mathematical expressions from trading data into new factors. However, with the development of deep learning, mo…
▽ More
Instead of conducting manual factor construction based on traditional and behavioural finance analysis, academic researchers and quantitative investment managers have leveraged Genetic Programming (GP) as an automatic feature construction tool in recent years, which builds reverse polish mathematical expressions from trading data into new factors. However, with the development of deep learning, more powerful feature extraction tools are available. This paper proposes Neural Network-based Automatic Factor Construction (NNAFC), a tailored neural network framework that can automatically construct diversified financial factors based on financial domain knowledge and a variety of neural network structures. The experiment results show that NNAFC can construct more informative and diversified factors than GP, to effectively enrich the current factor pool. For the current market, both fully connected and recurrent neural network structures are better at extracting information from financial time series than convolution neural network structures. Moreover, new factors constructed by NNAFC can always improve the return, Sharpe ratio, and the max draw-down of a multi-factor quantitative investment strategy due to their introducing more information and diversification to the existing factor pool.
△ Less
Submitted 13 October, 2020; v1 submitted 14 August, 2020;
originally announced August 2020.
-
Alpha Discovery Neural Network based on Prior Knowledge
Authors:
Jie Fang,
Shutao Xia,
Jianwu Lin,
Zhikang Xia,
Xiang Liu,
Yong Jiang
Abstract:
Genetic programming (GP) is the state-of-the-art in financial automated feature construction task. It employs reverse polish expression to represent features and then conducts the evolution process. However, with the development of deep learning, more powerful feature extraction tools are available. This paper proposes Alpha Discovery Neural Network (ADNN), a tailored neural network structure whic…
▽ More
Genetic programming (GP) is the state-of-the-art in financial automated feature construction task. It employs reverse polish expression to represent features and then conducts the evolution process. However, with the development of deep learning, more powerful feature extraction tools are available. This paper proposes Alpha Discovery Neural Network (ADNN), a tailored neural network structure which can automatically construct diversified financial technical indicators based on prior knowledge. We mainly made three contributions. First, we use domain knowledge in quantitative trading to design the sampling rules and object function. Second, pre-training and model pruning has been used to replace genetic programming, because it can conduct more efficient evolution process. Third, the feature extractors in ADNN can be replaced by different feature extractors and produce different functions. The experiment results show that ADNN can construct more informative and diversified features than GP, which can effectively enriches the current factor pool. The fully-connected network and recurrent network are better at extracting information from the financial time series than the convolution neural network. In real practice, features constructed by ADNN can always improve multi-factor strategies' revenue, sharpe ratio, and max draw-down, compared with the investment strategies without these factors.
△ Less
Submitted 26 November, 2020; v1 submitted 25 December, 2019;
originally announced December 2019.
-
DP-LSTM: Differential Privacy-inspired LSTM for Stock Prediction Using Financial News
Authors:
Xinyi Li,
Yinchuan Li,
Hongyang Yang,
Liuqing Yang,
Xiao-Yang Liu
Abstract:
Stock price prediction is important for value investments in the stock market. In particular, short-term prediction that exploits financial news articles is promising in recent years. In this paper, we propose a novel deep neural network DP-LSTM for stock price prediction, which incorporates the news articles as hidden information and integrates difference news sources through the differential pri…
▽ More
Stock price prediction is important for value investments in the stock market. In particular, short-term prediction that exploits financial news articles is promising in recent years. In this paper, we propose a novel deep neural network DP-LSTM for stock price prediction, which incorporates the news articles as hidden information and integrates difference news sources through the differential privacy mechanism. First, based on the autoregressive moving average model (ARMA), a sentiment-ARMA is formulated by taking into consideration the information of financial news articles in the model. Then, an LSTM-based deep neural network is designed, which consists of three components: LSTM, VADER model and differential privacy (DP) mechanism. The proposed DP-LSTM scheme can reduce prediction errors and increase the robustness. Extensive experiments on S&P 500 stocks show that (i) the proposed DP-LSTM achieves 0.32% improvement in mean MPA of prediction result, and (ii) for the prediction of the market index S&P 500, we achieve up to 65.79% improvement in MSE.
△ Less
Submitted 19 December, 2019;
originally announced December 2019.
-
Tracking the circulation routes of fresh coins in Bitcoin: A way of identifying coin miners with transaction network structural properties
Authors:
Zeng-Xian Lin,
Xiao Fan Liu
Abstract:
Bitcoin draws the highest degree of attention among cryptocurrencies, while coin mining is one of the most important fashion of profiting in the Bitcoin ecosystem. This paper constructs fresh coin circulation networks by tracking the fresh coin transfer routes with transaction referencing in Bitcoin blockchain. This paper proposes a heuristic algorithm to identifying coin miners by comparing coin…
▽ More
Bitcoin draws the highest degree of attention among cryptocurrencies, while coin mining is one of the most important fashion of profiting in the Bitcoin ecosystem. This paper constructs fresh coin circulation networks by tracking the fresh coin transfer routes with transaction referencing in Bitcoin blockchain. This paper proposes a heuristic algorithm to identifying coin miners by comparing coin circulation networks from different mining pools and thereby inferring the common profit distribution schemes of Bitcoin mining pools. Furthermore, this paper characterizes the increasing trend of Bitcoin miner numbers during recent years.
△ Less
Submitted 26 April, 2022; v1 submitted 3 October, 2019;
originally announced November 2019.
-
Homogeneity and heterogeneity of cryptocurrencies
Authors:
Xiao Fan Liu,
Zeng-Xian Lin,
Xiao-Pu Han
Abstract:
Thousands of cryptocurrencies have been issued and publicly exchanged since Bitcoin was invented in 2008. The total cryptocurrency market value exceeds 300 billion US dollars as of 2019. This paper analyzes the prices, volumes, blockchain transactions, coin difficulties and public opinion popularities of 3607 actively exchanged cryptocurrencies. We aim to reveal and explain the homogeneity, i.e.,…
▽ More
Thousands of cryptocurrencies have been issued and publicly exchanged since Bitcoin was invented in 2008. The total cryptocurrency market value exceeds 300 billion US dollars as of 2019. This paper analyzes the prices, volumes, blockchain transactions, coin difficulties and public opinion popularities of 3607 actively exchanged cryptocurrencies. We aim to reveal and explain the homogeneity, i.e., the strong correlation of market performance, and the heterogeneity, i.e., the imbalance of popularities and sophistications, of the cryptocurrencies.
△ Less
Submitted 20 April, 2022; v1 submitted 3 October, 2019;
originally announced October 2019.
-
Risk Management via Anomaly Circumvent: Mnemonic Deep Learning for Midterm Stock Prediction
Authors:
Xinyi Li,
Yinchuan Li,
Xiao-Yang Liu,
Christina Dan Wang
Abstract:
Midterm stock price prediction is crucial for value investments in the stock market. However, most deep learning models are essentially short-term and applying them to midterm predictions encounters large cumulative errors because they cannot avoid anomalies. In this paper, we propose a novel deep neural network Mid-LSTM for midterm stock prediction, which incorporates the market trend as hidden s…
▽ More
Midterm stock price prediction is crucial for value investments in the stock market. However, most deep learning models are essentially short-term and applying them to midterm predictions encounters large cumulative errors because they cannot avoid anomalies. In this paper, we propose a novel deep neural network Mid-LSTM for midterm stock prediction, which incorporates the market trend as hidden states. First, based on the autoregressive moving average model (ARMA), a midterm ARMA is formulated by taking into consideration both hidden states and the capital asset pricing model. Then, a midterm LSTM-based deep neural network is designed, which consists of three components: LSTM, hidden Markov model and linear regression networks. The proposed Mid-LSTM can avoid anomalies to reduce large prediction errors, and has good explanatory effects on the factors affecting stock prices. Extensive experiments on S&P 500 stocks show that (i) the proposed Mid-LSTM achieves 2-4% improvement in prediction accuracy, and (ii) in portfolio allocation investment, we achieve up to 120.16% annual return and 2.99 average Sharpe ratio.
△ Less
Submitted 2 August, 2019;
originally announced August 2019.
-
Optimistic Bull or Pessimistic Bear: Adaptive Deep Reinforcement Learning for Stock Portfolio Allocation
Authors:
Xinyi Li,
Yinchuan Li,
Yuancheng Zhan,
Xiao-Yang Liu
Abstract:
Portfolio allocation is crucial for investment companies. However, getting the best strategy in a complex and dynamic stock market is challenging. In this paper, we propose a novel Adaptive Deep Deterministic Reinforcement Learning scheme (Adaptive DDPG) for the portfolio allocation task, which incorporates optimistic or pessimistic deep reinforcement learning that is reflected in the influence fr…
▽ More
Portfolio allocation is crucial for investment companies. However, getting the best strategy in a complex and dynamic stock market is challenging. In this paper, we propose a novel Adaptive Deep Deterministic Reinforcement Learning scheme (Adaptive DDPG) for the portfolio allocation task, which incorporates optimistic or pessimistic deep reinforcement learning that is reflected in the influence from prediction errors. Dow Jones 30 component stocks are selected as our trading stocks and their daily prices are used as the training and testing data. We train the Adaptive DDPG agent and obtain a trading strategy. The Adaptive DDPG's performance is compared with the vanilla DDPG, Dow Jones Industrial Average index and the traditional min-variance and mean-variance portfolio allocation strategies. Adaptive DDPG outperforms the baselines in terms of the investment return and the Sharpe ratio.
△ Less
Submitted 20 June, 2019;
originally announced July 2019.
-
Multi-Agent Deep Reinforcement Learning for Liquidation Strategy Analysis
Authors:
Wenhang Bao,
Xiao-yang Liu
Abstract:
Liquidation is the process of selling a large number of shares of one stock sequentially within a given time frame, taking into consideration the costs arising from market impact and a trader's risk aversion. The main challenge in optimizing liquidation is to find an appropriate modeling system that can incorporate the complexities of the stock market and generate practical trading strategies. In…
▽ More
Liquidation is the process of selling a large number of shares of one stock sequentially within a given time frame, taking into consideration the costs arising from market impact and a trader's risk aversion. The main challenge in optimizing liquidation is to find an appropriate modeling system that can incorporate the complexities of the stock market and generate practical trading strategies. In this paper, we propose to use multi-agent deep reinforcement learning model, which better captures high-level complexities comparing to various machine learning methods, such that agents can learn how to make the best selling decisions. First, we theoretically analyze the Almgren and Chriss model and extend its fundamental mechanism so it can be used as the multi-agent trading environment. Our work builds the foundation for future multi-agent environment trading analysis. Secondly, we analyze the cooperative and competitive behaviours between agents by adjusting the reward functions for each agent, which overcomes the limitation of single-agent reinforcement learning algorithms. Finally, we simulate trading and develop an optimal trading strategy with practical constraints by using a reinforcement learning method, which shows the capabilities of reinforcement learning methods in solving realistic liquidation problems.
△ Less
Submitted 24 June, 2019;
originally announced June 2019.
-
Practical Deep Reinforcement Learning Approach for Stock Trading
Authors:
Xiao-Yang Liu,
Zhuoran Xiong,
Shan Zhong,
Hongyang Yang,
Anwar Walid
Abstract:
Stock trading strategy plays a crucial role in investment companies. However, it is challenging to obtain optimal strategy in the complex and dynamic stock market. We explore the potential of deep reinforcement learning to optimize stock trading strategy and thus maximize investment return. 30 stocks are selected as our trading stocks and their daily prices are used as the training and trading mar…
▽ More
Stock trading strategy plays a crucial role in investment companies. However, it is challenging to obtain optimal strategy in the complex and dynamic stock market. We explore the potential of deep reinforcement learning to optimize stock trading strategy and thus maximize investment return. 30 stocks are selected as our trading stocks and their daily prices are used as the training and trading market environment. We train a deep reinforcement learning agent and obtain an adaptive trading strategy. The agent's performance is evaluated and compared with Dow Jones Industrial Average and the traditional min-variance portfolio allocation strategy. The proposed deep reinforcement learning approach is shown to outperform the two baselines in terms of both the Sharpe ratio and cumulative returns.
△ Less
Submitted 30 July, 2022; v1 submitted 19 November, 2018;
originally announced November 2018.
-
Semi-supervised Text Regression with Conditional Generative Adversarial Networks
Authors:
Tao Li,
Xudong Liu,
Shihan Su
Abstract:
Enormous online textual information provides intriguing opportunities for understandings of social and economic semantics. In this paper, we propose a novel text regression model based on a conditional generative adversarial network (GAN), with an attempt to associate textual data and social outcomes in a semi-supervised manner. Besides promising potential of predicting capabilities, our superiori…
▽ More
Enormous online textual information provides intriguing opportunities for understandings of social and economic semantics. In this paper, we propose a novel text regression model based on a conditional generative adversarial network (GAN), with an attempt to associate textual data and social outcomes in a semi-supervised manner. Besides promising potential of predicting capabilities, our superiorities are twofold: (i) the model works with unbalanced datasets of limited labelled data, which align with real-world scenarios; and (ii) predictions are obtained by an end-to-end framework, without explicitly selecting high-level representations. Finally we point out related datasets for experiments and future research directions.
△ Less
Submitted 11 November, 2018; v1 submitted 2 October, 2018;
originally announced October 2018.
-
A Collaborative Approach to Angel and Venture Capital Investment Recommendations
Authors:
Xinyi Liu,
Artit Wangperawong
Abstract:
Matrix factorization was used to generate investment recommendations for investors. An iterative conjugate gradient method was used to optimize the regularized squared-error loss function. The number of latent factors, number of iterations, and regularization values were explored. Overfitting can be addressed by either early stop** or regularization parameter tuning. The model achieved the highe…
▽ More
Matrix factorization was used to generate investment recommendations for investors. An iterative conjugate gradient method was used to optimize the regularized squared-error loss function. The number of latent factors, number of iterations, and regularization values were explored. Overfitting can be addressed by either early stop** or regularization parameter tuning. The model achieved the highest average prediction accuracy of 13.3%. With a similar model, the same dataset was used to generate investor recommendations for companies undergoing fundraising, which achieved highest prediction accuracy of 11.1%.
△ Less
Submitted 26 July, 2018;
originally announced July 2018.
-
Listening to Chaotic Whispers: A Deep Learning Framework for News-oriented Stock Trend Prediction
Authors:
Ziniu Hu,
Weiqing Liu,
Jiang Bian,
Xuanzhe Liu,
Tie-Yan Liu
Abstract:
Stock trend prediction plays a critical role in seeking maximized profit from stock investment. However, precise trend prediction is very difficult since the highly volatile and non-stationary nature of stock market. Exploding information on Internet together with advancing development of natural language processing and text mining techniques have enable investors to unveil market trends and volat…
▽ More
Stock trend prediction plays a critical role in seeking maximized profit from stock investment. However, precise trend prediction is very difficult since the highly volatile and non-stationary nature of stock market. Exploding information on Internet together with advancing development of natural language processing and text mining techniques have enable investors to unveil market trends and volatility from online content. Unfortunately, the quality, trustworthiness and comprehensiveness of online content related to stock market varies drastically, and a large portion consists of the low-quality news, comments, or even rumors. To address this challenge, we imitate the learning process of human beings facing such chaotic online news, driven by three principles: sequential content dependency, diverse influence, and effective and efficient learning. In this paper, to capture the first two principles, we designed a Hybrid Attention Networks to predict the stock trend based on the sequence of recent related news. Moreover, we apply the self-paced learning mechanism to imitate the third principle. Extensive experiments on real-world stock market data demonstrate the effectiveness of our approach.
△ Less
Submitted 19 February, 2019; v1 submitted 6 December, 2017;
originally announced December 2017.
-
Asset Pricing with Random Volatility
Authors:
Xin Liu
Abstract:
This paper proposes to model asset price dynamics with a mixture of diffusion processes where the instantaneous volatility of the underlying diffusion process contains a random vector. The marginal probability distributions of the proposed process can match exactly the risk-neutral distributions implied by both spot vanilla options and forward start options. We can also derive the explicit pricing…
▽ More
This paper proposes to model asset price dynamics with a mixture of diffusion processes where the instantaneous volatility of the underlying diffusion process contains a random vector. The marginal probability distributions of the proposed process can match exactly the risk-neutral distributions implied by both spot vanilla options and forward start options. We can also derive the explicit pricing formula for derivatives that have a closed-form solution under Generalized Geometric Brownian Motion.
△ Less
Submitted 18 September, 2018; v1 submitted 5 October, 2016;
originally announced October 2016.
-
A Stochastic Model of Order Book Dynamics using Bouncing Geometric Brownian Motions
Authors:
Xin Liu,
Qi Gong,
Vidyadhar G. Kulkarni
Abstract:
We consider a limit order book, where buyers and sellers register to trade a security at specific prices. The largest price buyers on the book are willing to offer is called the market bid price, and the smallest price sellers on the book are willing to accept is called the market ask price. Market ask price is always greater than market bid price, and these prices move upwards and downwards due t…
▽ More
We consider a limit order book, where buyers and sellers register to trade a security at specific prices. The largest price buyers on the book are willing to offer is called the market bid price, and the smallest price sellers on the book are willing to accept is called the market ask price. Market ask price is always greater than market bid price, and these prices move upwards and downwards due to new arrivals, market trades, and cancellations. We model these two price processes as "bouncing geometric Brownian motions (GBMs)", which are defined as exponentials of two mutually reflected Brownian motions. We then modify these bouncing GBMs to construct a discrete time stochastic process of trading times and trading prices, which is parameterized by a positive parameter $δ$. Under this model, it is shown that the inter-trading times are inverse Gaussian distributed, and the logarithmic returns between consecutive trading times follow a normal inverse Gaussian distribution. Our main results show that the logarithmic trading price process is a renewal reward process, and under a suitable scaling, this process converges to a standard Brownian motion as $δ\to 0$. We also prove that the modified ask and bid processes approach the original bouncing GBMs as $δ\to0$. Finally, we derive a simple and effective prediction formula for trading prices, and illustrate the effectiveness of the prediction formula with an example using real stock price data.
△ Less
Submitted 25 March, 2016; v1 submitted 12 November, 2015;
originally announced November 2015.
-
A General Framework for Complex Network Applications
Authors:
Xiao Fan Liu,
Chi Kong Tse
Abstract:
Complex network theory has been applied to solving practical problems from different domains. In this paper, we present a general framework for complex network applications. The keys of a successful application are a thorough understanding of the real system and a correct map** of complex network theory to practical problems in the system. Despite of certain limitations discussed in this paper,…
▽ More
Complex network theory has been applied to solving practical problems from different domains. In this paper, we present a general framework for complex network applications. The keys of a successful application are a thorough understanding of the real system and a correct map** of complex network theory to practical problems in the system. Despite of certain limitations discussed in this paper, complex network theory provides a foundation on which to develop powerful tools in analyzing and optimizing large interconnected systems.
△ Less
Submitted 20 July, 2015;
originally announced July 2015.
-
Asset Allocation under the Basel Accord Risk Measures
Authors:
Zaiwen Wen,
Xianhua Peng,
Xin Liu,
Xiaoling Sun,
Xiaodi Bai
Abstract:
Financial institutions are currently required to meet more stringent capital requirements than they were before the recent financial crisis; in particular, the capital requirement for a large bank's trading book under the Basel 2.5 Accord more than doubles that under the Basel II Accord. The significant increase in capital requirements renders it necessary for banks to take into account the constr…
▽ More
Financial institutions are currently required to meet more stringent capital requirements than they were before the recent financial crisis; in particular, the capital requirement for a large bank's trading book under the Basel 2.5 Accord more than doubles that under the Basel II Accord. The significant increase in capital requirements renders it necessary for banks to take into account the constraint of capital requirement when they make asset allocation decisions. In this paper, we propose a new asset allocation model that incorporates the regulatory capital requirements under both the Basel 2.5 Accord, which is currently in effect, and the Basel III Accord, which was recently proposed and is currently under discussion. We propose an unified algorithm based on the alternating direction augmented Lagrangian method to solve the model; we also establish the first-order optimality of the limit points of the sequence generated by the algorithm under some mild conditions. The algorithm is simple and easy to implement; each step of the algorithm consists of solving convex quadratic programming or one-dimensional subproblems. Numerical experiments on simulated and real market data show that the algorithm compares favorably with other existing methods, especially in cases in which the model is non-convex.
△ Less
Submitted 6 August, 2013;
originally announced August 2013.