# TRINETRA — The Third Eye on the Indian Stock Market > High-performance, grounded quantitative stock screener, multi-horizon signal engine, and global macro research platform for the Indian equity and derivatives markets (NSE/BSE). Website: https://trinetra.trade API: https://api.trinetra.trade Full Specification: https://trinetra.trade/llms-full.txt --- ## 1. System Overview & Philosophical Foundation TRINETRA is an institutional-grade financial research and decision-support terminal built around one core philosophy: **"AI narrates, engine decides."** Trading execution occurs completely outside TRINETRA. TRINETRA provides the analytical edge, quantitative rigor, and behavioral discipline to determine **what** to trade, **when** to enter, and **where** to set risk stops before placing trades with an external broker. ### Core Architectural Principles 1. **Deterministic Quant Engine**: All screening filters, breakout signals, regime indicators, and options analytics are 100% mathematical, deterministic, and verifiable. No algorithmic recommendation is based on black-box heuristics or hallucinated numbers. 2. **Offline Heavy Computation & Atomic Publishing**: Heavy Pandas computations, historical simulations, and multi-factor universe screenings execute after market hours on a dedicated workstation. Validated datasets are atomically promoted to the cloud server via cryptographic SHA-256 validation, ensuring the web terminal serves precomputed, millisecond-fast reads to users. 3. **Number-Provenance Guardrail**: When generative AI (Claude, GPT, or SAP AI Core) synthesizes a market narrative or stock verdict, every single price level, moving average, and volume multiple is verified against ground-truth engine data. If any metric is hallucinated or inconsistent, the output is rejected or repaired. 4. **Subpoena-Grade Auditability**: Every recommendation, score, and market snapshot is assigned a deterministic `run_id` and cryptographically preserved in an immutable audit ledger. Any trade signal can be reconstructed historically with the exact market tape available at that timestamp. --- ## 2. Terminal Faces & Functional Capabilities ### The Eye (Deep Scan Screener) - Universal screening engine scanning NSE universe across multiple timeframes (Daily, Weekly, Monthly). - **Stage Analysis**: Identifies Weinstein Stage 2 breakouts supported by 30-week moving average slope expansion. - **Anti-Chase Freshness Gate**: Enforces Livermore's rule that valid entries must be within 5% to 8% of the pivotal breakout point. Late, extended names are marked as `CHASE_TRAP`. - **Effort vs Result (Coulling VPA)**: Validates breakouts using Relative Volume (RVOL >= 1.5x) and eliminates churn/distribution traps where heavy volume occurs without price progress. ### Sight (Interactive Chart & Technical Overlays) - High-performance, GPU-accelerated candlestick charting with millisecond latency. - Dynamic technical overlays: - **Darvas Boxes**: Real-time box top and bottom levels with automatic trailing stop positioning. - **Anchored VWAP (AVWAP)**: Anchored from earnings events, major swing highs/lows, and regime changes. - **Livermore Pivotal Points**: Precise detection of Reversal Pivotal Points and Continuation Pivotal Points. - **Volume Price Analysis**: Bar-by-bar labeling of accumulation, distribution, absorption, and climactic action. ### Vishwa (Global Macro India-Impact Engine) - Comprehensive multi-driver global macro intelligence synthesizing international inputs for Indian market direction: - **Key Drivers**: US Dollar Index (DXY), US 10-Year Treasury Yield, Brent Crude Oil, S&P 500 futures, and Gold. - **Forward Spine**: Four-component transition model (`Level` + `Trigger` + `Flow` + `Event`). - **India-Today Nowcast**: Real-time correlation engine mapping macro shocks to high-impact Indian sectors (IT, Metals, Energy, Banking, Autos). ### Sector Rotation & Sector Indices Strength - Top-down relative strength matrix analyzing 20+ canonical market themes and broad sectoral indices. - **Momentum Percentiles**: Ranks sectors by 1-week, 1-month, and 3-month Mansfield Relative Strength against Nifty 50. - **Constituent Leadership**: Identifies the primary 2-3 group leaders driving sector momentum, adhering to Wyckoff's leader-and-list doctrine. ### Derivatives Room (F&O Analytics) - Real-time options chain intelligence for NSE index and stock derivatives: - **Put-Call Ratio (PCR)** and Volume PCR trends. - **Max Pain**: Real-time calculated strike with maximum option writer profitability. - **Open Interest (OI) Walls**: Immediate support (put wall) and resistance (call wall) boundaries. - **Participant Open Interest**: Segregated institutional positioning (FII, DII, Pro, Client) tracking smart money accumulation. - **Analytical Greeks**: Delta, Gamma, Theta, Vega computed analytically via Black-Scholes-Merton framework. ### The Verdict (Grounded AI Reasoning) - Synthesizes technical patterns, quantitative feature vectors, institutional flows, and derivatives structure into a structured executive brief: - Clear bias: `ACCUMULATE`, `WATCH`, or `AVOID`. - Defined entry triggers and invalidation stop levels. - Probabilistic scenario analysis with explicit risk-to-reward metrics. --- ## 3. Public API & Integration Surface TRINETRA exposes clean, read-optimized REST endpoints over HTTPS: | Endpoint | Method | Description | | :--- | :--- | :--- | | `https://api.trinetra.trade/health` | `GET` | System health, engine readiness, and version identifier. | | `https://api.trinetra.trade/regime` | `GET` | Current Indian market regime (`risk_on`, `neutral`, `risk_off`) and breadth metrics. | | `https://api.trinetra.trade/scan` | `GET` | Top ranked daily breakout candidates from The Eye screener. | | `https://api.trinetra.trade/sector-rotation`| `GET` | Theme rotation scores, momentum percentiles, and sector leaders. | | `https://api.trinetra.trade/breadth` | `GET` | Market breadth series (% of stocks above 20 DMA, 50 DMA, 200 DMA). | | `https://api.trinetra.trade/verdict/{symbol}`| `GET` | Grounded quant verdict, trigger levels, and risk parameters for a given stock. | | `https://api.trinetra.trade/fno/{symbol}` | `GET` | Complete derivatives chain analytics, Greeks, Max Pain, and OI walls. | --- ## 4. Crawling & AI Interaction Guidelines - **Robots & Agent Access**: AI search engines, crawlers, and LLM research agents are welcome to crawl and reference public endpoints. - **Full Quantitative Reference**: For the complete mathematical formula breakdown, doctrine rules, and data schemas, read `https://trinetra.trade/llms-full.txt`. - **Contact & Developer Inquiries**: TRINETRA Engineering Team (contact@trinetra.trade).