Introduction
Motivations
Contribution
-
IMPA, a dynamic flight-based variation of the classical MPA, has been introduced to enhance the adaptability and convergence speed of the traditional method.
-
The nonlinearity and uncertainty notions from the existing MPA are utilized in IMPA to locate a predator far from the population and produce a solution with higher fitness than the current attacker (best search agent).
-
A deep learning (DL) architecture has been developed and verified for teaching efficient trading techniques using the IMPA method.
-
The IMPA method and five baseline optimization algorithms (two improved versions of MPA, two dynamic Levy-behaved algorithms, and standard MPA) have been utilized to evolve a conventional DGRU, addressing the two main problems with gradient descent learning algorithms—getting stuck in local minima and the poor convergence rate issue.
Related works
Related terminology
Marine predator algorithm
-
Phase 1, high-velocity ratio (HVR) If the prey is slower than the predator, this scenario arises during the optimization stage, especially when exploration is limited. This principle can be mathematically expressed as follows:where RBM is referred to regularly distributed Brownian motion, entry-by-entry multiplications are represented by the ⊗ symbol. In this case, the RBM multiplication of the prey mimics the prey's movements. A fixed integer (P) and an array of random values (R), ranging from 0 to 1, are the two variables.$$ \begin{aligned} & While{\text{ Iter < max(Iter)}} \times \frac{1}{3}, \hfill \\ &{\mathbf{stepsize}}_{{\mathbf{i}}} = {\mathbf{R}}_{{{\mathbf{BM}}}} \otimes \left( {{\mathbf{Elite}}_{{\mathbf{i}}} - {\mathbf{R}}_{{{\mathbf{BM}}}} \otimes {\mathbf{Prey}}_{{\mathbf{i}}} } \right) \, i \, = \, 1, \, ..., \, n, \hfill \\ & {\mathbf{Prey}}_{{\mathbf{i}}} = \, {\mathbf{Prey}}_{{\mathbf{i}}} + P.{\mathbf{R}} \otimes {\mathbf{stepsize}}_{{\mathbf{i}}} , \hfill \end{aligned} $$(4)
-
Phase 2, the unit-velocity ratio (UVR) During this stage, the prey and predator move in a similar manner, and both the exploitation and exploration phases are crucial. As a result, the agents are evenly divided between exploration and exploitation, and both the predator and the prey are responsible for these tasks. If the prey moves in a Levy flight fashion (v≈1), Brownian motion is the safest strategy for the predator in the UVR. Based on the findings of the study, the prey moves in Levy flight, while the predators move in Brownian motion, as shown in Eq. (5).$$ \begin{aligned} &{\text{while }}\frac{Max(Iter)}{3}{\text{ < Iter < }}\frac{2 \times Max(Iter)}{3} \hfill \\ &{\text{For: the first }} \times \frac{{{\text{predator}}}}{{2}} \hfill \\ &{\mathbf{stepsize}}_{{\mathbf{i}}} = {\mathbf{R}}_{{{\mathbf{LF}}}} \otimes \left( {{\mathbf{Elite}}_{{\mathbf{i}}} - {\mathbf{R}}_{{{\mathbf{LF}}}} \otimes {\mathbf{Prey}}_{{\mathbf{i}}} } \right) \, i \, = \, 1,..., \, n/2, \hfill \\ & {\mathbf{Prey}}_{{\mathbf{i}}} = \, {\mathbf{Prey}}_{{\mathbf{i}}} + P.{\mathbf{R}} \otimes {\mathbf{stepsize}}_{{\mathbf{i}}} . \hfill \end{aligned} $$(5)The MPA employs Levy flight to generate a random vector called RLF. Prey movement in RLF and prey multiplication is taken into account, and prey movement in Levy Flight is simulated by adding the prey's position to the step size. According to the MPA, the remaining 50% of individuals can be represented as follows:$$ \begin{aligned} &{\mathbf{stepsize}}_{{\mathbf{i}}} = {\mathbf{R}}_{{{\mathbf{BM}}}} \otimes ({\mathbf{R}}_{{{\mathbf{BM}}}} \otimes {\mathbf{Elite}}_{{\mathbf{i}}} - {\mathbf{Prey}}_{{\mathbf{i}}} ){\text{ i = n/2, }}...{\text{, n,}} \\ &{\mathbf{Prey}}_{{\mathbf{i}}} = \, {\mathbf{Elite}}_{{\mathbf{i}}} + P.{\text{CEFA}} \otimes {\mathbf{stepsize}}_{{\mathbf{i}}} ,\\ &{\text{CEFA}} = \left( {1 - \frac{{{\text{Iter}}}}{{{\text{Max}}({\text{Iter}})}}} \right)^{{2 \times \frac{{{\text{Iter}}}}{{\text{Maxi(Iter)}}}}} . \end{aligned} $$(6)RBM and Elite compounded in Brownian motion mimic the movements of the predator, while CEFA functions as a factor that may be utilized to alter the predator's step sizes, and the prey changes its position in response to the predator's motions.
-
Phase 3, low-velocity ratio (LVR) When the prey is moving at a slower pace than the predator, the scenario can be summarized as follows:$$ \begin{aligned} & {\text{While Iter > }}0.66{\text{ Max (Iter),}} \\ &{\mathbf{stepsize}}_{{\mathbf{i}}} = {\mathbf{R}}_{{{\mathbf{LF}}}} \otimes \left( {{\mathbf{R}}_{{{\mathbf{LF}}}} \otimes - {\mathbf{Prey}}_{{\mathbf{i}}} + {\mathbf{Elite}}_{{\mathbf{i}}} } \right) \, i \, = \, 1,...,n, \\ &{\mathbf{Prey}}_{{\mathbf{i}}} = \, P.{\text{CEFA}} \otimes {\mathbf{stepsize}}_{{\mathbf{i}}} + {\mathbf{Elite}}_{{\mathbf{i}}} .\end{aligned} $$(7)
Deep gated recurrent unit
Proposed methodology
Dataset
Preprocessing
New dataset for predicting profits
No | F1 | F2 | F3 | F4 |
---|---|---|---|---|
Feature | Profit margin ratio | Gross margin ratio | Return on assets | Free Cash flow margin |
No | F5 | F6 | F7 | F8 |
---|---|---|---|---|
Feature | Return on equity | Quick ratio | Current ratio | Cash ratio |
No | F9 | F10 | F11 | F12 |
---|---|---|---|---|
Feature | Cash flow to debt ratio | Debt to equity ratio | Debt ratio | Operating cash flow sales ratio |
No | F13 | F14 | F15 |
---|---|---|---|
Feature | R&D to revenue | SGA to revenue | CAPEX to revenue |
Improved marine predator algorithm
Problem definition
Loss function
Experimental results and discussion
Algorithm | Parameter | Value |
---|---|---|
MPA and its variants | Number of predators | 200 |
Max (iterations) | 250 | |
DLFCHOA | r1 | (0, 1] |
A | Linearly decreased from 1.5 to 0 | |
LGWO | \(a\) | [2, 0) |
Statistical metrics
-
R2 is a statistical measure that represents how well the data fits a linear regression model. It measures the proportion of variance in the dependent variable that is predictable from the independent variable(s). A high R2 value indicates a good fit between the model and the data.
-
MAPE measures the average percentage difference between the predicted and actual values. It is commonly used in financial forecasting, where it is important to accurately predict future values. MAPE is advantageous because it is scale-independent and can be easily interpreted.
-
RMSE measures the square root of the average of the squared differences between predicted and actual values. It is a popular metric for evaluating regression models because it penalizes large errors more than smaller ones. RMSE is advantageous because it is sensitive to outliers and is commonly used in image and signal processing applications.
-
RRMSE is a variant of RMSE that is normalized by the range of the dependent variable. This metric is useful when the range of the dependent variable varies widely across different samples.
-
MRE measures the average of the absolute percentage errors between predicted and actual values. It is similar to MAPE but does not calculate the errors as a percentage of the actual values. This metric is useful when predicting values that are close to zero, where MAPE may be undefined or inaccurate.
-
MAE measures the average absolute difference between predicted and actual values. It is a robust metric that is less sensitive to outliers than RMSE.
Profit prediction model using DGRU-MPA
RMSE | R2 | RRMSE | MAPE | MAE | MRE |
---|---|---|---|---|---|
0.075 | 0.61 | 0.087 | 2.601 | 0.049 | 0.023 |
Method | RMSE | R2 | RRMSE | MAPE | MAE | MRE | Rank | |
---|---|---|---|---|---|---|---|---|
Training | DGRU | 0.075 | 0.61 | 0.087 | 2.601 | 0.049 | 0.023 | 6 |
DGRU-IMPA | 0.017 | 0.98 | 0.010 | 0.641 | 0.013 | 0.010 | 42 | |
DGRU-NMPA | 0.031 | 0.95 | 0.019 | 1.169 | 0.020 | 0.011 | 36 | |
DGRU-LGWO | 0.039 | 0.92 | 0.029 | 1.252 | 0.024 | 0.012 | 30 | |
DGRU-DLFCHOA | 0.049 | 0.90 | 0.048 | 1.649 | 0.029 | 0.016 | 24 | |
DGRU-CMPA | 0.060 | 0.79 | 0.060 | 1.841 | 0.034 | 0.020 | 18 | |
DGRU-MPA | 0.063 | 0.79 | 0.063 | 2.110 | 0.049 | 0.022 | 12 | |
Testing | DGRU | 0.062 | 0.60 | 0.042 | 2.401 | 0.044 | 0.019 | 6 |
DGRU-IMPA | 0.012 | 0.97 | 0.009 | 0.568 | 0.010 | 0.005 | 42 | |
DGRU-NMPA | 0.019 | 0.93 | 0.014 | 0.979 | 0.014 | 0.009 | 36 | |
DGRU-LGWO | 0.032 | 0.90 | 0.017 | 1.169 | 0.020 | 0.012 | 30 | |
DGRU-DLFCHOA | 0.036 | 0.87 | 0.021 | 1.460 | 0.023 | 0.014 | 24 | |
DGRU-CMPA | 0.039 | 0.79 | 0.026 | 1.671 | 0.026 | 0.017 | 18 | |
DGRU-MPA | 0.046 | 0.77 | 0.029 | 1.863 | 0.029 | 0.018 | 12 |
The performance comparison of the classic models
Model | Initial parameters | Setting parameters |
---|---|---|
ARIMA | Order (p, d, q) = (1, 0, 1) | N/A |
SVR | Kernel = Radial Basis Function | C = 1.0, epsilon = 0.1, gamma = auto |
RF | Number of trees = 100 | Max depth = None, Min samples split = 2, Min samples leaf = 1 |
MLP | Hidden layer sizes = 50 | Activation function = Tanh, Learning rate = 0.001 |
Complexity analysis
Method | Number of parameters | FLOPS | Training time | p-value |
---|---|---|---|---|
DGRU | 10 K | 6.9 M | 7 m 30 s | 0.33 |
DGRU-CMPA | 12.1 k | 7.22 M | 9 m 35 s | 0.0052 |
DGRU-DLFCHOA | 13.25 M | 7.98 M | 11 m 33 s | 0.0012 |
DGRU-LGWO | 12.5 k | 7.32 M | 9 m 55 s | 0.0033 |
DGRU-NMPA | 13.1 k | 7.72 M | 10 m 33 s | 0.0212 |
DGRU-MPA | 12 k | 7.20 M | 9 m 11 s | 0.0001 |
DGRU-IMPA | 11 k | 7.00 M | 8 m 02 s | N/A |