Skip to main content
AgentAddaAgentAdda
All Articles
AI AgentsFinancial ServicesEnterprise AIMarket IntelligenceAgentic Systems

Market Intelligence Agent: Field Report

There is a bookshelf behind every trading decision you have ever made well. What happens when you digitise that accumulated wisdom onto a single platform and let AI make sense of it? This is what we built — and what we learned.

3 May 202613 min read·AgentAdda Collective

There is a bookshelf behind every trading decision you have ever made well. Not literally — but the accumulated weight of everything you have read, every loss that taught you something, every pattern you saw form and break and form again across thousands of hours of screen time.

Cover page

William O'Neil taught us that stocks move in stages — and that you only buy in Stage 2. Stan Weinstein gave us the framework to identify those stages with moving averages, slopes, and volume. Mark Minervini refined the entry criteria — the VCP, the tight price contraction, the breakout on volume expansion. Relative strength, breadth analysis, Supertrend indicators, McClellan oscillators, TRIN readings — each of these arrived in our toolkit through books we read at 2 AM, trades that went wrong and forced us to learn why, conversations with other practitioners who had been burned by the same mistakes.

This knowledge does not live in a model. It lives in us. In the hours spent studying why a stock with an RSI of 80 and declining volume behaves differently from one with the same RSI but expanding volume. In the experience of watching a sector rotate from laggard to leader over three months and knowing which breadth signal confirmed it early. In the hard-won understanding that a bearish divergence in a 94% breadth reading is more dangerous than an outright weak breadth number — because it lulls you into false confidence.

The question we set out to answer was simple: What happens when you take all of that — the books, the frameworks, the scars, the judgment — digitize it onto a single platform, and let AI make sense of it?

Not replace it. Make sense of it. At scale.

Section 01 · What We Actually Built

What We Actually Built

The NSE Sector Rotation & Trading Intelligence Platform — branded under Agent Adda's Market Intelligence Agent — is a live analytical system that produces a 25-page interactive report covering 137 NSE indices tracked across 8 categories, 48 investment candidates across 6 rotating sectors with structured narratives, 12 distinct analytical layers converging on every stock decision, macro regime detection with confidence scoring and economic cycle positioning, and full methodology documentation with every formula published.

It is a single self-contained HTML file. No backend. No subscription. No API calls at runtime.

The platform's opening surface: Bear Trend regime at 100% confidence, Slowdown economic cycle at 67% confidence with sector alignment, FII/DII flow classification showing DII Absorbing at ₹-8,048 Cr FII vs ₹+3,487 Cr DII, breadth internals with McClellan oscillator at +85.9 OVERBOUGHT and TRIN 0.39 VERY BULLISH with BULLISH DIVERGENCE flagged, 9-indicator macro backdrop, and the four-panel AI-synthesized Market Brief.

Overview dashboard with BUY signals, sector rotation score, and Market Rotation Context narrative

Overview dashboard: 5 active BUY signals (COALINDIA 81.0, ASTERDM 76.4, GLENMARK 76.3, ASTRAMICRO 68.2, IMFA 64.3), Defence & Aerospace leading at 12.7, 6 sectors rotating above Nifty 500 baseline, Market Rotation Context narrative synthesizing macro+technical+breadth, and the Sector Rotation Score horizontal bar chart.

Section 02 · The Architecture: Three Layers, One Principle

The Architecture: Three Layers, One Principle

Three-layer architecture: Knowledge sources and data feeds flow into Rules-Based Engine, then AI Narrative Agent, then Presentation Agent

The platform runs on a principle applied across enterprise data lakehouses and multi-agent systems: Rules compute. AI synthesizes. Knowledge governs both.

Three-layer architecture: Knowledge sources (O'Neil, Weinstein, Minervini, practitioner experience) and data feeds (NSE OHLC, Screener.in, F&O, macro indicators) flow into the Rules-Based Engine, which feeds the AI Narrative Agent, which feeds the Presentation Agent. Output: single self-contained HTML.

Layer 1 — The Rules-Based Engine

Every number in this platform is reproducible. Given the same data, you get the same output. Every time. No temperature setting. No prompt variation. No hallucination risk. This is where the books live — O'Neil's stage criteria translated into SMA slope thresholds, Weinstein's four-stage classification encoded as Price > SMA50 > SMA200 with both rising, Minervini's breakout rules programmed as 20-session lookback with 12% base width and 1.4× volume confirmation. The rules are the knowledge. The AI never touches them.

Layer 2 — The AI Narrative Agent

This is where AI earns its keep. It reads computed data across all twelve layers — scores, signals, patterns, regime, breadth, seasonality, events, F&O, insider activity — and produces narrative that a portfolio manager can act on. Coal India's narrative does not just say "BUY." It contextualizes a consolidation breakout at 2.10× volume against a bearish macro regime, a CYCLE UNFAVOURED economic positioning, and short-cover F&O signals — then gives you entry at ₹462–463, stop at ₹436.70, and targets at ₹464.85 and ₹526.41. The AI scales the judgment. It does not generate the judgment.

Layer 3 — The Presentation Agent

The entire output is a single HTML file with six interactive tabs (Overview, Sector Rotation, Investment Candidates, Stage Screener, Peak Resilience, All Indices, Methodology), sortable tables, sector filter pills with horizontal scrolling, a heatmap view toggle, full-text search across all narratives, print-optimized layout, and localStorage-based state persistence. AI generated all of this — but within a design system the practitioner specified: the badge taxonomy, the color encoding, the score bar gradients, the narrative disclosure patterns.

Section 03 · Five Scoring Frameworks — The Library Encoded

Five Scoring Frameworks — The Library Encoded

Each framework traces back to a specific body of knowledge that took years to internalize. Every formula is deterministic, auditable, and published in the Methodology tab.

1. Sector Rotation Score

0.35 × RS_1M + 0.25 × RET_1M + 0.20 × RS_5D + 0.10 × RS_3M + 0.10 × RS_6M

Defence & Aerospace tops at 12.7. Energy-Power follows at 12.3. The weights reflect a conviction that formed over years of watching rotations: 1-month relative strength is the strongest forward signal for sector rotation, but it needs short-term confirmation (5D) to avoid noise and longer-term support (3M, 6M) to avoid chasing a dead-cat bounce. RS is always computed against Nifty 500 as the benchmark. Positive values mean the sector is outperforming the broad market.

2. Investment Score (Per-Stock Composite)

0.38 × Tech + 0.27 × RS_rank + 0.25 × Fund + Pattern(+3) + Supertrend(+2) + F&O/Insider + Stage(S2 +4, S3 −5, S4 −8)

The stage bonus system is a practitioner interpretation — a way to make Weinstein's stage framework interact quantitatively with the broader scoring model. Stage 2 stocks get a +4 boost. Stage 3 (distribution) gets −5. Stage 4 (decline) gets −8. It came from watching how stage transitions affect real portfolio returns over dozens of cycles. Coal India leads the current universe at 81.0, followed by Aster DM Healthcare at 76.4 and Glenmark Pharmaceuticals at 76.3.

3. Technical Score · 4. Fundamental Score · 5. Peak Resilience

Technical (0–100): RSI 14-period, SMA50/200 position and crossover, distance from 52-week high, 5-day and 20-day rate-of-change, volume ratio versus 20-day average. Values above 60 indicate strong uptrend conditions.

Fundamental (0–100): Sourced from the Screener.in pipeline — earnings quality, revenue growth, balance sheet strength, institutional interest. Score ≥65 is strong, 50–65 is moderate, below 50 is speculative.

Peak Resilience: 0.25 × Tech + 0.20 × RS + 0.20 × RecoverySpeed + 0.20 × HighProximity + 0.15 × Fund

Section 04 · Sector Rotation Rankings and Seasonality

Sector Rotation Rankings & Seasonality

Sector Rotation Rankings table with multi-timeframe returns and 7-year Sectoral Seasonality heat-calendar

Six sectors ranked by composite rotation score vs Nifty 500: Defence (12.7, +20.1% 1M, +11.8% RS), Energy-Power (12.3, 90% breadth HEALTHY), Metals (8.6, 94% HEALTHY but BEARISH DIVERGENCE), Realty (7.6, seasonal tailwind), FMCG (6.6, 60% NEUTRAL with INT WEAKNESS), Pharma (5.0, −5.7% RS). Below: 7-year Sectoral Seasonality heat-calendar — May shows Defence at +21.8%, colour-encoded from deep red (<−5%) to deep green (>+5%), current month highlighted in blue.

Section 05 · Twelve Analytical Layers

Twelve Analytical Layers

This is the full inventory of what converges on every stock decision. What used to live in fourteen separate browser tabs now surfaces on a single row.

Twelve analytical layers table — from market regime through corporate events, one row per stock

Twelve layers converge on every stock decision: from market regime through corporate events, producing one row per stock, one narrative, one decision.

Layers 1–4: The Macro Canopy

Market Regime: Bear Trend, 100% confidence, 1-day duration. Economic Cycle: Slowdown at 67% confidence — favours FMCG, Pharma, IT; avoids Metals, Auto, Real Estate. Model weights shift: defensive gets 3.0, fundamental gets 2.5, momentum drops to 0.2. FII/DII Flows: FII 5D: ₹−8,048 Cr (SELL). DII 5D: ₹+3,487 Cr (BUY). Classification: DII Absorbing. Breadth: McClellan Oscillator +85.9 OVERBOUGHT, TRIN 0.39 VERY BULLISH, Net A/D −501, BULLISH DIVERGENCE flagged.

A beginner reads weak breadth and goes to cash. A practitioner reads TRIN at 0.39 inside weak breadth and recognizes a potential reversal setup — the market is internally stronger than the surface suggests. The platform surfaces both readings and lets you weigh them. It does not resolve the conflict for you. It presents it with the clarity you need to resolve it yourself.

That is a design choice born from experience. Early versions of this system tried to produce a single synthesized "market health" score. It was useless. Because a single number hides exactly the kind of divergence that experienced traders look for. We killed the synthesis score and kept the components visible.

Layers 5–6: Sector Context

Sector Rotation Rankings with multi-timeframe returns (5D, 1M, 3M, 6M), relative strength, macro alignment scoring, seasonality signals (Tailwind/Headwind/Neutral), and breadth health with divergence flags. The 7-year Sectoral Seasonality heat-calendar spans eight sector indices across twelve months. Defence historically averages +21.8% in May and +17.5% in April but −12.3% in July. These are not AI-generated insights — they are statistical computations that most retail investors never see in one place.

Layers 7–9: Stock-Level Analytics

Technical scoring, fundamental scoring, and O'Neil/Weinstein stage classification converge per stock. The Stage Analysis Screener shows 21 stocks in Stage 2 (buy zone), 25 in Stage 1 (basing), 0 in Stage 3 (distribution), and 2 in Stage 4 (decline — Lodha and Anant Raj). Stage 2 criteria: Price above SMA50, SMA50 above SMA200, both moving averages rising, price within 20% of 52-week high.

Layers 10–12: The Signals Column

Every stock row has a Signals button with three colour-coded dots — a compact visual encoding: green (bullish), red (bearish), grey (neutral), blue (upcoming event), light (no data). One glance tells you whether the signal layer confirms or conflicts with the technical setup. F&O: PCR, OI trend, max pain — BULL adds +2, BEAR subtracts −3. Insider: SEBI bulk/block deals, 90-day lookback — promoter buying adds +6, pledge subtracts −5. Events: Results, buyback, split, dividend with urgency badges (pulsing red ≤3d, amber 4–7d, blue 8–30d). Narratives adjust position sizing guidance around event proximity.

Section 06 · Investment Candidates — Stock-Level Intelligence

Investment Candidates — Stock-Level Intelligence

Every stock in the platform carries a structured row with 15+ data columns: Symbol, Price, Signal/Action (BUY/HOLD/WEAK HOLD/SELL with setup classification and stage badge), composite Investment Score with gradient bar, Technical Score, Fundamental Score, Relative Strength %, RSI, Supertrend direction with price level, Pattern classification, Volume ratio, three-dot Signals popup, and Entry/Stop/Target levels.

Defence & Aerospace candidates: DATAPATTNS (HOLD, Score 70.1, Tech 56.7, Fund 52.8, +47.1% RS, RSI 71.3, Bullish Supertrend at ₹3,383.17, Trending pattern, 0.91× volume). AZAD (69.1, +42.3% RS, RSI 79.3 — overbought). Each with expandable Investment Narrative disclosures rated CONSTRUCTIVE, NEUTRAL, or CAUTIOUS.

Section 07 · Stage Analysis — O'Neil / Weinstein

Stage Analysis — O'Neil / Weinstein

This is where O'Neil and Weinstein live in the platform. Every stock is classified into one of four stages based on the SMA 50/200 structure and their slopes. The screener shows the full diagnostic: SMA50, SMA200, both slopes (10-day), distance from 52-week high, volume ratio versus 20-day average, RS percentile versus the full universe, investment score, and composite stage score. Only buy Stage 2. Avoid Stage 3. Never hold Stage 4.

Stage 2 — Buy Zone

21 stocks currently in Stage 2. Criteria: Price above SMA50, SMA50 above SMA200, both moving averages rising, price within 20% of 52-week high. AZAD leads at 0.888 stage score — 88th RS percentile, 2.62× volume, +6.2% SMA50 slope.

Stage 1 — Basing

25 stocks in Stage 1 — accumulation underway but breakout not yet confirmed. Watch for the SMA50 crossover above SMA200 with expanding volume as the trigger to reclassify.

Stage 3 / 4 — Avoid

0 stocks in Stage 3 (distribution). 2 stocks in Stage 4 (decline): Lodha at 21.2, Anant Raj at 4.2. Stage 4 stocks are never held. Filter chips for S1/S2/S3/S4 allow instant screener segmentation.

Section 08 · Peak Resilience — Institutional Conviction Measured in Velocity

Peak Resilience — Institutional Conviction Measured in Velocity

Stocks trading within 5% of their 52-week high represent institutional accumulation — money that is not selling. The Peak Resilience screener ranks these stocks by how fast they recovered from their 52-week low, using a composite of technical strength, relative strength, recovery speed (percentage per day), high proximity, and fundamental quality. This is the kind of screening that quant funds run internally. The platform makes it available to any practitioner.

Peak Resilience: MTARTECH #1 (78.9 score, −3.6% from 52W high, +358.0% recovery from low, 0.93%/day speed). DATAPATTNS #2 (75.3, −3.1%, +191.6%, 0.50%/d). NTPCGREEN #3 (72.8, 57-day recovery). NATIONALUM #4 (69.4, −0.8% drawdown — essentially at its all-time high). Green drawdown bars show proximity to peak.

Section 09 · 137 NSE Indices — The Full Market Landscape

137 NSE Indices — The Full Market Landscape

Every NSE index series — Broad Market, Sector, Thematic, Strategy/Factor, Size, Fixed Income — with performance metrics computed from the same index data feed. Category filter chips to narrow focus. Search to jump to a specific index. All columns sortable. Each index carries 5D, 1M, 3M, 6M returns, 1M RS versus Nifty 500, composite rotation score, 52-week high and low, and drawdown from 52-week high.

137 NSE indices: SME Emerge leads (+21.5% 1M, +13.2% RS), Capital Mkt (+20.4%, +12.1% RS), Nifty Ind Defence (+20.1%, +11.8% RS). Nifty IT trails at −2.0% 1M, −10.3% RS, −28.1% drawdown. Category badges colour-coded: green (Broad Market), blue (Sector), purple (Thematic), yellow (Strategy/Factor), orange (Size), cyan (Fixed Income).

Section 10 · Published Methodology — No Black Boxes

Published Methodology — No Black Boxes

Every formula, every weight, every threshold is documented in the Methodology tab. This is not a black box. The platform is transparent by design — reproducible, auditable, and improvable by any practitioner who extends the knowledge base. When the market teaches you something new, you update the knowledge base. The AI agents adapt because they reference the structure, not hardcoded logic.

Methodology: Five scoring frameworks with exact formulas (Rotation Score, Investment Score, Technical Score, Fundamental Score, Peak Resilience). Supertrend parameters (ATR period 10, multiplier 3.0). Consolidation Breakout rules (20-session lookback, 12% base width, 1.4× volume). Stage Analysis definitions with score bonuses.

Section 11 · What a Year Changes

What a Year Changes

A year ago, encoding all of this into a functioning platform would have taken six to eight weeks with a team of three — a quant analyst, a frontend developer, and a data engineer. Today, a single practitioner with embedded domain knowledge and a carefully orchestrated AI system produced it in a fraction of that time.

But speed is not the story. The story is experimentation velocity. When the McClellan oscillator with TRIN and divergence detection emerged as necessary, that was a single iteration cycle. When the seasonality heat-calendar idea materialized, the structure was described once and verified. When F&O signal overlays became critical — because pure technicals without institutional positioning data miss context — the integration was a conversation, not a project.

Each addition represents a hypothesis about what makes analysis better. AI did not generate these hypotheses. The books generated them. The experience generated them. The losses generated them. AI made it possible to test them fast enough to learn from the results before the insight became stale.

Section 12 · What AI Is and Is Not Doing

What AI Is and Is Not Doing

AI is not replacing financial judgment

The scoring formulas, the signal taxonomy, the conviction framework, the risk management principles — these come from years of studying markets, reading O'Neil and Weinstein and Minervini, understanding what a McClellan divergence means in practice.

AI is scaling that judgment

A human analyst can deeply analyze 10–15 stocks in a day. This system analyzes 48 stocks across 6 sectors with the same depth, consistency, and rigor — every single run.

AI is creating a new kind of artifact

A 25-page interactive analytical surface with 137 indices, 48 stock narratives, 6 sector analyses, 12 analytical layers, and complete methodology documentation — in a single file you can open in any browser.

And AI is making the transmission of knowledge possible at scale. This platform encodes a particular way of thinking about markets — rotation-first, regime-aware, breadth-confirmed, technically grounded, fundamentally validated, event-aware, institutionally contextualized. That way of thinking is now executable. Shareable. Inspectable. Improvable.

Section 13 · The Real Point

The Real Point

AI did not read O'Neil. AI did not sit through Weinstein's weekly chart reviews. AI did not lose money on a Stage 3 stock that looked like Stage 2 because it had not learned to check the SMA50 slope. AI did not spend weekends studying McClellan oscillator divergences, trying to figure out why the market rallied when breadth said it should not.

We did.

The books. The hours. The deliberations. The trades that worked and the ones that did not. The slow accumulation of frameworks that eventually hardened into judgment.

What AI did — what it does extraordinarily well — is take that accumulated, hard-won, practitioner-tested knowledge and make it operational at a scale that a single human cannot achieve alone. Forty-eight stocks, six sectors, one hundred thirty-seven indices, twelve analytical layers, structured narratives for every entity — all grounded in the same frameworks we have spent years internalizing.

The platform is not an AI product. It is a knowledge product that AI helped build.

The books are still the starting point. The experience is still irreplaceable. The hours still matter. AI just made sure they do not stay locked inside one person's head.

Hold. Think. Then act.


Download

This article is available as a full PDF for offline reading and sharing.

Download PDF →

AgentAdda is a collective of data practitioners sharing honest insights on AI, data engineering, and enterprise transformation.

Back to All Articles