TWAP. What is it and how does it work.

TWAP. What is it and how does it work.

Hello, Friends!
Today in the article we will consider such a popular algorithm as TWAP (Time-weighted average price).
TWAP is a time-weighted average price, which is defined as the average value of valuable stock assets, such as stocks, bonds, derivatives, futures, options, etc., for a selected period of time.
This algorithm is one of the simplest, in terms of executing the spread of transactions over a certain period of time and reducing the impact on the broader market.
This algorithm and the methodology itself for measuring the time-weighted average price are often used by large institutional investors, for the purpose of investing in stock assets, while not violating market volatility.
It is worth noting that when calculating TWAP, the volume is not used, which leads to pronounced positioning.

In the electronic options and orders market, TWAP is an algorithmic strategy for executing transactions, which has the goal of achieving an average execution cost that is close to the time-weighted average price for the period previously marked by the trader and/or investor.
Based on this, we can say that TWAP is often used to reduce to the possible minimum the impact of a large order on the state of the market, by dividing the order into smaller numbers of orders with execution in different time periods.

A trader divides a large order into parts - sets that he executes at intervals at a price close to the time-weighted average, respectively, reduces the degree of influence of a large order on the market price.

Let's take an example:
A trader wants to purchase 1000 shares of company N using the TWAP algorithm. When choosing a strategy, he decides to purchase 50 shares every 20 minutes, respectively, the execution time will be 6 hours and 40 minutes.
Calculate TWAP.

- We take the average price (AP) for the nth number of periods. Applied to daily prices with a large number of changes, the values of opening, maximum, minimum and closing are used during non-working hours to calculate the average price.
For intraday prices for liquid assets, where closing and opening are similar, the values of opening, maximum and minimum are used.
Thus , the calculation formula looks like this:

AP= (MinPrice+ClosePrice+MaxPrice)/3
TWAP = (AP_open + AP_close + AP_N) / N.

The formula is simple enough to use.
- After the TWAP value is received, the order price is compared to determine whether the security is overvalued or, on the contrary, undervalued.
In fact, if the price is significantly higher than TWAP, then we can talk about the overvaluation of the asset, and vice versa, if lower, it is undervalued.

Often a random size of orders or time intervals between transactions is used, because of this TWAP is often used to reduce possible slippage and signaling , especially in large transactions.
Since volume is most significant when opening and closing , and the uniform distribution of the order flow during the trading day is not optimal, TWAP is best used for assets with a large volume or for several trading sessions.

Consider a number of advantages of TWAP:

- Simplicity of the execution algorithm, which allows the trader to apply it manually on several exchanges at the same time.
- Reducing the risks of signal transmission and slippage risks by breaking large transactions into smaller ones.

The disadvantages of TWAP include:

- Linear execution model. This circumstance may cause a problem, trading according to a predictable pattern, a signal risk for orders may arise.
Simply put, the algorithm splits the order into equal amounts distributed throughout the day, while for securities with low small volume or volume changes during the day, this can lead to the execution of orders at suboptimal prices and potentially signal risk.

Despite the disadvantages of this algorithm, it does not lose popularity and is used quite often in trading .
Convenience and simplicity outweigh the disadvantages associated with its use.

Would you be interested to see such an algorithm in our platform?
Write in the comments.
Thanks for attention.


Attach files by dragging & dropping, , or pasting from the clipboard.