FinDKG: Dynamic Knowledge Graphs with Large Language Models for Detecting Global Trends in Financial Markets

Xiaohui Victor Li,Francesco Sanna Passino
2024-10-16
Abstract:Dynamic knowledge graphs (DKGs) are popular structures to express different types of connections between objects over time. They can also serve as an efficient mathematical tool to represent information extracted from complex unstructured data sources, such as text or images. Within financial applications, DKGs could be used to detect trends for strategic thematic investing, based on information obtained from financial news articles. In this work, we explore the properties of large language models (LLMs) as dynamic knowledge graph generators, proposing a novel open-source fine-tuned LLM for this purpose, called the Integrated Contextual Knowledge Graph Generator (ICKG). We use ICKG to produce a novel open-source DKG from a corpus of financial news articles, called FinDKG, and we propose an attention-based GNN architecture for analysing it, called KGTransformer. We test the performance of the proposed model on benchmark datasets and FinDKG, demonstrating superior performance on link prediction tasks. Additionally, we evaluate the performance of the KGTransformer on FinDKG for thematic investing, showing it can outperform existing thematic ETFs.
Computational Finance
What problem does this paper attempt to address?
The problems that this paper attempts to solve mainly focus on two aspects: 1. **Dynamic Knowledge Graph Generation**: In the financial field, how to automatically extract and construct dynamic knowledge graphs (DKGs) from a large number of unstructured data sources (such as news articles). This involves how to use large - language models (LLMs) to effectively identify and extract entities and their relationships, and transform them into time - quadruples (source, relation, object, timestamp) to construct a dynamic knowledge graph. 2. **Dynamic Knowledge Graph Learning and Application**: How to design and implement an efficient graph neural network architecture for dynamic knowledge graph learning, especially how to combine meta - entity information to improve the effect of graph learning. In addition, the paper also explores the performance of the proposed model in actual financial applications, such as predicting trends in the financial market and conducting thematic investment. ### Specific Problem Description - **Dynamic Knowledge Graph Generation**: - **Challenge**: Data in the financial field is usually in unstructured text form, containing a large number of entities and relationships, and these entities and relationships are constantly changing over time. Existing methods have problems with efficiency and accuracy when dealing with large - scale, highly - dynamic data. - **Solution**: The paper proposes a large - language model named Integrated Contextual Knowledge Graph Generator (ICKG). Through supervised fine - tuning, it extracts entities and relationships from financial news articles and generates time - quadruples. These quadruples are further assembled into a dynamic knowledge graph (FinDKG). - **Dynamic Knowledge Graph Learning**: - **Challenge**: Traditional graph neural networks (GNNs) have difficulty capturing complex changes in time and structure when dealing with dynamic knowledge graphs. Especially in the financial field, the model is required to accurately predict future links and trends. - **Solution**: The paper proposes a graph neural network architecture based on the attention mechanism - Knowledge Graph Transformer (KGTransformer). This architecture can combine meta - entity information to generate low - dimensional dynamic entity and relationship representations. Through experiments on multiple benchmark datasets, the superior performance of this model in the link prediction task has been verified. ### Application Scenarios - **Financial Trend Detection**: By analyzing indicators such as node centrality in FinDKG, important trends and events in the financial market are detected. - **Thematic Investment**: Using KGTransformer to analyze FinDKG, predict possible future market movements, thereby guiding thematic investment strategies, such as investing using the AI trend. In short, this paper aims to solve the problems of generation and learning of dynamic knowledge graphs in the financial field by combining large - language model and graph neural network technologies, and further improve the prediction and investment decision - making capabilities in the financial market.