Optimal Segmented Linear Regression for Financial Time Series Segmentation
Chi‐Jen Wu, Wei-Sheng Zeng, Jan-Ming Ho · 2021 International Conference on Data Mining Workshops (ICDMW) · 2021
Given a financial time series dataset, one of the most fundamental and interesting challenges is the need to learn the stock dynamics signals in the financial time series data. An essential task is to represent the time series in line segments which is often used as a pre-processing step for learning the marketing signal patterns in financial computing. In this paper, we focus on the optimization problem of computing the best segmentations of such time series based on segmented linear regression models. The major contribution of this paper is to define the problem of Multi-Segment Linear Regression (MSLR) of computing the optimal segmentation of a financial time series, denoted as the MSLR problem, such that the global square error of segmented linear regression is minimized. We present an optimum algorithm named OMSLR, with two-level dynamic programming (DP) design, and show the optimality of OMSLR algorithm. The two-level DP design of OMSLR algorithm can mitigate the complexity of searching the best trading strategies in financial markets. It runs in O(kn2) time, where n is the length of the time series sequence and k is the number of non-overlapping segments that cover all data points.