Financial Time Series: Market Analysis Techniques Based on Matrix Profiles †
Abstract
:1. Introduction
2. Materials and Methods
- Returns an exact solution for motif discovery.
- Requires only one input parameter (sub-sequence length m).
- –
- For example, a similarity/distance threshold does not need to be specified (unlike for many other similar algorithms).
- Has a time complexity that is constant in sub-sequence length.
- –
- Thus, it can be constructed in a deterministic timeframe, an important consideration for time-sensitive financial applications.
- Incorporates flexibility.
- –
- No assumptions are made about the underlying data.
- –
- Is incrementally maintainable.
- Matrix Profile Index (MPI)
- –
- For every index i (or time point) in the examined series, the MPI contains a pointer to another index j (in the original series) indicating the start location of the nearest neighbour sub-sequence (or similar behaviour pattern).
- Matrix Profile (MP)
- –
- For every index i in the examined series, the MP contains a record of the Z-normalised Euclidean distance [10] to the nearest neighbour sequence (as indicated by the MPI).Note: Zero distance implies exact match.
- Motif Index (Mi)
- –
- For the given series, Mi records the start location index of the sub-sequence that has the lowest sub-sequence distance value of MP, i.e., closest match in terms of distance or ‘classical’ time series motif.
- Discord Index (Di)
- –
- Di records the start location index of the sub-sequence that has the highest sub-sequence distance value of MP, i.e., poorest match in terms of distance or ‘classical’ time series discord.
3. Results
3.1. Single Series Motif Identification
3.2. Single Series MP Evolution over Length
3.3. Multi-Variate Series
3.3.1. Single Sector
3.3.2. Multi Sector
3.4. Stocks within an Index
3.5. Reviewing the Raw Data
3.6. Multidimensional Analysis of a Single Stock
3.7. Motif Length Selection Considerations & Long- vs. Short-Term Behaviour
4. Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
MP | Matrix Profile |
SKIMP | Scalable Kinetoscopic Matrix Profile |
mSTAMP | Multidimensional Scalable Time Series Anytime Matrix Profile |
PMP | Pan Matrix Profile |
MPI | Matrix Profile Index |
PAA | Piecewise Aggregate Approximation |
WTI | West Texas Intermediate |
FED | Federal Reserve System |
IMF | International Monetary Fund |
S&P500 | Standard and Poor’s 500 |
References
- Mueen, A.; Keogh, E.; Zhu, Q.; Cash, S.; Westover, B. Exact Discovery of Time Series Motifs. In Proceedings of the SIAM International Conference on Data Mining, Sparks, NV, USA, 30 April–2 May 2009; pp. 35–53, 473–484. [Google Scholar] [CrossRef]
- Castro, N.; Azevedo, P. Significant motifs in time series. Stat. Anal. Data Min. 2012, 5, 35–53. [Google Scholar] [CrossRef] [Green Version]
- Silva, D.F.; Yeh, C.M.; Zhu, Y.; Batista, G.; Keogh, E. Fast Similarity Matrix Profile for Music Analysis and Exploration. IEEE Trans. Multimed. 2019, 21, 29–38. [Google Scholar] [CrossRef]
- Senobari, N.S.; Funning, G.; Zimmerman, Z.; Zhu, Y.; Keogh, E. Using the similarity Matrix Profile to investigate foreshock behavior of the 2004 Parkfield earthquake. In Proceedings of the American Geophysical Union Fall Meeting, Washington, DC, USA, 10–14 December 2018; p. S51B-03. [Google Scholar]
- Ferreira, P.; Azevedo, P.; Silva, G.; Brito, M. Mining Approximate Motifs in Time Series. In Discovery Science; Springer: Berlin/Heidelberg, Germany, 2006; pp. 89–101. ISBN 978-3-540-46493-8. [Google Scholar]
- Wilson, W.; Birkin, P.; Aickelin, U. The motif tracking algorithm. Int. J. Autom. Comput. 2008, 32–44. [Google Scholar] [CrossRef] [Green Version]
- Xiaoxi, D.; Ruoming, J.; Liang, D.; Lee, V.E.; Thornton, J.H. Migration Motif A Spatial Temporal Pattern Mining Approach for Financial Markets. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Paris, France, 28 June–1 July 2009; pp. 1135–1144. [Google Scholar] [CrossRef]
- Cartwright, E.; Crane, M.; Ruskin, H.J. Abstract: Motif Discovery & Evaluation Focus on Finance. In Proceedings of the Econophysics Colloquium 2018, Palermo, Italy, Online. 2018; Available online: https://sites.google.com/view/econophysics-colloquium-2018 (accessed on 29 June 2021).
- Cartwright, E.; Crane, M.; Ruskin, H.J. Financial Time Series: Motif Discovery and Analysis Using VALMOD. In Proceedings of the International Conference on Computational Science, Faro, Portugal, 12–14 June 2019; pp. 771–778. [Google Scholar] [CrossRef] [Green Version]
- Yeh, C.M.; Zhu, Y.; Ulanova, L.; Begum, N.; Ding, Y.; Dau, H.; Silva, D.F.; Mueen, A.; Keogh, E. Matrix profile I: All pairs similarity joins for time series a unifying view that includes motifs discords and shapelets. IEEE ICDM 2016, 1, 1317–1322. [Google Scholar] [CrossRef]
- Keogh, E. The UCR Matrix Profile Homepage. 2020. Available online: https://www.cs.ucr.edu/~eamonn/MatrixProfile.html (accessed on 29 June 2021).
- Gao, X.; An, H.; Fang, W.; Huang, X.; Li, H.; Zhong, W. Characteristics of the transmission of autoregressive sub-patterns in financial time series. Sci. Rep. 2014, 4, 2045–2322. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Investopedia Common Chart Pattern Definitions. Available online: https://www.investopedia.com/articles/technical/112601.asp (accessed on 29 June 2021).
- Investopedia Pennant Chart Pattern Definition. Available online: https://www.investopedia.com/terms/p/pennant.asp (accessed on 29 June 2021).
- Investopedia Triple Bottom Chart Pattern Definition. Available online: https://www.investopedia.com/terms/t/triplebottom.asp (accessed on 29 June 2021).
- Teall, J. Financial Trading and Investing, 2nd ed.; Academic Press: Cambridge, MA, USA, 2018; pp. 145–167. ISBN 9780128111161. [Google Scholar]
- Yahoo Finance Historical S&P Index. Available online: https://finance.yahoo.com/quote/%5EGSPC?p=%5EGSPC (accessed on 29 June 2021).
- Meegan, A.; Corbet, S.; Larkin, C. Financial market spillovers during the quantitative easing programmes of the global financial crisis (2007–2009) and the European debt crisis. J. Int. Financ. Mark. Instit. Money 2018, 56, 128–148. [Google Scholar] [CrossRef]
- Bracke, T.; Michael, F. The macro-financial factors behind the crisis: Global liquidity glut or global savings glut? N. Am. J. Econ. Financ. 2012, 23, 185–202. [Google Scholar] [CrossRef]
- Yahoo Finance Historical Microsoft Data. Available online: https://finance.yahoo.com/quote/MSFT (accessed on 29 June 2021).
- Investopedia Website Technology Companies List. Available online: https://www.investopedia.com/articles/markets/030816/worlds-top-10-technology-companies-aapl-googl.asp (accessed on 29 June 2021).
- Investopedia Website Pharmaceutical Stocks List. Available online: https://www.investopedia.com/investing/pharmaceutical-stocks/ (accessed on 29 June 2021).
- Investopedia Website Finance Stocks List. Available online: https://www.investopedia.com/terms/f/financial_sector.asp (accessed on 29 June 2021).
- OECD Financial Markets Highlights November. Financ. Mark. Trends 2007, 93, 11–25. Available online: http://www.oecd.org/finance/financial-markets/39654572.pdf (accessed on 29 June 2021).
- Bernanke, B.S. The Recent Financial Turmoil and its Economic and Policy Consequences. Available online: https://www.federalreserve.gov/newsevents/speech/bernanke20071015a.htm (accessed on 29 June 2021).
- Yahoo Finance Historical Dow Jones Index 26th October 2004 to 8th October 2008. Available online: https://finance.yahoo.com/quote/%5EDJI/history?period1=1098748800&period2=1223424000&interval=1d&filter=history&frequency=1d&includeAdjustedClose=true (accessed on 29 June 2021).
- Britannica Financial Crisis of 2007–08 Summary. Available online: https://www.britannica.com/event/financial-crisis-of-2007-2008/Key-events-of-the-crisis (accessed on 29 June 2021).
- Madrid, F.; Imani, S.; Mercer, R.; Zimmerman, Z.; Shakibay, N.; Mueen, A.; Keogh, E. Matrix Profile XX: Finding and Visualizing Time Series Motifs of All Lengths using the Matrix Profile. ICBK 2019, 1, 175–182. [Google Scholar] [CrossRef]
- Yeh, C.-M.; Kavantzas, N.; Keogh, E. Matrix Profile VI: Meaningful Multidimensional Motif Discovery. IEEE ICDM 2017, 1, 565–574. [Google Scholar] [CrossRef]
- Kamgar, K.; Gharghabi, S.; Keogh, E. Matrix Profile XV: Exploiting Time Series Consensus Motifs to Find Structure in Time Series Sets. IEEE ICDM 2019, 1, 1156–1161. [Google Scholar] [CrossRef]
Local MP Minima Location | Identified MP Minima Index | Identified MP Minima Date | MPI Value of Identified Index | MPI Date of Identified Index |
---|---|---|---|---|
A | 229 | 28 November 2007 | 412 | 20 August 2008 |
B | 326 | 18 April 2008 | 401 | 5 August 2008 |
C | 401 | 5 August 2008 | 326 | 18 April 2008 |
Series | Sector | Match Region 1 | Match Region 2 | ||
---|---|---|---|---|---|
Identified MP Minima Index | Identified MP Minima Date | Identified MP Minima Index | Identified MP Minima Date | ||
S&P500 | Various | 179 | 18 September 2007 | 401 | 5 August 2008 |
IBM | Information Technology | 169 | 4 September 2007 | 398 | 31 July 2008 |
Pfizer | Pharmaceutical | 182 | 21 September 2007 | 404 | 8 August 2008 |
Walt Disney | Entertainment | 179 | 18 September 2007 | 412 | 20 August 2008 |
Series | Sector | Match Region 1 | Match Region 2 | ||
---|---|---|---|---|---|
Identified MP Minima Index | Identified MP Minima Date | Identified MP Minima Index | Identified MP Minima Date | ||
S&P500 | Various | 135 | 17 July 2007 | 246 | 21 December 2007 |
IBM | Information Technology | 131 | 11 July 2007 | 245 | 20 December 2007 |
Pfizer | Pharmaceutical | 136 | 18 July 2007 | 253 | 3 January 2008 |
Walt Disney | Entertainment | 134 | 16 July 2007 | 246 | 21 December 2007 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Cartwright, E.; Crane, M.; Ruskin, H.J. Financial Time Series: Market Analysis Techniques Based on Matrix Profiles †. Eng. Proc. 2021, 5, 45. https://doi.org/10.3390/engproc2021005045
Cartwright E, Crane M, Ruskin HJ. Financial Time Series: Market Analysis Techniques Based on Matrix Profiles †. Engineering Proceedings. 2021; 5(1):45. https://doi.org/10.3390/engproc2021005045
Chicago/Turabian StyleCartwright, Eoin, Martin Crane, and Heather J. Ruskin. 2021. "Financial Time Series: Market Analysis Techniques Based on Matrix Profiles †" Engineering Proceedings 5, no. 1: 45. https://doi.org/10.3390/engproc2021005045
APA StyleCartwright, E., Crane, M., & Ruskin, H. J. (2021). Financial Time Series: Market Analysis Techniques Based on Matrix Profiles †. Engineering Proceedings, 5(1), 45. https://doi.org/10.3390/engproc2021005045