Combined trading strategy of bitcoin and gold
Authors: Chen Yuhan , Tong Lei , Chen Rui 
Published: July 2022

Market traders buy and sell volatile assets frequently, with a goal to maximize their total return. We have been asked to develop a model that uses only the past stream of daily prices to date to determine each day if the trader should buy, hold, or sell their assets in their portfolio. The assets that can be traded are Bitcoin and gold. We will start with $1000 on 9/11/2016 and try to maximize the total return until 9/10/2021. We will start from forecasting prices and developing trading strategies. In terms of price prediction, we use MSE and Trend_Acc as indicators, and use XGBoost, a representative strong learning algorithm in traditional machine learning, and LSTM, which is good at time series prediction in deep learning, to fit and forecast the data respectively. At first glance, the curve fitting MSE are satisfactory , but, a closer look reveals that the model either firmly remembers the data of the training set, resulting in a lack of generalization ability for unknown data (XGBoost), or tends to take the previous day's results as the predicted results, resulting in a significant lag in the prediction curve (LSTM), all of which are reflected in the models' poor performance in predicting whether prices will rise or fall in the future. In our view, since a large number and complexity of factors affecting prices, it is unrealistic to predict future prices accurately from past prices alone, unless we can get rid of the limitation of the problem, use additional data to assist the prediction, or use all the data as a training set for fitting, we cannot achieve good results in the prediction, but such behavior is inconsistent with our original intention. We established restricted trading model based on composite index judgment. The model not only applies the traditional economic Relative Strength Index and Stochastics Oscillator Index, but also introduces the K-Lipschitz limitation in deep learning into the model. The model dynamically adjusts each transaction strategy according to the changes of working capital and total assets, purchase cost, selling profit and other factors, and the total income of the model is $132433.1. In the horizontal comparison, the profit of our model is more than 39.6%-283.6% than that of the traditional moving average strategy and RSI-STC strategy, and 51.3% higher than that of the random walk model using Montmarlowe algorithm. In addition, we collected the transaction data of bitcoin and gold from 2012-01-01 to 2022-02-21, and applied the model to the historical data, and received good returs. For example, from 2012-1-1 to 2022-2-21, the return was $8418074.9. It is proved that the model has high generalization performance and strong stability. To test the sensitivity of the model to transaction costs, we also analyze the changes in trading strategies that should occur when fees rise. The analysis shows that the traders' single trading volume decreases first and then increases with the increase of the commission fee. The results of sensitivity analysis show that the return change is less than 3%, which proves the robustness of the model. Finally, we made a memo to summarize our work.