Keywords

1 Introduction

1.1 Background

Nowadays, the combination of traditional investment and alternative assets has become a hot spot. Gold has more stable investment value. Its precious metal attributes and scarcity have been recognized as risk aversion assets since ancient time. With the development of block-chain technology, virtual currency gradually enters the vision of asset allocation. Among them, Bitcoin is the most important currency. It was first issued in November 2008. Due to its privacy and scarcity, it reached a single $ 69,000 in 2021. Compared with gold, although Bitcoin has greater risks, its yields, large volatility, and supervision exemption have attracted investors’ vision. The combination of gold and Bitcoin is conducive to the pursuit of maximum benefits while maintaining the security of assets. Due to the violent fluctuations in the two aspects and high complexity, the research on the process of allocation of assets is carried out.

Researchers have introduced a variety of methods for research on asset quantification. In recent years, many scholars have used DEA (Data Envelopment Analysis) model [1] to obtain the best investment. Yun introduced DEA model in the Multi-Objective Genetic Algorithm to compare the solution. This model can consider classic DEA models such as CCR and BCC through different parameter values [2]. Tavana proposed the NSGA -II and Multi -Objective Particle Algorithm based on the reference point, and then used the DEA model to evaluate the solution. Finally, the TOPSIS method was used to adopt the optimal solution [3]. Cheng and Vincent used the DEA model to determine the relative efficiency of each operator in the Genetic Algorithm [4].

The time series method attracts the attention of researchers [6]. Various methods are applied such as the VaR-APARCH model [7], VEC model [8], ARIMA [5]. The mechine learning methods are also introduced to assist the time series analysis [9]. Besides, the safety of Bitcoin and gold is compared [10]. During the research process, the designed algorithm need to be flexible and robust. The computation time needs to be low for the timely determination.

Due to the dynamic changes in gold and Bitcoin, the daily optimal trading strategy is also constantly updated, and the requirement for timeliness for the algorithm is much higher. The above algorithm has more iteration and the operating efficiency is low. Therefore, investment analysis methods with low calculation costs and fast adjustment speed are required. This article conducts market price predictions based on ARIMA, combined with Entropy Weight method to conduct investment strategies and perception evaluations, and proposes an Objective Empowerment Multi-Objective Programming method based on ARIMA. The process is transformed into a Real-Time Multi-Objective Nonlinear Programming problem, and carried out the research on the hybrid investment of gold and Bitcoin. At the same time, because gold and Bitcoin are representative in the field of futures and virtual currency, the research methods of this article can also be expanded to investment in multi-futures and multi-currencies.

1.2 Problem Analysis

Based on the goal mentioned above, following points are considered:

  • To determine the specific operation (buy, hold, or sell) performed on a certain day, we need to first judge the price trend of that day or even a period of time in the future. From the data, we can see that both assets have a certain growth, but the final change trend does not tend to be linear, so it can be roughly considered that the time series of the two assets are not stable. We introduce the prediction model ARIMA to explore the changing tendency of gold and Bitcoin prices.

  • We use the price change data before the day to predict the price of this day, and the price of a period of time after that, and then analyze the price of this day and the price changes in the period of time before and after, if it is the lowest price, then make a purchase; if the price is the highest point, sell it; if the price is between the lowest and the highest, we need to consider the commission we have to pay for each transaction and make a decision later. After identifying the daily trend of price changes, we further consider the optimal trading strategies for each day. Our primary goal is to make the final total return as high as possible. However, in reality, traders may sell assets not for profit, but to avoid more losses. Therefore, we use a Multi-Objective Programming model to maximize profits and reduce losses as the overall goal, and adjust the value of the factor, so as to find the corresponding optimal trading strategy.

  • The output of the Multi-Objective Programming model is not unique, so we select the optimal trading strategy through comparison. In order to find the best trading strategy, we use Entropy Weight method, which is more objective, set evaluation indicators, and find the same indicator data of the gold market and Bitcoin market in the same period, and obtain the optimal transaction through the first question. The strategy and the actual data are scored, and we end up with the best strategy.

  • To determine how sensitive the strategy is to transaction cost, we analyze the sensitivity by changing the values of gold trading commission \( \alpha \) and Bitcoin trading commission \( \beta \) and observe changes in total assets as well as transaction frequency.

The flow chart is shown in Fig. 1:

Fig. 1.
figure 1

Flow chart

2 Objective Empowerment Multi-objective Programming Investment Strategy Based on ARIMA

2.1 Symbol, Definitions and Assumptions

  • Symbol and Definitions

    For ease of calculation, the symbols are defined as follows:

    Name

    Symbol

    Name

    Symbol

    Total value of assets held

    z

    Hold gold weight

    m

    Gold daily price

    g

    Buy gold weight

    m+

    Gold forecast price

    \( g^{'} \)

    Sell gold weight

    m-

    Change in the value of gold held

    \( \varDelta g \)

    Hold Bitcoin weight

    n

    Bitcoin daily price

    b

    Buy Bitcoin weight

    n+

    Bitcoin forecast price

    \( b^{'} \)

    Sell Bitcoin weight

    n-

    Change in the value of bitoin held

    \( \varDelta b \)

    Gold trading commission

    \( \alpha \)

    Amount of dollars held

    d

    Bitcoin trading commission

    \( \beta \)

  • Assumptions

    In order to simplify the model and grasp the essence of the problem, we make the following assumptions:     

First, each transaction is executed at the closing price of the day, and the closing price is known. Second, as actual transaction, gold trading is suspended on statutory holidays, assuming that the daily price of gold during the period when the market is not open is consistent with the last business day before the suspension. Third, whether it is gold or Bitcoin, it can only be traded in US dollars and cannot be directly converted. Last but not the least, gold and Bitcoin can only be held, purchased or sold on that day.

2.2 Data Preprocessing

  • Gold is regarded as Actual in this article, including gold nuggets (bricks), gold ingots, gold bars and gold coins, needs to rely on relevant platforms and institutions for trading, so it is necessary to consider the situation that these trading platforms and institutions stop trading on statutory holidays.

  • Unlike gold, as futures, Bitcoin has no entity and no issuing institution, so it can be traded every day and will not be affected by legal holidays.

  • We use the method of Min-Max scaling to process the daily prices of gold and Bitcoin, and convert the method of linearization of the original data to the range of [0,1]. The normalization formula is as follows:

    $$\begin{aligned} X_{norm}=\frac{X-X_{min}}{X_{max}-X_{min}} \end{aligned}$$
    (1)

    Among them, \( X_{norm} \) is the normalized data, X is the original data, \(X _{max} \) and \(X _{min} \) are the maximum and minimum values of the original data set, respectively.

2.3 ARIMA Model

Autoregressive Integrated Moving Average model, ARIMA for short, regards the data sequence formed by the predicted object as a random sequence, and uses a certain mathematical model to approximate this sequence. ARIMA model has three parameters:p,d and q, p represents the lags of the time-series data itself adopted in the prediction model,d represents the orders of difference that the time series data needs to undergo to be stable and q represents the lags of the prediction error adopted in the prediction model. Once this model is recognized, the future value can be predicted from the past values and current values of the time sequence. The modeling steps are as follows:

Stationary Test. In order to explore whether the trends of historical data and future data obey similar tendency, we need to test the stationarity of the time series. The p-values corresponding to the unit root statistics of Bitcoin and gold are 0.9614 and 0.9042 respectively, both of which are significantly greater than 0.05.

Therefore, it is judged that the sequence is a non-stationary sequence. In order to improve the stationarity of the data, we perform a first-order difference operation on the two data. The p-values for Bitcoin and gold outputs are \( 2.3078e^{-11} \) and \( 9.2697e^{-13} \), which are far less than 0.05. In Fig. 2, the X-axis represents the number of days, and the Y-axis represents the first-order difference.

Fig. 2.
figure 2

Stationary test

We can see the relatively average random oscillation of the white noise sequence around zero. Therefore, the sequence of the first difference is stable. Compared with the first difference, the improvement of the stationarity from the second difference is limited. Hence, it is more appropriate to use the first difference for this sequence that d=1.

ACF and PACF Test. The Autocorrelation Coefficient(ACF) measures the correlation between the same event in two different periods, The q-value can be roughly judged by the maximum lag point of ACF plot. When calculating the influence or correlation degree of a certain element on another element, the influence of other elements is not considered temporary, and the close degree of mutual relationship between those two elements is studied separately, which is called Partial Correlation. The p-value can be roughly judged by the maximum lag point of the Partial Autocorrelation Coefficient (PACF) plot. The plots are shown in Fig. 3.

Fig. 3.
figure 3

ACF and PACF Plot

The price of gold and Bitcoin in the previous 30 days are selected for the analysis. As can be seen from Fig. 3, the trend sequence ACF and PACF of Bitcoin experiences a shape increase in the first order, which is called the first-order truncation, so we could choose p=1,q=1. Similarly, the trend sequence ACF and PACF of gold has second-order truncation, so we could choose p=2,q=2.

However,it is subjective to order the model by tailing and truncation. Therefore, BIC is introduced to traverse the value of p and q.

Model Ordering. Bayesian information criterion originates from Bayesian theory and is mainly used in model selection problems to find the best balance between model complexity and the descriptive power of model logarithmic data sets. Let \(\boldsymbol{x}=\left\{ x_1, \cdots , x_N\right\} \) be the data set and M be the parameter model to be selected. To maximize the maximum likelihood function L(xM), the BIC of model M can be defined as:

$$\begin{aligned} BIC(M)=\log L(x, M)-\lambda \frac{m}{2} \log N \end{aligned}$$
(2)

The first part represents the matching quality between model and data, the second part is the penalty factor of model complexity, \(\lambda \) represents the penalty factor, which can be set according to different model selection situations, and M represents the number of parameters. [11]

The order of p and q in the ARIMA model generally does not exceed 5 orders, so we use the traversal method, p, q take values from 0 to 5 respectively, train the data, and draw a heat map, as shown in Fig. 4. The X-axis represents the q-value, and the Y-axis represents the p-value.

Fig. 4.
figure 4

Heat Map

In the heat map of Bitcoin and gold, the minimum values of BIC are 29617.20 and 3571.46, which (p,q)=(3,2) and (0,0) respectively.

Model Validation. To confirm the correctness of the model, we conduct autocorrelation test of model residuals. The test results of Bitcoin and gold are shown in Fig. 5. The shaded area represents the standard deviation. It is obvious that the autocorrelation coefficients of the residuals are all within 2 times the standard deviation, so the test is passed.

Fig. 5.
figure 5

Residual Analysis

Model Prediction. The data is predicted with the new parameters, and the result is shown in Fig. 6.

Fig. 6.
figure 6

Model Output

The X-axis represents the number of days since September 11, 2016 and the Y-axis represents the price of Bitcoin and gold in US dollar. Red is the predicted curve, black is the original curve.

It can be seen in Fig. 6 that the fitting effect is good.

Computing Prediction Accuracy. In order to ensure that our prediction model is sufficient to support the completion of the follow-up work, we calculate the accuracy of the price changes of gold and Bitcoin predicted by the ARIMA model. By observing the difference between the predicted value and the true value, we count the number of prediction errors, and thus calculate the prediction accuracy of gold and Bitcoin to be 97.896% and 96.126%, respectively. At the same time, we calculate the standard deviations of gold and Bitcoin respectively, and the results are 1.302 and 101.471, and the average daily prices are 1464.549 and 12206.068. The standard deviations are more reasonable under the vertical comparison. Therefore, our prediction model can support the following work.

2.4 Multi-objective Programming Model

Multi-Objective Programming model is an important branch of operations research. It is a mathematical method of scientific management developed on the basis of nonlinear programming to solve multi-objective decision-making problems. Multi-Objective Programming refers to a programming problem with multiple objective functions. In mathematics, the Multi-Objective Programming method can be written in the following form:

$$\begin{aligned} \min \left( f_{1}(x), f_{2}(x), \cdots , f_{k}(x)\right) ,\quad s.t\quad x \in X \end{aligned}$$
(3)

\( k> \)1, refers to the number of objective functions, and the set X is a set of feasible decision vectors. Feasible sets are usually defined by some constraint functions. Furthermore, a vector-valued objective function is usually defined as:

$$\begin{aligned} f: X \rightarrow R^k, f(x)=(f_1(x),\cdots , f_k(x))^T \end{aligned}$$
(4)

\(x^{*} \in X\) is a workable solution or a workable decision. Vector obtained for feasible solutions \( X^{*} \) is \(z^{*}:=f\left( x^{*}\right) \in R^{k}\), which is called the target vector or the result.

For each objective \(k(k \in K)\)in multi-objective optimization, if there are two sets of parameters \(\theta = (\theta _s, \theta _k)\) and \(\theta ^* =(\theta _s^*, \theta _k^*)\), such that \(L_k(\theta _s, \theta _k) \ge L_k(\theta _s^*, \theta _k^*)\) and \(L(\theta _s, \theta _k) \ne L(\theta _s^*, \theta _k^*)\), then the parameter \(\theta ^*=(\theta _s^*, \theta _t^*)\) is called Pareto optimal [12]. In multi-objective optimization, there is usually no feasible solution that minimizes all objective functions simultaneously. Therefore, attention should be paid to Pareto optimal that cannot be improved in any objective without compromising at least one objective. The modeling steps are as follows.

  • Determine the objective function

    According to the requirement, the total return should be as large as possible, but considering the actual transaction, the prices of gold and Bitcoin may continue to rise or fall for a certain period of time, that is, the extreme point is not reached. Therefore, we should take into account the eagerness of traders, and let traders make as much as possible in an uptrend and lose as little as possible in a downtrend. The expressions for the three targets are as follows:

    $$\begin{aligned} \begin{aligned}&\textrm{z}=g^{\prime }\left( m+m^{+}-m^{-}\right) +b^{\prime }\left( n+n^{+}-n^{-}\right) +d-g\left( m^{+}-m^{-}\right) -b\left( n^{+}-n^{-}\right) \\&-\alpha * g*\left( m^{+}+m^{-}\right) -\beta * b *\left( n^{+}+n^{-}\right) \\ \end{aligned} \end{aligned}$$
    (5)
    $$\begin{aligned} \begin{aligned}&\varDelta g=g^{\prime }\left( m+m^{+}-m^{-}\right) -g * m-g\left( m^{+}-m^{-}\right) -\alpha * g *\left( m^{+}+m^{-}\right) \\ \end{aligned} \end{aligned}$$
    (6)
    $$\begin{aligned} \begin{aligned}&\varDelta \textrm{b}=b^{\prime }\left( \textrm{n}+\textrm{n}^{+}-\textrm{n}^{-}\right) -\textrm{b} * n-b\left( n^{+}-n^{-}\right) -\beta * b *\left( n^{+}+n^{-}\right) \end{aligned} \end{aligned}$$
    (7)

    Coordinate and compromise among the three objective functions, so that each sub-objective can be optimized as much as possible.

  • Determine constraints The amount of gold and Bitcoin cannot be negative after each transaction:

    $$\begin{aligned} m-m^{-} \ge 0, n-n^{-} \ge 0 \end{aligned}$$
    (8)

    Every trade uses USD, so the USD that the trader has before the trade must be higher than the price of the newly purchased asset plus the commission paid:

    $$\begin{aligned} d-g *\left( m^{+}-m^{-}\right) -\alpha * g *\left( m^{+}+m^{-}\right) -b *\left( n^{+}-n^{-}\right) -\beta * b *\left( n^{+}+n^{-}\right) \ge 0 \end{aligned}$$
    (9)

    The amount of buying and selling gold and Bitcoin cannot be negative:

    $$\begin{aligned} m^{+} \ge 0, m^{-} \ge 0, n^{+} \ge 0, n^{-} \ge 0 \end{aligned}$$
    (10)

2.5 Entropy Weight Method

In information theory, entropy is a measure of uncertainty. According to the characteristics of entropy, the randomness and disorder degree of an event can be judged by calculating the entropy value, and the dispersion degree of an index can also be judged by the entropy value. The greater the dispersion degree of the index, the greater the impact of the index on the comprehensive evaluation. Entropy weight method can determine the weight of each evaluation index, which can effectively reduce the influence of human subjective factors on the weight size [13]. The modeling steps are as follows:

Determine and calculate evaluation indicators

  1. a.

    \( Annualized\,Rate\,of\,Return= \dfrac{Annual\,Profit}{Initial\,Assets\,of\,the\,year} \)

  2. b.

    \( Annualized\,Maximum\,Drawdown\,Rate=Max\frac{Z_{j}-Z_{i}}{Z_{i}} \)

  3. c.

    \( Annualized\,Sharpe\,Ratio= \dfrac{Expected\,Rate\,of\,Return-Risk\,Free\, Rate}{Portfolio\,Standard\,Deviation}\)

We make a portfolio investment of gold and Bitcoin, and its expected rate of return is 5.90% ; The risk-free interest rate is an asset investment without credit risk and market risk, which refers to the interest rate of treasury bonds whose maturity date is equal to the investment period. By looking up the data, we find that the risk-free interest rate in the United States from 2016 to 2021 is 1.56%.

The formula for the portfolio standard deviation is:

$$\begin{aligned} \sigma _{P}=\sqrt{w_{A}^{2} \sigma ^{2}\left( k_{A}\right) +w_{B}^{2} \sigma ^{2}\left( k_{B}\right) +2 w_{A} w_{B} R\left( k_{A}, k_{B}\right) \sigma \left( k_{A}\right) \sigma \left( k_{B}\right) } \end{aligned}$$
(11)

\( w_{i} \) is the weight of each element in the combination, \( \sigma (i) \) represents the standard deviation of each element, and the calculation formula is as follows:

$$\begin{aligned} \sigma =\sqrt{\frac{\sum _{t=1}^{n}(R,-\bar{R})^{2}}{t-1}} \end{aligned}$$
(12)

Among them, \( R_{t} \) and R are the actual rate of return and the average rate of return in each period, respectively, and t is the number of historical rates of return.

\( R (K_{a}, K_{b}) \) represents the correlation coefficient of elements a and b, and the calculation formula is:

$$\begin{aligned} {\text {R}}(X, Y)=\frac{\sum (x-\bar{x})(y-\bar{y})}{\sqrt{\sum (x-\bar{x})^{2} \sum (y-\bar{y})^{2}}} \end{aligned}$$
(13)

x is the daily price and \( \bar{x} \) is the average daily price.

  1. d.

    \( Calmer=\dfrac{Annualized\,Rate\,of\,Return}{Annualized\,Maximum\,Drawdown\,Rate} \)

However, in our actual operation, the Sharpe ratio does not apply, and the specific reasons are expected rate of return and risk-free rate of return are mainly for portfolio investment of different stocks, we did not find data on portfolio investment. Also, when calculating the standard deviation, since gold cannot be traded every day, the price of gold will have no data for some days, and it cannot correspond to the price of Bitcoin one-to-one, so the correlation coefficient cannot be calculated. Furthermore, the investment ratio of gold and Bitcoin changes dynamically, so there is no fixed weight. If the first and last values are forced to replace the weight, a large error may occur.

Local analysis of indicators for each year

Construct a judgment matrix for each evaluation index in each year, where rows 0 to 4 represent September 11, 2016 to September 10, 2017, September 11, 2017 to September 10, 2018, and so on. Columns 0 to 2 represent three indicators: Annualized Rate of Return, Annualized Maximum Drawdown Rate and Calmer. First, adopt the normalization formula:

$$\begin{aligned} \textrm{z}_{\textrm{i}, \textrm{j}}=\frac{\textrm{x}_{\textrm{i}, \textrm{j}}-\min \left( \textrm{x} 1, \textrm{j}, \textrm{x} 2, \textrm{j}, \cdots , \textrm{x}_{\textrm{3}, \textrm{j}}\right) }{\max \left( \textrm{x}_{1, \textrm{j}, \textrm{x} 2, \textrm{j}}, \cdots , \textrm{x}_{\textrm{3}, \textrm{j}}\right) -\min \left( \textrm{x}_{1, \textrm{j}}, \textrm{x}_{2, \textrm{j}}, \cdots , \textrm{x}_{\textrm{3}, \textrm{j}}\right) } \end{aligned}$$
(14)

to make matrix X non-negative, which includes 5 samples and 3 indicators:

$$\begin{aligned} \textrm{X}=\left( \begin{array}{cccc}\textrm{x}_{1,1} &{} \textrm{x}_{1,2} &{} \cdots &{} \textrm{x}_{1, \mathrm {~3}} \\ \textrm{x}_{2,1} &{} \textrm{x}_{2,2} &{} \cdots &{} \textrm{x}_{2, \mathrm {~3}} \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ \textrm{x}_{\textrm{5}, 1} &{} \textrm{x}_{\textrm{5}, 1} &{} \cdots &{} \textrm{x}_{\textrm{5}, \textrm{3}}\end{array}\right) \end{aligned}$$
(15)

The normalized matrix is in Fig. 7.

Fig. 7.
figure 7

Normalized Judgment Matrix

The normalized matrix obtained after the first step is Z:

$$\begin{aligned} \textrm{Z}=\left( \begin{array}{cccc} \textrm{z}_{1,1} &{} \textrm{z}_{1,2} &{} \cdots &{} \textrm{z}_{1, \mathrm {~3}} \\ \textrm{z}_{2,1} &{} \textrm{z}_{2,2} &{} \cdots &{} \textrm{z}_{2, \mathrm {~3}} \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ \textrm{z}_{\textrm{5}, 1} &{} \textrm{z}_{\textrm{5}, 1} &{} \cdots &{} \textrm{z}_{\textrm{5}, \textrm{3}} \end{array}\right) \end{aligned}$$
(16)

Second, calculate the proportion of the \(i_{th}\) sample under the \(j-{th}\) index, and regard it as the probability used in the calculation of relative entropy p.

$$\begin{aligned} p_{i, j}=\frac{z_{i, j}}{\sum _{1=1}^{5} z_{i, j}} \end{aligned}$$
(17)

Third, calculate the information entropy of each index, the information utility value, and obtain the entropy weight of each index by normalization. For the \(j_{th}\) index, the information entropy is calculated as follows:

$$\begin{aligned} \textrm{e}_{\textrm{j}}=-\frac{1}{\ln \textrm{5}} \sum _{\textrm{i}=1}^{\textrm{5}} \textrm{p}_{\textrm{i}, \textrm{j}} \ln \textrm{p}_{\textrm{i}, \textrm{j}} \end{aligned}$$
(18)

The entropy values of the three indicators are 0.7713, 0, 0.8924. The definition of information utility value is:

$$\begin{aligned} \textrm{d}_{\textrm{j}}=1-\textrm{e}_{\textrm{j}} \end{aligned}$$
(19)

Therefore, the greater the utility value of information is, the more information it corresponds to. The entropy weight of each index can be obtained by normalizing the information utility value:

$$\begin{aligned} \omega _{\textrm{j}}=\frac{\textrm{d}_{\textrm{j}}}{\sum \textrm{d}_{\textrm{j}}} \end{aligned}$$
(20)

The actual weights of the three indicators are 0.1719, 0.7516, 0.07648. Based on the entropy weights, the scores of each year are 3.4000, 1.3676, 0.6137, 0.3991, 1.7660 and the first year has the highest score. Therefore asset growth in the first year is the fastest.

3 Results and Analysis

To make the results more specific and persuasive, we assume that the initial asset is $1000, 0 troy ounces, 0 bitcoins.

Fig. 8.
figure 8

Total Changing Tendency

3.1 Case Study

Based on the prediction result of ARIMA model, we use the data of the first twenty-five days as the initial sample size for prediction, and obtain the trend chart of the daily value of US dollar, gold and Bitcoin owned by traders. Since this model is a Multi-Objective Programming model, the solution sets are various. After running the model multiple times, we obtain an optimal solution set, select the optimal trading strategy through comparison, and choose the final trading strategy according to the optimal trading strategy. The specific analysis is carried out based on Fig. 8. The X-axis reprsents days, and the Y-axis represents value.

In the first month, the prediction accuracy is low, the prediction model is poorly fitted, and the investment risk is high.

On October 11, 2016, it is predicted that Bitcoin will appreciate by 2.54%, so spend all US dollars to buy 1.59 bitcoins. Over the next 4 months, Bitcoin’s daily price volatility will increase evenly, with an increase in total assets. By January 3, 2017, it is predicted that in the next four days, the price of Bitcoin will drop sharply, and the loss rate is as high as 22.5%, so all the existing Bitcoins are sold.

A week later, it is forecast that gold will increase by 3.4% in a short period of time, so it will hold about 1,800 US dollars to buy all gold, and only 1.53 ounces of gold will be held at this time. On the second day, it is predicted that gold has reached its peak in the next week, and then it will drop by 2.7%, and Bitcoin has reached the lowest value in the past two months, so after all the gold is sold, all the dollars will be used to buy Bitcoin. In the ensuing three months, the Bitcoin price fluctuates little and grows steadily, and the total assets double. By April 16, 2017, it is predicted that Bitcoin suddenly dropped, so all Bitcoins are sold. The price of gold is relatively stable, so it is not traded. Half a month later, it is predicted that Bitcoin will surge by 11.7%, so all US dollars are used to buy nearly 2 bitcoins. By July 8, 2017, the price of Bitcoin is growing rapidly and steadily. On this day, it is predicted that the price of Bitcoin will drop dramatically, so all Bitcoins owned are sold.

After 20 days, a large increase in the value of Bitcoin is predicted, and all the funds are used to buy Bitcoin. In the following six months, the price of Bitcoin surges. On January 6, 2018, it is predicted that the price of Bitcoin will fall sharply, so all Bitcoins are sold. The price of gold remains relatively stable, so it is not traded and the total assets have already increased significantly.

On February 17, 2018, it is predicted that the growth trend of Bitcoin is obvious, and all US dollars are used to buy Bitcoin. In the ensuing year, the market rebounds, and the value of Bitcoin continues to decline slowly. In January 2019, it is predicted that the price of Bitcoin will increase significantly in a short period of time, so Bitcoin is sold. The price of gold remains relatively stable, so it is not traded.

By March 2019, the price of Bitcoin have recovered, and a large increase is predicted, and all funds are used to buy Bitcoin. In the following three months, the volatility of Bitcoin increases, so the Bitcoin held is not sold. By June 28, 2019, the value of Bitcoin has dropped significantly in a short period of time, so we choose to sell all Bitcoin. A month later, predicting an imminent rise in Bitcoin price, buy Bitcoin with all your liquid assets. By September 28, 2019, the price of Bitcoin has fallen sharply, and the total assets have declined relatively when they choose to announce the sale. On October 20, 2019, it is predicted that the price of Bitcoin will skyrocket in the short term, so buy Bitcoin with all US dollars. But 4 months later, Bitcoin rebounds sharply, so sell all Bitcoins. The price of gold remains relatively stable, so it is not traded.

After the low price lasts for a month, the price begins to recover. Because of the short-term interest, Bitcoin is purchased near the lowest point of the price forecast. By May 2021, Bitcoin price fluctuates greatly, but there is a substantial increase in value and total assets increase. But after 14 months of volatile growth, there is a notable drop in the short-term forecast, so all Bitcoins are sold. The price of gold fluctuates in a small range, so it is not bought or sold.

By July 2021, the price has seen its lowest value in nearly 1 year, so use all the funds to buy Bitcoin. In the following two months, the price volatility of Bitcoin increases, and by the end of the five-year period, 8.7 bitcoins are still held, and the total assets are 401896.2854 US dollars. From the change trend of total assets, it can be found that the total assets have an increasing trend, and the values of the last five days are 451530.4769, 459453.0313, 408270.2462, 401896.2854, 0. It can be seen that the final total assets are 401896.2854 US dollars.

According to Entropy Weight method, we build a judgment matrix of evaluation indicators to prove that our model provides the best investment strategy, in which rows 0 to 2 represent the optimal strategy we found, the gold market, and the Bitcoin market. Columns 0 to 2 represent three indicators: Annualized Rate of Return, Annualized maximum drawdown rate and Calmer. The normalized matrix is in Fig. 9:

Fig. 9.
figure 9

Normalized Judgment Matrix

The entropy values of the three indicators are 0.6364, 0, 0.7925. The actual weights of the three indicators are 0.2314, 0.6365, 0.1321. Using the formula to score the optimal trading strategy in the first question, the actual investment strategy in the gold market, and the actual investment strategy in the Bitcoin market, the results are 192.16, 0.5589, 54.6426. We find that the score of our proposed trading strategy is much higher than the other two, so we can consider our trading strategy as the best trading strategy.

3.2 The Discussion of Optimal Strategy

In the above calculation, total assets after five years would be 401896.2854 US dollars. Chen Xinyu [14] use the Gray Forecast model to predict the price of gold and bitcoin the next day respectively. Next, compare the absolute value of the rise or fall to the absolute value of the median to determine the sell and buy operations. Then, establish a dynamic programming model to avoid risks, and use the Monte Carlo Method to determine the transaction time and transaction amount. Finally, the total value after five years was obtained by referring to the literature and recalculating the proportion of fixed investment. By comparing the sizes of the two, the optimal strategy is proved. The total assets are calculated to be 3636.259 US dollars, which is much smaller than the result of this paper, so this paper adopts the optimal investment strategy.

3.3 Sensitivity Analysis

In order to study the sensitivity of the strategy to the transaction cost, the article adjusts the value of the transaction commission and records the changes of the transaction strategy and transaction frequency. Due to the fact that the actual investment has many disturbances, the market fluctuates greatly, and the model predicts the future price in a limited number of days, the planned trading strategy pays more attention to short-term interests, and realizes the appreciation of assets under large price fluctuations, which is likely to cause frequent transactions. However, the increase in transaction commissions will inevitably increase transaction costs. Be more cautious when buying and selling, and avoid frequent transactions.

Fig. 10.
figure 10

Heat Map

Typical transaction commissions are 1%, 0.5%, or less. In our tests, the trading commission for gold and the trading commission for Bitcoin are chosen as 25 discrete values evenly distributed between 0 and 0.1%. The trading strategy of each pair \( (\alpha , \beta ) \) combination is calculated by traversal, and the total assets accumulated in each pair \( (\alpha , \beta ) \) under 5 years are visualized through Fig. 10.

It can be seen that the cumulative total income is more sensitive to the changes in commissions. With the increase of transaction costs, the overall trend of cumulative total returns is decreasing; At the same time, it can be found that the changes of \( \alpha \) and \( \beta \) have different effects on cumulative total returns. When \( \alpha \) remains the same, with the increase of \( \beta \) value, the cumulative total return is generally reduced, and the change of \( \beta \) will have a greater impact on the cumulative total return. If the value of \( \beta \) remains the same, only looking at the value of \( \alpha \), the cumulative total return first increases and then decreases with the increase of \( \alpha \), and the change range is relatively small.

To illustrate the effect of commission changes on transaction frequency, the number of transactions under different \( (\alpha , \beta ) \) combinations in the experiment is counted. Figure 11 is the transaction times of gold and Bitcoin under different \( (\alpha , \beta ) \), respectively.

Fig. 11.
figure 11

Heat Map of Trading Time

It can be clearly seen that the number of gold transactions decreases significantly with the increase of commission \( \alpha \). When \( \alpha \) exceeds 2.08%, gold basically does not traded. The number of Bitcoin transactions also decreases with the increase in commissions, but the decrease is not as significant as gold. Even with the 10% commission on trades, trading did not stop completely. This is also related to the characteristics of the two products. The price of gold is relatively stable, the price fluctuation is small, and the expected return is relatively low. When the commission reaches a certain level, gold has no investment value. However, the price of Bitcoin rises and falls are relatively drastic, Bitcoin fell to an one-month low as Russian President Vladimir Putin’s decision to launch a military operation in eastern Ukraine followed the cryptocurrency’s plunge. At the time of writing, Bitcoin was trading at $35,478.13, down 7.1%. Wang Juan, secretary general of the digital economy Committee of Beijing Computer Society, thinks that under the situation in Russia and Ukraine, Ukraine’s second largest hub as COINS mining machine, digital currency supply scarce, high dependence on the network environment, exchange instability, poor trading convenience, led directly to the capital to convert them into real liquidity, the threshold is too high, too slow, and the timeliness and availability than anonymity, So gold, which is easy to exchange, is once again in demand.

To sum up, the combination of traditional assets and new assets can increase returns, but its own and the uncertainty of the environment also brings greater risks. In the actual investment process, we should maintain a cautious and objective attitude, and reasonably arrange the investment strategy of gold and Bitcoin.

4 Conclusion

For the problem of portfolio investment, in order to maximize the total investment return, the idea of first predicting the future market price and then figuring out the investment strategy and total assets is adopted. First, according to historical data, the ARIMA model is used to predict the closing prices of gold and Bitcoin on the next trading day, respectively. From the perspective of prediction accuracy, the fitting effect is good. Then, according to the forecast results of the price of the current day and the forecast price of the next day, the Multi-Objective Programming model is used to figure out the optimal investment strategy and obtain the maximum profit. According to Entropy Weight method, the article compare the strategy proposed with other two known strategies and finally prove that the optimal investment strategy is provided.