The financial domain involves a variety of important time-series problems. Recently, time-series analysis methods that jointly leverage textual and numerical information have gained increasing attention. Accordingly, numerous efforts have been made to construct text-paired time-series datasets in the financial domain. However, financial markets are characterized by complex interdependencies, in which a company's stock price is influenced not only by company-specific events but also by events in other companies and broader macroeconomic factors. Existing approaches that pair text with financial time-series data based on simple keyword matching often fail to capture such complex relationships. To address this limitation, we propose a semantic-based and multi-level pairing framework. Specifically, we extract company-specific context for the target company from SEC filings and apply an embedding-based matching mechanism to retrieve semantically relevant news articles based on this context. Furthermore, we classify news articles into four levels (macro-level, sector-level, related company-level, and target company-level) using large language models (LLMs), enabling multi-level pairing of news articles with the target company. Applying this framework to publicly-available news datasets, we construct FinTexTS, a new large-scale text-paired stock price dataset. Experimental results on FinTexTS demonstrate the effectiveness of our semantic-based and multi-level pairing strategy in stock price forecasting. In addition to publicly-available news underlying FinTexTS, we show that applying our method to proprietary yet carefully curated news sources leads to higher-quality paired data and improved stock price forecasting performance.
Figures & tables
Figure 1. Overview of the proposed semantic-based and multi-level pairing framework. Given a target company and a date, the framework retrieves semantically relevant texts at four levels (from 1 to 4 ) and pairs them with the target company’s stock price on that date. 1 represents the paired text at the macro level, while 2 corresponds to the sector-level paired text. 3 and 4 denote the paired texts at the company level, where 3 captures the information of the related company and 4 represents the target company-specific information.
Figure 2. Keyword-based vs. Semantic-based pairing method. Existing approaches rely on keyword-based matching, whereas the proposed semantic-based method enables the retrieval of more semantically relevant text even without explicit keywords.
Figure 3. LLM prompts used in our framework. Full version of LLM prompts are available in Appendix A .
Figure 4. Effect of Multi-Level Text Pairing on Forecasting Performance. In the left figure, textual information is progressively added from the macro level to the target company level to examine changes in forecasting performance, while the right figure shows performance changes when textual information is added in the reverse order.
Model
w/o Text
w/ Text
Keyword
Semantic
MSE
MAE
MSE
MAE
MSE
MAE
Autoformer
0.145
0.299
0.156
0.303
0.083
0.225
Crossformer
0.115
0.233
0.081
0.198
0.056
0.168
DLinear
0.025
0.120
0.035
0.141
0.022
0.110
FiLM
0.021
0.106
0.073
0.192
0.016
0.091
Table 1. Performance comparison of text-augmented stock forecasting under different text pairing strategies, including no textual information (w/o Text), keyword-based pairing (Keyword), and semantic-based pairing (Semantic). Note that ‘NonStat.’ denotes the Non-stationary Transformer ( Liu et al., 2022 ) .
Method
Return
Sharpe
Ours
53.98%
2.67
FNSPID
51.60%
2.57
w/o Text
51.50%
2.62
Table 2. Backtesting results.
Figure 5. Sensitivity analysis of the retrieval size N using the evaluation metrics MSE (left) and MAE (right).
Company
Embedding Model
IMP
Base
Fine-Tuned
AMD
62.3%
65.5%
+3.2%p
BA
67.9%
69.6%
+1.7%p
COST
66.8%
66.8%
+0.0%p
DIS
90.7%
92.2%
+1.5%p
GOOGL
86.0%
87.4%
+1.4%p
Table 3. Retrieval performance comparison between using the embedding model as-is (Base) and our fine-tuned embedding model (Fine-Tuned). ‘IMP’ denotes the improvement of our method over the baseline.
Figure 6. Effect of multi-level text on AMD (Advanced Micro Devices, Inc.) stock forecasting.
Figure 7. Multi-level paired text examples for AMD, which is a U.S. semiconductor company that designs high-performance CPUs and GPUs for PCs, data centers, and AI applications.
Model
Publicly-Available
Proprietary
MSE
MAE
MSE
MAE
Autoformer
0.084
0.231
0.070
0.204
Crossformer
0.038
0.143
0.029
0.123
DLinear
0.024
0.112
0.022
0.107
FiLM
0.018
0.093
0.017
0.090
Informer
0.041
0.150
0.034
0.136
Table 4. Comparison of forecasting performance with publicly-available and proprietary news sources.
Method
Criteria
Overall
Coverage
Relatedness
Diversity
FNSPID
1.17
1.70
1.18
1.35
FinTexTS
Open-Source
3.99
4.16
4.17
4.11
Proprietary
4.27
4.23
4.60
4.36
Table 5. LLM-based evaluation of paired text quality, where each criterion is scored on a 1–5 scale (higher is better).