The resource loading... loading...

Algorithmic trading strategies

Author: Inventors quantify - small dreams, Created: 2017-01-11 13:52:19, Updated:

Algorithmic trading strategies

At the heart of algorithmic trading is the construction of trading strategies, good algorithmic trading can effectively control transaction costs and optimize transaction prices.

  • (a) The TWAP strategy

    TWAP (Time Weighted Average Price), the time-weighted average price algorithm, is the simplest of the traditional algorithmic trading strategies. The model splits the trading time evenly, and orders are submitted evenly at each splitting node.

    For example, the A stock market has a trading day with a trading time of 4 hours, or 240 minutes. First, divide the 240 minutes evenly into N parts (or evenly divide a portion of the 240 minutes), such as 240 parts. The TWAP strategy allocates the orders that need to be executed for the day evenly to be executed on these 240 nodes, thus allowing the trade to track the TWAP even price.

    img

    The TWAP strategy is designed to provide a lower average transaction price while minimizing the impact of the transaction on the market, thus achieving a lower transaction cost. The model still better achieves the basic objective of algorithmic trading when the timing of the transaction cannot be accurately estimated.

    However, TWAP's biggest problem is that even with large orders, the evenly distributed order quantity at each node is still considerable and can still cause a certain shock to the market.

    On the other hand, the actual market volume is fluctuating, and it is obviously not reasonable to allocate all orders evenly to each node. However, since the TWAP model is very simple to operate and understand, it is still more suitable for more liquid markets and smaller order sizes.

  • (b) VWAP policy

    VWAP (Volume Weighted Average Price), a volume-weighted average price algorithm, is one of the most popular algorithmic trading strategies on the market today, and is the prototype of many other algorithmic trading models. VWAP was first defined as the average price of a security over a period of time weighted by the volume of transactions.

    img

    The price and volume of a security at a given point in time.

    The goal of the VWAP algorithm trading strategy is to keep the VWAP market in check as much as possible. From the definition of VWAP, to keep up with the VWAP market, it is necessary to file split orders as a proportion of the actual market timing, which requires predicting the timing of the market.

    Typically, a VWAP strategy uses the weighted average of transactions in the past M trading day segments as the predicted transaction, which involves determining the M and the weighting. Assuming that a certain number of shares are to be purchased at a certain time, using algorithmic trading, divide this time into N segments and predict the percentage of transactions in each segment as VPi, while the market's true segmentation percentage (which accounts for the market's true volume) is VPM, and the true transaction price at each market point is Pi, the tracking error can be defined.

    img

    Two things can be seen from the definition formula of TE:

    (1) Tracking error is very closely related to the prediction of the volume of transactions, and the good or bad of the prediction results directly affect the outcome of the VWAP algorithm transactions.

    (2) When the VPT exceeds the market's true VMt at a certain point in time, it is possible that the order cannot be fully settled, which leads to a decrease in the efficiency of algorithmic trade execution, so the more commonly used strategy is the VWAP algorithmic trading strategy known as ribbon feedback.

    The so-called feedback-driven VWAP algorithmic trading strategy is based on the original VWAP tracking, which is to distribute the outstanding orders of each time period proportionally to the subsequent time period, thus effectively improving the transaction rate. The TWAP strategy discussed earlier can also use this type of feedback technique, which significantly improves the efficiency of execution.

  • (c) The MVWAP strategy

    MVWAP (Modified Volume Weighted Average Price) is a transaction-weighted average price optimization algorithm. In fact, VWAP has many optimization and improvement algorithms, but the most common strategy is to adjust and control the size of the next order based on the relationship between the real-time market price and the VWAP market.

    When the real-time market price is lower than the VWAP market, the enlargement is based on the originally planned volume of transactions, which can help reduce the VWAP transaction if the enlargement is partial or partial; conversely, when the real-time market price is higher than the VWAP market, the enlargement is based on the originally planned volume of transactions, which also helps to reduce the VWAP transaction, thus achieving the purpose of controlling transaction costs.

    In the MVWAP strategy, in addition to the way of forecasting the volume of transactions (which is usually also forecasted according to the historical trade weighted average), it is also important to have quantitative control over the increase or decrease in the volume of transactions. A simple approach is to increase or decrease the next unit of the time period by a fixed percentage when the market real-time price is lower or higher than the VWAP market, then this ratio parameter is an optimal problem.

  • (iv) The VP strategy

    VP (Volume Participation) is a fixed percentage trading strategy, similar to VWAP, which tracks changes in the actual volume of transactions in the market and thus develops a corresponding ordering strategy. The difference is that VWAP is based on determining the number of transactions or the amount of transactions needed on a given trading day, and that the order is broken down into fractions; whereas VP is based on determining a fixed tracking ratio, based on the actual segmented volume of transactions in the market, and the order is broken down according to this fixed ratio.

    For example, splitting a trading day into 48 segments of 5 minutes each; ordering at a fixed rate of 10% based on the forecasted volume; the result of such a strategy is that all trades may be completed before the end of the trading time when the amount of orders needed to be processed is small, thus posing a risk of deviation from the average market price tracking.

    Therefore, we believe that this strategy is suitable for large-scale orders that are scheduled to be completed on multiple trading days, and that VP is an algorithmic trading strategy that can better track the market average price if the appropriate fixed percentage is chosen to ensure that the transaction can be completed effectively.

  • (v) The IS strategy

    IS (Implementation Shortfall) is an algorithmic trading strategy that uses execution shortfalls as a basis for decision making. Execution shortfalls are defined as the difference in the transaction amount between the target trading portfolio and the actual transaction portfolio. The objective of IS is to minimize execution shortfalls, or a strategy to track price benchmarks by finding the best fit, after taking shock costs and market risk into account.

    img

    In order to achieve this goal, the basic process of IS is as follows:

    (1) Determine the target trading price P0, which can be the price of arrival, the price of opening, the price of closing on the same day, etc.; then set a tolerance price Pr as the boundary condition of the trade.

    (2) When the actual market price is below or above P0, buy or sell a trade according to a certain strategy.

    (3) When the actual market price is above or below Pr, no purchase or sale transaction takes place.

    (4) When the actual market price is between P0 and Pr, trading can be done according to a strategy between positive and negative trading strategies.

    The advantages of using IS include:

    (1) The IS strategy analyses the various parts of the transaction costs more comprehensively, achieving a better balance between shock costs, time risk, price growth, and other factors, more in line with the objective of optimal transaction operations.

    (2) The IS strategy is based on the optimization of the transaction process according to the target price and is more in line with the investment decision process.

    (3) The IS strategy is mostly used for combination trading, whereas for combination trading the algorithm can better control the risk by leveraging the correlation between the stocks on the trading list.

  • Step by step strategy

    The step strategy is actually a strategy of layering the price, with the goal of pushing the price of the transaction as low as possible in the buy (sell) transaction. In simple terms, the step is a combination of different transaction ratios in different price ranges. For example, in the VWAP or TWAP strategy, it is usually done in practice according to a predicted percentage of the transaction volume k.

    img

    After opening, on the basis of VWAP or TWAP, 10% of the predicted transaction volume is traded when the price fluctuates between 19 and 21 USD; no transaction is done when the price exceeds 21 USD; 30% of the predicted transaction volume is bought when the price is less than or equal to 19 USD.

    A more radical strategy is the so-called Aggressive Step, which eats all orders in the market when the price is below the boundary of the optimal trading area.

    Specifically, the Aggressive Step strategy is also layered in buy (sell) transactions, for example, in the above trading scheme, the first two areas remain unchanged, when the price is less than or equal to $19, no matter how much the market price drops, the quotes are traded at a price limit of $19 until the price rises to above $19 or all the pending orders are completed. However, this strategy is not easy to control the volume of transactions and is easy to cause price volatility, increasing the indirect cost of trading securities.

  • The Sniffer Strategy

    Sniffer searcher strategy is an umbrella term for a group of strategies. It usually involves developing more sophisticated algorithms to monitor transaction and transaction data to detect whether there are other algorithmic traders among market participants.

    For example, a small number of experimental orders combined with certain algorithms and transactional situations can be used to determine whether an order is executed through algorithmic trading. If there are other algorithmic trading participants, calculate whether the absolute return can be obtained with a higher probability by following these algorithmic trades or by doing the opposite. If the probability of profit is higher, the order is executed using a targeted algorithmic trading strategy.

    This strategy is different from traditional algorithmic trading, which does not have the main purpose of executing orders, but mainly to make a profit. It is a more advanced strategy in algorithmic trading, and is suitable for markets where algorithmic trading has become widely popular.

  • (e) The strategy of disclosure

    Many of the more advanced algorithmic trading strategies abroad now require data that is not limited to two indicators: volume and price of transactions, but focuses more on the microstructure of the market, especially some important information that appears in the listing.

    The simplest example of an algorithm called a cap-and-trade strategy (PEG) is a strategy whereby the price of the target stock is always quoted. The PEG first monitors the lowest sell price or the highest buy price in the market in real time, and then makes a buy or sell order according to a certain strategy (or ratio).

    If the trading order fails to be completed and the market price begins to deviate from the price of the limit order, the above order is withdrawn and the corresponding limit order is re-issued based on the latest information on the balance sheet; if the trading order is fully completed, the buy limit order or sell limit order continues to be issued in accordance with the above strategy (proportional) until the order is fully completed or the trading time ends.

    The advantage of this strategy is that the impact on the market can be better quantified, while the disadvantage is that tracking the market average price is prone to deviations, and the volume of transactions per trading day is uncontrollable.

  • (9) The W&P strategy

    The Workand Pounce strategy, abbreviated as W&P strategy, is a strategy to further optimize algorithmic trading through market discounting and liquidity conditions, building on the general algorithmic trading strategy.

    Specifically, when executing an algorithmic trading strategy, the system lists broken orders at a certain price at a certain time. If the inventory data is tracked, it will be found that the price of the submitted order may be an active transaction (there is such an opportunity, for example, in the VWAP policy).

    In this case, it is possible to observe whether the corresponding price listing has a large volume of pending orders, i.e. whether there is excess liquidity in the market at a certain price range. If such liquidity exists, the number of transactions can be magnified, the liquidity of the market swept away, or only a small amount of residual liquidity is left.

    The W&P strategy is suitable for situations where there are a large number of orders that need to be completed in a short period of time, and the use of this strategy can effectively improve execution efficiency, but also for price tracking, which can lead to relatively large deviations, increasing the uncertainty of transaction costs.

  • The hidden strategy

    The hidden trading strategy is actually a proactive trading algorithmic trading strategy. For traditional strategies such as TWAP, VWAP and others, there may be a mix of both proactive and passive trading because the order is often placed at the market price.

    However, when there is a higher number of passive orders and withdrawals, especially in more developed financial markets, algorithmic traders and even algorithmic trading strategies themselves are easily observed and monitored by other competitors, which allows competitors to develop targeted strategies against the algorithm itself.

    Hidden strategy is a counterintelligence algorithmic trading strategy that is used when an order for a desired transaction price appears in the market and when a certain number is reached, the order will be eaten; otherwise, the server moves until the opportunity to meet the conditions appears.

    In general, the hidden strategy is also a strategy for re-optimizing the original algorithmic trading strategy, which is mainly used in more developed financial markets such as Europe and the United States, while hiding its actions at the cost of tracking the accuracy of the market price.

  • The 11th Guerrilla Strategy

    The Guerrilla Guerrilla strategy is also a further optimised strategy based on some of the original algorithmic trading strategies, which, like the Hidden strategy, is intended to hide one's strategy and trading behavior.

    The difference is that Hidden takes into consideration the number of main, passive trades and orders placed, whereas Guerrilla starts with the number of orders placed. Through a certain random algorithm, the Guerrilla strategy further disperses the number of orders that should be placed at each time point into parts of different sizes, making it difficult for other competitors to see the presence of the algorithmic trader and the corresponding algorithm in the transaction details.

  • Other strategies

    In addition to some of the commonly used algorithmic trading strategies described above, there are a number of strategies currently available in foreign markets, such as a basic VWAP algorithmic trading strategy that can be derived from dozens or even hundreds of strategies; and, for example, in the presence of a foreign market trading system, there are a number of commonly used algorithmic trading strategies based on this trading system, such as the Guaranteed VWAP, the SOR strategy, etc.

    To sum up, many algorithmic trading strategies are often no longer applicable after a period of use due to information leaks or changes in the microstructure of the market, and investors need to continue to develop new strategies. Therefore, various algorithmic trading strategies always appear in the market like a spring after the rain, and then disappear, and return.

    But in any case, the emergence of all sorts of algorithmic trading strategies is aimed at effectively controlling transaction costs, so these trading strategies will increasingly occupy a trading share of the entire market today, which is a major trend that will not change for the time being.

    At home, with the continuous development of the financial sector and the improvement of internationalization, as well as the introduction of stock index futures and financing securities rules, China's securities market unilateral trading and relatively closed, development backwardness is expected to improve, and gradually catch up with the world's advanced securities market.

    Therefore, algorithmic trading strategies are bound to show a trend of rapid development in the future. It not only benefits investors in reducing trading costs, richness and innovation of investment tools and strategies, but can also contribute to a more regulated and efficient market.

Translated from the Translated by:


More

bamsmenVWAP doesn't seem to support direct calls yet, does it need to write its own function calculations?

akkkIs there anyone who has implemented these trading algorithms against bots?