Investment Planning Model Based on Quantitative Trading Strategies

Investment, as a financial activity for the general public, has a wide influence on the development of national enterprises. In the research, the main object is Bitcoin and gold, and the investment prediction of short-term investment is made according to the real financial market, and the investment decision prediction model is established by using XGBoost, BP neural network model, entropy value method, coefficient of variation method, linear programming, and value-at-risk model to solve. The topic provides historical data related to bitcoin and gold. First, for the amount of gold and bitcoin increase, with the price deviation rate for data processing. For the amount and increase problem, which is difficult to judge the accuracy, both XGBoost and BP neural network models are used to predict and compare the results, and finally XGBoost, which has higher accuracy, is chosen as the result. After that, the market sentiment is judged according to the obtained data results, and the entropy value method is applied to calculate the weight of relevant indicators to establish the bull and bear market prediction model. Next, the value-at-risk model is applied to establish a risk prediction model. Finally, the predictions for price, market, and risk are combined, and the coefficient of variation method is used to determine the weights of each component to obtain the objective function and design the law of investment behavior as the result of the final prediction model. The initial amount is brought into the model for calculation, and the final return is found to be about $240,000. To assess the sensitivity of the model, three scenarios are discussed and analyzed in terms of changes in transaction costs, gold-only purchases, and bitcoin-only purchases. The three extreme cases are solved by dynamic programming in turn, and it is found that the decision model is very sensitive to changes in transaction costs. And for the case of only enough to buy gold, versus only buying bitcoin, the conclusion finds that the sensitivity is still high, and it can be judged that bitcoin has a high investment potential as an emerging investment product.


Introduction
With the popularization of globalization and the development of national economy, finance has gradually become an important indicator of the smooth development of society and people's happiness, and the "accelerator" of the rapid development of national economy. Among all financial activities, the importance of investment cannot be overemphasized. Rational investment can not only make investors get huge benefits, but also help to accumulate wealth for the long-term development of the country and society. For investors, the ultimate goal is to manage their money, plan their income and expenses, and build their assets. The realization of these objectives depends to a large extent on investors' long-term grasp of the market. However, due to the lack of advanced investment analysis, investors may ignore the risks and potential returns of investments, resulting in serious mistakes and loss of profits. Sound decision making requires systematic and standardized policy models. In this paper, we rely on trading knowledge and financial data to help traders invest in bitcoin and gold by providing optimal daily trading strategies through predictive models. In our study, we apply an advanced investment analysis method, quantitative investment method, which relies on advanced computers to allocate portfolios, eliminate information bias, reduce risk, and enable people to make more scientific, rational, accurate, and efficient investment decisions ["Applied Research on Quantitative Trading Strategy Models," 2014]. The results of the study are also tested using existing data, and the influence of trading prices on the results is taken into account, and the study is eventually further optimized.

FEMS 2022
Volume 19 (2022) 228 We collected the daily prices of gold and bitcoin for five consecutive years and their respective ratios of transaction costs to transaction values. Scenario assumptions were then made assuming an initial cash holding of $1,000 in the first year, followed by simulations of the optimal trading strategy to maximize assets at the end of five years. This builds a complete model of the decision system. First, a price-based time projection is used to mimic the perspective of an investor who does not know the future and cannot determine price changes in five years, but can only make the best current strategy based on the past. Then a risk assessment is performed, taking into account the risk that the investor will consider when developing his strategy. Finally, a model with specific strategy rules and amount determination is constructed to make periodic decisions. After getting the decision for each day, the answer is obtained by switching assets.

Assumptions
The value of money is constant The impact of taxes and other policies is not considered Assets are at your disposal Do not trade multiple times in one day Prediction from the 6th day, strategy from the 5th day Investors are not extremely risk averse, nor are they extreme risk lovers Transaction costs remain unchanged There is no cost to hold the asset

Model Establishment:
In order to build a financial investment strategy cantered on bitcoin and gold, it is necessary to identify the indicators used to determine the investment behaviour. The indicators of investment behaviour are mainly related to the return of the investment object, the relevant market conditions, and the risk. After the initial analysis, three models are needed, a predictive model, a scoring model to determine the investment behaviour (the core model), and a risk model to make the made strategy more realistic.
First of all, the time series prediction is used to process the original data to calculate the rise of gold and bitcoin respectively. Then, the average price and the BIAS are calculated separately based on the rise rate.
Among them, the formula for the rate of increase is: In the calculation process, due to the large daily increase of bitcoin and the small daily increase of gold, the investment period of bitcoin is set to five days and the investment period of gold is set to fifteen days. Then, the average price and the BIAS are calculated respectively. The formula for the BIAS is B =  Next, the study used both the XGBoost model in machine learning regression and a back propagation neural network for price prediction, and a genetic algorithm for parameter search to improve the accuracy of the correlation coefficients. After fitting, the predictions were found to be similar, indicating that the predictions were reasonable. Finally, it was decided to use the data from the machine learning regression algorithm with the growth rate of the investment amount to determine the daily investment index.
Then, moving to the step of predicting market sentiment, the study built a model to determine bull and bear markets and established specific trading rules. An evaluation function was created by deviation and rise, and the results were used to determine whether the gold/bitcoin market was bullish  or bearish on a given day. Next, by combining the appropriate indicators, the study builds a scoring function regarding the choice of buying and selling behaviour and finally determines the trading volume based on the scores. Then, the model is built based on investment risk indicators. Among them, the five-day average manipulation method shows that BIAS and upside are important indicators to determine the risk.
Finally, the objective function is established based on the investment profit index and risk index, and the recommended investment behaviour is obtained. It is important to note that since this study involves two investment objects, i.e., bitcoin and gold, portfolio matching is taken into account.

Model Solving
In the phase of predicting the price of bitcoin and gold, this study utilized two models: a machine learning regression prediction algorithm (XGBoost) and a BP Neural Network model. While using the models for prediction, genetic algorithm was used to optimize each parameter. The advantages of the machine learning regression algorithm (XGBoost) include fast parallelization, labelled data sets with numerical target variables, and ease of intuitive analysis from a data perspective at the end of prediction. XGBoost is able to automatically learn the segmentation direction in the presence of missing values in the sample. Therefore, in this study, regression prediction by machine learning is a suitable choice if a large amount of data appears and prediction results are needed as an indicator for the next application. The results of the evaluation metrics derived from the prediction using XGBoost are shown in the table below.
However, machine learning regression algorithms have high requirements for constraints and need to deal with outliers. Therefore, in order to reduce the occurrence of significant errors during the study, an alternative approach, namely BP neural network model, was also used to ensure the accuracy of the results.  The BP Neural Network regression evaluates the model by testing the data prediction accuracy, with the following results. From the results, the machine learning regression algorithm (XGBoost) has an accuracy of 99.9%, which is higher than that of the BP neural network model, so we choose the prediction results of the former as the data for the next study.
Predicting market sentiment requires a model for judging bull and bear markets. After reviewing the literature, the mean value was finally set 120 days as a unit for mean calculation and use the result as a gold bull market assessment indicator (Yan Chao, Liu Jinquan, Sui Jianli,2014).
In the process of data processing, the formula is used This study uses the entropy method to calculate the weights of these two indicators. The entropy method can avoid judging the weights through subjective assumptions during the study and is easy to operate. The final model is constructed as follows. 2 = 120 ( 2 )x 0.366 + 120 ( 2 )x 0.364 (7) The same approach can be used to derive the results of the bull and bear market model for bitcoin.
The data are brought into the formula to derive the indicator values, and all the values obtained are averaged. If the assessment indicator value of the market on a given day is greater than the average value, it is a bull market, and the opposite is a bear market. The next step is to determine the risk model.
Since the BIAS can reflect the degree of deviation of the price from its MA in a certain period of time, and derive the possibility of the price causing a retracement or rebound in case of sharp fluctuations, the BIAS can be used to some extent as an indicator to predict the investment risk. In the process of using bull and bear markets to determine stock market risk, bull market sentiment is

FEMS 2022
Volume 19 (2022) 232 generally bullish, and is a large upward market that continues for a longer period of time, while bear markets are the opposite. Therefore, bull and bear markets also have a significant impact on predicting investment risk and will be used as an important consideration for risk prediction (Wu, Yuebo, 2013).
For the design of the weights of BIAS and bull/bear market, the variation coefficient method is used in this study.
Among the results obtained, for investments in gold and in bitcoin, the weights of BIAS and bulls and bears are shown in the following table. Then the equation of the target model can be expressed as: 2 = 2 * 0.695 + 2 * 0.305 (9) 1 = 1 x0.79 + 1 x0.21 (10) Bringing the data into the risk prediction models for gold and bitcoin respectively, the risk graphs for the two types of investments are obtained as follows After determining the models, in order to obtain the objective function for judging the investment behaviour, the weights of the three models need to be assigned. After searching the literature and practicing multiple weight assignment methods with data, we finally came up with this formula.
By comparing the data, it can be seen that the buying or selling behaviour judged by the above formula can effectively predict the investment results. After determining the buy-score formula, the obtained buy-score is normalized.
After the normalization process, we designed the thresholds for judging the choice of investment behaviour and derived the final trading rules. Its contents include: Before deciding to buy or sell, first determine if it is a gold trading day. Buy gold when 2 > 0.56 and sell gold when 2 < 0.3, i.e. the buying criterion is 0.56 and the selling criterion is 0.3.
Buy bitcoin when 1 > 0.72 and sell bitcoin when 1 < 0.56, i.e. the buying criterion is 0.72 and the selling criterion is 0.56.

Sensitivity analysis
To evaluate the sensitivity of the optimal strategy model and the systematic decision model in the first question, the analysis is discussed in three main cases: change in transaction costs, gold-only purchase, and bitcoin-only purchase.

Sensitivity analysis setting conditions
Firstly, the range for the change of transaction cost is set. Because the service cost formed by the exchange generally does not account for an excessive percentage of the total transaction amount, so the range of transaction cost for bitcoin is set to [1%,15%] of the transaction amount, and the interval is divided by 0.005 as the interval length; the range of transaction cost for gold is set to [1%,5%] of the transaction amount, and the interval is divided by 0.005 as the interval length for interval division. Then the variations of the two transaction costs are combined, and the maximum total asset amount under the corresponding combination of gold and bitcoin transaction costs is finally obtained through a circular decision algorithm.
For the two extreme cases of buying only bitcoin or only gold, the extreme cases are solved by dynamic programming solution, following the idea of the previous model building.  Figure 8. Sensitivity analysis Some of the continuous transaction cost combinations are shown in the table below. As the transaction cost changes, the total maximum asset changes as shown in the graph below.

Sensitivity Analysis Results
As can be seen from the following graph, the optimal strategy is sensitive to changes in transaction costs, and the overall trend of total maximum assets decreases as transaction costs increase. For different combinations of transaction costs, the two cost ratios add up faster and faster, but the rate of decline in total maximum assets gradually slows down, indicating that the decision model increasingly appears to have a characteristic tendency as certain transaction costs increase.
Simply put, the impact of daily price changes on the decision is weakened. In addition, we evaluate the maximum total asset amount purchased in pure gold and pure bitcoin at the subject's original transaction cost. The total amount of pure bitcoin purchases was found to be much larger than pure gold purchases, coupled with previous preliminary analysis of the raw data -the high volatility of the bitcoin price -together suggest that the potential for bitcoin purchases is high, with high risk accompanied by high reward.

Conclusion
Based on the characteristics of short-term investments, gold and bitcoin, this study designs an investment market forecasting model that divides forecasting into three main steps.
First, the price fluctuations of gold and bitcoin are forecasted. Price forecasting of investment products provides a basic grasp of the supply and demand situation in the product market. Since financial markets cannot be further predicted by other markets, the supply and demand situation of investments is a more accurate and reliable source of forecasting information.

Trend of maximum total assets under different handling charges
Total Assets

FEMS 2022
Volume 19 (2022) 235 Bull and bear market forecasts for the bitcoin and gold markets are performed separately. However, the bull and bear market forecasts do not fully represent the returns of investment activities, but only through a general perception of the future market direction, and the risks of the investment market are not taken into account.
Therefore, the last step is the forecast of the investment market risk. The risk of the investment market is considered in two ways: the general direction of the current investment market, and the deviation of past investments from their average level, i.e. the deviation rate. The deviation rate helps investors understand the investment market for gold and bitcoin over a longer time horizon, and the results reflect a more accurate investment market pattern.
The investment forecasting model in this study takes into account changes in transaction costs and market conditions and is sensitive to these changes, allowing for immediate recommendations on changes in investment behavior. At the same time, the forecasting model is able to analyze and reflect the bitcoin and gold investment markets in terms of price, increase, offer, and risk, and make accurate risk predictions by reflecting and understanding the market. Therefore, the final investment prediction model has clear guidance and value for gold and bitcoin investment.