Portfolio Research Based on SVM-GARCH and Dynamic Weighted Multi-Objective Planning Models—An Example of Gold and Bitcoin

: The question of how to benefit from an organic combination of gold and bitcoin has become a prominent topic in the contemporary society. Hence, we've built the time series forecasting models and target planning models of gold and bitcoin, providing the best gold and bitcoin rotation investing strategy based on our methodology. We consider the connection between gold and bitcoin price fluctuations by creating the SVM-GARCH Combination Model, and at the same time, data-based nonlinear feature extraction and heteroscedasticity processing give a more accurate and dependable foundation for investment decision making.In terms of investment planning, We first utilized VaR to clarify our quantitative investment risk indicators, and then built a VaRY Model to organically integrate and balance investment returns and risks. At the same time, we include Risk Adjustment Parameters into the planning model so that, by dynamic weight adjustment, our target planning model can match the wealth utility propensity of investors with diverse risk preferences, therefore improving the model's application and flexibility. Finally, in view of the differences in trading restrictions between Trading Days and Non-trading Days, we formulate different dynamic weights - Multi-objective Programming Models for trading and non trading periods, so that our best investment decision can be more comprehensive and targeted.We present proof for the brilliance of our investment strategy in four dimensions by merging and assessing the forecasting model and the planning model: Accuracy, Rationality, Flexibility, and High Return.


Introduction 1.Research framework
We first observe the characteristics and distribution of the topic data, and after determining the absence of missing values and outliers, we propose a prediction model for the SVM-GARCH price return time series based on nearest neighbor mutual information feature selection, which is used to make day-by-day rolling forecasts by fixing the reference period.
We refer to the days when both bitcoin and gold can be traded as trading days, and the days when only bitcoin can be traded as non-trading days.At the same time, we construct the Pre discriminant to distinguish the profit and loss of the optimal portfolio strategies, so as to target different investment strategies.
Finally, we demonstrate the superiority of our model to investors in four different dimensions by juxtaposing evidence and analysis through prediction accuracy, planning rationality, model resilience, and investment outcome analysis, as shown in Figure 1.

Problem Background
Nifty's new show "The Squid Game" has caught fire around the world, becoming one of the most-played series.[1] This game of life and death has resonated in the asset markets: although gold and bitcoin belong to two different asset classes with different risk appetites, since they both operate in large pools of money, they are inevitably drawn together and participate in the "squid game" chosen by investors.[2] Since 2016, annual bitcoin production has been halved, black swan events such as Brexit have occurred, Asian financial markets have seen an "asset shortage", investors have included digital currencies in the underlying category, global financial markets have been volatile, gold has become the preferred safe haven for investors, and the bitcoin market has seen an upswing.[3] We may not know who is the survivor of this "squid game", but the organic combination of gold and bitcoin may lead to a different kind of "surprise".

Assumptions and Justifications
(1) The portfolio strategy is rotated day by day, and the short-term profit-seeking objective is the basis for constructing the strategy.
According to the question, we need to determine the best daily investment strategy based on past information and current day's price, [4] so our investment decision should increase the degree of attention to maximize the utility of daily wealth, and reduce the focus on the comprehensive return of long-term holdings to ensure the rotation and flexibility of the investment strategy.
(2) Assume that the investor's precautionary needs are satisfied by wealth other than $1,000.
Macroeconomic theory divides investors' monetary demand into transaction demand, investment demand and precautionary demand.We construct our portfolio strategy with investment demand as the core and assume that the investor's precautionary demand can be satisfied by other wealth, so our investment strategy does not need to set aside cash in advance for this purpose.
(3) Our model does not take into account the time cost of trading.
Even if reasonable investment decisions can be made in advance, it often takes some time for investors to complete transactions in the market.Therefore, we do not consider the price fluctuations of financial assets during this time, and consider the small price changes during the trading time period to be negligible.
(4) The returns of gold and bitcoin obey normal distribution.
On the one hand, assuming that asset returns obey a normal distribution can make VaR better reflect the risk of gold and bitcoin, making the analysis of investment decisions more reasonable and accurate; [5]on the other hand, based on our observation of the data provided in the question, we find that the return distribution of gold and bitcoin is roughly in line with a normal distribution.
(5) The investor's wealth utility is linearly related to the investment return and investment risk.
Investors' wealth utility tends to increase as investment returns increase and decrease as risk increases.[6] Thus, we assume that wealth utility is positively linearly related to investment return and negatively linearly related to investment risk to improve the simplicity of the goal planning model.
(6) The price fluctuations of gold and bitcoin in the same day are not considered.
Since we only have closing price data for gold and bitcoin, we are unable to implement a buylow, sell-high or catch-up investment strategy for both assets in the same day.Therefore, we buy the asset at the opening of the next day if we expect to need to buy it, and sell it near the close of the next day if we expect to need to sell it.This strategy ensures that the maximum possible spread is earned for the next day.[7]

Notations
It is vital to define symbols that will be used in our discussion before we begin evaluating the challenges.These are listed in Table 1

Data Pre-processing
A. 5 years of trading data for the gold market and the bitcoin market can be obtained from the data given in the figure.However, when pre-processing the data for the gold market, we found that there are always two fixed days in December every year when there are times but no data, so we started looking for market related information.Through the analysis of US holidays and NYSE closing times, we found that a) Dec.24 every year (when Dec.23 corresponds to Friday, Dec.23 also has no data) corresponds to the time point of the vacation is Christmas Day on Dec.25.b) Dec.30 of each year corresponds to the New Year's Day of Jan.1.
Figure 2: Probability distribution of gold and bitcoin yields Therefore, we do not interpolate the data to fill the vacancies in the gold market.B. In the data processing for gold and bitcoin returns, we found that the respective return distributions of both are roughly in line with the normal distribution, as shown in the Figure 2.
Therefore we assume that asset returns follow a normal distribution, which is to allow VaR to better reflect the risk of gold and bitcoin, and to enable more accurate and reasonable decision making.(1) where and denote the lag order, and is the lag term parameter.In the mean value equation of the above SVM-GARCH model, is the predicted value of SVM and is the error term of equation ( 1) at the moment of .The result contains both the return past data and the high-dimensional information related to the return.Definition 2. If the sample set is described by the discrete numerical feature set , is the feature subset of the feature set , i.e., , and the nearest neighbor domain of the sample on the feature subsets and can be denoted as and , respectively, then the nearest neighbor mutual information of and is defined as:

Future Predictors
( The concept of nearest-neighbor mutual information not only satisfies the need to express the nonlinear relationship between the time series of returns, but also solves the difficulty of calculating the associated edge probability density and joint probability density of the traditional mutual information in computing the mutual information of numerical discrete data.Step9:Output the prediction result .The general idea of the SVM-GARCH price return time series forecasting model based on the nearest neighbor mutual information feature selection is as follows: firstly, we use the nearest neighbor mutual information to select the historical data of the target market with strong correlation with the target market return and the surrounding market information to construct the highdimensional input variable information for the support vector machine regression; [8]then we train the SVM analysis to process the return time series data; Finally, a GARCH model is used to analyze the heteroskedasticity of the residual series to correct and improve the validity and accuracy of the SVM-GARCH model prediction.[9] The algorithm description of the SVM-GARCH prediction model based on the neighborhood mutual information is shown in Table 2.

Algorithm Descriptions
is the k-dimensional input variable containing the previous P-period return data and the information that the K-P dimension has a strong correlation with the gold (or bitcoin) return correlation.

Dynamic weighted multi-objective planning model
A sound portfolio strategy should balance investment return and risk.Therefore, the utility of an asset portfolio should be evaluated from the perspective of the highest possible return and the lowest possible risk.In this paper, the VaRY model is used to combine the two, thus transforming multi-objective planning into single-objective planning, and the risk adjustment factor V is used as the dynamic weight adjustment basis of the model to accommodate the differences in utility tendencies of different investors.At the same time, the paper constructs the Pre discriminant to distinguish the profit and loss of the optimal portfolio strategy, and constructs the decision of maximizing wealth utility if it is profitable, and the decision of minimizing investment loss if it is loss.
Based on the market price information given in the question, we find that the bitcoin market can be traded every day, regardless of whether it is a holiday or not, while the gold market can only be traded on non-holiday and non-weekend weekdays.The days when both Bitcoin and gold can be traded are referred to as trading days, and the days when only Bitcoin can be traded are referred to as non-trading days.

Trading Day Decision Model
During the trading day, both gold and bitcoin can be traded, so both individual asset trading strategies and portfolio strategies can be constructed during this period.As a result, we construct the following dynamic weighted objective programming model from the perspective of making the best trade-off between return and risk preferences.

Risk Quantification
During the trading day, both Bitcoin and gold are able to trade, so we measure the portfolio risk of Bitcoin and gold using the VaR calculation for the asset portfolio case, which is calculated as follows.
Assuming that the single-period return of the asset is and is the weight of the asset, the return and variance of the portfolio are: (3) is the variance of the return of the asset , is the correlation coefficient between the returns of assets and , , is the variance-covariance matrix, , where denotes the weight vector and denotes the return vector of the asset.If the returns of each asset obey a normal distribution, then the portfolio returns also obey a normal distribution, at which point we have : , is the yesterday's closing price of the asset , and is the covariance calculated by using the last 7 days of price data as a sample.From the above analysis, we can know which portfolio brings the most risk through the calculation, and then take the portfolio with less correlated assets to reduce the risk of the portfolio, which is the important purpose of the calculation.

Wealth utility
After deriving the VaR, we have obtained the portfolio risk of investing in gold and bitcoin.According to Markowitz's asset portfolio theory, a rational investor tends to pursue the individual asset or asset portfolio with the greatest return for a certain risk and the least risk for a certain return, so we convert the dual-objective planning model to a single-objective planning model by organically combining return and risk through the VaRY model, and by hedging the positive benefits from return with the negative benefits from risk to find the optimal weights of gold, bitcoin . ( and represent the risk adjustment factors, represents the proportion of gold held at moment t, represents the proportion of bitcoin held at moment t, and and represent the return on gold and bitcoin, which is divided by the difference between the closing price of the day minus the opening price.We put and under controlled at (1,10) to ensure that they are in the same order of magnitude and are calculated here in a risk-neutral manner, as detailed in the risk appetite analysis ( §7.3).
The risk-adjusted factors, and , play a dynamic weighting role in judging the utility of wealth.represents the investor's preference for risk, the higher the investor's tolerance for risk, the lower the ; represents the investor's preference for return, the higher the investor's preference for return, the higher the .We use Python to establish the discriminant criterion that makes the utility that returns can bring to investors.
applicable during non-trading periods.Therefore, it is necessary to adjust the objective function and constraints of the planning model so that the investment objective fits with the trading regulations, thus providing the best investment strategy during non-trading days.

Risk quantification
According to the conditions given in the title, the measurement of asset risk in this paper does not include external factors that are not related to the market due to the unavailability of other data.Since gold cannot be traded during non-trading days, the VaR calculation for the single-asset scenario is used herein to measure the investment risk of Bitcoin, which is calculated as follows.(7) denotes the yesterday's closing price of bitcoin, where denotes the expected return of the asset over the holding period ( =1 since this paper constructs a daily rotation strategy), and .denotes the minimum return corresponding to the confidence level , i.e., the lower quantile of the return.

Wealth utility
The citation and description of VaRY here is the same as in 6.1.2.2 above, but since only bitcoin can be traded on non-holidays, we construct wqe for this asset, bitcoin, to determine the optimal daily holding weight of bitcoin during non-trading days, and the calculation process is as follows.(8) denotes the single-asset risk quantifier for bitcoin, and the rest of the symbols have the same meaning as above.

Profit and Loss Picking
After obtaining the optimal daily weights for the non-trading day period according to VaRY, we discuss the two cases of profit and loss during the non-trading day period separately by setting up the discriminant Pre, and adjust the weights established by VaRY according to the different objectives in the profit or loss state.
denotes the change in weight of bitcoin on day of the non-trading day period from the previous day, and denotes the weight of gold holdings on the day before the non-trading day.denotes the number of days in the non-trading day period, denotes the next-day return of bitcoin during the non-trading day period, and denote the commission rates of gold and bitcoin, respectively, as shown in Table 4. , it means that the best investment strategy after weighing return and risk appetite will bring profit to the investor, thus, the optimal weight calculated by the VaRY model can be directly output as the next day's gold and bitcoin holding ratio.However, since gold cannot be traded during non-trading days, an appropriate amount of gold should be sold the day before the non-trading day to ensure that the optimal investment decision for bitcoin has sufficient and just enough cash to execute during the non-trading day.
Therefore, on the day before the non-trading day, if EQW, you need to sell shares of gold and adjust your bitcoin holdings daily during the non-trading day according to the weight of ; if , you do not need to sell gold and adjust your bitcoin holdings daily during the non-trading day directly according to the weight of .Strategy D: When it means that even if the VaRY optimal weighting strategy is ensured by selling gold, it is still not profitable during non-trading periods.Thus, to somewhat hedge the risk of bitcoin price fluctuations and to avoid unnecessary costs, no gold is sold the day before a non-trading day.Based on the prediction of the next day's closing price, if , the current bitcoin weighting is kept unchanged.When , the weight of bitcoin held is sold short immediately on the next opening day until the of the following day is predicted to buy bitcoin with the weight in cash at the opening of the i day.

Forecast Accuracy
We perform day-by-day rolling forecasts by fixing the reference period and apply the SVM-GARCH model to forecast the gold market and the bitcoin market, which have different trading day times, respectively.We use line graphs to compare the forecasting results of the SVM-GARCH model with those of the SVM model to visually demonstrate the model's excellence.Also, we demonstrate that our combined model has higher forecasting accuracy compared to a single model by using five indicators: MSE, RMSE, MAE, MAPE and R2.In the Figure 3, the blue line represents the real value of gold price, while the green line represents the predicted value of gold price.As we can see, the curve predicted by our model is almost the same as the curve drawn by the real value of gold price, which indicates that our model has good prediction accuracy, as shown in Table 5. it can be seen that the results of the SVM-GARCH model are not very different between the test set and the training set.The small MSE indicates that the expectation of the squared difference between the test value and the actual value obtained by our model is very small, and the accuracy of the model is extremely good; the small MAE and MAPE indicate that the actual situation of the error of the predicted value obtained by our model is very good, and the accuracy of the model is excellent.When comparing the predicted values to the case where only the mean is used, the result of R2 is very close to 1, which proves that the overall accuracy of our model is extremely good.Comparing the SVM-GARCH with the test set data of the SVM, it can be seen that the SVM-GARCH model is more accurate, which also proves the superiority of our model compared to the single SVM prediction.In the figure 4, the blue line represents the real value of the bitcoin price, while the green line represents the predicted value of the bitcoin price.As you can see, the curve predicted by our model is roughly consistent with the curve drawn from the real value of the gold price, with slight differences, which indicates that our model has a good prediction accuracy, as shown in Table 6.can be seen that the results of the test set of the SVM-GARCH model are generally consistent with the training set, with slight differences, and the MSE is larger, indicating that the expectation of the squared difference between the test value and the actual value obtained by our model is biased, but due to the high volatility of the price of bitcoin itself, thus we consider it realistic and acceptable as long as the MSE∈ [1000,2000].The small MAE and MAPE indicate that the actual situation of the errors in the predicted values obtained by our model is very good and the accuracy of the model is excellent.When comparing the predicted values to the case where only the mean is used, the R2 result reaches 0.982, which proves that the overall accuracy of our model is extremely good.Comparing the SVM-GARCH with the test set data of the SVM, it can be seen that the SVM-GARCH model is more accurate, which also proves the superiority of our model compared to the single SVM prediction.

Model Flexibility
Since our multi-objective planning model takes into account the variability of wealth utility propensities of investors with different risk preferences through the risk adjustment factor v, we thus analyze the daily holding ratios of bitcoin and gold of investors with different risk preferences from 2016-2021 based on the dynamic weighted-multi-objective planning model constructed in the previous section, so as to further verify the rationality of introducing the risk preference factor v and thus determine whether our model is flexible enough.
Prior to the analysis, we first define the different risk-appetite types of investors as follows.
, according to Hypothesis 6, investors' positive utility of wealth and returns are linearly correlated.
, according to Hypothesis 6, investors' negative utility of wealth and risk are linearly correlated, as shown in Table 7.

Risk-neutral investors
The Figure 5 is a graph of the optimal asset allocation for risk-neutral investors over a 5-year period.From the graph, we can see that risk-neutral investors are more evenly distributed in the weighting ratios of bitcoin and gold, but in general the share of gold holdings is relatively high.Therefore, we use this result as the basis for our analysis of risk-adverse and risk-averse investors.The Figure 6 is a graph of the optimal asset allocation for risk-averse investors over a 5-year period, and comparing the two graphs shows that risk-averse investors (k taken as 10) tend to invest more in Bitcoin compared to risk-neutral investors, while investing relatively less weight in gold overall.The fact that bitcoin is a riskier asset than gold is an indication that the dynamic weightingmulti-objective programming model we have constructed is realistically meaningful and the risk adjustment factors introduced are reasonable.The Figure 7 is a graph of the optimal asset allocation for risk-averse investors over a 5-year period.Comparing the two graphs shows that risk-averse investors (k taken as 1/10) tend to invest more in gold compared to risk-neutral investors, while investing relatively less weight in bitcoin overall.The fact that gold is a less risky asset than bitcoin is an indication that the dynamic weighting-multi-objective programming model we have constructed is realistic and meaningful, and that the risk adjustment factors introduced are reasonable.

Risk-averse investors
In summary, all else being equal, the propensity for higher-risk assets increases as the investor's risk appetite rises, and the propensity for lower-risk assets decreases as the investor's risk appetite decreases.This shows that by introducing risk adjustment factors, our model can meet the investment needs of investors with different risk preferences to a certain extent and has some flexibility.

Conclusion
To obtain the optimal portfolio strategy for gold and bitcoin, we construct a dynamic weightedmulti-objective programming model based on a time-series forecasting model.
In terms of investment forecasting, we first introduced the concept of nearest neighbor mutual information and constructed the SVM-GARCH combination model to provide a more accurate and reliable basis for investment decision planning based on nonlinear feature extraction and heteroskedasticity processing of the data while fully considering the correlation between gold and bitcoin price fluctuations.In terms of investment planning, we further construct the VaRY model to reasonably weigh investment returns against investment risks, and introduce risk adjustment factors into the planning model, and develop different dynamic weights for trading and non-trading periods -a multi-objective planning model.
By combining and analyzing the forecasting model with the planning model, we provide evidence for the excellence of our investment strategy in four dimensions: accuracy, reasonableness, flexibility, and high return.

: The Past 5 . 1 .
SVM-GARCH Model (Day-by-day rolling forecast with fixed reference period)5.1.1.Required definitionsDefinition 1.Assuming that is the return time series data, the mean and variance equations of the SVM-GARCH model are as follows:

Table 2 :
Algorithm description of SVM-GARCH prediction model based on mutual information Algorithm description: Step1:Construct the feature ensemble , extract the discrete numerical feature set associated with the target and calculate the feature values to obtain the training sample set .Step2: Calculate the nearest neighbor mutual information NMI of and , select the first k (k≤N) strongly correlated features to form a new training sample , where is used as the input variable of SVM.Step3:According to the above steps, the input variable is established from for period t+1.Step4:Train the SVM on and select the parameters and kernel functions.Step5:According to the fitting result of SVM , the training error sequence is obtained according to .Step6:Perform heteroskedasticity test on , if there is heteroskedasticity then perform the following steps; otherwise go to Step8*.Step7:Fit the parameters of SVM-GARCH by Definition 1 to build the prediction model.Step8:Use as input to the SVM-GARCH model to obtain .Step8*:Using as input to the SVM model, we obtain .

Figure 3 :
Figure 3: Gold Forecast Price Comparison Chart

Table 1 :
below: Notations used in this paper

Table 4 :
Profit and loss selection

Table 5 :
Gold Forecasting Model Evaluation Results

Table 6 :
Bitcoin Prediction Model Evaluation Results

Table 7 :
Investor type & Corresponding condition