Margin trading in detail: methods
Code: pipeline/tipsheet/compute/mtf_detail.py, pipeline/tipsheet/publish/mtf_detail.py, step mtf_detail (pipeline/tipsheet/steps/insights_mtf.py). Tests: pipeline/tests/test_mtf_detail.py. Page: /leverage/mtf/. The headline book and its share of market value are on /leverage/ (docs/methods/leverage.md).
Source
NSE’s daily margin-trading disclosure, per security, from April 2004 (Data bank nse_mtf_2004_2012, nse_mtf_2013_2022, nse_mtf). On every day the per-security amounts add up to NSE’s printed total for the book. The amount is the brokers’ outstanding loan against each stock, not the market value of the shares held as collateral.
Measures (weekly, each week’s last trading day)
- Concentration (from 2004): the number of stocks funded; the share of the book in the largest 10 and 50 positions; and the effective number of positions, 1 / Σ(share²), the number of equal positions that would be as concentrated.
- Size tilt (from January 2018): the book split across AMFI’s large caps (ranks 1–100), mid caps (101–250) and small caps (251 on), matched by NSE symbol (94–99% of the book matches each week). Alongside it, each group’s share of total market value and the book in basis points of the group’s market value.
- Crowding (from January 2018): each stock’s funded amount over its six-month average full market cap from the same AMFI list, with counts of stocks at 1%, 2% and 5% or more, the share of the book in stocks at 2% or more, and the 40 highest in the latest week. A loan is set against a six-month average, so the ratio is a ranking, not an exact share of the company.
- Falls (from June 2017): every decline of 10% or more in the Nifty 500 total-return index, from its previous high to its lowest close before a new high. For each, the book’s change from peak to trough and over the three months after. The book also moves with new lending and repayments, so a change is not all forced selling.
No look-ahead
AMFI publishes each list in the first week of January or July for the six months just ended. A list counts only from 15 days after its window ends, so no week uses a list published after it.
Limits
- Regime break: before mid-2017 the book was ₹20–250 crore. SEBI revised its margin-trading framework in June 2017 and the facility became widely offered; size and crowding start in 2018, concentration is shown from 2004 with the break marked.
- Sample size: six market falls; the table describes, it does not test.
- Names: the stock table lists NSE symbols and is not a recommendation.