{'fraction_non_alphanumeric': 0.03271053054232025, 'fraction_numerical': 0.025108410514481504, 'mean_word_length': 4.272368049675416, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Pairs Trading Strategy under Geometric Brownian Motion and its Application to the US stocks

This study is a study on pair trading, a representative market-neutral investment strategy. A general pair trading strategy uses econometric techniques to select a pair of stocks and calculates the trading price level depending on a single variable called the variance of stock returns without any theoretical background. This study applies the optimal pair trading strategy proposed by Liu et al. (2020) to the top US market cap stocks and examines its performance. This strategy proposes a mathematical background for optimally calculating the trading price level. Since the statistical method for pair selection can be omitted, a pair can be formed only with good stocks with guaranteed liquidity. In addition, strategic risk management is possible because the stop loss set according to the market situation is performed. As the top 10 market cap stocks traded on the US exchange, daily closing price data for 10 years from 2011 to 2020 were applied to optimal pair trading. It was confirmed that the rate of return may differ depending on the adjustment of various parameters including the level of stop loss. In this study, an applicated strategy that properly managed pairs trading and stocks together earned the minimum annual average return 17.88% and the Sharpe ratio reached 1.81. These numbers can be better with the adjustment of the parameters.


Introduction
This study is about pairs trading strategy, one of the representative market neutral trading strategies. Pairs trading is a strategy for two stocks with interlocking stock price flows, and make a profit with buying relatively undervalued stock and selling overvalued stock at the same time. This is a statistical arbitrage strategy that realizes returns based on the assumption that the prices of these two stocks will return to similar values at some point in the future. Pairs trading strategy is a long-short strategy developed by Nunzio Tartaglia, a Wall Street quant in the 1980s. (Gatev, Goetzmann and Rouwenhorst (2006)) In addition to this, extensive research has already been conducted on general pair trading strategies, and well-organized subjects can be found in Vidyamurthy (2004). Kim and Kim (2019) suggested an optimized price level by applying deep learning technology to a pair trading strategy. However, in a typical pairs trading strategy, the trade timing is determined when the spread between two linked stocks is ±2 standard deviation, and there is no mathematical background for this. In particular, the time series of stocks selected as pairs must intersect within a certain period due to the assumption of the strategy, and the number of pairs that satisfy this must be relatively small. Therefore, even if enough data is collected, there is inevitably little data available. Because of these weaknesses, the pair is mainly selected for stocks in the same sector. The statistical method of selecting pairs usually uses a cointegration test. Portfolio selection and trading rules based on mathematical theory have been studied for about 20 years. Zhang (2001) proposed a mathematical solution for optimizing transaction returns based on regime switching model. Song and Zhang (2013) calculated the optimal price level for the trading point of the two stocks, assuming that the difference between the two stock pairs statistically related to each other follows a regime switching model. Tie, Zhang and Zhang (2018) calculated an optimized price level by expanding the conditions of the pair with a very common assumption that the two stock pairs each follow the geometric Brown model. However, in the study of Tie et al. (2018), there is a lack of a stop loss condition, which is an essential risk management method when operating a pair trading strategy. Liu, Wu and Zhang (2020) introduces the optimal pairs trading strategy of the two stocks following the geometric brown model by supplementing the weakness of cut loss. In this study, I intend to apply the model of Liu et al. (2020) to the actual US stock market. This model has the advantage that there is no need to consider statistical methods for selecting pairs, as it makes the general assumption that stocks follow the geometric Brownian model. The limitation of Liu et al. (2020) seems to have been concluded with an emphasis on mathematical results. There are only two practical examples of applying the results of their paper to the market, Walmart and Target, and GM and Ford. The contributions of this study are summarized in three ways. First, there is a clear mathematical background that was not found in the existing general pairs trading strategy, and by omitting the statistical procedure for pair selection, a simple and reliable pairs trading strategy is presented. Second, the method proposed by Liu et al. (2020) is applied to the actual US market to find its results. Third, we examine the sensitivity to portfolio performance of parameters not covered in detail in Liu et al. (2020) to find ways to improve performance. The structure of this paper is as follows. Section 2 summarizes the methodology of Liu et al. (2020) Section 3 briefly introduces the collected U.S. market capitalization data and stocks, and presents methods for measuring performance. Section 4 summarizes the research results, and Section 5 summarizes the results of the study with conclusions.

Determination of the trading price levels of the optimal pairs trading strategy
where , i ∈{1, 2}, are the return rates, , i, j ∈{1, 2}, are the volatility constants, and ( 1 , 2 ) is a 2-dimensional standard Brownian motion. Let be the position of long 1 and short 2 at time t. Let International Journal for Innovation Education and Research© 2021 pg. 552 τ 0 < τ 1 < τ 2 < ⋯ denote sequence of stopping time. τ 0 < τ 2 < τ 4 < ⋯ is the time sequence of selling , and τ 1 < τ 3 < τ 5 < ⋯ is the time sequence of buying . Let K denote the fixed percentage of transaction costs associated with buying and selling of stocks , i ∈{1, 2}. Let = 1 + , = 1 − . Let > 0 is a given discount factor, or a penalty for late earnings realization, and I A is a dummy variable for event A. (i.e., 1 if event A occurs, 0 otherwise). In this study, I consider the state constraint variable for cutting loss. The stop loss level is set to M, and the Suppose that > max( 1 , 2 ). Based on the above notation and assumptions, the procedure for obtaining the price levels of trading during the back-testing period by applying the data during the observation period is as follows.
1. Applying the stock price data of 1 and 2 during the observation period, calculate the annualized stock returns 1 , 2 , covariance 12 = 21 , and standard deviations 11 , 22 .
, and find 0 which satisfies 0 > ( ) 2 and ( 0 ) = 0 . In this study, I used the Newton-Raphson method to obtain a numerical solution of 0 .
, and find 2 ( 3 ) = 0 such that 3 ∈ ( 2 , M). In this study, I used the binomial method to find a numerical solution of 3 .
7. Sell if the time series data t 2 / t 1 is less than 1 and buy if the time series data is greater than 2 during the back-testing period. If t 2 / t 1 is greater than 3 , then sell and close the transaction. 8. Calculate the outcome of the transaction by calculating the value function V(x 1 , x 2 ) which is the sum of the profits from the transaction of portfolio during the back-testing period. Vol:-9 No-05, 2021 International Educative Research Foundation and Publisher © 2021 pg. 553

Data, strategy, and performance measurement
The data in this study uses daily adjusted closing price data of the top 10 US market caps for 11 years from January 4, 2010 to December 30, 2020. Data was obtained from https://finance.yahoo.com/, and these data are allowed for general use. To secure the trading liquidity of stocks, the stocks were selected by renewal at the beginning of each year, focusing on the top stocks based on the US market cap. Once 10 stocks are selected, data on the observation period to generate the parameters and the back-testing period to measure the performance are obtained. The parameters for selling, buying, and stopping loss of the portfolio ( 1 , 2 , 3 ) introduced above are recalculated every 6 months using data from the past 1 year before the start of trading (called observation period), and the back-testing period is maintained for 6 months after the parameter's calculation. For example, suppose that the investment principal is P, and pairs trading is conducted with 10 stocks for 6 months. For the selection of stocks, 10 stocks that are ranked among the top 10 in the US market cap are obtained for the business day prior to the back-testing period. Among these stocks, the number of pairs of randomly selected i and j , 1≤i, j≤10, is 10 × 9 = 90 kinds of portfolios.
When the price level of i , j is divided by each initial value, the initial value of is 0, and the value Let us consider the transaction of for the use of investment principal. Since the initial value of the initial is 0, there is no initial required amount. For purchase at t=τ 1 , j are required as much as τ 1 / 0 . This means that you can buy 1 stock of j at the beginning of the back-testing period, and it makes self-financing to buy i and sell j , so purchasing . This is because the stock i is relatively undervalued and the stock j is relatively overvalued at time t=τ 1 , and it makes τ 1 / 0 − τ 1 / 0 < 0.
If short selling is possible, the above preparation of j is not required anymore, but even if short selling is prohibited, holding j stock at the start of investment will resolve the investment principal of the transaction. By adding the all returns until the end of the back-testing period, the value function V (1,1) for the investment principal $1 can be calculated. If you invest $1 in the initial stock j , and buy j stocks with amount of 1/ , and start trading, you can get the value function V (1,1) / for the pairs trading.
By selling the initially purchased stock j at the end of the back-testing period, the final return is calculated as (V (1,1) + s T / 0 − 1) / . In summary, if short selling is allowed, the final return is calculated as V (1,1) through pure pairs trading. On the other hand, if short selling is not allowed, the initial $1 is invested to j and the final return is calculated as (V (1,1) + s T / 0 − 1) / . To simplify the calculation of the return on investment of principal, this study assumes that $1 is initially invested in stocks j and considers two valuation methods.
An additional consideration is about the end of the back-testing period with buying . In this case, there may be gains or losses when selling, but I assumed that the average is converged to zero. This is extended for a total of n=90 positions, and if you invest P/n in each position, you can calculate the sum of all value functions multiplied by the investment amount P(∑ ij (1,1) n i,j ) /(n ) as the net return over 6 months. If International Journal for Innovation Education and Research© 2021 pg. 554 you carry this over for one year (two periods), you will get an annual return on investment, and for universal results, we will look at the average rate of return over 10 years. In this study, I will compare three strategies. If short selling is allowed, the profit from pure pairs trading strategy is denoted as PT, if short selling is not allowed, the profit is denoted PTwS = (V (1,1) + s T / 0 − 1) / that reflects the fluctuation of stocks along with pure pairs trading, and the third strategy is similar with a stock index denoted as 10 US stocks that the top 10 stocks based on the US market cap are weighted evenly. I will compare the returns and standard deviations for three types of investment strategies. And by calculating the Sharpe ratio (Sharpe (1994)), I will find out the adequacy of the return to risk of the three investment strategies. The definition of Sharpe's ratio is as follows. If R a is the return on the investment strategy, a is the standard deviation of the return on the investment strategy, and R f is the risk-free interest rate, then the Sharpe index is given by:

Empirical result
In the 10-year period from 2011 to 2020, the number of business days for each year varies, but for convenience of calculation, the number of business days per year is supposed to be 252 days. Among the parameters, I assumed that the transaction cost ratio K=0.1%, a kind of discount rate ρ=100, and the level of cutting loss M=2. The list of the top 10 US stocks (10 US stocks) updated every year was collected as Table 1. As for the selection criteria, the top 10 stocks in the US stock market capitalization were selected in the month prior to the start of investment.       PTwS showed the highest return of 1057.08%, reflecting the change in stock price of 10 US stocks every 6 months.  Table 3 shows the average and standard deviation of the returns, assuming that the three strategies are executed for 20 back-testing periods every 6 months from 2011 to 2020. The return from the PT strategy achieved a stable rate of return of 4.88% on average and 2.36% standard deviation over the 6-month backtesting period. In terms of annual returns, it recorded stable returns with an average of 9.99% and standard deviation of 3.53%. The average return of the PTwS strategy was 13.38% for 6 months and 28.67% per year. The standard deviation of the PTwS strategy was 7.89% and 14.15% for 6 months and 1 year, respectively. The average return and standard deviation of the 10 US stocks strategy averaged 8.51% and 7.31% over 6 months and recorded 17.88% and 13.11% per year. Assuming risk-free interest rate of 3%, and calculating the Sharpe ratio, PT was 1.98, PTwS was 1.81, and 10 US stocks was 1.13. In general, if the Sharp ratio is less than 1, it is evaluated as a non-optimal strategy, if it is more than 1, it is a good strategy, and if it exceeds 2, it is evaluated as a very good strategy.  Table 4 is a measure of the sensitivity of the performance of the pairs trading strategy to the value of K and ρ. Since PTwS fluctuates often depending on the stock price, we will measure and compare relatively stable PT performance as a representative.
As an expected result, the performance of PT decreases as the K related to the transaction cost increases. As ρ increases, the rate of return increases more as described in Section 2. As mentioned above in Section 2, a big ρ with the observed data during the observation period calculates 1 and 2 so that they derive to realize returns in an early time. Therefore, it is more advantageous to increase the transaction performance by realizing profits during the back-testing period that maintains the nature of the observation period for an initial period. Therefore, the larger the rho is, the more advantageous it is. However, when it is too large, the difference between 1 and 2 decreases, and it makes the opportunities of profit decreases as mentioned in Tie et al. (2018). Finally, let us look at the data related to the sensitivity of PT performance to the change in the stop loss level and the number of cases reaching the stop loss level.  Table 5 shows the data that can be observed when the price ratio of 2 stocks compared to 1 , which is the level of stop loss, is changed from 1.5 to 2 times. The second column shows the sensitivity of PT earnings according to the level of stop loss. The higher the level of stop loss, the higher the PT income, but the higher the level of stop loss, the more the profit result is reflected without removing the uncertainty at maturity. The third column CLn (number of cut loss) shows how many 90 portfolios each year reach a stop loss every 20 investment periods over 10 years. In other words, it represents the number of cases where the change in the price level of 900×20 different portfolios reach the stop-loss level. The lower the level of stop loss, the higher the number of cases that reach the level of stop loss in the entire portfolio. The last column, ratio of approaching cutting loss level, represents the ratio of CLn (CLn/18000) in the entire scenario (900 portfolios × 20 investment periods). The higher the level of stop loss, the lower this rate.

Conclusion
Pairs trading is a risk neutral strategy that allows profits regardless of market conditions, and there are several operating methods to generate optimal profits. Through this study, we investigated how the pairs trading strategy can make a profit in the US market under the assumption that stocks follow the geometric Brown model. Unlike the traditional pair trading strategy, this study is a very simple pair trading strategy in that it achieves some profit while omitting the pair selection process. For the method of obtaining the optimal solution for determining the trading level, the research results of Liu et al (2020) were referred to, and the secondary application conditions were interpreted according to the actual market. Since the statistical analysis process for stock selection could be omitted, the liquidity of stocks was considered first in order to apply good stocks -the top 10 stocks based on the market capitalization of the U.S. stock market were selected from 2011 to 2020. The hypothetical portfolio that applied the same weight to the top 10 stocks in the U.S. posted an annual average return of 17.88% and volatility of 13.11%. Pairs trading strategy with cutting loss level as 2 has the return of 9.99% and volatility of 3.53%. On the other hand, the PTwS International Journal for Innovation Education and Research© 2021 pg. 560 strategy, which combines the two strategies, recorded a one-year yield of 28.67% and volatility of 14.15%, which was similar in volatility and a 10% higher return than the 10 US stocks strategy invested in ordinary stocks.
Research results related to the sensitivity of performance to ρ show that the above performance can be further improved. Depending on the appropriate application value of the variable ρ, it is possible to construct a trading strategy with better performance. In addition, when the price ratio of 2 stocks to 1 , which is the level of stop loss, is 1.5 times or more, the probability of a stop loss is less than 0.5% of the total portfolio. If high-frequency data is applied based on this study, it is expected to create a better strategy as more trading opportunities can be captured. In addition, a more efficient strategy may be operated if a suitable pair selection method is found for this strategy, or an optimal combination of the ratio and length of the observation period and the back-testing period is added.