In this paper, we analyze the price fluctuations of Bitcoin and gold, find the optimal transaction model by establishing the corresponding model, and analyze the transaction cost sensitivity and transaction strategy of transaction risk. Specifically, we employ deep reinforcement learning to simulate trading in stocks. In addition, using the risk analysis of the Sharpe ratio, compared with the Markowitz efficient frontier model of portfolio management, choose a medium risk, high return portfolio. Finally, according to the needs of the trading strategy, the sensitivity analysis of the trading strategy to the transaction cost is completed.