Data mining based quantitative trading strategy model for gold
and bitcoin
Summary
First, we first performed data cleaning on the data at hand. We first solved the
inconsistent format of Date column programmatically and sorted it, then we determined the
error value of value by box plot test and changed the error value to null value. Then the
vacant values and error values were filled using Newton interpolation based on time series.
The approximate trend of gold and bitcoin prices from September 11, 2016 onwards is
depicted by plotting a line graph.
For the first question, considering that the csv file only gives the relationship between
time and price, we used a time series ARIMA model to predict the price trend of gold and
bitcoin. First, we performed a smoothness test to find that the time series is unstable, then we
did a 1st order difference and the data passed the stability test. To avoid errors caused by
human subjectivity, we then plotted ACF and PACF charts, then determined the order of
the ARMA model for the two types of investment products by using the BIC information
criterion and the AIC information criterion, and fitted the model to predict the price for the
days after the closing to obtain the daily return after the closing, so as to build a dynamic
programming model to calculate the most optimal portfolio of positions.
For the second question, we use gradient descent to tune the parameters of the ARIMA
model to improve the model and obtain the optimal solution, thus obtaining the optimal
model. Then we give a perturbation to the trading strategy to see if the total return will
increase, and finally we confirm that this "seems" to be the optimal model.
For the third question, we were asked to perform a sensitivity test on the rate parameters.
We observed the final profitability results by increasing the two transaction costs rate
parameters
and
to 1-5 times and 1-3 times their original values, and obtained
that the data did not fluctuate much, indicating that the model has good stability.
For the sensitivity analysis, we also did other work. We changed the three parameters
, α and β of the ARIMA model in the first question separately, and compared the predicted
images after changing the parameters with the original images, and found that the change of
parameter β, i.e., the parameter of MA, had some sensitivity to the prediction results of
the model. And the model prediction results do not change much after the parameters
and β are changed.
Finally, we performed a model extension where we optimized the timing operation by
using several of the more established quantitative transaction timing theories in finance:
the Moving Average (MA) and KDJ indicators, and developed some trading rules for
existing products. The VaR risk control model is also used to assess the risk of the next
day's trading. When the possibility of losing money is assessed to be higher than 70%, an
early warning is made and the quantitative transaction process is suspended, allowing
the user to make his own choice and proceed to the next operation.
Keywords: Time Series Model Gradient descent method Sensitivity testing Quantitative
transaction Timing Theory VaR model
- 1
- 2
- 3
- 4
- 5
- 6
前往页