Education, Science, Technology, Innovation and Life
Open Access
Sign In

Quantitative Trading Decision Model Based on Lstm Algorithm and Dynamic Programming

Download as PDF

DOI: 10.23977/ICAMCS2022.017

Author(s)

Yi Zhou, Longbiao Xie, Qianxi Zhang

Corresponding Author

Yi Zhou

ABSTRACT

Quantitative trading is a way of trading that combines mathematical and financial knowledge and relies on computer programming. However, as we all know, the return and risk of investment is difficult to accurately estimate, this paper takes gold and Bitcoin as an example, uses machine learning methods to predict price trends, and builds a reasonable quantitative trading decision model based on this to seek a good trading strategy to assist traders in trading decisions. First, we preprocess the data to fill in the missing values in the gold data. Then, after analyzing the data for 5 years, we select the LSTM model in the constructed machine learning algorithm to predict the price of gold and Bitcoin in the next 1 day based on the data from the previous 10 days. Then, based on the predicted price, we set the goal of maximizing the value of the asset, take the trading conditions and return conditions as constraints, establish a quantitative trading decision model based on dynamic programming, and use Python deduction to derive the best trading strategy per day and calculate that when the initial capital is $1000, the final value of the asset at maturity is: $75,507. Then, for the verification of the best trade strategy, we carry out from the two aspects of price prediction model and trading strategy planning. The results show that the fit of the LSTM model selected in this paper is higher than that of the ARIMA model, and the final asset return obtained after adding perturbation terms to the original daily trading strategy is slightly lower than the asset return of the original model. Therefore, the trading strategy given in this article effectively passes the test. Finally, we perform a sensitivity analysis of the transaction cost of the model, so that the transaction cost ratio changes by 10%, and the sensitivity of gold and Bitcoin with the transaction cost change are 5.37 and -3.72. After the model analysis, it is found that: on the one hand, because the transaction cost increases, the number of transactions will be reduced, which will affect the trading strategy. On the other hand, an increase in transaction costs leads to an increase in total costs, which affects the final benefit.

KEYWORDS

Quantitative trading, Lstm model, Dynamic programming, Financial time series

All published work is licensed under a Creative Commons Attribution 4.0 International License.

Copyright © 2016 - 2031 Clausius Scientific Press Inc. All Rights Reserved.