Convert index trading to option strategies via LSTM architecture

In the past, most strategies were mainly designed to focus on stocks or futures as the trading target. However, due to the enormous number of companies in the market, it is not easy to select a set of stocks or futures for investment. By investigating each company’s ﬁnancial situation and the trend of the overall ﬁnancial market, people can invest precisely in the market and choose to go long or short. Moreover, how to determine the position size of the transaction is also a problematic issue. In the past, many money management theories were based on the Kelly criterion. And they put a certain percentage of their total funds into the market for trading. Nonetheless, three massive problems cannot be overcome. First, futures are leveraged transactions, and extra funds must be deposited as margin. It causes that the position size is hard to be estimated by the Kelly criterion. The second point is that the trading strategy is difﬁcult to determine the winning rate in the ﬁnancial market and cannot be brought into the Kelly criterion to calculate the optimal fraction. Last, the ﬁnancial data are always massive. A big data technique should be applied to resolve this issue and enhance the performance of the framework to reveal knowledge in the ﬁnancial data. Therefore, in this paper, a concept of converting the original futures trading strategy into options trading is proposed. An LSTM (long short-term memory)-based framework is proposed to predict the proﬁt probability of the original futures strategy and convert the corresponding daily take-proﬁt and stop-loss points according to the delta value of the options. Finally, the proposed framework brings the results into the Kelly criterion to get the optimal fraction of options trading. The ﬁnal research results show that options trading is closer to the optimal fraction calculated by the Kelly criterion than futures trading. If the original futures trading strategy can proﬁt, the beneﬁts after converting to options trading can be further superior.


Introduction
For many experts, scholars, and even traders, it is fascinating to research and develop profitable trading strategies or optimize already existing trading strategies to maximize the overall profitable growth. In many trading strategies, most of the trading targets are stocks and futures, and stocks represent the ownership of a company. Therefore, when choosing which stock to invest in, a lot of homework will be done in advance such as the company's operating status, debt status, evaluation. Also, many people directly use stock index futures as the investment target, because as long as the overall stock market trend is judged, enter the market to go long or short. Many trading strategies are based on common strategies or ideas and further extended, such as moving average trading strategies based on the average price over a while [10,13,18]; or because of trading at the opening the trading volume and price fluctuations are larger than other periods, there are also many trading strategies based on this, such as the open range breakthrough (ORB) trading strategy [15,35], first formulate a period as the observation period, if only when there is a breakthrough up or down before entering the market. After deciding the target and strategy of the transaction, one of the most important factors in the financial market is money management [36][37][38]. Many traders are more concerned about choosing the investment target and the time to enter and exit, and ignore the control of the position size, making the final result loss or performance not as expected. The foundation of money management was derived from the Kelly criterion [17] proposed by John Larry Kelly at Bell Labs in 1956, but it was originally a formula proposed to study the probability of noise occurring in communications. It was until Edward O. Thorp put the Kelly criterion in other fields, such as blackjack for playing cards, sports lottery tickets, and the stock market [33]. The Kelly criterion can be used in situations such as gambling that can be played unlimited times and has a fixed probability of winning and odds [41], in the process of repeated betting to maximize the growth of his assets [20,30,34,42]. However, there is a gap between the financial market and the gambling [16], so many scholars have begun to explore how to use the Kelly formula in a more general situation [4,6,9,11,43].
To use the Kelly criterion in the financial market, we need to know the odds and winning probability of the trading strategy in advance. Although the odds of the trading strategy can be controlled by formulating the takeprofit and stop-loss point, due to the futures are leveraged transactions, we have to deposit some money as a margin to operate. So if we want to calculate the position size according to the Kelly criterion, we cannot reach the size of the position calculated by the Kelly criterion when using futures trading. Therefore, we propose an architecture to convert the original futures trading strategy to using the options as the target of the transaction. At the same time, because the options premium unit is small, the position size can be controlled more accurately to achieve the optimal betting fraction by the Kelly criterion. After we use options trading to replace the original futures trading strategy, another problem is that the trading strategy we have developed is difficult to estimate the winning rate, which cannot be brought into the Kelly criterion for calculation. Many studies have combined financial transactions with machine learning to estimate stock prices or the direction of ups and downs [7,19,23,31,32]. To further improve the accuracy of prediction, artificial neural networks and deep learning have also been used in financial markets [12,25,45]. The study also pointed out that because of the time series characteristics in the financial market, each time the price is affected by the long-term or short-term [3].
Thus, the long short-term memory (LSTM) algorithm [14] has many different applications in the financial market and also more accurate than traditional machine-learning methods in the past [5,27]. Therefore, we decided to use LSTM to estimate our trading strategy's winning rate and, at the same time, using fixed take-profit and stop-loss points to fix the odds and bring it into the Kelly criterion to calculate the position size.
Due to the difference between the final profit and loss results of using futures and options under the same trading strategy, the original futures trading strategy cannot be converted into options trading directly. The options have a different strike price, so the first in the money strike price is usually set as target and using the delta value as the basis for conversion from the original futures strategy's takeprofit and stop-loss points to options operations. In the futures, according to the characteristics of the option, different options retest strategies can be used in combination with the Kelly formula to achieve better performance [39,40]. However, if we can convert the futures strategy with good performance into options as the trading target and control the position size, it can save a lot of time in developing strategies. In this paper, a LSTM-based framework is proposed to convert a futures strategy to a options strategy.The major contributions of our work are listed as follows: 1. We first proposed a conversion process from a futures trading strategy to a new options trading strategy. It causes a futures trading strategy can be applied in options transaction directly. 2. A win rate prediction system-based LSTM network is proposed to apply the proposed method into Kelly formula. 3. Due to the proposed LSTM-based prediction framework and the conversion process, the new generated options trading strategy can effectively enhance the total profit.

Futures trading strategy at market opening
Futures trading price fluctuations and volume at opening periods are much bigger than other periods. For instance, Fig. 1 shows the candlestick chart minutely with the target of TAIEX futures on December 09, 2019. We discover that the first half time of differences of high and low is more than 60 points, but the second half time of differences is less than 30 points, namely the first half time is twice as much as the second half time. Not only the price fluctuations but also the trading volume is much bigger than the second half time except for the last closing period. Another example on December 13, 2019 is shown in Fig. 2. We discover that the first half time of differences of high and low is even more than 80 points, but the second half time of differences is less than 40 points. The price fluctuations and the trading volume are lager in the first half time than the second half no matter in bull market or bear market. So, there are many trading strategies based on the opening period. For example, the opening range breakout strategy is a famous and classic case that many people know. One of the basic operations is shown in Fig. 3. Take the first 15 candlesticks as standard, if the price breaks through the highest price of the first 15 candlesticks, we long the target, otherwise, we short the target. In Fig. 3, the price is lower than the lowest price of the first 15 min, so we short the target.

Kelly criterion
When we formulate trading strategies and control profit margins by setting stop-loss and take-profit points, the biggest problem we are currently facing is that we do not know how many positions we should put in the market, so many financial theories have emerged. Kelly criterion is one of the most famous theories. First, we consider a binary outcomes game with win rate p, and if the player wins, he will get b 1 times of bet and get all bet back, but if the player loses, he will be deducted b 2 times of bet for punishment. Without loss of generality, if the player bid 1 dollar, the player will earn 1 þ b 1 dollars if win and will lose 1 À b 2 dollar if lose. Namely, in the case of bidding 1 dollar, the net profit is b 1 dollars. Assume that the initial capital is A 0 , and the capital in tth step is A t , the player will always bid the fraction f of his total capital in every step, where 0% f 100%. Therefore, if win in tth step, the capital will be A t ¼ A tÀ1 ð1 þ b 1 f Þ, on the other hand, if lose in tth step, the capital will be A t ¼ A tÀ1 ð1 À b 2 f Þ. After playing T rounds, with winning W times and losing L times, that is, T ¼ W þ L, the function is given as By both sides divided by A 0 , Then, take the equation log and divide by T, we get After many times, let T approach to infinity, and the win rate is p, we get To get the maxima of the capital growth rate, we take the derivative of the above equation and get the optimal fraction as However, we recognize that there is a gap between reality and theory. For example, consider a game with 50% win rate, it may not exactly win 50 times by playing 100 times. Its probability of winning k times is C 1 k 00 Â ð50%Þ k Â ð50%Þ 1Àk by binomial theorem. But let us not consider the issue now. Let us give an example of a practical application of the Kelly criterion. We play a fair coin-tossing game that the probability of getting head or tail is 50%, as shown in Fig. 4. If the outcome is head, we can earn double bet; otherwise, we will lose all the money we bet this round.
Considering playing the above game after 10 rounds, we can calculate an expected return with optimal fraction by the Kelly criterion, As a result of the above equation and considering 1 dollar as the initial capital, the final result is shown in Fig. 5. Via the above estimation with the Kelly criterion, a game with win rate 50% and odds 2 will obtain optimal fraction as 25%, and final capital will be about 1.8 times than that of initial capital.

Long short-term memory and related work
Before we discuss long short-term memory, let us talk about the original neural network, artificial neural network (ANN). An ANN works like a human's nervous system, based on a collection of connected artificial neurons. Each connection can transmit the signal or data to other neurons. Besides, ANN can learn from us by giving him variables, weight, bias, activation function, and so on. A neural network can be divided into three layers, input layer, hidden layer, and output layer as Fig. 6. After that, many scholars begin to increase the number of hidden layers to improve the accuracy of prediction, and the multiple hidden layer neural network is also called deep learning as shown in Fig. 7.
The output of the traditional neural network after each layer of calculation is only passed to the next layer in one direction, which means that the input and output are independent of each other. Therefore, recurrent neural network (RNN) algorithm was born. In Fig. 8, we can see that the calculation results are not only output but also become one of the inputs to the next calculation.
Until 1997, the long short-term memory (LSTM) was proposed by Hochreiter and Schmidhuber. The LSTM algorithm solves the problem of the disappearance of gradients generated in mathematics, causing long-term memories to be hidden by short-term memories. The LSTM adds four important components, including input gate, output gate, forget gate, and memory cell as shown in Fig. 9. The input gate will control whether the input features should be input or not. The output gate will control whether to output the result of this calculation. The memory cell will store the calculation results for the next  After the proposal of neural network, many scholars use it to predict stock prices or weighted stock index [21,44]. Not only the original neural network, many studies using recurrent neural network or long short-term memory have also been applied in many journals [22,24]. Furthermore, in order to improve the prediction accuracy, many studies have added many hidden layers or mixed multiple algorithms [1,12,28,29]. In addition to the stock price information, other information such as textual information, financial news, emotional data, and so on are also be added [2,8,26,46].

The proposed method
In this chapter, we will define the original futures day trading strategy and use long short-term memory algorithms to train the strategy's win rate today. Next, use the delta value to convert the take-profit and stop-loss points of the original futures strategy into trading with options. The Kelly formula will be used to calculate the optimal betting ratio to estimate the size of the entry position and compare it to the futures and what is the difference in the outcome of an options trading.

Define the original futures strategy
We first consider a simple futures day trading strategy, for example, by setting a take-profit point and a stop-loss point and, at the same time, formulating a daily observation and trading period as shown in Fig. 10. Suppose our trading strategy is long at 80 points take-profit and 20 points for stop-loss. The observation period is from 08:45 A.M. to 09:15 A.M. During this period time, we do not trade but judge whether to enter the market today to execute the strategy and estimate the size of our entry position. If we decide to enter the market today to implement the strategy,    we will enter at 09:15 A.M., and during the period from 09:15 A.M. to 10:00 A.M. If the price touches the takeprofit point or stop-loss point, it will enforce to close out. Still, if no take-profit or stop-loss points are touched before 10:00 A.M., we will also enforce close the position at the end of the trading period (10:00 A.M.) and compute profit and loss.
For example, as shown in Fig. 11, we entered the market at 09:15 A.M., the entry point is 10,000, so our stop-loss point is 10,000 ? 80 = 10,080. The stop-loss point is 10,000 -40 = 9960, if the take-profit or stop-loss point is touched during the trading period, we will enforce to close out the position, and we find that at 09:15 A.M, the points rise above the take-profit point so that we will gain from closing positions and in this example, we have gained 80 points.
And Fig. 12 is another example. We enter the market at 09:15 A.M., and the entry point is 10,000, so our take-profit point is 10,000 ? 80 = 10,080, and the stop-loss point is 10,000 -40 = 9960, if the take-profit or stop-loss point is touched during the trading period, we will enforce to close out the position, and when the time reaches 09:37 A.M., the price is lower than the stop-loss of 9960 points, so we close out the position, losing 40 points in this example.
To give another example, as shown in Fig. 13, we also entered the market at 09:15 A.M., the entry point is 10,000, so our take-profit point is 10,000 ? 80 = 10,080. The stoploss point is 10,000 -40 = 9960, but the price did not touch the take-profit or stop-loss point during the trading period, so we enforce to close out the position at the end of the trading period of 10:00 A.M. to settle the profit and loss, and finally, we lost 23 points.
After we have set the trading strategy, we can bring the historical data into the long short-term algorithm to train the model and estimate the daily winning rate according to the strategy we have formulated. That is, we can calculate how much funds to invest at 09:15 A.M., and even further convert to options for the target transaction.

Predict the trading strategy win rate by long short-term memory
After we formulated the original futures day trading strategy in the previous section, if we want to use the Kelly formula to calculate the optimal betting ratio to determine    the size of the position, we need to have a fixed profit-toloss ratio and the winning rate of this strategy. The ways of take-profit and stop-loss control the profit-to-loss ratio. Still, the strategy's win rate is difficult to estimate in the financial market, so we decided to use long short-term memory algorithms to estimate the win rate. As shown in Fig. 14, the parameters are required before we train the model. We organize the transaction data per minute during the observation period into the opening price (the first transaction price per minute), the highest price, the lowest price, and the closing price (the last transaction price per minute), and the total transaction volume are used as the predicted features. For example, we have a trading period from 08:45 A.M. to 09:15 A.M., which means that we have five kings of features: the opening price, the highest price, the lowest price, the closing price, and the transaction volume, multiplied by 30 min. The total of 5 Â 30 ¼ 150 transaction data. Among them, our four features of the opening price, highest price, lowest price, and closing price will be converted into fluctuations based on yesterday's closing price. For example, the opening price of the first minute is 10,087 points, and yesterday's closing price is 10,000 points. So, we will mark as 10;087À10;000 10;000 And for the volume of the transaction, we take the five days of the week as the benchmark, and in the past five days, the average per minute during the observation period. We use the average transaction volume as a benchmark to highlight whether the trading volume explodes or decreases. For example, the transaction volume in the first minute of today is 1032, and the average transaction volume per minute in the observation period of the past five days is 1412, so we mark it as 1032À1412 1412 ¼ À0:269. We also need to input the parameters we want to predict. In this paper, we will divide the results into two parts to discuss as shown in Fig. 15. If the final result is assumed to be 60 points of profit, and our take-profit point is 80 points, so today's strategy's profit and loss value is 60 80 ¼ 0:75. If the result is a take-profit and close position, then the strategy's profit and loss value will be the maximal value 80 80 ¼ 1. On the other hand, if the final result of the day is a loss, suppose we lose 10 points today, and we formulate the stop-loss point is 40 points, so today's strategy's profit and loss value is À10 40 ¼ À0:25. If the final result is a stop-loss appearance, the strategy's profit and loss value is the minimum value À40 40 ¼ À1. After we have trained the prediction model, the next step is to bring the testing data into the model for prediction, as shown in Fig. 16. We also organize the observation period data into the model as input data and then output the daily input data as a result of À1 to 1. Still, this result is not the final estimation strategy we want to use. We linearly scale the output to a value between 0 and 1 as the winning rate of strategy. We regard this result as the win rate of the trade entry at 9:15 A.M. on that day, and we use this win rate to calculate the expected value, if the expected value is positive, we will enter the market today. For example, assuming that the predicted result of the LSTM model is À0:072, we get a win rate of 0.464 based on linear conversion. It means that if enter the market and execution strategy trade have a profit probability of 0.464, we finally calculate the expected value of 0:464 Â 80 À ð1 À 0:464Þ Â 40 ¼ 15:68, so in this example, we will enter the market today to execute the trading strategy.
If we use LSTM to accurately predict the winning rate of the daily execution of the trading strategy, then we can further bring into the Kelly formula based on this result to calculate the optimal betting ratio and convert it to use the options as the target can be more accurate control the position size to maximize growth.

Convert futures strategy to use options
as the target and calculate the size of the position  Fig. 17 as an example, assuming today's delta value is 0.8, it means that assuming our original futures day trading strategy has a take-profit of 80 points and a stop-loss of 40 points, today's options trading strategy take-profit after conversion is 80 Â 0:8 ¼ 64 points, and the stop-loss is 40 Â 0:8 ¼ 32 points. However, the biggest difference between options and futures is that options have many different strike prices. Assuming that the futures are now 11,108 points, we will use first in the price option, that is, the options with a strike price of 11,100. If the original futures strategy is long, we will buy call options after converting to options; otherwise, if the original futures strategy is short, then we will long put options. Assuming that our initial capital is 1,000,000 dollars, and the winning rate predicted according to the futures strategy is brought into the Kelly formula to obtain 0.196 as the optimal betting ratio, and each point of options is 50 dollars, and our position size is theoretically investedcapital maximumloss But the same we have to pay the premium when trading options, assuming the options is now 260 points, in fact, we can only purchase 1;000;000 260Â50 Ä Å ¼ 76 lots. Although there are still some gaps between the 76 lots and the 122 lots with the best betting ratio, compared with the 6 lots and 24 lots with futures, the gap has been reduced a lot.

The pseudo-codes of converting the original futures strategy to the options trading strategy
In this section, the formal pseudo-codes of the proposed framework are proposed here. First of all, Algorithm 1 reads the original futures exchange tick data for this study and converts it into the required data (opening price per minute, highest price, lowest price, closing price, and trading volume). First, when the data are read in the proposed framework, it is divided into the data needed for the observation period, and we store it in total observe data. The data in the trading period are calculated through backtesting, and the tick transaction price during the trading period is temporarily stored for future strategy backtesting when used. After the observation period data are entered, standardization is required. The four data of opening, high, low, and closing are converted into percentages of change based on the opening of yesterday. The trading volume is based on the average trading per minute of the observation period in the past days (this study is set as the fifth trading day of the week) as a percentage to determine whether the trading volume has increased or decreased.
Then we can bring in the planned strategy, such as entering the market at 09:15 A.M., stopping profit at 80, and stopping loss at 40. The data in the total price list during the trading period can be calculated. The first is the entry price. If the price touches the take-profit or stop-loss point, it will exit the market directly and calculate the profit and loss mark as the current day's strategy profit and loss value between À1 and 1. After processing the training set data, bring it into the LSTM model to calculate the winning rate and expected value of the daily execution strategy, and then backtest and calculate the daily part size and profit and loss results. However, due to the margin system of futures trading, the calculated Kelly ratio may not be executed accurately. If the original margin is insufficient, the total assets will be used to calculate the profit and loss results. The detailed pseudo-codes are provided in Algorithm 2.

Input:
data, the testing futures data in a specific period, s, the strategy experimentation function (a trained LSTM network), k, the daily Kelly fractioin function, sp, the pre-defined stop-loss points, fw, the pre-defined futures worth, om, the pre-defined futures original margin, p, the daily profit function and a, the current assets. Output: assetArray, daily assets record and positionArray, daily positions record.  totalP riceList totalP riceList Save today's data into daily trading period data 6: end for 7: averageDays = 5 Standardized days 8: for i from averageDays to the length of the data period do 9: Moreover, the pseudo-codes of the converted options trading strategy are shown in Algorithm 3. However, because of the nature of the option, in addition to being divided into call and put, there are also different performance prices to choose from. In this thesis, we only consider the options whose strike price is most close the current price as the target. There may still be a gap between the same ideal position size and the actual tradable position size, so the actual position size of the bet due to insufficient funds on hand should also be considered.

Experimental results
In this section, different experiments are compared to show the effectiveness of the proposed method. The experimentation will establish different frameworks with long or short strategies, different take-profits, stop-loss points, and various training set lengths. The futures and options transaction data used in the experiments were downloaded from the Taiwan Futures Exchange official website, and the period starts from January 02, 2018 to June 28, 2020. The target products are Taiwan Stock Index Futures (TX) and Taiwan Stock Index Options (TXO). All of the experiments are implemented by Python and performed on a Mid-2014 MacBook Pro with macOS Catalina OS. It has 2.2 GHz quad-core Intel Core i7 CPU, 16GB 1600 MHz DDR3 Ram and Intel Iris Pro 1536MB GPU. As the original futures strategy is established, the proposed LSTM framework is used to estimate the winning rate of the strategy and calculate the optimal betting position by Kelly criterion. Next, the result will be converted to an options trading strategy, which is used to compare with the original futures trading strategy. Assume the limitation of the initial budget is 1,000,000 New Taiwan Dollar (NTD). Here, the discussion focuses on the different profits of a strategy applying in the futures market and options market, therefore it ignores the transaction fee and the tax to simplify the experimental environment. The difference between the actual trading position and the ideal position size by the long and short futures day trading strategy will be shown in the following subsection. The influence of the length of the training period will be provided in the last of this section.

Input:
data, the testing options data in a specific period, s, the strategy experimentation function (a trained LSTM network), k, the daily Kelly fractioin function, sp, the pre-defined stop-loss points, ow, the pre-defined options worth, a, the current assets. Output: assetArray, daily assets record and positionArray, daily positions record.

Convert futures trading strategies into options strategies
In this subsection, the description of the transferring process and the performance of the proposed frameworks are shown. It will be divided into two parts. The strategy transferred from the long futures day trading strategy is shown in the first part, and the strategy moved from the short futures day trading strategy is shown in the second part separately. Due to the limitation of the budget, the following experiments will show the ideal positions and actual positions in futures and options markets. During the trading period, if the price achieves the takeprofit/stop-loss points or the trading period is up, the strategy will close the position and calculate the profit and loss. In the following LSTM training process, the period of the training and validation set is set from January 01, 2018 to February 29, 2020, and the period of the testing data is set from March 01, 2020 to June 28, 2020, to backtest the transaction performance. Figure 18 shows the state of the loss values at each epoch in the process of training LSTM. The batch size is set as 8 and patience is set as 30. If training results no longer improve in 30 epoch, the training will be interrupted, and the max value of the total epoch is 633 rounds. In Fig. 18, the proposed process labels the winning rate for each transaction in the testing data and puts it into the LSTM model as the input data. The optimal position, therefore, can be calculated by the output results from the LSTM model. Nonetheless, a sufficient extra margin for futures leverage trading is required. It, thus, is hard to reach the optimal position size in the real situation. The budget limits it; the actual transaction position could not reach the ideal position. As shown in Fig. 19, ideal position is the ideal position size, and actual transaction position is the position size that can be traded. The ideal position is average 7.69 times by the actual position. Among the 59 transactions, there are only three transactions that meet the ideal position size. Obviously, it is hard to achieve the ideal positions and cannot obtain a satisfied profit.
Then the original futures longing trading strategy is converted into longing call options trading strategy according to the method proposed in Sect. 3. And the takeprofit and stop-loss points corresponding to the options strategy are calculated through the delta value. Bring the converted options strategy and the winning rate predicted by LSTM into the Kelly criterion to calculate the optimal position size as shown in Fig. 20. The results show that the actual tradable position size is 4.82 times smaller than the ideal position size and is closer to the ideal position size than the futures strategy. The results show that among the 59 trades of options trading after the actual conversion, although there are only three actual positions in line with the ideal position size. The actual position size is average 4.82 times worse than the perfect position size. However, comparing with the futures strategy, it is still closer to the ideal part size. It, therefore, has more potential to obtain a higher profit. Figure 21 shows the different quotients between the original futures strategy and the options strategy. It can be seen that the quotient of the options strategy is smaller than the original futures strategy, representing that the options strategy is closer to the ideal position size. Take the ideal positions calculated by the previous steps for backtesting  with the initial budget. Figure 22 shows the different asset changes between the futures strategy and the options strategy. It can be seen that during the backtesting of the original futures trading strategy, the minimum asset was 938,400 NTD, the highest asset came to 1,944,800 NTD, and the final asset was 1,738,600 NTD. On the other hand, the minimum options trading strategy was 780,400 NTD, the highest came to 5,919,400 NTD, and the final asset achieved 3,473,950 NTD. It means that the operable position of the options trading is closer to the ideal value obtained by the Kelly criterion. Due to the more significant positions can be invested, the fluctuation of asset is also more considerable. If the final profit and loss have a benefit, it will also be higher than the futures transaction. Table 1 reveals the different performances by taking the different take-profit and stop-loss points in the original futures strategy and the options strategy. Obviously, no matter what the values of take-profit and stop-loss points were set, the position gap between the ideal positions and actual positions in the options strategy is always smaller than in the futures strategy. That is to say, the options strategy can always put more positions than the futures strategy. It, thus, suffers more risk and causes the minimal value of the assets is smaller than the futures strategy. However, during the backtesting process, Kelly criterion showed excellent performance in the options strategy. The largest asset of the options strategy was much better than the futures strategy. Therefore, the Kelly criterion can maximize long-term profit growth.

Convert the short futures day trading strategy
The previous section described how to convert the original long futures trading strategy to the call options strategy. In the market, it is in addition to going long and also need to consider the going short situation. As long as the required margin is deposited in futures trading, traders can choose to go long or short, but the options are divided into two types of call and put options. So if the original futures strategy is going short, it should be converted into longing put options and will get the same result.
An example is also provided here; a short futures strategy sets at 80 points take-profit and 40 points stop-loss. And the observation period starts from 08:45 A.M. to 09:15 A.M. The trading period is 09:15 A.M. to 10:00 A.M. If the strategy decides to make a transaction today, then it will be at 09:15 A.M. During the trading period, if take-profit or stop-loss points are achieved or the trading period is times-up, the strategy will be forced to close out and calculate the profit and loss. Set the same parameters of the previous subsection and perform the LSTM model to reveal the ideal position. The experimental results are provided and discussed in Fig. 23.
The results are similar to the previous subsection. Due to the limitation of the budget, the gaps between the actual position and the ideal position are also huge in the futures strategy. Figure 24 shows the ideal position size and actual   After predicting the winning rate through the LSTM model, the original short futures trading strategy can also be converted into a long put options trading strategy according to the method proposed in Sect. 3. The optimal options positions and the actual positions by the converted options trading strategy are shown in Fig. 25. It can be seen that although the actual operable positions still have a gap with the ideal positions, it is reduced to 2.90 times and closer to the size of the position required by the Kelly criterion than the original futures trading strategy. There are 12 out of all 55 tradings reaching the ideal position size. This number is obviously more than the same strategy applying in futures trading. That is to say, Kelly criterion can present more ability in the case of using the same strategy in options trading. Figure 26 shows the quotient of the ideal positions and the actual operating positions of the original futures trading strategy and the converted options trading strategy. It is the same as the long trading strategy, the options strategy has a better ability to provide similar positions with the positions calculated by Kelly formula.
Then, the original short futures trading strategy and the converted options strategy also do backtesting for comparison, the results are shown in Fig. 27. The data shows that the futures strategy asset reaches a maximum of 1,108,400 NTD, the minimum value is 530,400 NTD, and the final asset is 600,000 NTD. However, for the options strategy, the highest asset reaches 1,481,200 NTD, the lowest is 556,250 NTD, and the final asset comes to 1,321,175 NTD. Apparently, the options strategy has much better performance than the original futures strategy.
Next, we also tried to adjust the take-profit and stop-loss points of different original short futures strategy, compare   the difference between the actual operating and the ideal position size, and the performance during the backtesting is shown in Table 2. The results show that the gap between the actual operating and ideal position of the options is closer to the original futures strategy. Therefore, the method that converts the original futures strategy into the options strategy in this paper can do more ability to reliable money management. However, it can also be seen that in addition to the 80 points take-profit, 40 points stop-loss, and the 60 points take-profit, 20 points stop-loss, the converted options strategy has a benefit in backtesting performance and performs better than the original futures strategy. Instead of backtesting the performance of other group strategies, the options are losing. The representative said that if the LSTM model predicts a large winning rate at the beginning, the position size calculated according to the Kelly criterion will also be more extensive. If it gets a more considerable profit value when trading in the market, it will be relatively higher, for example, the original strategy shorts the futures at 80 points take-profit and 40 points stop-loss. Taking the original short futures at 60 points take-profit and 40 points stop-loss as examples, and the result is shown in Fig. 28. It can be seen that the futures and the converted options strategy are similar in trend, but because the position control of the options is closer to the ideal position size than the futures. When a loss is encountered, more money will be lost in the converted options strategy. In addition to whether the original strategy will benefit, the results of machine-learning predictions will also affect the final return.

Comparison of different LSTM forget gate settings and training set length
To use the Kelly criterion to calculate the best betting ratio and position size, in addition to the odds and winning rate.
In the first two sections, we compared the difference between the final profit and loss results of different takeprofit points and stop-loss points. This chapter discusses adjusting the parameters of the forgetting gate and different training under the same take-profit points and stop-loss points.  Table 3. It can be seen that the  position quotient that can be operated when converted to the options strategy is smaller than that of the original futures, which means that the street is close to the Kelly formula. It is easier to remember historical data when the dropout value is set to 0.2. Therefore, when the training set time is longer, the performance of the backtest of the long training set will also have greater benefits than the medium and short training period. As a result, the final asset of the long-term training set operation futures came to 1,738,600 dollars, the final asset of the operation options came to 3,473,950 dollars, while the short-term training set operation futures final asset was only 1,246,000 dollars, and the final asset of the operation options was only 1,706,950 dollars. When the dropout value is set to 0.6, it is easier to forget historical data, so we can see that the final performance results in a short time and a long time are similar. The final asset of the operation futures grows to 1.2 to 1.7 times, and the final asset of the operation options grows to 2.6 to 3.3 times.
After comparing the long futures trading strategies, compare the situation when the original futures trading strategy is short. Table 4 shows the case of a short trading strategy with a profit stop at 80 points and a stop-loss at 40 points. The result of the experiment is roughly the same as that of long. When the dropout value is set smaller, the longer the training set time, the better the backtest performance. When the overall profit performance is low, and the predicted result is not good, it may also lead to more losses in the final profit and loss result. The results of these changes to the experimental parameters are limited to the conversion of Taiwan stock index futures to options trading strategies. If the transition to a different trading target has a more diversified original trading strategy, the most suitable parameters and training set length may be set not the same, need to do more experiments to find the best parameters.

Conclusion and future research
We propose a method of converting the original futures strategy into options trading strategy. In other words, even if the capital is limited, the same strategic logic as the original futures trading can be achieved by executing options trading. At the same time, in order to carry out better money management, the optimal fraction calculated by the Kelly criterion has traditionally been used. However, due to the problem of the futures trading system, it is difficult to apply the Kelly criterion on the margin system. If the original futures trading strategy is converted into longing call and put options through the framework proposed in this paper, it can be closer to the position size of the Kelly criterion and maximize the overall benefit growth. Although it is impossible to truly calculate the   winning rate of a trading strategy in the financial market, most of the past used the performance of backtesting as the winning rate. Still, the past does not represent the future, so we use the LSTM model to predict the winning percentage of the strategy. The experimental results also show that different training set lengths will also give different prediction results and cause different position sizes; the final profit and loss results are also different. If we can further optimize the prediction results in the winning rate, money management can be implemented better, and the final performance can be further superior. Future research not only can improve the prediction accuracy of machine learning but also other futures trading strategies that are currently known to benefit can be converted to options trading strategies based on the framework proposed in this paper. At the same time, if the position is properly controlled in combination with the theory of money management, the growth in profit may be better than the past.