Abstract
This study presents an expert system designed to generate Bitcoin investment strategies based on cryptocurrency market indicators. Historical BTC daily closing prices from 2015 to 2021 were processed to build the system’s predictive foundation. Multilayer perceptron (MLP) neural networks with various configurations were then employed to forecast both price levels and directional movements in Bitcoin’s value. These networks were trained using supervised learning techniques and assessed through multiple evaluation metrics. The configuration achieving the lowest RMSE and highest trend prediction accuracy was subsequently used to implement a capital management system capable of executing long, short, and combined trading positions in the Bitcoin market. An all-or-nothing investment scheme was applied and benchmarked against a traditional Buy & Hold (B&H) strategy. The proposed system achieved up to +68% profitability in the combined long/short configuration while reducing maximum drawdown by more than 40%. In addition, an expert supervisory layer was integrated, incorporating market indicators such as stop-loss, take-profit, and market withdrawal rules based on maximum adverse excursion (MAE) and maximum favorable excursion (MFE). Although this supervisory layer slightly reduced profitability in some scenarios, it enhanced risk control and capital protection during highly volatile periods. Overall, the proposed framework demonstrates that neural network–driven trading strategies, when combined with supervisory expert rules, can significantly outperform a passive Buy & Hold approach, offering a reproducible and fully automated solution for Bitcoin capital management.
1. Introduction
The cryptocurrency market has experienced remarkable growth in recent years, introducing a disruptive alternative to traditional financial transaction systems through blockchain technology [1]. Numerous cryptocurrencies exist today, including Bitcoin, Ethereum, and Solana, with Bitcoin (BTC) remaining the most widely adopted and serving as a benchmark for the entire sector [2]. As the first decentralized cryptocurrency, Bitcoin is the natural focus of this work.
A substantial body of literature investigates the use of neural networks for stock and cryptocurrency price prediction [3,4], as well as for time series forecasting more broadly [5]. Hybrid methods combining technical and fundamental indicators [6], and architectures such as Convolutional Neural Networks (CNNs) [7] and multilayer perceptrons (MLPs) [8,9], have been extensively explored. Recent studies have also evaluated Bayesian neural networks (BNNs) [6], long short-term memory (LSTM) models [10,11,12,13], and deep learning approaches trained on blockchain data [8] for Bitcoin price forecasting. Furthermore, several works [14,15] analyze the feasibility of applying different machine learning techniques to datasets with varying structures and dimensionalities to predict Bitcoin prices at different frequencies. These studies confirm that machine learning models can capture nonlinear dynamics; however, they also highlight that prediction accuracy remains limited, often near the 50% mark [16,17,18].
Data preprocessing is a crucial component of time series forecasting, particularly given the computational demands associated with cryptocurrencies. Rajabi et al. [15] examined the relationship between sample size and model performance, showing that reducing input dimensionality does not necessarily increase prediction error. The work presented in [19] discusses various normalization techniques designed to improve neural network performance. Similarly, refs. [20,21,22] study Bitcoin price prediction using extensive sets of financial indicators.
While price forecasting has received considerable attention [23], fewer studies have focused on integrating these predictions into capital management systems capable of real-time trading. Fuzzy logic–based systems, though less common, have been used to implement intelligent trading frameworks. Examples include rule-based fuzzy expert systems designed for traditional markets to determine trading signals and capital allocation [24,25,26], as well as fuzzy recommendation systems incorporating candlestick analysis and currency devaluation effects [27].
Moreover, neural network models are typically evaluated only using statistical accuracy metrics (RMSE, MAE), rather than performance indicators directly relevant to financial decision-making, such as profitability, drawdown reduction, and risk-adjusted returns. Additionally, supervisory mechanisms capable of adapting to market shocks—crucial in the highly volatile cryptocurrency landscape—are often missing [5].
In light of these limitations, this work addresses three primary research gaps:
- •
- Integration gap: Most studies focus solely on price or trend prediction and do not develop end-to-end automated capital management systems.
- •
- Performance gap: Evaluation criteria typically emphasize statistical accuracy instead of profitability metrics compared with benchmark strategies such as Buy & Hold (B&H).
- •
- Risk management gap: Few approaches combine machine learning models with expert supervisory rules (e.g., stop-loss, take-profit, market withdrawal) to handle volatility and manage risk.
This paper addresses these gaps by proposing an integrated framework for Bitcoin capital management that combines supervised MLP-based price and trend forecasting with a rule-based supervisory expert layer. MLPs were selected for their simplicity and ability to capture nonlinear patterns while avoiding the greater complexity and computational overhead associated with sequential architectures. This shallow network structure facilitates testing various configurations with manageable computational cost. Importantly, the proposed strategy is generalizable and may incorporate predictions from other neural architectures or forecasting methods.
The originality of this work lies not only in predicting price movements but also in embedding these predictions within an automated trading system capable of executing long, short, and combined strategies. Unlike previous studies that report only prediction accuracy, this work evaluates realistic performance metrics—such as profitability, drawdown reduction, and capital preservation—offering insights more relevant to real-world investors. This combination of predictive modeling, executable trading logic, and risk-aware supervision provides a practical and robust alternative to methods that focus solely on statistical accuracy or passive investment strategies.
In this sense, the proposed approach differs from existing alternatives by going beyond isolated prediction tasks and delivering a complete, automated trading framework. While many studies emphasize accuracy metrics, this work prioritizes the key objectives in finance: profitability and risk management. By integrating neural network forecasts with a flexible capital management structure, the system achieves up to 68% higher returns than a Buy & Hold strategy, demonstrating its practical utility.
Furthermore, the system addresses a critical weakness of automated trading—its vulnerability to extreme market volatility—through an expert supervisory layer that employs professional risk measures (MAE/MFE) to dynamically manage trades, mitigate losses, and preserve capital during adverse conditions.
The main contributions of this work are as follows:
- -
- Development of a neural network–based system for Bitcoin price and trend prediction using daily closing data and supervised learning with MLP architectures.
- -
- Design of a capital management framework capable of long, short, and combined positions, outperforming the Buy & Hold strategy by achieving up to +68% profitability while reducing drawdown.
- -
- Implementation of an expert supervisory layer based on MAE/MFE metrics to improve risk control and enhance robustness during adverse market events.
By combining predictive modeling, capital allocation, and expert supervision, this work demonstrates that neural network–based trading systems can substantially outperform passive strategies such as Buy & Hold, offering a reproducible and risk-aware approach to cryptocurrency capital management.
The remainder of this paper is structured as follows. Section 2 describes the dataset and methodology, including neural network configurations and performance metrics. Section 3 presents the results of price and trend prediction. Section 4 introduces the capital management strategies and compares them with Buy & Hold. Section 5 discusses the supervisory expert system and its impact on performance. Finally, Section 6 provides conclusions and future research directions.
2. Dataset and Metrics Used
The dataset employed in this study consists of daily Bitcoin closing prices obtained from the AlphaVantage repository [28], covering the period from 1 February 2015 to 14 April 2021. Preprocessing involved removing non-trading days and filling missing values through shifting, since these gaps typically correspond to weekends or periods of platform downtime. Outliers resulting from extreme volatility were retained to preserve market realism but normalized using z-score standardization to stabilize neural network training.
The z-score is computed by subtracting the mean from each observation and dividing by the standard deviation, as defined in Equation (1):
where
is the data point,
the mean and
the standard deviation.
The dataset was divided into two subsets: approximately 80% for training (1 February 2015 to 13 April 2020; 1356 samples) and 20% for validation/testing (14 April 2020 to 14 April 2021; 262 samples). This split provides a sufficiently long historical window for training while ensuring a representative testing period under realistic market conditions.
2.1. Prediction Metrics
To evaluate the prediction performance of the neural network configurations, several error metrics were used: root mean square error (RMSE), mean absolute error (MAE), mean relative error (MRE), hit rate, and success rate. These metrics are defined as follows:
- -
- The RMSE quantifies how closely the predictions match the true values (2):where n is the number of samples, the predicted data value and the actual value.
- -
- The MAE measures the average magnitude of prediction errors. In the mean absolute error, the individual differences are weighted equally in the average (3):
- -
- The mean relative error (MRE) is used to assess errors proportionally, which is particularly relevant in Bitcoin price series where large absolute values may mask prediction quality (4):
Trend prediction quality was evaluated using the hit rate, where a hit denotes a correct prediction of next-day direction (5):
Additionally, confusion matrices were computed to derive the success rate, which evaluates the proportion of correct directional predictions (TP) across all outcomes, with true positive (TP), false positive (FP), true negative (TN) and false negative (FN) (6).
- ⚬
- True positive (TP): The network predicts that Bitcoin’s price will rise, and the price indeed increases.
- ⚬
- True negative (TN): The network predicts that Bitcoin’s price will fall, and the price indeed decreases.
- ⚬
- False positive (FP): The network predicts that Bitcoin’s price will rise, but the price actually falls.
- ⚬
- False negative (FN): The network predicts that Bitcoin’s price will fall, but the price actually rises.
A higher success rate means better forecast performance in the test period.
2.2. Capital Management Metrics
To evaluate the capital management system, several performance indicators were computed: profitability, maximum drawdown, profit factor, average profit, average loss, and number of trades.
- -
- Profitability is defined as (7), that is, benefit obtained with respect to the initial investment:
- -
- Maximum drawdown (MDD) provides an estimate of the risk assumed by the system, indicating the largest peak-to-trough loss of the equity curve.
- -
- The profit factor evaluates the ratio between total profits and total losses (8):
A value greater than 1 indicates profitability. The higher the profit factor, the more likely the system is to be able to make higher profits while assuming lower risk.
- -
- The number of trades is also essential to assess the statistical reliability of results: systems with very few trades may yield unstable or non-generalizable metrics.
- -
- Average profit (9) and average loss (10) are defined as
- -
- Finally, the mathematical expectation of the system is given by (11):
A positive expectation implies that the system is profitable on average.
3. Methodology
The proposed capital management system follows a layered architecture that integrates predictive modeling with expert supervisory rules. At its core, the system employs multilayer perceptron (MLP) neural networks configured for time-series prediction. Each MLP includes an input layer that receives between 10 and 200 historical closing prices, one or two hidden layers with up to 20 neurons in the first and up to 5 in the second, and an output layer that provides either the next-day price estimate or a binary trend prediction (bullish/bearish).
On top of this predictive layer, an expert supervision module manages trading decisions and risk exposure. This module combines neural network outputs with rule-based strategies, applying stop-loss, take-profit, and market exit or withdrawal rules based on maximum adverse excursion (MAE) and maximum favorable excursion (MFE). The architecture therefore couples predictive intelligence with deterministic safeguards, enabling more robust capital management in highly volatile cryptocurrency markets.
Figure 1 presents an overview of the proposed architecture.
Figure 1.
Overview of the proposed architecture for neural network-driven Bitcoin capital management.
3.1. BTC Price and Trend Prediction with Neural Networks
Neural networks have been widely used for time-series prediction across multiple disciplines, including financial forecasting. In this work, MLP networks are configured to predict the evolution of Bitcoin’s value, both the next-day closing price and the expected direction of movement. The training period spans 1 February 2015 to 13 April 2020, and the testing period covers 14 April 2020 to 14 April 2021.
In addition to forecasting BTC’s next-day closing price, the networks identify whether the following day’s price will be higher or lower than the current value, thus estimating the price trend. Two cases are analyzed: when the absolute variation exceeds 1% and when it exceeds 2%.
The trend prediction process is summarized in the following pseudocode (Algorithm 1).
| Algorithm 1 Predict BTC Trend |
| Input: |
| P [1…n]—series of daily closing prices |
| w—window size (e.g., 50 days) |
| θ—threshold for trend definition (e.g., 0.01 or 0.02) |
| Output: |
| Trend prediction for day t + 1: “UP”, “DOWN”, or “” (no significant change) |
| Procedure: |
| Extract price window: |
| X ← P[n − w + 1 … n] |
| Compute historical label: |
| label ← { +1 if BTC price increases, −1 if decreases, 0 if no change | threshold θ} |
| Feed input into neural network: |
| p ← NN(X) //output from trained neural network model |
| Decision rule: |
| if p ≥ 0.5 then |
| return “UP” //predict upward trend |
| else if p ≤ −0.5 then |
| return “DOWN” //predict downward trend |
| else |
| return “” //predict no significant change |
To predict the BTC price and trend, multiple MLP configurations were tested (varying number of layers and neurons), selecting those that minimized RMSE or maximized trend success rate. Hidden layers used tansig activations, while output layers used purelin or logsig. Networks were trained with the Levenberg–Marquardt or scaled conjugate gradient algorithms, using up to 1000 epochs and early stopping. All other hyperparameters and random seeds were fixed.
3.2. BCT Trading Strategy Based on Neural Network Prediction
The trading strategy directly relies on the trend predictions generated by the neural networks. Using historical windows of 10 to 200 days, the networks classify the next-day movement as upward or downward. If an upward movement is predicted, the system opens a long position with all available capital; if a downward movement is predicted, it opens a short position. Positions are closed at the beginning of the next trading session when the forecast changes, following an all-or-nothing rule. In cryptocurrency markets, a “session” corresponds to a continuous 24 h period, since trading is uninterrupted.
Three configurations were evaluated: long-only, short-only, and long–short. This allows the system to adapt to both bullish and bearish phases. Subsequent sections assess profitability, drawdown, and risk-adjusted performance against a Buy & Hold (B&H) benchmark.
The networks that achieved the best trend prediction performance were selected for integration into the investment system. The test period for the capital management evaluation spans 15 April 2021 to 15 April 2022, with an initial capital of USD 1000.
The investment system operates as follows:
- -
- Trades use full available capital (all-or-nothing strategy).
- -
- Based on the predicted trend, the system takes a long or short position.
- -
- If already in a position and the prediction changes, the system exits at the next session’s opening price and takes the corresponding new action.
Although networks with higher success rates are expected to perform better, this cannot be guaranteed: frequent small gains combined with occasional large losses may still lead to negative returns. Moreover, past behavior does not necessarily repeat in future markets.
Performance is evaluated by comparison with a Buy & Hold strategy, the standard benchmark in financial analysis. Risk assessment is based on Drawdown, a widely used and intuitive metric that measures historical peak-to-trough loss and is considered a relevant indicator of capital preservation.
3.3. Expert Trading Supervisory System
The capital management system based solely on neural network predictions can be improved by incorporating additional supervisory layers. For this purpose, an expert system was developed to supervise and adjust trading decisions using market-based rules such as stop-loss, take-profit, and market withdrawal. Since neural networks may underperform during unexpected events or regime shifts, the expert system provides additional risk control and adaptability.
Below, the market indicators used by the expert system are summarized.
- •
- A stop-loss is a conditional order that triggers the sale of an asset if its price falls below a predefined limit, representing the maximum acceptable loss. Although stop-losses protect against severe downturns, they may also trigger too frequently, especially with small thresholds in volatile markets such as Bitcoin, generating “snowball” liquidation effects.
- •
- Take-profit (T/P) orders automatically close trades once a predefined profit level is reached. While they secure gains, they may also prevent capturing larger potential increases. Stop-loss and take-profit rules together provide structured short-term risk management.
- •
- Market withdrawal. If losses exceed 30% of initial capital, the system exits the market entirely. This reflects a realistic constraint, as no broker or investor would typically remain in the market under such adverse conditions.
Several combinations of stop-loss and take-profit rules were analyzed (see below). In every case, the 30% market withdrawal rule remained active.
3.3.1. Fixed Stop-Loss and Take-Profit
The first strategy sets stop-loss (12) and take-profit (13) as fixed percentages of the entry price:
This strategy performed poorly: due to Bitcoin’s high volatility, stop-losses were frequently triggered even when network predictions were correct. Therefore, this configuration was discarded for the final expert system.
3.3.2. ATR Based Stop-Loss and Take-Profit
Average True Range (ATR) provides a measure of recent volatility (14):
Thus, it is possible calculate the ATR of n previous sessions (typically one or two weeks, that is, 7 or 14 sessions) and based on this, to calculate the stop-loss and take-profit with k times the ATR according to Equation (15) and Equation (16), respectively.
ATR values over the previous n sessions (typically 7 or 14) are used to set stop-loss (15) and take-profit (16) at k times the ATR:
This approach also yielded unsatisfactory results, as profitable parameter ranges could not be reliably identified. Additional adjustments to both thresholds appear necessary.
3.3.3. MAE- and MFE Based Stop-Loss and Take-Profit
Maximum adverse excursion (MAE) quantifies the maximum unrealized loss during a trade.
For long positions (17):
For short positions (18):
MAE provides a quantitative basis for determining stop-loss placement.
Maximum favorable excursion (MFE) measures the maximum unrealized gain during a trade.
For long positions (19):
For short positions (20):
MFE can therefore be used to determine appropriate take-profit thresholds.
MAE and MFE values may be computed using dynamic variables such as ATR or by analyzing historical distributions.
4. Results of Neural Network Forecasting
To provide a clear overview of the computational requirements and to facilitate reproducibility, the training time of each neural network configuration was recorded during the experiments. All models were trained on a workstation equipped with an Intel Core i7-8550U processor, 32 GB of RAM, and MATLAB 2021b, specifically using the Deep Learning Toolbox. The finet function was used to create the MLP neural networks, which were then trained with the Levenberg–Marquardt algorithm using default learning-rate and momentum parameters.
Training times varied depending on the size of the input window and the network depth. For configurations with input windows between 10 and 50 days and one hidden layer, training required approximately 15–30 s per epoch, whereas networks with two hidden layers increased this time to 40–60 s per epoch. For larger input windows (100–200 days), training times ranged between 2 and 5 min per epoch, mainly due to the higher dimensionality and larger number of neurons involved.
All reported metrics correspond to the average of 10 independent runs using different random seeds to reduce initialization variability. As mentioned earlier, data were normalized using z-score scaling without temporal shuffling, and randomness was controlled using rng (42, ‘twister’).
4.1. Bitcoin Price Prediction
Table 1 summarizes the results obtained for the different MLP configurations. The second and third columns indicate the number of hidden layers and the number of neurons per layer, respectively. The input data correspond to the number of past closing-price samples used as predictors.
Table 1.
Results of BTC price prediction.
Regarding the MAE, Table 1 shows that for input windows up to 50 days, the absolute errors remain relatively stable. Beyond this point, increasing the number of input data leads to higher MAE. It can also be observed that deeper networks tend to reduce MAE (with the exception of the 150-day input window). This confirms that increasing network depth can help decrease prediction error.
All networks yield mean relative errors (MREs) between 2.5% and 3.5%. However, MRE is not a reliable metric in this context, since daily price fluctuations usually fall between 1% and 2%. Consequently, small absolute prediction errors can appear disproportionately large when expressed as relative values.
Figure 2 shows the RMSE values for the different network configurations. Two main observations can be made: (i) increasing the number of hidden layers generally reduces RMSE, and (ii) a larger number of input data does not necessarily yield better performance. In fact, the lowest RMSE is obtained when using the previous 50 closing prices as input.
Figure 2.
RMSE in price prediction.
4.2. BTC Price Change Prediction
Table 2 presents the results for BTC price-trend prediction (first column indicates the 1% or 2% change thresholds). Higher change thresholds were not explored, as such variations are relatively rare in cryptocurrency markets.
Table 2.
Results of BTC price change prediction.
The success rate is a useful measure of the ability to correctly predict BTC price movements. While the highest success rate in Table 2 is 0.643, this value must be interpreted in the context of a three-class prediction problem (upward trend, downward trend, or stability). Assuming equal class probability, any success rate above 0.33 indicates predictive value beyond random guessing and thus provides useful information for trading decisions.
More importantly, when a change is predicted, it is crucial that the prediction is correct. This is captured by the success rate, which is particularly relevant for investment strategies. Even modest success rates may provide a significant advantage in highly volatile markets like Bitcoin.
Figure 3 shows that neither increasing network depth nor increasing the number of input data significantly improves the hit rate. However, larger BTC price variations are inherently easier to predict, which explains the higher success rates observed for the 2% threshold.
Figure 3.
Hit rates comparison for the different NN configurations analyzed.
Since the success rate is a strong indicator of how well the network adapts to the problem under study, configurations with higher success rates would be expected to yield better profitability when integrated into capital-management systems (Figure 4).
Figure 4.
Success rates comparison for the different NN configurations analyzed.
However, achieving more correct predictions does not necessarily translate into higher profits. What matters is being correct at the right moments—an aspect that will be examined later.
The main conclusion of this analysis is that neural networks perform well when predicting general trends from past values but are less accurate at forecasting specific price values. The inherent volatility of cryptocurrency markets greatly complicates point-value prediction. Moreover, accurate timing is as important as accurate forecasting. Combined with the fact that past market behavior does not guarantee future patterns, this makes the forecasting task particularly challenging.
The results of this section, which form the basis for designing the trading and capital-management system, can be summarized as follows:
- -
- MLP networks can estimate Bitcoin prices with mean relative errors below 3.5%.
- -
- RMSE and MAE are appropriate indicators of forecasting performance.
- -
- Trend prediction strongly depends on trend discretization.In highly volatile markets, small changes should not be treated as anomalies, as this would degrade network training.
- -
- A higher hit rate does not necessarily imply a higher success rate, and a higher success rate does not guarantee higher profitability.
5. BTC Trading Strategy Results
We first develop an investment strategy that takes action only when the neural network predicts an increase in the value of Bitcoin. In such cases, the system purchases BTC; otherwise, the system sells. This strategy is applied in long, short, and combined contexts. In the next section, this capital-management strategy will be enhanced with an expert system.
5.1. Long-Term BTC Trading
The results obtained using the long-term investment strategy are shown in Table 3. The first column indicates whether the system relies on the NN trained to predict 1% or 2% BTC price variations. The table reports profitability, maximum drawdown, profit factor, average profit, average loss, and the number of trades executed.
Table 3.
Investment management results with long-term trading.
From the number of trades, it is evident that some systems barely operate in the market, as indicated by the very small or even zero number of buy/sell actions.
A first observation is that nearly all NN-based systems outperform the Buy-and-Hold (B&H) strategy. Some models even achieve positive returns. However, this performance does not appear to correlate directly with any specific training parameter. Each network identifies different patterns, which may or may not recur during the testing period.
The maximum drawdown shows that all networks assume less risk than the B&H strategy. Notably, the networks that obtain the highest profits also tend to exhibit the lowest drawdowns. In contrast, the profit factor, average profit, and average loss do not reveal clear or consistent performance patterns, nor could these outcomes be anticipated from the training phase.
Some systems achieve profit factors higher than the B&H benchmark, although only a subset exceeds the value of one. With 50 input data, the networks tend to perform particularly well. A relationship is also observed between the last three metrics: a higher profit factor corresponds either to lower average losses or to higher average gains.
5.2. Short-Term Trading Results
In this scenario, the investment system performs only short-selling operations, entering the market only when it predicts that the BTC price will fall. Short positions are capped at USD 1000. The results are presented in Table 4, including profitability, maximum drawdown, profit factor, average gain, average loss, and number of trades.
Table 4.
Investment management results with short-term trading.
Short-selling results indicate that systems trained with 50 input values generally perform better than the others, which is consistent with the training-phase outcomes. During the analysis period, more short-than-long opportunities occurred, enabling systems that learned such patterns to achieve better performance. Nevertheless, profitability never surpasses that of the B&H strategy in this short-term framework.
In terms of risk, maximum drawdowns are lower than those observed in the long-term case and also lower than the B&H drawdown, indicating reduced exposure. Overall, short-selling strategies outperform long-only strategies because the study period contains more bearish phases.
Analysis of the profit factor suggests that all networks generate similar gains, and most exceed those of the B&H benchmark. This indicates that the short-term systems are generally functioning well.
5.3. Combined Long- and Short-Term Trading Results
Both trading modes are now combined, allowing the system to take either long or short positions depending on the NN prediction. Table 5 presents the corresponding results, showing profitability, maximum drawdown, profit factor, average gain, average loss, and number of trades.
Table 5.
Investment management results with long- and short-term trading.
Inspection of Table 5 shows a clear increase in profitability, as the ability to act on both upward and downward trends improves the chance of correctly exploiting market movements.
In general, results are strongest when using 50 input data, consistent with previous findings. Additionally, NNs trained with a 1% prediction threshold outperform those trained with 2%, confirming that neither success rate nor hit rate are reliable predictors of future financial returns.
5.4. Analysis of the Proposed Investment Strategies
We compare the evolution of invested capital across all NN-based strategies—long, short, and combined—alongside the B&H benchmark.
Figure 5 displays the performance of systems trained using a 1% BTC-variation threshold with 50 input data and a single hidden layer. Results show that the network captures the most frequent trends (in this period, upward trends) reasonably well. Although errors occur, the overall capital management is strong. The combined long-short strategy performs best, albeit with higher risk because it executes more trades. All NN-based strategies outperform B&H.
Figure 5.
Capital evolution with neural networks trained using a 1% BTC price variation and different investment strategies.
A similar analysis was conducted using networks trained for a 2% variation margin with 100 input data and one hidden layer (Figure 6). Although better systems have been shown previously, the performance remains acceptable. The short-term strategy performs fewer actions, as the selected network struggles to detect upward movements or does not detect them within the imposed 2% threshold. Still, short-term capital management achieves reasonable results, maintaining a low maximum drawdown.
Figure 6.
Capital evolution with neural networks trained using a 2% BTC price variation and different investment strategies.
6. Expert Trading Supervisor Results
In this work, a market-withdrawal strategy was implemented whereby the system exits the market whenever losses exceed 20% of the initial investment capital of USD 1000. In other words, trading is halted when the account value falls below USD 800. This withdrawal is executed only after the session in which the condition is triggered has concluded.
The expert supervisory layer uses the maximum adverse excursion (MAE) and maximum favorable excursion (MFE) metrics to set stop-loss and take-profit thresholds. These values are computed using Equations (16)–(19) and illustrated in Figure 7.
Figure 7.
MAE versus MFE in long and short trades for the neural networks.
To improve the trading system, an expert module was added with MAE fixed at 5% and MFE at 2%. Based on these parameters, long-position stop-loss and take-profit levels are defined using Equations (21) and (22):
For short positions, the corresponding expressions are given by Equations (23) and (24):
Table 6 presents the results obtained when applying the expert supervisory system to networks trained to predict a 1% change in Bitcoin price, using the combined long–short trading strategy.
Table 6.
Results with the expert system operating in combined long and short trading.
The results in Table 6 show that although the expert system enhances the capital-management process, the improvements relative to the previous strategy are modest. This limited impact is likely due to the suboptimal selection of stop-loss and take-profit thresholds. In practice, this can lead to two undesirable effects: (i) profitable sessions may be prematurely constrained, reducing potential gains, and (ii) in certain cases the system exits the market at a loss despite the neural network correctly predicting the direction of the movement.
It is also important to note that the supervisory model operates under a pessimistic assumption: it evaluates the stop loss before the take-profit, implicitly assuming that the daily LOW is reached before the HIGH. This conservative condition may limit the potential benefits of the expert system.
Based on the results obtained with the expert capital-management layer, the following conclusions can be drawn:
- -
- The best-performing systems are those operating in both long and short modes, since the neural networks have been trained to detect upward and downward movements.
- -
- The safest systems are those restricted to long-only trading, due to the overall upward market tendency during the training period. As a result, the networks learn to identify upward trends more accurately.
- -
- It is challenging to predict during the training phase whether the capital-management system will perform well during testing, because past patterns do not necessarily recur in future market conditions.
- -
- For Bitcoin, the most effective configuration corresponds to predicting 1% price movements using 50 days of historical data, which consistently yields the strongest performance.
- -
- Given Bitcoin’s high volatility, incorporating stop-loss and take-profit mechanisms can be beneficial, but only if appropriate thresholds can be estimated. Conversely, poorly chosen levels can degrade performance rather than enhance it.
7. Conclusions and Future Works
This study shows that neural networks, particularly MLP architectures with 50-day input windows, are effective tools for modeling cryptocurrency market behavior and predicting both Bitcoin price and short-term trend. The results obtained, with relative errors below 3.5% and trend prediction success rates above 64%, confirm their ability to compete with traditional statistical methods. Integrating these predictive models into a capital management system yields substantially higher profitability than passive strategies such as Buy and Hold, especially when using combined long–short configurations that also reduce maximum drawdown and improve risk control.
The findings also indicate that network configuration strongly affects the model’s ability to capture market volatility, and that good predictive accuracy does not always translate into better trading performance due to differences between training and testing conditions. The addition of an expert supervisory layer with stop loss, take profit, and market withdrawal rules improves capital protection, although poor configuration can significantly worsen results. Overall, the proposed system integrates predictive modeling, dynamic capital allocation, and risk control, offering a robust architecture transferable to other financial markets and to domains where short-term forecasting and automatic decision-making are essential.
Future research will focus on improving generalization and reinforcing the statistical validity of the results. This includes using out of sample validation and adaptive learning models and extending the study to more advanced architectures such as LSTM networks, GRUs, and Transformer based models. Additional datasets will be considered to evaluate robustness across different assets and currencies. Further improvements may come from adding on chain blockchain metrics to enhance market representation, applying statistical significance tests such as the Wilcoxon test to validate outperformance over Buy and Hold, and expanding the risk analysis using standard financial indicators such as the Sharpe ratio, Sortino ratio, and Value at Risk.
Author Contributions
Conceptualization, P.G. and M.S.; methodology, P.G.; software, P.G.; validation, P.G. and M.S.; investigation, P.G.; resources, M.S.; data curation, P.G. and M.S.; writing—original draft preparation, P.G.; writing—review and editing, M.S.; visualization, P.G.; supervision, M.S.; funding acquisition, M.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data and code used in this study are available on request from the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Conti, M.; Kumar, S.; Lal, C.; Ruj, S. A Survey on Security and Privacy Issues of Bitcoin. IEEE Commun. Surv. Tutor. 2018, 20, 3416–3452. [Google Scholar] [CrossRef] [Scilit]
- Mao, X. Would Bitcoin Relace World Currency in The Future: Analysis Based on Marx’s Theory of Monetary Function. Highlights Bus. Econ. Manag. 2023, 17, 201–207. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q. Cryptocurrencies asset classification and pricing using CNN and RNN. Int. J. Data Sci. Anal. 2023, 20, 841–854. [Google Scholar] [CrossRef] [Scilit]
- Bustos, O.; Pomares-Quimbaya, A.; Stellian, R. Machine learning, stock market forecasting, and market efficiency: A comparative study. Int. J. Data Sci. Anal. 2025, 20, 6815–6839. [Google Scholar] [CrossRef] [Scilit]
- Westergaard, G.; Erden, U.; Mateo, O.A.; Lampo, S.M.; Akinci, T.C.; Topsakal, O. Time series forecasting utilizing automated machine learning (AutoML): A comparative analysis study on diverse datasets. Information 2024, 15, 39. [Google Scholar] [CrossRef] [Scilit]
- Adeyebi, A.; Ayo, C.; Adeyebi, M.; Otokiti, S. Stock Price Prediction using Neural Network with Hybridized. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2012; pp. 1–9. [Google Scholar] [CrossRef] [Scilit]
- Izadi, M.A.; Hajizadeh, E. Time Series Prediction for Cryptocurrency Markets with Transformer and Parallel Convolutional Neural Networks. Appl. Soft Comput. 2025, 177, 113229. [Google Scholar] [CrossRef] [Scilit]
- Pakdaman, N.M.; Hamidreza, T.; Hashemi, H.B. Stock Market Value Prediction Using Neural Networks. In 2010 International Conference on Computer Information Systems and Industrial Management Applications (CISIM); IEEE: New York, NY, USA, 2010. [Google Scholar] [CrossRef] [Scilit]
- Ibrahim, A.; Kashef, R.; Corrigan, L. Predicting market movement direction for bitcoin: A comparison of time series modeling methods. Comput. Electr. Eng. 2021, 89, 106905. [Google Scholar] [CrossRef] [Scilit]
- Jang, H.; Lee, J. An Empirical Study on Modeling and Prediction of Bitcoin Prices with Bayesian Neural Networks Based on Blockchain Information. IEEE Access 2017, 6, 5427–5437. [Google Scholar] [CrossRef] [Scilit]
- Viéitez, A.; Santos, M.; Naranjo, R. Machine learning Ethereum cryptocurrency prediction and knowledge-based investment strategies. Knowl.-Based Syst. 2024, 299, 112088. [Google Scholar] [CrossRef] [Scilit]
- Khaniki, M.A.L.; Manthouri, M. Enhancing price prediction in cryptocurrency using transformer neural network and technical indicators. arXiv 2024, arXiv:2403.03606. [Google Scholar] [CrossRef] [Scilit]
- Šestanović, T.; Kalinić Milićević, T. Identification of the Optimal Neural Network Architecture for Prediction of Bitcoin Return. Informatica 2025, 36, 175–196. [Google Scholar] [CrossRef] [Scilit]
- Ranjan, S.; Kayal, P.; Saraf, M. Bitcoin price prediction: A machine learning sample dimension approach. Comput. Econ. 2023, 61, 1617–1636. [Google Scholar] [CrossRef] [Scilit]
- Rajabi, S.; Roozkhosh, P.; Farimani, N.M. MLP-based Learnable Window Size for Bitcoin price prediction. Appl. Soft Comput. 2022, 129, 109584. [Google Scholar] [CrossRef] [Scilit]
- Ji, S.; Kim, J.; Im, H. A Comparative Study of Bitcoin Price Prediction Using Deep Learning. Mathematics 2019, 7, 898. [Google Scholar] [CrossRef] [Scilit]
- Chen, Z.; Li, C.; Sun, W. Bitcoin price prediction using machine learning: An approach to sample dimension engineering. J. Comput. Appl. Math. 2020, 365, 112395. [Google Scholar] [CrossRef] [Scilit]
- McNally, S.; Roche, J.; Caton, S. Predicting the Price of Bitcoin Using Machine Learning. In Proceedings of the 26th Euromicro International Conference on Parallel, Distributed, and Network-Based Processing, Cambridge, UK, 21–23 March 2018. [Google Scholar] [CrossRef] [Scilit]
- Sin, E.; Wang, L. Bitcoin Price Prediction Using Ensembles of Neural Networks. In Proceedings of the 13th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD 2017), Guilin, China, 29–31 July 2017. [Google Scholar] [CrossRef] [Scilit]
- Albariqi, R.; Winarko, E. Prediction of Bitcoin Price Change using Neural Networks. In Proceedings of the 2020 International Conference on Smart Technology and Applications (ICoSTA), Surabaya, Indonesia, 2020; pp. 1–40. [Google Scholar] [CrossRef] [Scilit]
- Velankar, S.; Valecha, S.; Maji, S. Bitcoin Price Prediction using Machine Learning. In Proceedings of the International Conference on Advanced Communications Technology (ICACT), Chuncheon-si, Republic of Korea, 11–14 February 2018. [Google Scholar] [CrossRef] [Scilit]
- Dutta, A.; Kumar, S.; Basu, M. A Gated Recurrent Unit Approach to Bitcoin Price Prediction. J. Risk Financ. Manag. 2020, 13, 23. [Google Scholar] [CrossRef] [Scilit]
- Rodrigues, F.; Machado, M. High-Frequency Cryptocurrency Price Forecasting Using Machine Learning Models: A Comparative Study. Information 2025, 16, 300. [Google Scholar] [CrossRef] [Scilit]
- Bu, Y. Fuzzy Decision Support System for Financial Planning and Management. Informatica 2024, 48, 113–126. [Google Scholar] [CrossRef] [Scilit]
- Van den Berg, J.; Kaymak, U.; Van den Bergh, W.-M. Financial markets analysis by using a probabilistic fuzzy modelling approach. Int. J. Approx. Reason. 2003, 35, 291–305. [Google Scholar] [CrossRef] [Scilit]
- Naranjo, R.; Arroyo, J.; Santos, M. Fuzzy modeling of stock trading with fuzzy candlesticks. Expert Syst. Appl. 2018, 93, 15–27. [Google Scholar] [CrossRef] [Scilit]
- Naranjo, R.; Santos, M. A fuzzy decision system for money investment in stock markets based on fuzzy candlesticks pattern recognition. Expert Syst. Appl. 2019, 133, 34–48. [Google Scholar] [CrossRef] [Scilit]
- “AlphaVantage,” 2022. Available online: https://www.alphavantage.co/ (accessed on 17 November 2022).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).






