## 3 Method
### Distance Calculation Functions  
In this part, the authors aim to learn a binary classifier \(f\) that, given two temporal observation sequences of stocks \(X\) and \(Y\), determines whether or not \(X\) and \(Y\) are related stocks that share the same or similar business scopes. Astute readers may consider that it is a subjective task for determining if two stocks are related, which makes the evaluation of the learned model difficult. However, there is indeed a well-justified criteria for this task. In fact, both our evaluation and our labeling scheme are based on this criteria. The U.S. Federal Securities Laws require public companies to disclose information on an ongoing basis ([[https://www.sec.gov/](https://www.sec.gov/)]([https://www.sec.gov/](https://www.sec.gov/))). For example, U.S. companies in the stock market must submit financial reports, for example, Form 10-K (i.e., annual reports) and Form 10-Q (i.e., quarterly reports). These reports contain accurate and timely information about the companies which submitted them. Among these reports, 10-K reports are particularly important because 10-K reports contain a large number of texts providing information related to different aspects of the companies (e.g., competitors, industry type, challenges, and lawsuits). As an illustration, IBM's 10-K report in the year of 2017 mentioned that the company's principal competitors included Alphabet Inc. (Google), Amazon.com, Inc. (Amazon) Cisco Systems, Inc. (Cisco), and so on ([[https://www.sec.gov/Archives/edgar/data/51143/000104746917001061/a223022210-k.htm](https://www.sec.gov/Archives/edgar/data/51143/000104746917001061/a223022210-k.htm)]([https://www.sec.gov/Archives/edgar/data/51143/000104746917001061/a223022210-k.htm](https://www.sec.gov/Archives/edgar/data/51143/000104746917001061/a223022210-k.htm))). Therefore, a well-justified criteria for telling if two stocks \(X\) and \(Y\) are related is to see if their financial reports (e.g., 10-K and 10-Q) have overlapped descriptions, for example, the authors can confidently state that \(X\) and \(Y\) are related stocks if \(X\)'s report mentions \(Y\) as one of its competitors or vice versa. In this paper, the authors consider two stocks \(X\) and \(Y\) are related companies if one of the following conditions holds:  
1. Either \(X\) or \(Y\) mention the other one as a competitor in their 10-K reports. 2. \(X\) and \(Y\) are in the same industry according to their 10-K reports. 3. \(X\) and \(Y\) are connected by lawsuit, contract, or acquisition according to their 10-K reports. Figure 4: An example of news text and its record unit text after preprocessing. It is worth mentioning that the authors only consider 10-K reports, the filing date of which reflects the news data the authors collected for these stocks. Bearing the aforementioned criteria in mind, the authors then state the goal of this paper is to learn a classifier \(f\) that, given two temporal observations of stocks \(X\) and \(Y\), returns 1 if the distance dist[X,Y] of \(X\) and \(Y\) is greater or equal to some threshold \(\tau\) (e.g., \(\tau=0.5\)); it returns 0 otherwise (also see definition below). \[f(X,Y)=\left\{ \begin{array}{ll}1,&\text{if dist[X,Y]}\leq\tau=0.5,\\ 0,&\text{otherwise.}\end{array} \right. \tag{2}\]  
Fundamental to the success of Equation 2 is the quality of the distance function dist[X,Y]. In this paper, the authors measure the distance between two stocks \(X\) and \(Y\) based on a distance function, which is called _Dynamic Time-Text Warping_ (_DTTW_ in short) motivated by DTW. The main idea of DTTW is to use a DTW-style distance function that takes into account both the numeric values (zero-nomalized closing prices sequences) and textual data (daily feature texts). Before giving the definition of DTTW, the authors first briefly introduce the DTW distance function for two items of temporal sequence data consisting of real values, and then describe how the authors adapt DTW to incorporate textual information.