# On the Estimation of Logistic Models with Banking Data Using Particle Swarm Optimization
## 4 Implementation  
The test sample (banks) consists of Indonesian commercial and rural banks. The number of commercial and rural banks in Indonesia has decreased over the years (see Figure 2, the data are taken from the Indonesia Central Bureau of Statistics's website [[https://www.bps.go.id](https://www.bps.go.id)]([https://www.bps.go.id](https://www.bps.go.id)) (accessed on 23 October 2024)) due to various factors like mergers, consolidations, and regulatory changes. This decrease is largely due to government efforts to stabilize the banking sector and encourage mergers among smaller banks to create stronger institutions. Despite that, the total assets seem to increase each year; see Figure 1a,b. The data are monthly total assets in the period January 2007-January 2020 in terms of a billion rupiah (Rp) taken from Indonesia Financial Service Authority's website ([[https://www.ojk.go.id](https://www.ojk.go.id)]([https://www.ojk.go.id](https://www.ojk.go.id)) accessed on 1 March 2020), as shown in Figure 1. Let \(y_{d}(t_{i})\) be the data of banking assets at time \(t_{i}\), where \(t_{i}=i\Delta t\), \(i=0,1,\ldots,156\). \(\Delta t=1/12\) is the time increment, \(t_{0}\) is January 2007, and \(t_{156}\) is January 2020. We use the data from January 2007 until December 2018 as the training data, that is the data that are implemented to the logistic models for gaining the parameter value of the models. The data from January 2019 until January 2020 are used as the validation data of the models' prediction in the future assets value. Figure 2: The number of commercial and rural banks in Indonesia over the years. Parameters of logistic models can be divided into two categories. One consists of a growth rate parameter and shape parameters which can be estimated in a short interval of search space; for example, [0,1], [0,5], etc. The other one is a carrying capacity that may require a very long interval of search space; for example, \([0,10^{3}]\), \([10^{4},10^{8}]\), etc. Instead of picking an arbitrary interval for estimating the carrying capacity, we can pick an interval based on a rough estimated value of the carrying capacity. [PERSON] and [PERSON] [1] give a formula to determine the rough estimation of the carrying capacity of the Verhulst logistic function in (2). They use three data points that have the same distance range \(h>0\). Those points are named \((s_{1},x_{1})\), \((s_{2},x_{2})\), and \((s_{3},x_{3})\), where \(s_{2}-s_{1}=s_{3}-s_{2}=h\), and \(x_{1}=y_{d}(s_{1})\), \(x_{2}=y_{d}(s_{2})\), \(x_{3}=y_{d}(s_{3})\). By substituting those points into (2) and doing some eliminations, we obtain  
\[K=\frac{2x_{1}x_{2}x_{3}-(x_{1}+x_{3})x_{2}^{2}}{x_{1}x_{3}-x_{2}^{2}}. \tag{21}\]  
We choose \(s_{2}\) as the time around the mid-time of banking assets data, \(s_{2}=\frac{71}{12},\frac{72}{12}\) and some \(h=\frac{71}{12},\frac{69}{12},\frac{67}{12}\). From those \(s_{2}\) and \(h\), we calculate \(s_{1}=s_{2}-h\) and \(s_{3}=s_{2}+h\). Thus, we obtain \(s_{1}=0,\frac{2}{12},\frac{4}{12}\) and \(s_{2}=\frac{142}{12},\frac{140}{12},\frac{138}{12}\) for the case \(s_{2}=\frac{71}{12}\), and \(s_{1}=\frac{1}{12},\frac{3}{12},\frac{5}{12}\) and \(s_{2}=\frac{143}{12},\frac{141}{12},\frac{139}{12}\) for the case \(s_{2}=\frac{72}{12}\). Having those \(s_{j}\) and the associated \(x_{j}=y_{d}(s_{j})\), \(j=1,2,3\), from (21), we obtain rough values for the carrying capacities of Indonesian commercial and rural banking assets that are presented in Table 1. From Table 1, we can clearly see why the Pearl and Reed formula is called a rough calculation of the carrying capacity of the logistic model, since different \(s_{1}\), \(s_{2}\), and \(s_{3}\) will produce different carrying capacity values. Perhaps the best-estimated value (using an optimization method) of the carrying capacities of the logistic models is smaller or greater than the rough values. Experience shows that their value is not very much different [8,10].