With the development of the investment market, the term quantitative trading is enduring. How to predict the price trend of investment products or determine when to hold and sell stocks through models is a hot issue in the financial field. In order to provide some reference for investors, I need to establish a basis for past data to solve the problem of holding and selling stocks. Firstly, in order to build a best strategy to trade, I merge the two tables given by the question and deal with missing values and so on.I set up cattle bear market model, give the quantitative after cattle bear market definition, and then establish a risk model, establish the formula of risk model, get the gold and currency risk trend chart, on the issue of how to buy and sell, I buy a grade, sell, the introduction of innovation So when to buy and sell has an intuitive and easily understood conclusion, that is, gold score is greater than 0.578 to buy, less than 0.297 to sell, bitcoin score is greater than 0.710 to buy, less than 0.559 to sell. Secondly, in order to solve the problem of predicting price trends, I build a price prediction model based on LSTM. Compared with RNN model, LSTM model has the advantages of strong memory and reduced computational complexity. I predict that the initial $ 1000 to September 10,2021 ,the value of gold is $1763.54,and the value of bit is $4116.75.The prediction error of gold is about 0.99,and that of bitcoin is about 0.92.The closer the prediction error is to 1,the better the prediction effect is. Therefore, I believe that LSTM prediction can get better results. Thirdly, to prove the optimal trade strategy,I added a 3% perturbation to our previous approach, and then buying and selling again to see if the gains are better than the original approach, to conclude that our model can provide the best trade strategy. Finally,in order to test the sensitivity of our model,I increase the transaction cost of gold from 1% to 0.5% of the increase margin increased to 3%,the currency of the transaction costs begin to rise by as much as 0.5% from 2% to 4%.I draw a picture of the change of total assets and make a table of the change of transaction times. It is concluded that the influence of transaction cost on strategy is as follows: with the increase of transaction decreases and the total assets also decreases. In addition,the advantages and disadvantages of our model are summarized,so as to improve our model later.