Source-linked AI summary

Multi-Modal Financial Time-Series Retrieval Through Latent Space Projections

Tom Bamford, Andrea Coletta, Elizabeth Fons, Sriram Gopalakrishnan, Svitlana Vyetrenko, Tucker Balch, Manuela Veloso

arXiv:2309.16741v2cs.LGcs.AIcs.HC

TL;DR

Financial time-series databases commonly rely on structured queries that may not express complex series properties or users’ desired search modalities. This paper uses deep encoders to map financial time series and multimodal queries into a latent space. The authors report reduced retrieval time and competitive or better accuracy than baselines, and conclude that latent projections support more intuitive retrieval.

  • Problem

    SQL-like time-series queries use fixed properties and can make it difficult for users to express complex financial series features such as volatility.

    Source: §1 · p. 1, §3 · p. 3
  • Method

    Deep encoders map financial time series and multimodal inputs into a shared latent space for retrieval, with text- and sketch-based query approaches.

    Source: §1 · pp. 1–2
  • Results

    The authors report reduced retrieval time and competitive or better accuracy than baselines, with evaluation on historical and synthetic data.

    Source: §1 · p. 2, §7 · p. 8
  • Takeaways & Limitations

    The paper concludes that latent-space projections support financial time-series retrieval with more intuitive natural-language and sketch query modalities.

    Source: §7 · p. 8

    The described approach focuses on univariate time series and natural-language or sketch queries, though the authors say it can generalize to multivariate series and other modalities.

    Source: §3 · p. 3

Abstract

from arXiv · show

Financial firms commonly process and store billions of time-series data, generated continuously and at a high frequency. To support efficient data storage and retrieval, specialized time-series databases and systems have emerged. These databases support indexing and querying of time-series by a constrained Structured Query Language(SQL)-like format to enable queries like "Stocks with monthly price returns greater than 5%", and expressed in rigid formats. However, such queries do not capture the intrinsic complexity of high dimensional time-series data, which can often be better described by images or language (e.g., "A stock in low volatility regime"). Moreover, the required storage, computational time, and retrieval complexity to search in the time-series space are often non-trivial. In this paper, we propose and demonstrate a framework to store multi-modal data for financial time-series in a lower-dimensional latent space using deep encoders, such that the latent space projections capture not only the time series trends but also other desirable information or properties of the financial time-series data (such as price volatility). Moreover, our approach allows user-friendly query interfaces, enabling natural language text or sketches of time-series, for which we have developed intuitive interfaces. We demonstrate the advantages of our method in terms of computational efficiency and accuracy on real historical data as well as synthetic data, and highlight the utility of latent-space projections in the storage and retrieval of financial time-series data with intuitive query modalities.

1 INTRODUCTION

Rigid SQL-like queries and existing systems do not directly address the complexity of financial time series or users’ need for intuitive ways to express relevant features. The paper proposes deep-encoder latent-space retrieval across modalities and reports reduced retrieval time with competitive or better accuracy than baselines.

1 INTRODUCTION

  • SQL-like queries over fixed properties do not capture the complexity of financial time series or make it easy to express stylized facts such as volatility or correlation.Users may find real price-series statistical properties challenging to express in rigid formats.Source: §1 · p. 1
  • Prior academic retrieval work addresses other applications, while the authors identify financial time-series retrieval as requiring domain-specific statistical properties.The paper’s contribution summary emphasizes financial focus, text and sketch modalities, and evaluation against existing approaches.Source: §1 · pp. 1–2
  • The framework uses deep encoders to store and retrieve financial time series across modalities while retaining finance-pertinent information in a latent space.It supports natural-language and sketch queries, with the general approach extensible to other modalities.Source: §1 · pp. 1–2
  • The system learns a shared embedding for multimodal data, indexing historical series so queries can retrieve them using different modalities.The described text-based encoder attends to finance-relevant descriptors, while sketch queries can represent a time-series trend.Source: §1 · p. 2
  • The authors report reduced retrieval time and competitive or better accuracy than standard time-series and UMAP-based baselines.The evaluation uses real historical and synthetic data.Source: §1 · p. 2

2 RELATED WORK

Existing time-series databases emphasize storage, indexing, and structured queries, while prior research addresses multimodal search or other domain-specific retrieval problems. The paper positions its contribution as multimodal retrieval tailored to financial time series and their pertinent statistical properties.

Commercial and open-source TS databases

  • Commercial and open-source time-series databases focus on efficient indexing and storage, but the paper contrasts them with its intuitive multimodal queries for complex financial series.The cited examples include InfluxDB, TimescaleDB, KDB+, and Amazon Timestream; these systems often use SQL-like queries.Source: §2 · p. 2

Research Literature

  • The authors say prior multimodal-search work and other time-series retrieval studies do not target multimodal retrieval specifically for financial time series.They identify incorporating financially pertinent statistical properties such as price volatility as a domain-specific requirement.Source: §2 · p. 2
  • Earlier text-based retrieval methods map a limited predefined vocabulary to numeric features, whereas the authors describe their approach as accommodating out-of-sample or ad-hoc queries.The prior approaches are described as domain-agnostic; the authors say theirs can be domain-agnostic or tailored to financial series.Source: §2 · p. 2
  • Prior sketch-based retrieval methods match trends and shapes, while the authors’ approach also incorporates volatility.The paper says its experiments modify baseline methods to try to incorporate volatility.Source: §2 · pp. 2–3

3 PROBLEM DESCRIPTION

The paper formulates retrieval as returning the top k matches from a dataset for an input query, with the goal of supporting multiple modalities and financially relevant properties beyond trend. The described study focuses on univariate series and natural-language or sketch queries, while noting possible generalization to multivariate series and other modalities.

3 PROBLEM DESCRIPTION

  • The retrieval objective is to learn a function that maps a query, dataset, and k to the k best-matching time series.The time-series space is defined as R^L, with L the length of each series.Source: §3 · p. 3
  • The target is multimodal retrieval that matches not only series trends but also financially relevant properties such as price volatility.The passage identifies stylized facts as statistical properties of financial series that can be challenging to express in existing query frameworks.Source: §3 · p. 3
  • The discussion restricts its focus to univariate series and natural-language or sketch queries, while stating that the approach can generalize to multivariate series and other modalities.Images are given as an example of another modality to which the approach may be applied.Source: §3 · p. 3

4 DATASET CONSTRUCTION

The paper constructs synthetic series with captions for text retrieval and collects historical stock series for both text- and sketch-based retrieval. Its synthetic process adds trend and shocks to a mean-reverting series, while captions and historical datasets describe selected properties and regimes.

4.1 Synthetic stock price time series dataset

  • The synthetic dataset addresses the lack of financial time series paired with textual descriptions by generating series with a discrete mean-reverting process.The generation process adds trend and infrequent large megashocks to represent directionality and exogenous events, then plots series as 224x224 images.Source: §4.1 · p. 3
  • Synthetic captions describe generated feature regimes, with filtering used to correct surprising labels and phrase augmentation expanding the caption set.Filtering assigns trend and shock regimes using fitted or pointwise gradients; ChatGPT-generated alternatives increase descriptions from 36 to over 500 and training data from 4,000 to 16,000 samples.Source: §4.1 · pp. 3–4
  • The dataset’s captions can distinguish high- and low-liquidity stocks based on their volatility profiles.The passage states that low-liquidity stocks have high volatility, while high-liquidity stocks have low volatility.Source: §4.1 · p. 4

4.2 Historical price time series dataset

  • For text retrieval, the historical dataset uses 60-timestep stock windows and contains 1,500 or 3,000 series depending on the selected tickers and window size.The series are converted into 224x224 images and assigned captions describing features of interest.Source: §4.2 · p. 4
  • For sketch retrieval, the historical dataset contains 1,516 traces of length 30, sampled in increments of five time steps.The authors state this dataset was sufficient to show relative performance costs between baseline methods and an autoencoder.Source: §4.2 · p. 4

5 METHODOLOGIES

The methodology maps financial time series and user queries into a shared latent space for retrieval. Separate encoding paths support text queries and sketches that can represent trends and additional time-series properties.

5 METHODOLOGIES

  • Deep encoders project different query modalities and financial time series into a shared latent space that indexes the database for retrieval.Source: §5 · p. 4, Figure 2 · p. 5

5.1 Text-based retrieval

  • Text-based retrieval embeds time-series images and natural-language descriptions into a consistent space using pretrained encoders and a contrastive loss.Source: §5.1.1 · p. 4

5.1.1 Architecture.

  • The text architecture uses ResNet50 for time-series images and Sentence-BERT for text, while fixed database embeddings enable fast query-time similarity calculations.Source: §5.1.1 · pp. 4–5, Figure 2 · p. 5

5.2 Sketch-based retrieval

  • Sketch retrieval can match a drawn trend while encoding a selected statistical property, illustrated with price volatility and extensible to other computable properties.Source: §5.2 · pp. 5–6

5.2.1 Training.

  • The sketch model trains separate autoencoders on the original series and a rolling-window volatility series, then concatenates and normalizes their embeddings.The volatility series uses the standard deviation of neighboring points, with m=4.Source: §5.2.1 · p. 6

5.2.2 Database.

  • For each historical series, the database stores its concatenated trend-and-volatility embedding alongside the original series and indexes embeddings with FAISS.Source: §5.2.2 · p. 6

5.2.3 Retrieval.

  • A sketch query is encoded with trend and volatility encoders, then cosine similarity retrieves the highest-ranked database series; the approach is reported as faster and more flexible than rigid trend matching.Source: §5.2.3 · p. 6

6.1 Evaluation Measures

The evaluation measures assess text retrieval across in-sample and out-of-sample queries, and sketch retrieval against automatically generated test queries.

6.1.1 Text-Based Retrieval Measures.

  • Text retrieval is evaluated on unseen validation time-series images using Rank@9 accuracy for in-sample and out-of-sample queries, plus aggregate diversity across both settings.Diversity measures the fraction of distinct returned time-series images across prompt variations.Source: §6.1.1 · p. 6

6.1.2 Sketch Based Retrieval Measures.

  • Sketch retrieval uses 302 held-out test-series queries, with added noise and a five-step circular shift, and reports MAPE, Pearson correlation, and mean retrieval time with standard deviation.Timing includes query-embedding computation when required.Source: §6.1.2 · p. 6

6.2 Baselines

The section establishes text- and sketch-based retrieval baselines for comparison in a field without established benchmarks. The methods range from a fixed-output classifier and Word2Vec/UMAP embeddings to brute-force and UMAP searches over time-series and volatility representations.

6.2.1 Text-Based Retrieval Baselines.

  • With no established benchmarks, the authors provide a comparison benchmark and implement two text-retrieval baselines: a neural classifier and Word2Vec-UMAP.Table 1 also covers three Deep Encoding Network filtering variants; Filtered+ combines GPT caption augmentation with post-process filtering.Source: §6.2.1 · p. 6, Table 1 · p. 7
  • The classifier predicts similarities for database samples from text embeddings, but its fixed output nodes restrict it to in-sample retrieval.The classifier uses 100-dimensional Word2Vec embeddings and is trained and evaluated for retrieval on the validation set.Source: §6.2.1 · p. 7
  • Word2Vec-UMAP replaces the deep text and image encoders with Word2Vec and UMAP, aligning their embeddings in a 64-dimensional space.The text and image embeddings are 100- and 2048-dimensional, respectively.Source: §6.2.1 · p. 7

6.2.2 Sketch Based Retrieval Baselines.

  • Sketch retrieval compares brute-force search on the series, averaged series-and-volatility distances, and concatenated UMAP embeddings of both representations.Table 2 reports historical-dataset results for Deep Encoding Networks, with filtering referring to GPT-augmented filtering of trend, volatility, and shock probability.Source: §6.2.2 · p. 7, Table 2 · p. 7

6.3 Results

Results cover natural-language and sketch time-series queries. The reported comparisons favor deep encoders on synthetic text retrieval, show stronger historical results after retraining, and indicate a trade-off between trend matching and volatility matching in sketch retrieval.

6.3.1 Text Based Retrieval Results.

  • All three Deep Encoding Network variations outperform the text-retrieval baselines on the synthetic dataset.The classifier requires complete retraining to add database entries, while UMAP training was limited to 4,000 images because of computational expense.Source: §6.3.1 · p. 7
  • On historical data, retraining on the new dataset yields better results, particularly as dataset size increases; volatility filtering is not essential and often hinders accuracy.The comparison includes a pretrained model from the synthetic-data study and a model retrained on historical data.Source: §6.3.1 · p. 7

6.3.2 Sketch Based Retrieval Results.

  • AE typically matches volatility better than the baselines on MAPE and CORR and runs significantly faster; BF best matches time-series trends.Table 3 averages matching measures over test queries with Gaussian noise and circular shifts.Source: Table 3 · p. 8, §6.3.2 · p. 8

7 CONCLUSIONS

The paper concludes that latent-space projections support multi-modal storage and retrieval of financial time series while preserving finance-relevant information.

7 CONCLUSIONS

  • The framework maps financial time-series and other modalities into a lower-dimensional latent space using deep encoder networks.The authors state that the projections preserve essential time-series properties.Source: §7 · p. 8
  • The developed query interfaces accept natural-language text and time-series sketches.Source: §7 · p. 8
  • Experiments support the approach’s computational efficiency and retrieval accuracy, demonstrating the utility of latent-space projections for financial time-series retrieval.Source: §7 · p. 8

DISCLAIMER

The disclaimer describes the document’s informational purpose and disclaims warranties and investment-advice status.

DISCLAIMER

  • The document was prepared for informational purposes by JPMorgan Chase & Co. and its affiliates’ Artificial Intelligence Research group.Source: DISCLAIMER · p. 8
  • JPMorgan Chase disclaims representations and warranties regarding the information’s completeness, accuracy, or reliability, as well as related liability.Source: DISCLAIMER · p. 8
  • The document is not investment research or advice, nor a recommendation, offer, or solicitation concerning a security or financial product.Source: DISCLAIMER · p. 8
Loading 2309.16741v2…