# Recommending Cryptocurrency Trading Points with Deep Reinforcement Learning Approach
## 2 Background
### The Double Crossover Strategy  
As noted above, there are two kinds of price averages required for this strategy. The longer calculating period (in our case 60 days price average) is called the long-term moving average (LMA) and the shorter period called the short-term moving average (SMA--15 days price average). To calculate the simple moving average, whether it is ten days or 60 days, one adds the price of 10 days and divides into ten or sums up the 60 days and divides into 60. For the next day calculation, drop the last data and add the latest data point and recalculate the average. In this way, the average keeps on moving forward with every new data point being generated. Below, Equation (1) is a quick explanation of how to calculate ten days moving average, where \(d\)--daily price, \(p\)--points, \(n\)--number of points:  
\[p_{1}=\frac{d_{1}+d_{2}+\cdots+d_{d}+d_{10}}{10};p_{2}=\frac{d_{2}+d_{3}+\cdots+ d_{10}+d_{11}}{10};\ldots;p_{n}=\frac{d_{n}+d_{n}+\cdots+d_{n-1}+d_{n}}{10} \tag{1}\]  
According to the strategy, next, we should find the right crossover points. To find crossovers, we can use a rule that explained in the strategy:  
1. Downtrend changes to the uptrend, the price crosses over the short-term, and secondly, the short-term crosses over the long-term. This is called the \"Golden Cross\". 2. Uptrend changes to the downtrend, firstly, the price crosses under the short-term, and secondly, the short-term crosses under the long-term. This is called \"Death Cross\". The golden cross interpreted as a signal to a final upward turn in a market by analysts and traders. So, the operation tactics can be \"buy at the golden cross\". Conversely, a similar intersection of the lower moving average is a deadly cross, and it is believed that it signals a decisive decline in the market. So, it is a useful act like \"sell at death cross\". We downloaded hourly historical data of Bitcoin from 2 of October 2016 to 1 of the March 2019 year and traded based on the Double Cross strategy. The trade process visually described in Figure 1. Trade process went as follows: for starting, the trader's capital was 10 000 $ cash and 20 Bitcoin (BTC) coin, and he/she acted with the guidance of strategy: bought at the golden cross, sold at the death cross. One factor that every investor must pay attention to is transaction costs. They are important because it is one of the key determinants of net returns. High transaction costs can mean thousands of dollars lost from not just the costs themselves, but because the costs reduce the amount of capital available to invest [30]. Table 1 presents the main information about the process: invested money for trade includes sum of cash and value of available coins at that moment, number of appeared golden and death Crosspoints, sum of trading fee that is 0.15% of the trading value taken whenever trader acts, money after trading also includes sum of all cash and available coins value at the final trade process, quality of trade process, whether the capital is lost or gained profits. For evaluating the trading process, we show two cases in Table 1. The first one shows how invested money changes when the trader's act goes based on the Double Crossover strategy's guidance. The second case describes when a trader holds invested money and coins until the final moment of trading without performing any actions, then compares the initial investment with the final capital. Figure 1: The Bitcoin hourly data diagram from the 2 of October 2016 to the 1 of March 2019. The Dead and Golden Crosspoints matched with green and red points, respectively. According to Table 1, the quality of the trade process when applied Double Crossover strategy is 56% lower than trading only with the \"hold\" action. These results indicate one of the weaknesses of the strategy. However, the single result is not enough to judge the whole strategy. For that reason, we will test the strategy differently. Continuously, to test the strategy more deeply, we divided our last prepared data into two parts.