{'fraction_non_alphanumeric': 0.03125254997960016, 'fraction_numerical': 0.01636066911464708, 'mean_word_length': 4.865278774826513, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Data Analytics Driven Controlling: bridging statistical modeling and managerial intuition

Strategic planning in a corporate environment is often based on experience and intuition, although internal data is usually available and can be a valuable source of information. Predicting merger&acquisition (M&A) events is at the heart of strategic management, yet not sufficiently motivated by data analytics driven controlling. One of the main obstacles in using e.g. count data time series for M&A seems to be the fact that the intensity of M&A is time varying at least in certain business sectors, e.g. communications. We propose a new automatic procedure to bridge this obstacle using novel statistical methods. The proposed approach allows for a selection of adaptive windows in count data sets by detecting significant changes in the intensity of events. We test the efficacy of the proposed method on a simulated count data set and put it into action on various M&A data sets. It is robust to aberrant behaviour and generates accurate forecasts for the evaluated business sectors. It also provides guidance for an a-priori selection of fixed windows for forecasting. Furthermore, it can be generalized to other business lines, e.g. for managing supply chains, sales forecasts, or call center arrivals, thus giving managers new ways for incorporating statistical modeling in strategic planning decisions.


Introduction
Data driven insights can improve corporate decision making. In large organizations, a variety of financial data is available due to reporting requirements and organizational purposes. However, expertise in the field of data analytics is scarce. New methods for robotic data evaluation can help organizations cut costs by shifting resources away from manual tasks and towards tasks that require supervision. Managers can derive valuable insights from forecasts based on internal company data to deal with common problems in a corporate environment such as demand forecasting for supply chain planning (Yelland et al., 2010), call center arrival times (Taylor, 2007(Taylor, , 2011 and Oreshkin et al. (2016), sales forecasting (Kolsarici and Vakratsas, 2015), or mergers & acquistions (M&A) forecasting (Very et al., 2012). However, the available datasets are usually subject to non-stationarity and structural breaks, and they usually make manual efforts to fit a meaningful model necessary. To deal with such problems, experts employ techniques on change point detection or finding stable parameter windows. To the best of our knowledge, no combination of such techniques was explored for a framework incorporating count data. To address this gap, we propose a method that automatically detects locally homogeneous time windows and corresponding parameters in an automated way that can be used to generate point or density forecasts.
As a motivating example we apply this newly developed algorithm to forecast M&A intensity in different industries. M&A are especially interesting as they frequently occur in different markets and industries, and are relevant both to the financial industry that generates revenue by supporting their execution, as well as those companies that are observing their own industry and their competitors.
Recent approaches are using time series models, as in Very et al. (2012) or a revealed preference model as in Akkus et al. (2015). Figure 1 shows an example data set of mergers and acquisitions of German energy market that illustrates the presence of non-stationarity and structural breaks in such time series. Empirical evidence strongly suggests that mergers are often clustered in time as waves, see Martynova and Renneboog (2005), Harford (2005) and Maksimovic et al. (2013). Ahern and Harford (2014) find that their activity is subject to network effects and that these waves largely occur within industries, but can also be transmitted to connected industries. Furthermore, shocks of any kind, even if they lead to merger waves, are difficult to predict. Wave patterns seem to be heterogeneous and differ both in time and in industries. Following their argumentation, we conclude that data on M&A should be evaluated per industry and geographic location due to differences in regulation, innovation power, technology, and stock markets.
Predictive models for M&A intensity could be identified through aggregating acquired knowledge and tailored to specific industries and markets. Alter-natively, time-series models, e.g. ARMA can be used. While a co-variate based model provides explainability to the user, it requires manual efforts to gather data and incorporate expert knowledge to define relevant variables and calibrate their impact on a predictive model. Data gathering can be time-consuming and expensive, and knowledge about modeling heterogeneous industries in a specific application requires domain knowledge, which is often scarce and narrowed to said application. Time series models are an alternative, as they can be adapted to any other data set with comparable structure. However, such models need to be robust to non-stationarity, structural breaks and wave patterns that limit their predictive power.
There is no doubt that only time varying time series models approximate the dynamics of the underlying series better than any homogeneous parameter approach, e.g. a fixed ARMA(p, q) model. Therefore, we employ an adaptive estimation method called Local Parametric Approach (LPA). The quantitative implementation was first proposed in Spokoiny (1998), advances are made in Mercurio and Spokoiny (2004) and Spokoiny (2009). It helps us to find locally homogeneous time intervals with stable parameters and guarantees a trade-off between parameter variance and modeling bias. The technique is based on a series of likelihood ratio tests to determine assumed but unknown change points in the underlying series. As a result one finds local intervals of homogeneity and efficient estimates at each point in time.
Since we are often dealing with small sample sizes, and the test statistic distribution is unknown, we need a method to approximate this distribution.
Recent advances in bootstrapping methodology allow us to generate confidence sets and critical values that non-asymptotically approximate the true distribution. Here, we couple LPA with multiplier bootstrap (MBS) (Spokoiny and Zhilova, 2015) for approximating a critical value for the testing procedure. MBS builds up on wild bootstrap, that originates from Wu (1986) and Beran (1986).
An important application is reported in Mammen (1993), andMammen (1993). Further advancements are made in Chatterjee and Bose (2005) and Arlot et al. (2010). Notable publications that precede Spokoiny and Zhilova (2015) are Bücher and Dette (2013) and Chernozhukov et al. (2013) Hinkley and Hinkley (1970), (Hsu, 1979), (Haccou et al., 1987), and (Chen and Gupta, 1999) that propose change point detection methods for gamma, exponentially, and normally distributed data respectively. Kutoyants and Spokoiny (1999) propose an adaptive procedure as well as theoretical properties for Poisson distributed data. Chen and Gupta (2011) provides the null distribution of a likelihood ratio test for Poisson distributed random variables, but they do not evaluate the efficiency of the procedure on real data.
Both change point detection and homogeneous window approaches can serve as determinator for an optimal forecasting window. Recent approaches for optimal window selection are Giraitis et al. (2013), Pesaran et al. (2013), andInoue et al. (2017). They address parameter instability and frequent structural breaks and indicate that adaptive window selection is favorable over choosing fixed window sizes, such as a 1 year or 3 year moving average. Since we aim at developing a generally applicable method that is robust to different data characteristics, we need an adaptive window. Hence, we pursue a nonparametric approach that is independent of knowledge about or assumptions on the dataset, except that the values are generated by a Poisson process with smooth but time varying intensity over some unknown time window.
Our approach extends the previous literature as it serves as a generic toolbox that could easily be adapted to other applications and gives density forecasts that can (but do not have to) be adjusted by incorporating knowledge from industry experts and is adaptable to arbitrary frequencies. Although we show how to forecast the density of M&A, our methodology could also extend research in other areas that typically use Poisson processes.
The remainder of this paper is structured as follows: Section 2 describes the algorithm that is based on a combination of LPA, MBS and put into action in an iterative procedure. Section 3 contains an experimental study. We describe the evaluation method, verify the robustness of the presented algorithm in simulation scenarios, apply it empirically on a dataset of mergers & acquisitions and show how it can be used to generate forecasts. Section 4 presents key results, such as robustness to diverse data inputs and adaptability to other applications. Section 5 discusses limitations, such as in the evaluation approach or computational costs and suggests next steps like density forecasting, introducing a judgemental component and extending the test-statistic. All numerical algorithms can be found on Quantlet.de .

Basic Idea
Planning processes in corporate environments are based on internal financial data of different kinds. Traditionally, these problems have been solved using diverse time series models. However, it is difficult to use them since real time series often are non stationary and have structural breaks. Automated analyses can be beneficial as they make modelling easier. To contribute to solving this problem, we focus on detecting locally homogeneous intervals with stable parameters. To be more specific, we focus on a count data model where the time varying intensity determines a Poisson process. Take again figure 1 as an example. We aim to detect the years of '95 -'97 as a structural break and capture therefore the non stationary component (a slight uptrend is observable). We find locally homogeneous windows, verifying that the procedure is working and show how it can be used to obtain density forecasts.

Stochastics
Let Y t ∈ N, t = 0, ..., T be a count data time series such as the count of M&A series, see in figure 1. Think of Y t ∼ P oisson(θ), where θ represents the rate or average number of occurrences in a fixed interval. Since we allow for time variation in our model, for The log likelihood function on I is: the MLEθ I based on observations in i ∈ I is: which for a Poisson model is the sample mean. The testing hypotheses are therefore:

Local Parametric Approach
The LR test statistic for a breakpoint τ is: Since one has many candidates τ ∈ J, one arrives at: This unfortunately has a very intractable distribution, hence the critical values z I (α), indicating that the test indicates that the test statistic rejects H 0 in equation (3) i.e. when is hard to calculate. Indeed the limiting distribution of T I is different from general likelihood ratio tests due to the presence of nuisance parameters (breakpoints) in the alternative hypothesis which are not identified under the null hypothesis. Hence, convergence of the generalized LR statistics to a χ 2 distribution according to Wilk's phenomenon can not be put into action. While the asymptotic distribution of the sup-LR test in equation (5) can still be derived (Andrews and Ploberger, 1994), a large enough sample size is required for its asymptotic critical values to be applicable. Certainly, that is not the case in most of the practical situations where only small samples of data are available.
Spokoiny and Zhilova (2015) provide a non-asymptotic result for misspecified models with small sampling sizes. The technique is called multiplier bootstrap (MBS) which is discussed in detail in the next section.

Multiplier bootstrap
Since the asymptotic distribution for the LR test statistic is not available for small samples, we approximate the unknown log-likelihood distribution using the bootstrap. First, introduce random weights to the previously defined likelihood function: where the weights w t are with E(w t ) = 1 and Var(w t ) = 1 iid. The bootstrap version of (1) is given by: The bootstrap MLE is then defined as: which is:θ It follows that the corresponding bootstrap of (10) is: A penalty termθ B,τ −θ A,τ is introduced to compensate for model misspecification bias. Klochkov et al. (2019) shows that the distribution of this test conditional on the data mimics the "true" distribution of T I with high probability. Using (8) we can obtain the critical value through simulations. Indeed, the critical value z • I (α) is defined as:

Algorithm
The algorithm for an adaptive window length selection at each point in time is now straightforward. It is based on sequential testing of the hypotheses on a nested set of intervals {I k } k=0,1,...,K , where I 0 ⊂ I 1 ⊂ . . . ⊂ I K . Let n k = |I k | be the number of observations in each interval. The first interval I 0 is assumed to be homogeneous with length n 0 . Then, for each interval I k , the null hypothesis of parameter homogeneity is tested against the alternative of a change point at an unknown location τ within I k , as in (3).
Since the setup deals with nested intervals, but the existence and location respectively (see figure (2)). The test statistic is calculated similarly to equation (5) as where A k,τ and B k,τ are as previously specified and we test at every point τ ∈ J k for a change point. The kth interval is rejected if and z • I k is generated via multiplier bootstrap as explained in the previous section. If the interval I is not rejected, i.e. there exists no change point and it is homogeneous, we continue the testing procedure by choosing a bigger interval. Otherwise, the length of the last non-rejected interval I is the interval of homogeneity and θ i0 = θ I is the respective adaptive estimate of I.
Homogeneity testing for I k utilizes also part of observations of I k+1 . Hence, the pre-definition of intervals is crucial. Following that, the choice of interval lengths affects the test results, and therefore requires careful selection. We employ a geometric increase of intervals like Härdle et al. (2015) and Klochkov et al. (2019). Based on the initial length n 0 , the intervals lengths are defined by where c is a geometric multiplier, chosen slightly above 1 to ensure a monotonic increase of interval lengths, but not by a big margin. Furthermore, instead of taking a constant number of intervals K for testing as proposed by Härdle et al. (2014) and Klochkov et al. (2019), we select K to be the smallest integer such that the whole time series is covered under a geometrically increasing length.
In summary, the LPA algorithm for the adaptive choice of an interval of homogeneity and the corresponding MLE is given by the following iterative procedure: 1. Initialization: Select I 0 , I 1 , I 2 , and define J 1 = I 1 \I 0 , (∀τ ∈ J 1 ), A 1,τ = Figure 2: Iterative algorithm 3. Testing homogeneity: Calculate test statistics in equation (10)

Experimental results
The following lines seek to answer the question whether or not we can generate better forecasts by using the described adaptive methodology, and whether or not the methodology is robust with respect to previously unseen and thus unpredictable patterns. We compare one-step-ahead and multi-period point parameter forecasts of the proposed locally adaptive procedure to a baseline of one year and three years moving averages in a pseudo-out-of-sample approach. We acknowledge that this is a fairly simple approach. A more sophisticated evaluation approach would be to generate multi-period density forecasts that could be evaluated using a tailored loss-function as in Diebold et al. (1998);Diebold (2015), and Gonzalez-Rivera and Sun (2014). However, as this is beyond the scope of this paper (or altogether another paper), we leave it open for future work.

Simulation study
This section evaluates the performance of the proposed technique using simulated datasets as shown in figure 3. We create scenarios that mimic common (n 0 ) of 5 months, we compute K as described in section (2.5). For example, the candidate homogeneous windows for the latest period in the time series are [6,9,12,16,22,30,40,55,74,100,135,183,247,300]. Note that since we allow  Finally, to check the robustness of the algorithm, values are generated from an exponential distribution. The simulation in (f) shows that the algorithm detects breakpoints correctly even with exponentially distributed data. Accordingly, the assumption of Poisson distributed values can be easily relaxed towards models from any exponential family. This robustness allows the algorithm to be used even with misspecified models.
For each simulation scenario, we also compare the results with fixed window estimates of 12 months (high variance) and 36 months (high bias) and show the results in figure (5). All subplots show that LPA finds a balance between variance and bias by selecting a smaller or bigger window size when necessary.
Plot (a) shows that while the estimates of LPA fluctuate (as described above), the shift in regime is detected earlier by LPA than by fixed window estimates.
Plots (b) and (e) show that for the simulated intervals with constant mean, fixed window estimates indicate a highly fluctuating mean, while LPA recognizes intervals of time homogeneity correctly. Moreover, the impact of the short term shock disappears faster in the LPA estimates in (c) and (d). However, LPA underestimates the magnitude of shocks as visible in (d).
In conclusion, the algorithm accurately detects small shocks, regime shifts and temporary mean changes in time series without strict assumptions on the underlying model. The results could be improved further by correct selection of interval lengths and numbers of intervals being tested, as they have a significant impact on the precision and accuracy of the results.

Use case study
In this section, we apply LPA to a working example of time series that are relevant to businesses in the financial industry. We use a data set of mergers & acquisitions per month that we acquired from the database Refinitiv Eikon Deals (restricted access through subscription). We consider different industries according to the Thomson Reuters Business Classification scheme in Germany.
The dataset consists of a total of 9,969 observations in ten industries in the US and Germany. We put the procedure into action on the following three industries in Germany: 1. Financials 2. Telecommunication

Energy
Due to seemingly inconsistent recordings of transactions, we considered only 424 observations from 01-1984 to 04-2020 in Germany for each industry. We do not make any assumptions regarding correlations of these industries or between countries.
Following previous literature, we consider different industries separately.
Without insider knowledge, the frequency of M&As could be assumed to be random and i.i.d. over certain time windows, which is based on the intuition that we usually learn about mergers only after they are announced. The i.i.d.
assumption states in this context that the observed industries are of a specific, somewhat stable structure in the short run, but can be interrupted by exogenous factors that change industry dynamics. Given these characteristics, we model the number of M&A with a Poisson process and apply LPA to forecast the next period given the MLE of the last observed homogeneous time window. We do not preprocess the data and let the procedure account for structural breaks and non-stationarity.
Similar to the simulation study in previous section, we fix n 0 at 5 months, c at 1.35, compute K as in section (2.5), and run 100 simulations to smoothen the estimated window sizes. We keep n 0 and c for the interval selection through equation ( (1) (3) the previous section, we identify six regimes in the German financial industry (1984-1988, 1988-1990, 1990-1994, 1994-1999, 1999-2006 and 2006-2020). These We see that LPA can handle time-varying parameters while facing a trade-off between parameter variability and modelling bias. A similar conclusion can be drawn from the energy markets plots in (3) of figure (6).
Next, we forecast the number of M&As for 02-2020 to 04-2020 using the LPA estimate and the fixed 1-year and 3-year window estimates of 01-2020.
The estimates and mean squared errors (MSE) of estimation are summarized in the table (1). Moreover, apart from the selection time-varying window lengths, we propose that LPA can also provide guidance on a priori selection of fixed windows. Looking at the distribution plot of window lengths (as a proportion of data points in the time series before the time of evaluation) in figure (7) and selecting the window with highest frequency (w) as the fixed time window for each time series, we also make a forecast and report the MSE in the same  Table 1: Forecast results for 02-2020 to 04-2020 based on the adaptively selected MLE, fixed windows and most recurring window proportionally (w) in the distribution plots in figure (7) (1) (2) (3) Figure 7: Distribution of estimated interval length as a proportion of data points for (1) Financials, (2) Telecommunication and (3) Energy.

LPA Empiricalstudy
The A new algorithm for automatically finding homogeneous time intervals in a non stationary context is proposed. Trends, cyclical components, and even black swan events can be analysed with this technique. The algorithm is based on a fruitful combination of a local parametric model (here a Poisson process) and MBS. We conduct a simulation study that indicates that the procedure is indeed robust, even if the input data is not Poisson distributed. These results are then used to evaluate a data set of M&A industry-based in Germany. The results show that in this non-parametric model-free context we obtain interpretable structural breaks and changes in trend. In conclusion, we provide an easy-to use solution for analyzing large data collections automatically that addresses the most common problems in time series modeling and can be adapted to diverse applications, including call center arrivals, sales forecasting or supply chain decisions.

Future Work
This work is subject to several limitations that are caused either by computational cost or additional complexity that exceeds the scope of this work. As the proposed algorithm is computationally expensive, we evaluated only three German industries and admit that this choice is, to an extend, arbitrarily taken.
However, data for all industries in the US and Germany is available and could be used. The simulations showed the the proposed method had difficulties with detecting small changes. We also saw that the method is not in all cases better than choosing a simple approach using moving averages. An evaluation based on all 20 datasets could give further insights on the robustness of the method. Furthermore, the evaluation using a pseudo-out-of-sample point fore-cast is fairly limited and we justify the superiority of our approach based on the simple measure of a mean-squared-error. However, as Diebold (2015) outlines, this approach provides no insurance against over-fitting, are costly as they discard data and it is questionable whether they provide any benefit. Another questionable point is whether the occurrence of M&A per month strictly follows a time-varying Poisson process, as assumed in this paper.
Answering this question using a sophisticated evaluation approach through generating (multi-period) density forecasts would give more insights and could be an interesting area for future research. Future research could also evaluate the fit to a Poisson distribution with time-varying MLE, but with respect to different values of n 0 and c. Alternatively, other methods for increasing the tested homogeneous interval could be compared to a geometric approach, e.g. random increases that follow a Poisson process or arithmetic increases. Furthermore, the simulation study indicated that the procedure could be generalized to work with any data that is assumed to follow a distribution of the exponential family.
Finally, a possible extension could include a more general version of the current test statistic that looks into both directions.