6.6

Algorithmic trading

Algorithmic trading uses computer programs to automatically generate and execute orders based on pre‑defined rules. It is a high‑impact sub‑topic in the Trading Mechanism chapter because SEBI expects candidates to know how algorithms affect order flow and market integrity. Understanding the mechanics, common strategies, and regulatory requirements helps you answer scenario‑based questions in the NISM exam.

Learning Objectives

  • 1Define algorithmic trading and differentiate it from manual trading.
  • 2Identify the main components of an algo‑trading system used in Indian equity derivatives.
  • 3Explain popular algorithm types such as VWAP, TWAP and Implementation Shortfall with their formulas.
  • 4Recall SEBI’s key guidelines and risk‑control measures for algo trading.

What is Algorithmic Trading?

Algorithmic trading (often shortened to “algo trading”) refers to the use of computer‑based models that automatically generate, place, modify or cancel orders without human intervention. The logic behind the algorithm is derived from quantitative analysis, statistical arbitrage, or pre‑set execution strategies, and it runs on a high‑speed server that connects directly to the exchange’s order‑matching engine.

In the Indian context, SEBI defines an algorithm as “a set of instructions that, when executed, result in a trade or a series of trades”. The primary purpose is to achieve better price discovery, lower market impact, and consistent execution quality, especially for large institutional orders in equity derivatives.

For the NISM exam, you will be asked to identify characteristics of algorithmic trading, recognise common algorithm types, and apply simple calculations such as VWAP or implementation shortfall. Remember that many exam questions test your ability to link a concept (e.g., “minimise market impact”) with the appropriate algorithmic approach.

Key Components of an Algo Trading System

The first component is market data feed, which supplies real‑time price, volume and order‑book information. Accurate and low‑latency data is essential because the algorithm’s decision logic depends on the latest market state.

The second component is the strategy engine. This is where the mathematical model lives – it could be a VWAP schedule, a statistical arbitrage rule, or a risk‑limit checker. The engine receives data, evaluates the rule set, and generates order instructions.

The third component is the execution gateway. It translates the algorithm’s instructions into exchange‑compatible order messages (e.g., limit, market, iceberg). It also handles acknowledgements, cancellations, and post‑trade reporting. Finally, a risk‑monitoring module enforces SEBI‑mandated pre‑trade checks such as order‑to‑trade ratio, price‑band limits and maximum exposure.

ℹ️Exam Trap – Algo vs High‑Frequency Trading

Students often conflate algorithmic trading with high‑frequency trading (HFT). While all HFT is algorithmic, not every algorithmic strategy is high‑frequency. The exam distinguishes them by focusing on execution‑style algorithms (VWAP, TWAP) rather than ultra‑low‑latency market‑making strategies.

Common Types of Trading Algorithms in Indian Markets

VWAP (Volume Weighted Average Price) aims to execute an order such that the average price matches the market’s volume‑weighted average over a specified horizon. It is popular for large institutional orders because it spreads the trade proportionally to market volume, reducing impact.

TWAP (Time Weighted Average Price) distributes the order evenly across time intervals, regardless of volume. It is useful when volume patterns are unpredictable or when a trader wants a simple, time‑based execution schedule.

Implementation Shortfall (also called “arrival price” algorithm) seeks to minimise the difference between the decision price and the actual execution price, factoring in both market impact and opportunity cost. It is often chosen when the trader’s primary concern is the total cost of execution.

Percentage of Volume (POV) submits orders as a fixed percentage of the prevailing market volume, automatically adjusting to market liquidity. Iceberg hides the true order size by displaying only a small visible portion, protecting large orders from signalling. Sniper or “aggressive” algorithms target specific price levels and execute quickly when those levels are reached.

Comparison of Popular Execution Algorithms

AlgorithmPrimary ObjectiveTypical Use‑CaseKey AdvantageKey Limitation
VWAPMatch market VWAPLarge institutional buy/sell over a dayLow market impactMay under‑perform in thin‑volume periods
TWAPEven time‑based executionOrders with unknown volume patternSimple to implementIgnores volume spikes, possible higher impact
Implementation ShortfallMinimise total costUrgent orders where cost mattersBalances impact and timing riskRequires accurate decision‑price reference
POVTrade as % of market volumeDynamic liquidity environmentsAdapts to real‑time volumeExecution speed depends on market activity
IcebergHide true sizeVery large block tradesReduces information leakagePartial fills may extend execution horizon

VWAP Algorithm – Formula and Worked Example

Formula: VWAP (Volume Weighted Average Price)
i=1nPi×Vii=1nVi\frac{\sum_{i=1}^{n} P_{i}\times V_{i}}{\sum_{i=1}^{n} V_{i}}

Where:

P_{i}= Trade price in rupees during interval i
V_{i}= Traded volume (shares) during interval i
n= Number of intervals in the execution horizon

Worked Example

Given three 1‑hour intervals for a 10,000‑share order: Interval 1: P₁=100 ₹, V₁=2,000 shares Interval 2: P₂=102 ₹, V₂=3,000 shares Interval 3: P₃=101 ₹, V₃=5,000 shares Step 1: Numerator = (100×2,000)+(102×3,000)+(101×5,000)=200,000+306,000+505,000=1,011,000 Step 2: Denominator = 2,000+3,000+5,000=10,000 Step 3: VWAP = 1,011,000 ÷ 10,000 = 101.10 ₹ Verification: (∑PᵢVᵢ)/(∑Vᵢ) = 1,011,000/10,000 = 101.10.

The VWAP formula aggregates price and volume across the chosen horizon, delivering a single benchmark price. In practice, brokers compare the actual execution price of each slice to the VWAP; a “VWAP‑slippage” of less than 5 bps is often considered acceptable for large equity‑derivative orders.

For the exam, remember that VWAP is a *volume‑weighted* average – the denominator is total volume, not the number of intervals. A common mistake is to average the prices first and then weight them, which yields an incorrect result.

SEBI’s algorithm‑trading guidelines require that the algorithm disclose its VWAP schedule to the exchange and maintain an audit trail of the calculated VWAP versus actual execution. Candidates may be asked to identify which compliance document (e.g., “Algo‑Trading Policy”) should contain this information.

Implementation Shortfall – Concept and Calculation

Formula: Implementation Shortfall (absolute)
(PexePdec)×Q(P_{exe} - P_{dec}) \times Q

Where:

P_{exe}= Average execution price in rupees
P_{dec}= Decision (arrival) price in rupees
Q= Quantity of shares executed

Worked Example

Decision price = 150 ₹, average execution price = 151 ₹, quantity = 5,000 shares. Step 1: Difference = 151 ₹ - 150 ₹ = 1 ₹ Step 2: Implementation Shortfall = 1 ₹ × 5,000 = 5,000 ₹ Verification: (P_{exe} - P_{dec}) × Q = (151-150)×5,000 = 5,000.

Implementation shortfall captures both *explicit* costs (commissions, taxes) and *implicit* costs (market impact, opportunity cost). The algorithm attempts to minimise this metric by balancing urgency against price impact, often using a dynamic schedule that slows down when the market moves unfavourably.

In NISM questions, you may be given a decision price and a series of execution prices, then asked to compute the total shortfall. Remember to multiply the price difference by the total quantity, not by each slice individually unless the question explicitly asks for per‑slice shortfall.

SEBI requires that firms disclose the methodology used to calculate implementation shortfall in their risk‑management framework. This ensures transparency for investors and regulators alike.

Regulatory Landscape for Algo Trading in India

SEBI’s “Guidelines on Algorithmic Trading” (issued in 2015 and updated periodically) mandate that every algorithmic strategy be approved by the exchange’s Surveillance Committee and that a pre‑trade risk check be performed for each order. The checks include order‑size limits, price‑band restrictions, and order‑to‑trade ratio caps (typically 10:1).

Broker‑dealing members must maintain an audit trail for at least five years, capturing order submission time, parameters, execution details, and any manual overrides. The audit logs must be made available to SEBI on request.

For the exam, you may be asked which of the following is *not* a SEBI requirement for algo trading. Common distractors include “mandatory co‑location” (which is a market‑practice, not a regulation) and “minimum daily trade volume” (no such threshold exists).

ℹ️Common Mistake – Ignoring Order‑to‑Trade Ratio

Many candidates forget that SEBI caps the order‑to‑trade ratio at 10:1 for algo orders. Exceeding this ratio triggers a breach and may lead to a regulatory penalty. Always check the ratio when answering compliance‑related questions.

Latency and Market Microstructure

Latency is the time delay between the moment an algorithm decides to act and the moment the exchange receives the order. In Indian equity‑derivative markets, latency is measured in microseconds (µs) to milliseconds (ms). Co‑location services offered by NSE and BSE reduce latency to sub‑millisecond levels.

Market microstructure – the way the order book is organised, tick size, and matching algorithm – influences how an algo performs. For example, a VWAP algorithm may suffer higher slippage in a thin order‑book because each slice moves the price more.

Exam questions often present a scenario where a trader chooses between a co‑located server (0.5 ms latency) and a remote server (5 ms latency). The correct answer hinges on the trade‑off between cost (co‑location fees) and execution quality, especially for high‑frequency strategies.

Typical Latency Adoption by Algo Traders in India (2023 Survey)

Testing and Monitoring of Algorithms

Before deployment, algorithms undergo back‑testing using historical tick data to verify that the strategy would have met its performance targets. A robust back‑test includes transaction cost modelling, slippage assumptions and out‑of‑sample validation (walk‑forward analysis).

Live monitoring involves real‑time dashboards that track execution quality metrics such as average execution price vs. benchmark, fill rate, and latency per slice. Alerts are triggered if any metric deviates beyond pre‑set thresholds, prompting a manual intervention.

SEBI expects firms to document both the back‑testing methodology and the live‑monitoring framework. In the exam, you may be asked to select the correct sequence: back‑test → simulation → live‑monitor → periodic audit.

Example: NISM‑Style Scenario: Using VWAP for a Large Buy Order

Scenario

An institutional client wants to buy 100,000 shares of Reliance Industries Ltd. (RIL) over the trading day. The client mandates that the execution price should not deviate more than 10 bps from the day’s VWAP. The broker’s VWAP algorithm divides the order proportionally to the market volume each hour.

Solution

Step 1: Obtain market volume for each hour (e.g., 9‑10 am = 15%, 10‑11 am = 20%, …, 3‑4 pm = 10%). Step 2: Allocate shares accordingly: 15,000 shares (9‑10 am), 20,000 shares (10‑11 am), etc., totalling 100,000 shares. Step 3: For each hour, compute the hour‑VWAP using the formula \frac{\sum P_i V_i}{\sum V_i}. Suppose the 10‑11 am hour VWAP is 2,150 ₹. The algorithm places a limit order at 2,150 ₹ + 0.0010 × 2,150 ₹ = 2,152.15 ₹. Step 4: If the order fills at 2,152 ₹, the deviation is 0.0093 % (≈9.3 bps), which is within the client’s limit. Step 5: The broker records the execution price, compares it with the day‑wide VWAP (say 2,148 ₹), and reports a total slippage of (2,152 ₹‑2,148 ₹)/2,148 ₹ = 0.186 % (≈18.6 bps). Since the client’s limit applies per‑hour, the execution is acceptable.

Conclusion

The VWAP algorithm successfully kept each hourly slice within the 10 bps limit, demonstrating why VWAP is preferred for large, time‑distributed orders. Candidates should remember to allocate shares based on volume percentages and to calculate per‑slice price caps using the 0.0010 factor for 10 bps.

Exam Takeaways

  • Algorithmic trading uses pre‑defined quantitative rules to generate and execute orders without manual intervention.
  • Key components are market data feed, strategy engine, execution gateway and risk‑monitoring module.
  • VWAP = \frac{\sum P_i \times V_i}{\sum V_i}; it matches the market’s volume‑weighted average price and is the most common execution benchmark.
  • Implementation Shortfall = (P_exe - P_dec) \times Q; it measures total execution cost relative to the decision price.
  • SEBI mandates pre‑trade risk checks, order‑to‑trade ratio limits (typically 10:1), and a five‑year audit trail for all algo orders.
  • Latency (sub‑millisecond vs. multi‑millisecond) directly affects the suitability of an algorithm, especially for high‑frequency strategies.
  • Robust back‑testing, live monitoring and periodic audits are required to comply with regulatory expectations.
  • Common exam traps: confusing algorithmic trading with HFT, ignoring order‑to‑trade ratio, and mis‑applying VWAP by averaging prices before weighting.

Practice Questions

8 questions on Algorithmic trading

1

Algorithmic trading is best described as:

2

Which of the following is NOT listed as a core component of an algorithmic trading system in the study material?

3

What is the SEBI‑mandated maximum order‑to‑trade ratio for algorithmic orders?

4

Using the VWAP formula, calculate the VWAP for three intervals with the following data: Interval 1 – price ₹100, volume 2,000; Interval 2 – price ₹102, volume 3,000; Interval 3 – price ₹101, volume 5,000.

5

If the decision price of a trade is ₹150, the average execution price is ₹151, and 5,000 shares are filled, what is the implementation shortfall?

6

Which of the following is NOT a requirement imposed by SEBI’s Guidelines on Algorithmic Trading?

7

Which statement correctly differentiates the primary objectives of VWAP and TWAP algorithms?

8

A trader can choose between a server with 0.5 ms latency (co‑located) and one with 5 ms latency (remote). For a high‑frequency execution algorithm, which choice is most appropriate according to the material?

Related topics