Unsupervised Change Point Detection and Trend Prediction for Financial Time-Series Using a New CUSUM-Based Approach

The aim of this research is to propose a binary segmentation algorithm to detect the change points in financial time-series based on the Iterative Cumulative Sum of Squares (ICSS). The proposed algorithm, entitled KW-ICSS, utilizes the non-parametric Kruskal-Wallis test in cross-validation procedures. In this regard, KW-ICSS can quickly detect the change points in non-normally distributed time-series with a small number of observations after the change points than the state-of-the-art ICSS algorithm, entitled AIT-ICSS. For the simulated financial time-series whose true location of the change point is known, KW-ICSS detects the change points with the average true positive rate of 81% for the different number of change points, whereas AIT-ICSS only exhibits 72.57%. Also, KW-ICSS’s mean absolute deviation between the true and detected change points is less than that of AIT-ICSS for different significance levels. The experiment also finds that the significance level, the model parameter, should be set to less than 10%. For the real-world financial time-series whose true location of change points is unknown, KW-ICSS’s robust detection of change points is observed from fewer detected change points and longer intervals between them. Furthermore, KW-ICSS’s trend prediction for the short-term future performs with an average of 92.47% accuracy, whereas AIT-ICSS shows 90.69%. Therefore, we claim that KW-ICSS successfully improves AIT-ICSS.


I. INTRODUCTION
In recent years, time-series analysis has become more critical than ever before. The time-series data are one of the elements that describe a system operation in a timely manner. Such data appear in various fields, including medicine, aerospace, finance, business, advertising, services, meteorology, and entertainment. The time-series dynamics are affected by external or internal factors [1]. In particular, change point (CP) analysis aims to detect rapid changes in time-series data when its distributional properties change [2]. CP analysis is closely related to CP estimation, or CP mining [2]- [5], which aim to investigate segmentation, event detection, anomaly detection, and clustering.
The associate editor coordinating the review of this manuscript and approving it for publication was Dost Muhammad Khan . Furthermore, CP analysis plays a critical role in establishing an investment strategy in the financial sector. For instance, investment decision-making in a portfolio can be determined by considering the predicted changes in the momentum of a market or asset price. In the era of data science, there have been various efforts to predict the changes in market momentum in both quantitative and qualitative approaches. For instance, research on the simultaneous detection and forecast of CPs in mean returns, volatility, and conditional correlation have been studied [6], [7]. Most related studies focus on estimating the CPs using a non-parametric method to divide the financial time-series into segments with similar characteristics such as mean, variance, and correlation while holding their stationarity.
Specifically, CP analysis can be divided into real-time (online) and retrospective (offline) methods. At first, the online method is related to event or anomaly detection since it aims to detect (or predict) changes in time-series dynamics in real-time. In contrast, offline detection is related to signal segmentation since it aims to detect and analyze every CP to interpret and explain the past time-series. In other words, the offline method estimates all possible CPs by considering the entire dataset at once or each batch of a specific period [8].
In this study, we develop a binary segmentation algorithm based on an offline method that simultaneously improves offline segmentation and online trend prediction. In terms of estimating binary segmentation, many studies have attempted to estimate CPs based on the change in the probability distribution, the likelihood function [9]- [11], and the comparison verification using F-test [12], [13]. Also, the Bayesian [14] and cumulative sum (CUSUM) [15]- [22] methods have been used to estimate the point of changes in time-series.
The proposed algorithm in this research utilizes the iterative CUSUM method, which detects a point where its distribution deviates from the normality as the CP. The effectiveness of the CUSUM-based algorithm has been discovered in analyzing the causality of the oil and US dollar exchange rates, the time-varying relationship over time, and the transfer effect of volatility [23], [24]. Also, the effectiveness of the integrated cumulative sum of squares (ICSS) algorithm in estimating the asymmetric volatility in oil prices has been revealed [25]. Such algorithm has been utilized to analyze the relevance of the commodity market, stock market, exchange rate market, and offshore market and applied to improve the prediction performance [26]- [31]. However, the limitations of the initial ICSS method include the assumption of the normal distribution of data, uncertainty in the robustness of CPs depending on the size and scale of data, and impossibility of ascertaining the number of CPs in advance. Therefore, the CUSUM algorithm has been further developed to overcome such limitations.
At first, the Bayesian rule was developed to resolve the normality assumption [32] in ICSS algorithm. Also, the sequential regime shift detection (SRSD) was developed as an ICSS algorithm sensitive to outliers [33]. Note that the Bayesian rule-based ICSS and SRSD were verified to be effective in detecting CPs [34]. Also, the non-parametric CP model, effective to non-normal distribution data, was developed by combining two-sample testing techniques with ICSS based on the CUSUM statistics [35]. ICSS algorithm further improved by combining the CUSUM and the kurtosis statistic, which is entitled as AIT-ICSS. [18]. In terms of energy volatility forecasting, the effectiveness of using AIT-ICSS was discovered by utilizing its CPs as dummy variables in prediction [36]; however, related studies also noted that the CP of long memory data might be underestimated [37].
Secondly, many studies have been conducted to overcome the robustness problem due to the time-window-based estimation process of the ICSS [38]. For instance, Bayesian analysis of linear models incorporating CPs contributes to improve the robustness of the accuracy of distribution estimation [39]. Also, the necessity to estimate an appropriate time window could improve the algorithm's robustness by comparing various statistics based on Gaussian data [40]. As an extension, CP estimation using a multi-window method has been discovered to improve robustness, which promoted theoretical research on consistency [41].
Lastly, a method to consider the variance of the regression analysis's coefficients and residuals is proposed to analyze how to estimate the number of CPs [42], [43]. Note that the initial ICSS algorithm is not robust when the time-series are not normally distributed or trend. In this regard, utilization of residuals or bootstrap theory to improve robustness were also suggested [17], [44]. In addition, several studies are ongoing to detect CPs elaborately. [45] proposed an algorithm to understand the structural change of volatility based on a wavelet, and [46] developed a new algorithm suitable for farm animal behavior patterns. Beyond the typical usage of estimating the severe change in time-series, several studies also investigated to detect a smooth change, verifying the effectiveness of the model to the non-normal distribution data [47], [48].
The purpose of this research is to propose an improved ICSS algorithm, called KW-ICSS, that modifies the existing algorithm in terms of the performance of CP detection and the integration in online binary prediction suitable for financial time-series. The proposed algorithm is based on CUSUM, which ranks a top-tier algorithm in the estimation of F1-score or area under the curve (AUC) of the precision-recall (PR) curve or receiver operating characteristic (ROC) curve [49]. Especially, AIT-ICSS, the nonparametric kernel-based method, is utilized as a benchmark model due to its advantages in usages of non-normal distribution [18]. Similar to AIT-ICSS, KW-ICSS algorithm also utilizes a non-parametric approach. Inspired by the use of the Mann-Whitney statistic as a non-parametric median comparison algorithm in HeurMeth [50] and the Fisher ratio statistic that estimates the volatility of CPs [12], [13], KW-ICSS algorithm combines the Kruskal-Wallis (KW) test as the extension to the Mann-Whitney algorithm used in AIT-ICSS algorithm. In this context, KW-ICSS algorithm can be applied to non-normal distribution data.
The novelty of this paper is as follows: At first, KW-ICSS's improvements in CP detection and trend prediction performances are discovered for simulated financial time-series. Note that the pre-specified true locations of CPs for simulated financial time-series allow the performance evaluation on CP detection. The experiment shows that the α, the model parameter, should be set to less than 10% in terms of mean absolute deviation between the true and detected CPs. Secondly, KW-ICSS's robustness in CP detection is observed for various real-world financial time-series. The algorithms are tested for 32 financial time-series from the stock, treasury, currency, and commodity markets for roughly 18 years of data. Since the true locations of CPs are unknown, we investigate the circumstantial evidence on the over-estimation phenomenon of CP detection, which is known as the drawback of AIT-ICSS. The results show that KW-ICSS detects fewer CPs with longer intervals for most VOLUME 10, 2022 financial time-series and significance levels less than 10%. Lastly, the proposed algorithm's significant improvement in trend prediction is explored for real-world financial timeseries. Even though few cases exhibit lower trend prediction performances, most real-world financial time-series show the improved prediction performance for the significance levels less than 10%.
The outline of this paper is organized as follows. Section 2 introduces the related work of CP analysis in terms of an unsupervised learning approach becoming increasingly important. Section 3 describes the proposed algorithm and metrics to evaluate the performance. Section 4 discusses the performance of the proposed algorithm based on the simulated and real-world financial series data. Besides, we show the empirical results from four different representative financial time-series to verify the algorithm's performance. Section 5 concludes.

A. SINGLE BINARY SEGMENTATION PROCESS
The direction of CP estimation involves numerous iterations of the segmentation process and is composed of two steps. In the first step, segments are estimated by analyzing the point of change with the highest likelihood in the full sample period. Then, two additional segments are estimated in the forward and backward directions based on this CP. Eventually, all possible CPs are estimated and set as the initial CP value. In the second step, estimated initial CP values are cross validated. Two segments before and after each CP are set as subsample periods, and the segmentation process is performed again to verify whether or not the estimated CPs are valid. Afterward, if the newly estimated CP is correct, then it is determined as the final CP. If any CP is different from the initial CPs, it is set as an error, and the CPs are updated until the error converges to zero to obtain the final CPs.
Algorithms based on the CUSUM test are used to estimate CPs of the trend of mean [15], [18], [51] and the time-series X t is used as input data. Let X t : t = 1, 2, · · · , T be a sequence of N dimensional random vectors, where T is the maximum period in each random vector. The first dimension can be the sequences for a specific market within a period of T , whereas the other dimensions can be the sequences for others. Each time sequence X 1 , X 2 , . . . , X T can be written as where µ t is the average value of each time sequence, and R n is a random component with zero mean E(R n ) = 0 and covariance matrix of positive definite E(R n R T n ) = . We also assume that the sequence of time is time t-dependent, and Y t 1 is independent of Y t 2 for t 1 , t 2 , and |t 1 − t 2 | > t.
The CP analysis tests the existence of the mean changes from the initial to the final time of N ; thus, we can define the null hypothesis of a constant mean as follows: and the alternative hypothesis is for the unknown CP of mean value t * i ∈ 1, 2, . . . , T . If we consider the corresponding assumptions for the stochastic process of time sequence, we can set the CUSUM detector as test statistics with non-parametric form using sequence (1) from the full sample period.
Then, D k statistics can be calculated as where D 0 = D T = 0. The work of [18] showed that the CP estimation using the existing D k (IT) does not reflect the large kurtosis and conditional heteroskedasticity out of the normal distribution. Thus, they provided the modified version of the D k statistics with the non-parametric statistics, D k , based on the Bartlett kernel such that, whereλ If no sudden structural change occurs in the time sequence, then D k vibrates around zero; otherwise, it vibrates and deviates from a specific boundary. Thus, the last step for estimating the unknown CP requires the critical values for several significance levels α. The asymptotic 95th percentile of D k statistic max k √ (T /2)|D k | is 1.4058 [18]. Therefore, the null hypothesis is rejected if the test statistics exceed the asymptotic criteria. Note that t * i is selected as a candidate for the CP. We can define as t * i under hypothesis H 1 , is given by

B. ITERATIVE SEGMENTATIONS FOR MULTIPLE CPs
The above hypothesis testing detects one CP at most and does not confirm the remaining CPs in either direction for the statistically stationary of the estimated detection. The D k statistics of the CUSUM detector just focuses on the highest magnitude on the offline analysis of the full period; thus, we should rephrase the hypothesis of alternative H 1 as follows: where t * 1 , t * 2 , . . . , t * τ are multiple CPs. A greedy technique to detect multiple CPs utilizes the iterative binary segmentation (BS) algorithm. At first, when a single CP is estimated over the entire period without observed CP, we stop the process and accept the null hypothesis H o . Otherwise, the estimated CP divides the entire time sequence into two segments. Secondly, the BS algorithm is repeated to estimate the additional CP in each segment until no CP is added in every segment.

C. CROSS-VALIDATION OF MULTIPLE CPs USING THE Kruskal-Wallis TEST
Although the BS algorithm can be easily implemented with low time complexity of O(N logN ), it tends to overestimate the CPs [52], [53]. Therefore, the ICSS segmentation algorithm includes a cross-validation [15]. It verifies the estimated CP by reapplying the BS algorithm for only the two segments before and after each estimated CP whether the H 0 is rejected or not. If the null hypothesis H 0 is not rejected, then the estimated CP is excluded. If a new CP is not the same as the existing CP is estimated, then the existing CP is replaced with a new estimated CP. This process is repeated until the existing CPs' error and updated CPs converge to zero..
In this study, we use a new cross-validation approach. The procedure is the same as AIT-ICSS, but the non-parametric KW test [54] is used as an algorithm for cross-validation. The KW test is widely used in non-parametric comparison tests, and it is a method of comparing and estimating whether or not the distribution is the same regardless of the number of data or the distributional assumption based on the median value. The advantage of the KW test is its no consideration of the normal assumption of data distribution. Moreover, in the existing algorithm, the high performance is only obtained when the number of data is large, and the normal distribution assumption is satisfied. However, the KW test can be used for comparing two or more independent samples with small sizes. That is, it can be used for comparison of non-normally distributed data whose number of observations is insufficient. CP detection in real-time (online) is difficult since the estimation requires many new data to divide the point of distributional change in time-series. Therefore, in reality, at least new data is required for the algorithm to determine CPs between the existing and new data. That is, the smaller the , the more powerful the online algorithm is. With the advantage of small , we expect that the proposed approach can simultaneously achieve the increased robustness of the results in offline and possible high performance in online analysis.
The KW test inputs are two sequences of each segment before and after each CP; these inputs verify that each sequence has the same variance as an unknown heavytailed distribution. If the null hypothesis of equal variance is rejected, then CPs are selected as updated CPs. This process is repeated until the error between the initial CPs and the updated CPs converges to zero; then, the final CPs are selected. The KW statistics can be obtained as follows: where n j is the number of data of the j-th segment, n = 2 j=1 n j is the total sample length of two segments, and X 2 j indicates the squared values of the rank sum of two segments. In the presence of many ties, the test statistics KW * can be corrected as where k j is the number of ties of the j-th segment of ties. The KW test is used only in the cross-validation process and not in the initial CP construction because it tends to overestimate. That is, the KW test estimates the CPs even with minimal data. However, if it is used only in the evaluation, then robustness can be improved. The existing algorithms also use the verification process, but they are not strict (e.g., using a qualitative method or an approach that ignores a specific error). Therefore, this study handles this limitation with the advantages of the non-parametric KW algorithm. Again, the KW test can be used for non-normally distributed data, and it uses only the significance level as a parameter without calculating additional critical values in hypothesis testing.
where χ 2 α and α represent the chi-squared statistic and associated significance level, respectively.

D. PERFORMANCE EVALUATION FOR TREND PREDICTION
We compare the trend prediction performance of KW-ICSS against AIT-ICSS. At first, the unsupervised trend prediction for financial time-series from the algorithm is performed as follows. Let t * i be the time when the algorithm detects a CP. Then, we compute averages of current time series with before and after a CP such that, Then, the short-term future trend after the CP is predicted to be upward (downward) whenX 1 <X 2 (X 1 >X 2 ). Note that the prediction can be performed at time t * i + 1. Such prediction process is suggested based on the assumption that the existence of CP could indicate a turning point in which the direction of past trend changes. In this regard, the prediction VOLUME 10, 2022 can be performed using the time-series data before time t * i +1, which does not require supervised learning through train/test split.
Then, the true trend should be defined for comparison. The CUSUM detector can be simply used to define the true trend, but it might not be appropriate since the mean value before and after the CP may differ depending on the initial value, the outlier, and the number of CPs. Therefore, the moving average convergence-divergence filter is used as a direction of change indicator, which provides higher weights to more recent values [55]. It estimates the local movement within a specific window interval and the movement of the continuous variation of the time-series. MACD based on the exponential moving average approach can be defined as follows: where l is the lag parameter. The MACD is derived from the difference between a short-term l 2 lag of EMA and a longterm l 3 lag of EMA such that Then, the trend indicator (TI ) is calculated by the subtraction of a short-term l 1 lag EMA of the MACD sequence from the original MACD sequence such that where l 1 < l 2 < l 3 . TI is analogous to the second derivative with respect to time over an interval around the CP because it involves multiple subtractions. In this study, we utilize a trend indicator for short-term future that estimates the direction of the time-series for a future time horizon, h. Let TI (t * i + h) be the value of accumulated trend indicator from the detected CP at time t * i to t * i + h such that where h is set to be 10 for the experiment. The true trend is upward (downward) when TI (t * i + h) > 0 (TI (t * i + h) < 0). Then, we compare the direction of financial time-series at CP drawn from the algorithm with that from TI (t * i +h) to evaluate the prediction performance.

III. RESULTS & DISCUSSIONS A. PERFORMANCE ON SIMULATED FINANCIAL TIME-SERIES
The proposed algorithm's characteristics and performance are analyzed based on simulated financial data containing CPs. One of the advantages of using simulated data is that the performance of CP detection, an unsupervised learning problem, can be evaluated. The second is to confirm the properties of the algorithm's parameters at the CPs of the time-series and evaluate the appropriate parameters.
The simulated data is generated using the traditional AutoRegressive Moving Average (ARMA) algorithm [56]- [60], which estimates the mean and variance of data properly [61]- [65]. In this study, we use an ARMA(1,1) process. At first, 100 samples of time-series with a length (N ) of 1000 for each sample are generated. The average of all the generated series is selected randomly in a specific range for each series's consistency by reflecting the number of CPs. In the case of one CP, there are two periods before and after the CP. Then, one of 0 and 1 is selected for the average of each period. Similarly, when two or three CPs exist, the mean of each period is randomly selected from 0, 1, and 2 without duplicate. Moreover, the variation of the mean value is limited to 0.5, which is half of the mean interval. Therefore, the mean size before and after the CP does not exceed. Note that the simulated data is generated under Python 3.8.5 environment using the ARMA generate sample function in the statsmodels package. The function parameters are set to default values, and AutoRegressive and Moving average coefficients are set to be valued between 0 and 1 to generate data satisfying stationarity.
KW-ICSS algorithm's CP detection ability is compared with that of AIT-ICSS algorithm. The total number of CPs, NCP = 0, 1, . . . , 5, are included in the simulated data. Note that max (NCP) is set to five since it achieves the average of mean absolute deviation between the actual and estimated CPs less than one. We set each CP at the time point t * i = (iN )/NCP, where i = 1, 2, . . . , NCP − 1. Each magnitude of change, {µ 0 , µ 1 , . . . , µ NCP }, is randomly selected from a set of {0, 1, . . . , NCP} without duplicate. Therefore, the magnitude increases or decreases randomly at each time of change. Note that the default significance level, α, for the cross-validation is set to 5% for the experiment.
At first, we plot the snapshots of each simulation for a different number of CPs set on the simulated time-series in Figure 1. The black vertical lines indicate the designed CP in the simulation data. The solid blue line refers to the increasing trend after a CP, whereas the dashed red line refers to the decreasing trend. For all numbers of CPs in simulated data, KW-ICSS detects the CPs more accurately than AIT-ICSS. As seen in Figure 1-(c,d,e), AIT-ICSS overestimates the number of CPs, whereas KW-ICSS does not. Therefore, we can visually confirm the robustness of KW-ICSS algorithm.
Then, we summarize the results of CP detection from 100 simulated financial time-series in Table 1. When calculating the true positive rate (TPR), we set the detection of CPs as a success if the values of detected CP is within ±5 for the designed CP in simulated time-series. In both algorithms, the TPR increases as the number of CPs increases. Specifically, KW-ICSS outperforms AIT-ICSS algorithm for all paired cases. Note that the bold text in the table represents the superiority in performance. If one CP exists, the TPRs of AIT-ICSS and KW-ICSS algorithms are 35% and 65%, respectively, indicating that KW-ICSS successfully improves the CP detection ability. Besides, in other sub experiments, KW-ICSS shows much higher TPR than AIT-ICSS. Based on the average, TPRs of AIT-ICSS ranges from 35% to 82%, whereas those of KW-ICSS show higher performances from 65% to 86%. Similarly, the mean absolute deviations (MAD) of algorithms are compared. Note that the MAD is calculated by taking the absolute value of the difference between the locations of detected and designed CPs. The smaller the value, the higher the CP estimation performance. The result shows that for every sub-experiment except for the case of four CPs, KW-ICSS algorithm estimates the CPs more accurately than AIT-ICSS. In the case of four CPs, KW-ICSS's relatively inaccurate detection of third(CP3) and fourth(CP4) CPs severely increases its MAD.
Also, we compare trend prediction performance based on the success rate of predicting the direction of the trend indicator for the short-term future, TI (t * i + 10), in Table 1. The larger the number, the better the trend prediction performance. Again, the bold text in the table represents the superiority in performance. The success rates of AIT-ICSS in the short-term future range from 81% to 96%, whereas those of KW-ICSS are range from 90% to 98%. Specifically, the average success rate of AIT-ICSS is approximately 0.93, whereas that of KW-ICSS is approximately 0.96. Interestingly, the success rates increase as the numbers of CPs increase for both algorithms. In summary, the average success rates of KW-ICSS outperforms those of AIT-ICSS for all number of CPs. Therefore, we conclude that KW-ICSS outperforms AIT-ICSS for the ability to predict short-term future trends.
Lastly, we explore the MAD for different significance levels, α, in Eq.15. Since the CPs of simulated financial timeseries are known, it is possible to evaluate the algorithm's CP detection ability for different significance levels. The boxplots composed of the entire MADs for different numbers of CPs are illustrated in Figure 2. Note that Figure 2-(a) shows the MAD of a wide range of significance levels from one to 15, whereas Figure 2-(b) show the MAD of a range of small significance levels from one to nine for comparison. In general, MAD increases as the significance level increases, indicating the risk of overestimated CPs at a high significance level. Since the notable increase of MAD is observed from 11% for both algorithms, the significance level should be managed under 10% for accurate detection of CPs. Furthermore, KW-ICSS algorithm outperforms AIT-ICSS algorithm at all significance levels.

B. PERFORMANCE ON REAL-WORLD FINANCIAL TIME-SERIES
For the real-world experiment, we employ 5563 (N = 5563) daily closing prices of the 32 financial time-series from the stock (13), treasury (7), currency (6), and commodity (6) markets, which includes 18 years of daily closing prices from 2001-01-01 to 2020-12-31, to evaluate KW-ICSS algorithm. Note that the data are obtained from the Thomson Reuters Datastream. Figure 3 shows the entire financial time-series based on the min-max scaling. The results show that each market shows different movements and structural changes (i.e., CPs). At first, a statistical test is performed to determine if such structural changes exist in real financial data. The true location of the CP of real-world financial time-series is unknown. However, some circumstantial evidence can help to check the existence of CPs. For instance, the time-series data may not be normally distributed if a structural change occurs, indicating time-varying trend or variance. In this context, we examine the descriptive statistics and analyze the normality, heteroscedasticity, and stationary tests as summarized in Table 2. At first, each sector's mean and variance are different, and most of the markets have positive skewness. Moreover, the result shows that all markets follow a non-Gaussian distribution due to their nonzero kurtosis. Secondly,   the ARCH test, which examines the equal variance, rejects H 0 strongly at the significance level of 1% in lags 10 and 20. Lastly, the price series of all markets are non-stationary since the augmented Dickey-Fuller (ADF) test does not reject the null hypothesis in which data are not a constant structure due to the trend, variance, or seasonality of the time-series.
Analogous to the experiment on the simulated financial time-series, we apply the AIT-ICSS and KW-ICSS algorithms to the real-world financial time series. The main difference between the simulated and real-world financial time-series is the true location of CPs. Therefore, we focus on the inferring improvements in over-estimation of CPs and trend prediction based on the number of detected CPs and prediction performance, respectively. At first, we plot the representative cases of detected CPs for different financial markets using α = 5% in Figure 4. Note that the solid blue line refers to the increasing trend after a CP, whereas the dashed red line refers to the decreasing trend. We can visually observe the change of timeseries movement after the detected CPs in both AIT-ICSS and KW-ICSS algorithms. In general, KW-ICSS has a smaller number of detected CPs than AIT-ICSS, which suggests reducing the over-estimation phenomenon in AIT-ICSS algorithm. For instance, NASDAQ in the stock market shows the reduction of the number of detected CPs from ten in AIT-ICSS to eight in KW-ICSS. 20-year US T-Bill in the treasury market also shows the reduction of detected CPs from seven in AIT-ICSS to five in KW-ICSS. In contrast, EUDOLLR in the currency market indicates the increase of the number of detected CPs from three in AIT-ICSS to four in KW-ICSS. However, the additional CP around 2007 successfully detects the decreasing trend with a red dashed line. CRUDOIL in the commodity market shows the reduction of the number of detected CPs from 11 in AIT-ICSS to 10 in KW-ICSS. Specifically, KW-ICSS avoids the redundant overestimation of decreasing trends around 2008.
Then, we summarize the performances of CP detection using AIT-ICSS and KW-ICSS for different significance levels and sectors in Table 3. Note that the performances are investigated via the number of detected CPs, the length of average intervals between the CPs, and success rates of trend indicators for the short-term future. The bold text indicates the superiority or equivalent performances. In the case of the average number of detected CPs in each sector, the treasury and currency markets show the largest and smallest number for all significance levels, respectively. Analogous to the simulated financial time-series, the average number of CPs increases as the significance level increases. Interestingly, most of the average numbers of the detected CPs of KW-ICSS are less than or equal to those of AIT-ICSS except for the currency market in 1% and 5% significance levels. Furthermore, most of the average intervals of KW-ICSS for the stock, treasury, and commodity markets are greater than or equal to those of AIT-ICSS except for the stock market in 13% and 15%. However, the average intervals of KW-ICSS commodity market are less than those of AIT-ICSS except for the 5% and 7% significance levels. In summary, KW-ICSS has less tendency to over-estimate the CPs than AIT-ICSS. The performance of trend prediction is also investigated for different significance levels and sectors in Table 3. Most of the success rates of KW-ICSS for the short-term future trend prediction are greater than those of AIT-ICSS except for the stock market in 11% significance level and treasury and currency markets in 13% and 15% significance levels. From the simulated financial time-series, we observe the dramatic increases of mean absolute deviation of CP detection when the significance level increases above 10%. Although the CPs of real-world financial time-series are unknown, we infer that the algorithms with below 10% significance level can be suitable for practical usage. In this regard, we conclude that the KW-ICSS improves the AIT-ICSS in terms of CP detection and trend prediction.
We further investigate the performances of the entire financial time-series in Figure 5. The blue (yellow) color scheme indicates the improved (lowered) performance by KW-ICSS. Note that the symbols for the individual market are listed in Table 2. The number of CPs in Figure 5-(a) shows that KW-ICSS improves the CP detection performance for all significance levels in general except for the currency and commodity market. Specifically, the lower CP detection performances in most significance levels below 10% are observed for FTALLSH of the stock market, JAPAYE$ and BRACRU$ of the currency market, and CORNUS2 and GOLDBLN of the commodity market. The interval lengths in Figure 5-(b) show a similar pattern to the number of CPs since two measures are closely related in the calculation. In general, the success rates of short-term future trend prediction in Figure 5-(c) shows improved performances. However, some cases of lowered performances are also observed. For instance, the success rate of TTOSP60 of the VOLUME 10, 2022 stock market shows the lowered performance for all significance levels. Also, those for KORCOMP and DAXINDX of the stock market, FRTCM1Y of the treasury market, and JAPAYE$ and BRACRU$ of the currency market show lowered performances for the significance levels under 10%. As shown in Table 3, KW-ICSS improves the CP detection and trend prediction performances of AIT-ICSS. However, some financial time series exist whose performances are decreased for all significance levels. Therefore, it is necessary to decide whether to utilize KW-ICSS through back-testing for the past data for each financial time series.
Although the performance of the KW-ICSS algorithm improved that of the AIT-ICSS algorithm, it has the disadvantage that computing time according to data length takes longer in KW-ICSS. Figure 6 presents computing time for each algorithm. The x-axis is the length of the data, whereas the y-axis is the actual computing time in seconds. The average of each financial time-series is calculated by repeating the change VOLUME 10, 2022  point estimation ten times while increasing the data length for each algorithm, and the scale of the y-axis is the same for comparison. Note that the straight line for each sector is the average of all associated financial time-series, and the range expressed means ±1.5 standard deviation. AIT-ICSS algorithm estimates the change point quickly without exceeding 1 second on average, even with 5000 data points (roughly 20 years), while KW-ICSS takes about 4 seconds and takes up to 6 seconds depending on the market. Table 4 summarizes the computation time in details. Regardless of the financial market, KW-ICSS takes roughly four times more computation time to estimate the CPs than AIT-ICSS for all financial time-series. However, the computation time for KW-ICSS still takes only a few seconds, whose performance is sufficient for usual real-time high-frequency trading such as minutely, hourly, and daily investment strategies.

IV. CONCLUSION AND FUTURE WORK
For decades, CP analysis has been studied in data mining, statistics, and computer science. CP analysis aims to estimate timely action in many real-world problems and detect immediate change points in time-series; thus, detecting CPs is essential in many practices. This study aims to develop a binary segmentation algorithm, KW-ICSS, by improving AIT-ICSS algorithm. Note that the CUSUM-based algorithm is considered one of the best algorithms in estimating the F1-score or AUC of the PR curve or ROC curve in detecting the CPs.
The main contributions of this research are two-fold. At first, to the best of our knowledge, this is the first attempt to incorporate the Kruskal-Wallis (KW) test for CUSUM-based CP analysis. Since the KW test requires a relatively small amount of data to detect the point of distributional change in time-series, the proposed algorithm can simultaneously be used as a retrospective (offline) and real-time (online) method. The KW test, a non-parametric comparison method, can also investigate the non-normally distributed time-series data. In this context, KW-ICSS is a generalized algorithm that can detect trends in non-stationary prices in real-time.
Secondly, we discover that KW-ICSS algorithm's improved performance and robustness, which supports the validity of utilizing the KW test. Throughout the experiments, we discover that KW-ICSS algorithm is superior to AIT-ICSS algorithm for simulated and real-world financial time-series. In case of the simulated financial time-series whose CPs are known, KW-ICSS shows a much higher TPR than AIT-ICSS as the number of CPs increases. Moreover, KW-ICSS algorithm shows higher detecting performance with fewer estimated CPs than AIT-ICSS, which infers the robustness of the algorithm. The lower MAD also supports such results for KW-ICSS for all significance levels. The prediction performances for short-term future trends are also improved in simulated data for all number of CPs. Therefore, KW-ICSS's improvements for CP detection, robustness, and trend prediction are confirmed for simulated financial time-series. Also, we explore that the significance level of the algorithm should be less than 10% to avoid the overestimation of CPs. In the case of the real-world financial time-series whose CPs are unknown, we could investigate the circumstantial evidence on CP detection based on the average number of detected CPs and the average length of intervals. The results show that KW-ICSS, in general, is more robust than AIT-ICSS in CP detection. Furthermore, the prediction performances are improved in most financial markets and significance levels.
Despite its contributions, our work has some limitations. The first limitation is the existence of decreased performances in CP detection and trend prediction in some financial markets. Therefore, to apply KW-ICSS, a practitioner should examine the target financial time-series with its past data to confirm its applicability. The second limitation is the computation time. KW-ICSS is clearly consumed more time than AIT-ICSS. Nonetheless, the computation time of KW-ICSS takes only a few seconds. Therefore, the proposed algorithm can still be applied to real-time high-frequency trading. The last limitation is the variety of benchmarks. This research solely focuses on improving AIT-ICSS algorithm. In this context, the performance of KW-ICSS algorithm is only compared with AIT-ICSS algorithm. For further research, the model's performance should be evaluated against other types of unsupervised binary segmentation algorithms. Also, KW-ICSS can be applied to any time-series data. Hence, the applications of KW-ICSS for CP detection and trend prediction in climate, voice, image, health data can be considered for future work.