# Using Convolutional Neural Network and Candlestick Representation to Predict Sports Match Outcomes
## 3 Methodology
### Candlestick Representation of Sports Match Behavior  
The candlestick representation of sports match behavior is taken from the odds of the betting market and the real score to generate an OHLC time series. Betting lines and their odds typically come in two types, one related to the difference in points scored by two teams and the other related to the total points scored by these teams. These spreads and total points scored are calculated after the game based on the actual points scored to decide  
Figure 1: The framework of the proposed two-stage approach for sports outcome prediction model.  
whether a bet is won or lost. These spread, total points scored, and actual points scores are plotted for each team's candlestick according to the method proposed by [PERSON] (2018). Further details can be found in the article on sports metrics ([PERSON], 2018) and the previous study ([PERSON], 2018). The candlestick chart defined by OHLC is formulated as follows:  
\[\text{O}=LD \tag{1}\]  
\[\text{H}=\left\{\begin{array}{c}\max(D,\ LD)+GST\ (if\ GST>0)\\ max(D,LD)\ (if\ GST<0)\end{array}\right. \tag{2}\]  
\[\text{L}=\left\{\begin{array}{c}\min(D,\ LD)\ (if\ GST>0)\\ min(D,LD)-GST\ (if\ GST<0)\end{array}\right. \tag{3}\]  
\[\text{C}=D \tag{4}\]  
\[\text{Body color}=\left\{\begin{array}{c}White\ (if\ LD>LD)\\ Black\ (if\ LD>D)\end{array}\right. \tag{5}\]  
where \(D\) is the team winning/losing margin (i.e., the difference in points scored between the team and its opponent); \(LD\) is the line (or spread) on the winning/losing margin between the team and its opponent (i.e., the side line in the betting market); \(T\) is the total points scored by both teams; \(LT\) is the line on the total points scored by both teams (i.e., the over/under (O/U) line in the betting market); \(GSD\) presents the gambling shock related to the line on the winning/losing margin between the team and its opponent (i.e., \(D\)-\(LD\)); \(GST\) provides the gambling shock related to the line on the total points scored by both teams, which can calculate the difference between \(LT\) (the line on the total points scored by both teams) and \(T\) (the actual total points scored) (i.e., \(T\)-\(LT\)).  
The candlestick chart for each team can be obtained in this manner. We take New England with the highest winning percentage and Cleveland with the lowest winning percentage of the 2017/2018 NFL season as examples, as shown in Figures 2 and 3.  
Figure 2: Candlestick chart of New England in 2015/2016 and 2016/2017.  
As shown in Figures 2 and 3, the OHLC sports time series include positive and negative values, which greatly differ from the traditional time series of stock prices, where all values are greater than 0. The OHLC sports time series reflect the gap between two teams in the match. These time series are equivalent to the stationary return time series of the stock prices, which are derived by differencing its original non-stationary price time series. Stationary time series forms are beneficial for time series prediction modeling. However, the existence of meaningful patterns in sports candlesticks, such some identified patterns (e.g., morning star, bullish engulfing, etc.), warrants further investigation.