Module G · Alpha: Finding & Validating an Edge - Chapter 30

Event-Driven & Flow Strategies

Trading the calendar and the flows - earnings, index rebalancing, corporate actions and FII activity.

NSENFO
What you'll learn
  • ·Earnings drift
  • ·Nifty index reconstitution
  • ·Corporate actions
  • ·F&O ban & expiry effects
  • ·FII/DII flow signals
  • ·Designing event trades

Some of the most dependable edges in markets have nothing to do with chart patterns or statistical relationships. They come from events - known dates and predictable flows that force certain participants to act, regardless of price. An index fund must buy a stock added to the Nifty. Time decay must accelerate into expiry. A weekend must let news pile up before Monday's open. These are structural, recurring, and - because the forced participant isn't trying to be smart - genuinely exploitable. This chapter trades the calendar and the flows.

Trading the calendar

The simplest events are dates. Markets show persistent calendar effects - patterns tied purely to the day or week. Let's measure Nifty's behaviour by weekday across years:

EX 1Day-of-week effects in NiftyINDEXch30/01_calendar_effects.py
# Calendar effects: does the day of the week change Nifty's return and volatility?
import os
from datetime import datetime

from openalgo import api

client = api(
    api_key=os.getenv("OPENALGO_API_KEY", "your_api_key_here"),
    host=os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000"),
)

end = datetime.now().strftime("%Y-%m-%d")
df = client.history(symbol="NIFTY", exchange="NSE_INDEX", interval="D",
                    start_date="2019-01-01", end_date=end)
df["ret"] = df["close"].pct_change() * 100
df["weekday"] = df.index.day_name()

order = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
g = df.groupby("weekday")["ret"].agg(["mean", "std", "count"]).reindex(order)

print(f"{'DAY':11s}{'AVG RET':>10s}{'VOLATILITY':>13s}{'DAYS':>7s}")
for day in order:
    print(f"{day:11s}{g.loc[day, 'mean']:>9.3f}%{g.loc[day, 'std']:>12.2f}%{int(g.loc[day, 'count']):>7d}")

print("\nWeekly option expiry has long fallen mid-week - watch which day carries the highest volatility.")
print("Persistent, calendar-driven patterns like these are the seed of event-driven strategies.")
Live output
DAY           AVG RET   VOLATILITY   DAYS
Monday        -0.073%        1.41%    367
Tuesday        0.172%        1.02%    371
Wednesday      0.112%        0.95%    369
Thursday       0.002%        1.03%    371
Friday         0.039%        1.04%    366

Weekly option expiry has long fallen mid-week - watch which day carries the highest volatility.
Persistent, calendar-driven patterns like these are the seed of event-driven strategies.

A clear signature emerges: Monday is the weakest day (slightly negative) and the most volatile (1.4% vs ~1.0% on other days), while Tuesday is the strongest. The Monday effect has a clean story - over the weekend, news and worries accumulate with no market open to absorb them, so Monday's open gaps and churns as everything gets repriced at once. It's a small edge, easily swamped by costs on its own, but it's real, recurring, and a building block you can combine with others.

EX 2The weekday return patternINDEXch30/02_weekday_chart.py
# Plot the day-of-week pattern in Nifty's average return - a calendar anomaly.
import os
from datetime import datetime
from pathlib import Path

import matplotlib

matplotlib.use("Agg")
import matplotlib.pyplot as plt
import seaborn as sns
from openalgo import api

client = api(
    api_key=os.getenv("OPENALGO_API_KEY", "your_api_key_here"),
    host=os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000"),
)

end = datetime.now().strftime("%Y-%m-%d")
df = client.history(symbol="NIFTY", exchange="NSE_INDEX", interval="D",
                    start_date="2019-01-01", end_date=end)
df["ret"] = df["close"].pct_change() * 100
df["weekday"] = df.index.day_name()

order = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
mean_ret = df.groupby("weekday")["ret"].mean().reindex(order)

sns.set_theme(style="whitegrid")
fig, ax = plt.subplots(figsize=(8, 4.5))
colors = ["#16a34a" if v >= 0 else "#dc2626" for v in mean_ret]
sns.barplot(x=order, y=mean_ret.values, hue=order, legend=False, palette=colors, ax=ax)
ax.axhline(0, color="#555", lw=1)
ax.set_title("NIFTY average return by weekday (2019-today)")
ax.set_ylabel("Average daily return (%)")
out = Path(__file__).with_suffix(".png")
plt.savefig(out, dpi=110, bbox_inches="tight")
best = mean_ret.idxmax()
print(f"Strongest weekday: {best} ({mean_ret.max():+.3f}%), weakest: {mean_ret.idxmin()} ({mean_ret.min():+.3f}%). Saved {out.name}")
Live output
Strongest weekday: Tuesday (+0.172%), weakest: Monday (-0.073%). Saved 02_weekday_chart.png
The weekday return pattern chart

The event-study idea

The deepest event edge is post-event drift. When genuinely new information hits - an earnings surprise, a policy change - the market often under-reacts at first and then drifts in the same direction for days or weeks as the news fully sinks in:

before: quiet Event (news) immediate jump post-event DRIFT (tradeable)
The market underreacts, then drifts - the event-driven edge

That gradual drift after the initial jump is the edge. The famous example is post-earnings-announcement drift: stocks that beat earnings keep outperforming for weeks, because investors are slow to fully update. An event study - measuring the average price path around many past instances of an event - is how a quant discovers and sizes these drifts.

Index reconstitution

The cleanest forced-flow event in India is index reconstitution. Twice a year, the Nifty is rebalanced - stocks added, others dropped. The moment a stock joins, every index fund and ETF tracking the Nifty is obligated to buy it, creating a wave of predictable, price-insensitive demand. Traders who anticipate the inclusion can position ahead of that forced buying. It's an edge born not from insight but from obligation - the index fund must trade, whatever the price.

Corporate actions, F&O ban and flows

The calendar of forced flows runs deeper:

  • Corporate actions - splits, bonuses, dividends, buybacks - create mechanical price adjustments and arbitrage opportunities for those who model them correctly.
  • The F&O ban (Chapter 8) - when a stock crosses 95% of market-wide open interest, no new positions are allowed, forcing unwinding and distorting its behaviour in predictable ways.
  • FII / DII flows (Chapter 9) - foreign flows drive large-caps, and India publishes them daily; persistent foreign selling is a genuine, if noisy, headwind a quant can lean against.

Designing event trades

Event strategies have a distinct character. The recipe: define the event precisely (its date and trigger), run an event study on history to measure the typical reaction and drift, trade the predictable part, and - crucially - manage the discrete risk. Unlike a smooth signal, an event is often binary: the earnings either beat or miss, the stock is either added or not. That lumpiness means position sizing (Chapter 25) and hard limits matter even more than usual.

Key idea

Event-driven edges come from forced or predictable behaviour, not clever prediction - an index fund that must buy, time decay that must accelerate, news the market is slow to digest. They're some of the most robust edges in India precisely because the other side isn't trying to win; it's trying to comply. Find who is forced to act, and position ahead of them.

Try it yourself

  • Measure the volatility of the day before and after a known monthly expiry. Does expiry concentrate volatility as the theory says?
  • Run a mini event study: for the last several Nifty reconstitutions, did added stocks outperform in the weeks around inclusion?
  • Build a tiny calendar overlay: only take long trades on the historically strong weekdays. Does avoiding the weak days improve a simple strategy's returns?

Recap

  • Event-driven strategies trade known dates and forced flows, not chart patterns - structural edges from participants who must act.
  • Calendar effects are real: Monday was Nifty's weakest and most volatile day (weekend news repricing), Tuesday the strongest.
  • Post-event drift - the market underreacts to news then drifts (e.g., post-earnings drift) - is the classic event edge, found via an event study.
  • Index reconstitution forces index funds to buy added stocks; corporate actions, the F&O ban and FII/DII flows are other predictable, forced-flow events.
  • Event trades carry discrete, binary risk, so precise event definition, event studies and disciplined sizing are essential.

We've traded relationships, factors and events. The final strategy family flips perspective entirely - instead of taking liquidity, we provide it: market making and the optimal execution that even non-market-makers need.