Contents:
Nowadays, there is a vast pool of tools to build, test, and improve Trading System Automations: Trading Blox for testing, NinjaTrader for trading, OCaml for programming, to name a few. Here are a few write-ups that I recommend for programmers and enthusiastic readers:. Forex or FX trading is buying and selling via currency pairs e.
Forex brokers make money through commissions and fees. Forex traders make or lose money based on their timing: If they're able to sell high enough compared to when they bought, they can turn a profit. Backtesting is the process of testing a particular strategy or system using the events of the past. Subscription implies consent to our privacy policy. Thank you! Check out your inbox to confirm your invite.
Engineering All Blogs Icon Chevron.
the umbrella term 'technical analysis'. In this paper, we present an overview of trading strategies and systems in various branches. The. A majority of available academic papers are related to pairs identification. The distance method, i.e. simple/naive.
Filter by. View all results. Rogelio Nicolas Mengual. My First Client Around this time, coincidentally, I heard that someone was trying to find a software developer to automate a simple trading system.
MQL5 has since been released. As you might expect, it addresses some of MQL4's issues and comes with more built-in functions, which makes life easier. If you want to learn more about the basics of trading e. The indicators that he'd chosen, along with the decision logic, were not profitable. One caveat: saying that a system is "profitable" or "unprofitable" isn't always genuine.
Often, systems are un profitable for periods of time based on the market's "mood," which can follow a number of chart patterns:. Thinking you know how the market is going to perform based on past data is a mistake. Understanding the basics. The results show that the BQQ model can achieve a higher rate of returns.
Since the A-share margin trading system opened in , there has been a gradual improvement in short sales of stock index futures Wang and Wang and investors are again favoring prudent investment strategies, which include pairs-trading strategies. As a kind of statistical arbitrage strategy Bondarenko , the essence of pairs trading Gatev et al. However, with the increase in statistical trading strategies and the gradual improvement of market efficiency Hu et al.
At present, academic research on pairs trading has mainly concentrated on the construction of pairing models and the optimization design of trading parameters, with a greater focus on the latter. However, merely improving trading parameters does not guarantee a high return for the strategy, and this drives researchers back to the foundations of the pairs-trading model. There are three main methods for screening stocks: the minimum distance method, the cointegration pairing method, and the stochastic spread method.
The minimum distance method was proposed by Gatev et al. Gatev et al. When making a specific transaction, the strategy user determines the trading signal by observing the magnitude of the change in the Euclidean distance between the normalized price series of two stocks the sum of the squared deviations, or SSD. Perlin promoted GGR as a unitary method rather than a pluralistic one; testing it in the Brazilian financial market, he found that risk can be lessened by increasing the number of pairs and stock.
Do and Faff found that the length of a trading period can affect strategy returns; their study laid the foundation for later research. Chen et al. Wang and Mai measured the return on stock markets in Shanghai, Shenzhen, and Hong Kong respectively, and found that improvements to the original approach can bring portfolio construction strategic benefits but can also increase the risk of exploitation of the GGR model.
The cointegration pairing method was first used by Vidyamurthy to find stock pairs with a cointegral relationship. He used cointegrating vectors as the weight of pairs when trading. To solve the problem of single-stock pairing risks, Dunis and Ho extended the cointegration method from unitarism to pluralism and proposed an enhanced index strategy based on cointegration.
Peters et al. The stochastic spread method first appeared in a paper by Elliott et al. Based on the research by Elliott et al. Do et al. Bertram , assuming that the price differences of stock obey the Ornstein—Uhlenbeck process, derived the expression of the mean and variance of the strategic return on the position and found the parameter value when the expected return was maximized.
Based on above approaches, many scholars have begun to study mixed multistage pairing-trading strategies. Miao added a correlation test to the traditional cointegration method and found that screening stock-correlation analysis improved the profitability of the strategy. Xu et al.
In recent years, most scholars have focused on improving the long-term equilibrium of paired-stock prices in the stock-matching process continuously. Few studies have considered the short-term fluctuations of paired-stock spreads, which has led to poor profitability of the strategy. Therefore, this paper focuses on the stock matching of pairs trading and constructs a bi-objective optimized stock-matching strategy based on the traditional GGR model. The remainder of this paper is organized as follows.
Basic theory and model section provides the basic theories and models of pairs-trading strategies and double bi-objective optimization. Optimized pairing model section establishes an optimized pairing model. Pairing strategy empirical analysis section provides an empirical analysis of the optimal matching strategy proposed in this paper.
Finally, Conclusions section presents conclusions and suggests future research direction. Based on theories of pairs trading, stock-pairing rules in the minimum distance method, and multi-objective programming, we propose a strategy to improve profits based on the minimum distance method.
Formation period : the time interval for stock-pair screening using the stock-matching strategy. Trading period : the time interval in which selected stock pairs are used for actual trading.
Configuration of opening : the value of the portfolio construction triggered. For example, we can start a transaction by satisfying the following conditions: 1 The user is in the short position state; 2 the degree to which the paired-stock spread deviates from the mean changes; and 3 the degree changes from less than a given standard deviation to more than a given standard deviation. Closing threshold : the value of the position closing triggered.
For example, when the strategy user is in position and the paired-stock spread hits the mean. Stop-loss threshold : the value of the stop-loss triggered; that is, when the rules are engaged for exiting an investment after reaching a maximum acceptable threshold of loss or for re-entering after achieving a specified level of gains. When using the minimum distance method to screen stocks, it is necessary to standardize the stock price series first. By compounding r , we can get the cumulative rate of return of stock A in period T , which is recorded as:. The multi-objective optimization problem was first proposed by economist Vilfredo Pareto Deb and Sundar It means that in an actual problem, there are several objective functions that need to be optimized, and they often conflict with each other.
In general, the multi-objective optimization problem can be written as a plurality of objective functions, and the constraint equation and the inequality can be expressed as follows:.
The feasible domain is given as follows:. Previous studies on the GGR model have mostly focused on similarities in stock trends and have cared less about the volatility of stock spreads. Such studies could not present ways to achieve higher returns. This paper, however, is based on the traditional GGR model, and can thus propose a new pairs-trading model, namely bi-objective quadratic programming with quadratic constraints BQQ model. By adjusting the weights between maintaining a long-term equilibrium of paired-stock prices and increasing the volatility of stock spreads Whistler , we can achieve equilibrium.
Assume that there are m stocks in the alternative stock pool, and the formation period of the stock pairing is n days. Then, in the moment, t can be expressed as follows:. Then, we divide the stock into two groups according to the positive and negative weights. Therefore, we get the bi-objective optimization model as follows:.
The volatility of the paired-stock spread is a source of revenue for the pairs-trading strategy. Variances are used to describe the volatility of a time series. Therefore, we use the formula below to measure the stock spread:. The model is denoted as revised quadratic programming with quadratic constraints RQQ :. Since the objective and constraints of RQQ are quadratic functions, these are typical nonlinear programming problems. Therefore, the sequential quadratic programming algorithm can solve the original problem by solving a series of quadratic programming sub-problems Jacobs and Weber ; Zhang and Liu The solution process is as follows:.
By solving this:. Equation 21 is the exact penalty function. Thus, we find the optimal sub-solution d k.