Paper: arXiv 2407.18645

Abstract

Representation learning has emerged as a powerful paradigm for extracting valuable latent features from complex, high-dimensional data. In financial domains, learning informative representations for assets can be used for tasks like sector classification, and risk management. However, the complex and stochastic nature of financial markets poses unique challenges. We propose a novel contrastive learning framework to generate asset embeddings from financial time series data. Our approach leverages the similarity of asset returns over many subwindows to generate informative positive and negative samples, using a statistical sampling strategy based on hypothesis testing to address the noisy nature of financial data. We explore various contrastive loss functions that capture the relationships between assets in different ways to learn a discriminative representation space. Experiments on real-world datasets demonstrate the effectiveness of the learned asset embeddings on benchmark industry classification and portfolio optimization tasks. In each case our novel approaches significantly outperform existing baselines highlighting the potential for contrastive learning to capture meaningful and actionable relationships in financial data.

Complexity vs Empirical Score

  • Math Complexity: 5.5/10
  • Empirical Rigor: 7.0/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper applies advanced machine learning concepts like contrastive learning and statistical hypothesis testing for sampling, representing moderate math complexity. It demonstrates empirical rigor by testing the approach on real-world datasets for industry classification and risk hedging tasks, showing improvements over baselines.

Research Flowchart

  flowchart TD
  A["Research Goal: Learn Asset Embeddings<br>from Financial Time Series"] --> B["Input: Historical Equity Return Data"]
  B --> C["Core Method: Contrastive Learning Framework"]
  C --> D{"Sampling Strategy<br>via Hypothesis Testing"}
  D --> E["Construct Positive/Negative Sample Pairs"]
  E --> F["Train Model using<br>Contrastive Loss Functions"]
  F --> G["Output: Learned Asset Embeddings"]
  G --> H["Key Findings: Superior Performance<br>on Industry Classification & Portfolio Optimization"]

Cited References (271)

  1. Distributed Representations
  2. Machine learning in finance: history, technologies and outlook
  3. Graph contrastive learning with augmentations (2020)
  4. Network embedding as matrix factorization: Unifying deepwalk, line, pte, and node2vec (2018)
  5. A well-conditioned estimator for large-dimensional covariance matrices (2004)
  6. One Sample Test of Proportions
  7. Correlation with prices or returns: that is the question
  8. Th 'e orie de la sp 'e culation (1900)
and 263 more
  1. On lines and planes of closest fit to systems of points in space (1901)
  2. Portfolio Selection (1952)
  3. A synopsis of linguistic theory, 1930-1955 (1957)
  4. Capital asset prices: A theory of market equilibrium under conditions of risk (1964)
  5. An algorithm for the machine calculation of complex Fourier series (1965)
  6. The behavior of stock-market prices (1965)
  7. Calculating the singular values and pseudo-inverse of a matrix (1965)
  8. Singular value decomposition and least squares solutions (1971)
  9. A generalized solution of the orthogonal Procrustes problem (1966)
  10. Efficient capital markets: A review of theory and empirical work (1970)
  11. The arbitrage pricing theory (1976)
  12. More evidence on the distribution of security returns (1978)
  13. Dynamic programming algorithm optimization for spoken word recognition (1978)
  14. Generalized autoregressive conditional heteroskedasticity (1986)
  15. The Markowitz optimization enigma: Is optimized optimal? (1989)
  16. Noise trader risk in financial markets (1990)
  17. Heteroskedasticity in stock returns (1990)
  18. Case-based reasoning for financial decision making (1991)
  19. Downside risk (1991)
  20. Case-based reasoning: Foundational issues, methodological variations, and system approaches (1994)
  21. Using dynamic time warping to find patterns in time series (1994)
  22. Differences between COMPUSTAT and CRSP SIC codes and related effects on research (1994)
  23. The sharpe ratio (1994)
  24. A comparison of incremental case-based reasoning and inductive learning (1995)
  25. Does international diversification work better for real estate than for stocks and bonds? (1996)
  26. The impact of industry classifications on financial research (1996)
  27. Long short-term memory (1997)
  28. Bankruptcy prediction using case-based reasoning, neural networks, and discriminant analysis (1997)
  29. Gradient-based learning applied to document recognition (1998)
  30. Deep learning (2015)
  31. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods (1999)
  32. Case-based reasoning supported by genetic algorithms for corporate bond rating (1999)
  33. Identifying business sectors from stock price fluctuations (2000)
  34. Algorithms for non-negative matrix factorization (2000)
  35. Bayesian probabilistic matrix factorization using Markov chain Monte Carlo (2008)
  36. Document clustering based on non-negative matrix factorization (2003)
  37. Picture Perfect: Visualisation Techniques for Case-based Reasoning (2000)
  38. Theoretical and empirical properties of dynamic conditional correlation multivariate GARCH (2001)
  39. A case-based approach using inductive indexing for corporate bond rating (2001)
  40. SMOTE: synthetic minority over-sampling technique (2002)
  41. Correlation and dependence in risk management: properties and pitfalls (2002)
  42. Data mining for financial prediction and trading: application to single and multiple markets (2004)
  43. Toward global optimization of case-based reasoning systems for financial forecasting (2004)
  44. The adaptive markets hypothesis: Market efficiency from an evolutionary perspective (2004)
  45. Comovement (2005)
  46. Dynamic adaptive ensemble case-based reasoning: application to stock market prediction (2005)
  47. Embedding time series data for classification (2005)
  48. Exact indexing of dynamic time warping (2005)
  49. Case based representation and retrieval with time dependent features (2005)
  50. The impact of industry classification schemes on financial research (2005)
  51. Pattern recognition and machine learning (2006)
  52. Enriching word vectors with subword information (2017)
  53. Deep Learning: Foundations and Concepts (2023) — link
  54. A new hybrid data mining technique using a regression case based reasoning: Application to financial forecasting (2006)
  55. Support vector machine as an efficient framework for stock market volatility forecasting (2006)
  56. Reducing the dimensionality of data with neural networks (2006)
  57. Characteristic-based clustering for time series data (2006)
  58. Industry classifications and return comovement (2007)
  59. Portfolio optimization with linear and fixed transaction costs (2007)
  60. Financial market monitoring by case-based reasoning (2007)
  61. Cluster analysis for portfolio optimization (2008)
  62. Visualizing data using t-SNE. (2008)
  63. Deep learning for time series classification: a review (2019)
  64. Bankruptcy prediction modeling with hybrid case-based reasoning and genetic algorithms approach (2009)
  65. Time-contrastive networks: Self-supervised learning from video (2018)
  66. Chronos: Learning the Language of Time Series (2024) — link
  67. TimeGPT-1 (2023) — link
  68. Lag-llama: Towards foundation models for time series forecasting (2023) — link
  69. Unified training of universal time series forecasting transformers (2024) — link
  70. Technical analysis of the financial markets: A comprehensive guide to trading methods and applications (1999)
  71. Analysis of financial time series (2005)
  72. A transformer-based framework for multivariate time series representation learning (2021)
  73. A neural network with a case based dynamic window for stock trading prediction (2009) — link
  74. Candlestick analysis based short term prediction of stock price fluctuation using SOM-CBR (2009)
  75. Multi-class adaboost (2009)
  76. Options, futures and other derivatives/John C. Hull. (2009)
  77. Gephi: An Open Source Software for Exploring and Manipulating Networks (2009) — link
  78. Matrix factorization techniques for recommender systems (2009)
  79. Predicting financial activity with evolutionary fuzzy case-based reasoning (2009)
  80. Distance metric learning for large margin nearest neighbor classification. (2009)
  81. Time series shapelets: a new primitive for data mining (2009)
  82. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models (2010)
  83. Recommending twitter users to follow using content and collaborative filtering approaches (2010)
  84. The greatest trade ever: The behind-the-scenes story of how John Paulson defied Wall Street and made financial history (2010)
  85. Power to the people: exploring neighbourhood formations in social recommender system (2011)
  86. Trend discovery in financial time series data using a case based fuzzy decision tree (2011) — link
  87. A review on time series data mining (2011)
  88. Classification of sparse time series via supervised matrix factorization (2012)
  89. Realized GARCH: a joint model for returns and realized measures of volatility (2012)
  90. A Lazy Learning Approach to Explaining Case-Based Reasoning Solutions. (2012)
  91. Restoring the enterprise statistics program (ESP) for the 2012 economic census (2012)
  92. Clustering time series using unsupervised-shapelets (2012)
  93. Quantifying the relationship between financial news and the stock market (2013)
  94. A Similarity-Based Approach for Financial Time Series Analysis and Forecasting (2013)
  95. Representation learning: A review and new perspectives (2013)
  96. Impact of fundamental factors on stock price: A case based approach on pharmaceutical companies listed with Dhaka stock exchange (2013)
  97. Efficient estimation of word representations in vector space (2013) — link
  98. Linguistic regularities in continuous space word representations (2013)
  99. API design for machine learning software: experiences from the scikit-learn project (2013)
  100. Stock price prediction using the ARIMA model (2014)
  101. Pseudomathematics and financial charlatanism: The effects of backtest over fitting on out-of-sample performance (2014)
  102. Using structured events to predict stock price movement: An empirical investigation (2014)
  103. Interpretable machine learning (2020)
  104. Deep learning: A critical appraisal (2018) — link
  105. Evaluation Methods for Representation Learning: A Survey. (2022)
  106. Classification of time series by shapelet transformation (2014)
  107. Learning the parts of objects by non-negative matrix factorization (1999)
  108. Short term stock selection with case-based reasoning technique (2014) — link
  109. ForceAtlas2, a continuous graph layout algorithm for handy network visualisation designed for the Gephi software (2014)
  110. A review of unsupervised feature learning and deep learning for time-series modeling (2014)
  111. Text mining for market prediction: A systematic review (2014)
  112. Glove: Global vectors for word representation (2014)
  113. Deepwalk: Online learning of social representations (2014)
  114. word2vec parameter learning explained (2014) — link
  115. Directional prediction of stock prices using breaking news on twitter (2015)
  116. Time series analysis: forecasting and control (2015)
  117. Deep learning for event-driven stock prediction (2015)
  118. The Viability of Six Popular Technical Analysis Trading Rules in Determining Effective Buy and Sell Signals: MACD, AROON, RSI, SO, OBV, and ADL. (2015)
  119. Collaborative data science (2015) — link
  120. Facenet: A unified embedding for face recognition and clustering (2015)
  121. Item2vec: neural item embedding for collaborative filtering (2016)
  122. Exchange traded funds (ETFs) (2016)
  123. Inside a moneymaking machine like no other (2016)
  124. Forecasting East Asian indices futures via a novel hybrid of wavelet-PCA denoising and artificial neural network models (2016)
  125. Multi-layer representation learning for medical concepts (2016)
  126. Knowledge-driven event embedding for stock prediction (2016)
  127. node2vec: Scalable feature learning for networks (2016)
  128. Semi-supervised classification with graph convolutional networks (2016) — link
  129. Building diversified portfolios that outperform out of sample (2016)
  130. Industry classification schemes: An analysis and review (2016)
  131. Improved deep metric learning with multi-class n-pair loss objective (2016)
  132. A case-based reasoning-decision tree hybrid system for stock selection (2016)
  133. Temporal regularized matrix factorization for high-dimensional time series prediction (2016)
  134. Unsupervised feature learning from time series. (2016)
  135. A deep learning framework for financial time series using stacked autoencoders and long-short term memory (2017)
  136. Exchange-traded funds (2017)
  137. In defense of the triplet loss for person re-identification (2017) — link
  138. Cryptocurrency portfolio management with deep reinforcement learning (2017)
  139. Time series and case-based reasoning for an intelligent tetris game (2017)
  140. Stock price prediction using LSTM, RNN and CNN-sliding window model (2017)
  141. Survey of stock market prediction using machine learning approach (2017)
  142. Attention is all you need (2017)
  143. Systematic review of bankruptcy prediction models: Towards a framework for tool selection (2018)
  144. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling (2018) — link
  145. Advances in financial machine learning (2018)
  146. Bert: Pre-training of deep bidirectional transformers for language understanding (2018) — link
  147. Towards understanding linear word analogies (2018) — link
  148. Deep learning with long short-term memory networks for financial market predictions (2018)
  149. Selection of related stocks using financial text mining (2018)
  150. Listening to chaotic whispers: A deep learning framework for news-oriented stock trend prediction (2018)
  151. A comparative study of supervised machine learning algorithms for stock market trend prediction (2018)
  152. Representation learning with contrastive predictive coding (2018) — link
  153. Reinforcement learning: An introduction (2018)
  154. Natural language based financial forecasting: a survey (2018)
  155. Explainable text-driven neural network for stock prediction (2018)
  156. Building real estate valuation models with comparative approach through case-based reasoning (2018)
  157. Improve network embeddings with regularization (2018)
  158. The UCR time series archive (2019)
  159. Unsupervised scalable representation learning for multivariate time series (2019)
  160. Financial risk prediction based on case based reasoning methodology (2019)
  161. catch22: CAnonical Time-series CHaracteristics: Selected through highly comparative time-series analysis (2019)
  162. Scalable dictionary classifiers for time series classification (2019)
  163. Signal2vec: Time series embedding representation (2019)
  164. What you say and how you say it matters: Predicting stock volatility using verbal and vocal cues (2019)
  165. Comparison of Machine Learning Approaches for Industry Classification Based on Textual Descriptions of Companies (2019)
  166. Non-linear GARCH models for highly persistent volatility (2005)
  167. Random forests (2001)
  168. A training algorithm for optimal margin classifiers (1992)
  169. Hierarchical structure in financial markets (1999)
  170. Machine learning based stock market analysis: A short survey (2019)
  171. Leveraging BERT to improve the FEARS index for stock forecasting (2019)
  172. Shared analyst coverage: Unifying momentum spillover effects (2020)
  173. A simple framework for contrastive learning of visual representations (2020)
  174. Knowledge graph-based event embedding framework for financial quantitative investments (2020)
  175. Debiased contrastive learning (2020)
  176. Geometric Case Based Reasoning for Stock Market Prediction (2020) — link
  177. Medallion fund: The ultimate counterexample? (2020)
  178. Statistical and machine learning models in credit scoring: A systematic literature survey (2020)
  179. ROCKET: exceptionally fast and accurate time series classification using random convolutional kernels (2020)
  180. Machine learning in finance (2020)
  181. Using case-based reasoning to predict marathon performance and recommend tailored training plans (2020)
  182. Global Industry Classification Standard (GICS) Methodology (2020)
  183. Learning company embeddings from annual reports for fine-grained industry characterization (2020)
  184. Word Embedding: Basics (2020) — link
  185. The great time series classification bake off: a review and experimental evaluation of recent algorithmic advances (2017)
  186. A wavelet tour of signal processing (1999)
  187. Bake off redux: a review and experimental evaluation of recent time series classification algorithms (2024)
  188. Multilevel wavelet decomposition network for interpretable time series analysis (2018)
  189. Exploiting a novel algorithm and GPUs to break the ten quadrillion pairwise comparisons barrier for time series motifs and joins (2018)
  190. Matrix profile I: all pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets (2016)
  191. Time series classification with HIVE-COTE: The hierarchical vote collective of transformation-based ensembles (2018)
  192. Introducing ChatGPT (2022) — link
  193. Implementing Matrix Factorization Technique for Recommender Systems from scratch (2023) — link
  194. Llama 2: Open foundation and fine-tuned chat models (2023) — link
  195. Self-supervised visual feature learning with deep neural networks: A survey (2020)
  196. Automatic early stopping using cross validation: quantifying the criteria (1998)
  197. A survey of credit and behavioural scoring: forecasting financial risk of lending to consumers (2000)
  198. Deep learning detecting fraud in credit card transactions (2018)
  199. Twitter mood predicts the stock market (2011)
  200. Deep transfer learning for crop yield prediction with remote sensing data (2018)
  201. Big data and AI strategies: Machine learning and alternative data approach to investing (2017)
  202. Deep learning for finance: deep portfolios (2017)
  203. A deep reinforcement learning framework for the financial portfolio management problem (2017) — link
  204. Adam: A method for stochastic optimization (2014) — link
  205. Adaptive subgradient methods for online learning and stochastic optimization. (2011)
  206. ReduceLROnPlateau - PyTorch 2.2 documentation (2023)
  207. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude (2012)
  208. An efficient word embedding and deep learning based model to forecast the direction of stock exchange market using Twitter and financial news sites: a case of Istanbul stock exchange (BIST 100) (2020)
  209. Stock market forecasting using computational intelligence: A survey (2020)
  210. Contrastive representation learning: A framework and review (2020)
  211. Correlation vs. trends: a common misinterpretation (2020)
  212. Enhancing Stock Trend Prediction Models by Mining Relational Graphs of Stock Prices (2020)
  213. A comparison of industry classification schemes: A large sample study (2013)
  214. Text-based network industries and endogenous product differentiation (2016)
  215. An integrated framework of deep learning and knowledge graph for prediction of stock price trend: An application in Chinese stock exchange market (2020)
  216. Deep learning for financial applications: A survey (2020)
  217. Financial Distress Prediction in Indonesia Stock Exchange’s Listed Company Using Case Based Reasoning Concept (2020)
  218. Financial time series forecasting with deep learning: A systematic literature review: 2005–2019 (2020)
  219. Irrational exuberance why we should not believe 95% of papers on time series anomaly detection (2021)
  220. Stock2Vec: A Hybrid Deep Learning Framework for Stock Market Prediction with Representation Learning and Temporal Convolutional Network (2020) — link
  221. Noise and Time Frames (2020) — link
  222. A Guide to Word Embedding (2020) — link
  223. Gpt-4 technical report (2023) — link
  224. HTML: Hierarchical Transformer-Based Multi-Task Learning for Volatility Prediction (2020) — link
  225. Learning knowledge-enriched company embeddings for investment management (2021)
  226. Stock movement prediction with financial news using contextualized embedding from bert (2021) — link
  227. Instance-based counterfactual explanations for time series classification (2021)
  228. Measuring Financial Time Series Similarity With a View to Identifying Profitable Stock Market Opportunities (2021)
  229. A Survey of Forex and Stock Price Prediction Using Deep Learning (2021)
  230. The firm next door: Using satellite images to study local information advantage (2021)
  231. An artificial intelligence-enabled industry classification and its interpretation (2021)
  232. Modeling the stock relation with graph network for overnight stock movement prediction (2021)
  233. Financial Cybercrime: A Comprehensive Survey of Deep Learning Approaches to Tackle the Evolving Financial Crime Landscape (2021)
  234. Zero-shot text-to-image generation (2021)
  235. Fund2Vec: mutual funds similarity using graph learning (2021)
  236. A comprehensive survey on deep neural networks for stock market: The need, challenges, and future directions (2021)
  237. Sentiment correlation in financial news networks and associated market movements (2021)
  238. Current time series anomaly detection benchmarks are flawed and are creating the illusion of progress (2021)
  239. Equity2vec: End-to-end deep learning framework for cross-sectional asset pricing (2021)
  240. REST: Relational Event-driven Stock Trend Forecasting (2021) — link
  241. Forecasting for Sustainable Dairy Produce: Enhanced Long-Term, Milk-Supply Forecasting Using k-NN for Data Augmentation, with Prefactual Explanations for XAI (2022)
  242. A Machine Learning Approach to Industry Classification in Financial Markets (2022)
  243. Stock Embeddings: Learning Distributed Representations for Financial Assets (2022) — link
  244. Learning Embedded Representation of the Stock Correlation Matrix using Graph Machine Learning (2022) — link
  245. A comprehensive review on multiple hybrid deep learning approaches for stock prediction (2022)
  246. “Better” Counterfactuals, Ones People Can Understand: Psychologically-Plausible Case-Based Counterfactuals Using Categorical Features for Explainable AI (XAI) (2022)
  247. Stock2vec: An embedding to improve predictive models for companies (2022) — link
  248. A Case-Based Reasoning Approach to Company Sector Classification Using a Novel Time-Series Case Representation (2023)
  249. Stock Embeddings: Representation Learning for Financial Time Series (2023)
  250. Asset Embeddings (2023)
  251. A review of ARIMA vs. machine learning approaches for time series forecasting in data driven networks (2023)
  252. A tutorial on hidden Markov models and selected applications in speech recognition (1989)
  253. Hierarchical Multi-Scale Gaussian Transformer for Stock Movement Prediction. (2020)
  254. Informer: Beyond efficient transformer for long sequence time-series forecasting (2021)
  255. Gaussian processes in machine learning (2003)
  256. Empirical properties of asset returns: stylized facts and statistical issues (2001)
  257. An efficient framework for learning sentence representations (2018) — link
  258. Company Similarity using Large Language Models — → 2308.08031
  259. Contrastive learning with hard negative samples (2020) — link
  260. Coherent measures of risk (1999)
  261. Diffstock: Probabilistic relational stock market predictions using diffusion models (2024)
  262. Assessment of the Applicability of Large Language Models for Quantitative Stock Price Prediction (2024)
  263. Incorporating corporation relationship via graph convolutional neural networks for stock price prediction (2018)

1 of 271 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2518 linked papers.