Using USD / JPY from 2018.01 to 2019.04, The entry point of the golden cross of the moving average on the 5-minute bar was used as sample data. (2482 data)
Labeling was done according to the following rules.
Result | Label |
---|---|
Profit | 1 |
Loss | -1 |
Settlement by holding time | 0 |
This time, we set the loss cut and profit taking lines so that they are roughly divided into three equal parts.
As shown in the graph below, I expected that "profit taking" / "loss cut" / "settlement by holding time" would be separated for each cluster.
With this, in the case of cluster 2, it can be judged that it is not good and the trade can be forgotten.
We clustered using scikit-learn's TimeSeriesKMeans, illustrated the percentage of labels in each cluster, and sorted them in order of winning percentage.
Not good enough. .. The highest win rate was 45% and the lowest win rate was 22%. Since the original is almost divided into 3 equal parts (33%), it seems that it can be divided a little, but I would like it to be divided a little more beautifully.
Aiming for improvement, we decided to add the following longer timeframe information to the features.
The result is below.
The highest win rate was 63% and the lowest win rate was 14%. By adding the information of the upper legs, it has improved a lot. I think it was good because I was able to confirm again that the information on the upper legs is useful. With such a result, it seems difficult to avoid damaging, but I personally thought that it could be used to adjust the quantity of positions.
Thank you for reading the article.
Recommended Posts