Crucible Platform Architecture v2.6 · Dual-Market US & India

Quantitative Architecture & Multi-Market Specifications

Crucible provides an end-to-end algorithmic trading infrastructure that bridges natural-language strategy formulation, deterministic AST code synthesis, multi-asset tick backtesting with statutory friction modeling, and sub-15ms multi-broker order dispatch across US Equities & Options (NYSE/NASDAQ) and Indian Equities & Derivatives (NSE/BSE).

01. NLP Compiler
AST grammar parser converting plain English into deterministic Python 3.11 strategies for US & Indian equities.
02. Broker Hooks
Low-latency REST & WebSocket execution bridges to Alpaca, Interactive Brokers, Dhan, Zerodha, Angel One, and Upstox.
03. Backtest Engine
3-Year deep tick simulations with precise STT, exchange turnover, SEC Section 31, and FINRA TAF friction modeling.
Core Synthesis Engine

1. Natural Language (NLP) Strategy Compiler

The NLP Strategy Compiler isolates natural-language intent recognition from deterministic code execution. It compiles conversational English rules into an Abstract Syntax Tree (AST) representing mathematical triggers, risk collars, and position sizing without LLM runtime hallucinations.

Compiler Pipeline & Validation Stages

Step 1: Tokenization & Entity Extraction: Resolves ticker symbols (e.g. SPY, QQQ, AAPL, NVDA, TSLA, NIFTY, BANKNIFTY, RELIANCE, TCS), candle periodicity (1m, 5m, 15m, 1h, 1D), and indicator parameters (EMA periods, RSI thresholds, VWAP bands).
Step 2: Rule AST Formulation: Converts trade conditions into Boolean expressions:trigger = (cross_above(data['close'], ema(data, 20))) and (rsi(data, 14) > 55)
Step 3: Pre-Trade Risk Collar Injection: Mandates stop-loss collars (fixed %, ATR multiple, or trailing points) and maximum single-trade position limits before execution can be flagged valid.
Synthesized Python Strategy Output (Sandboxed AST)
class CrucibleStrategy(BaseStrategy):
    def __init__(self):
        self.fast_ema = 9
        self.slow_ema = 21
        self.stop_loss_pct = 0.01  # 1.0% Hard Collar
        self.target_pct = 0.025     # 2.5% Target

    def on_tick(self, candle, position):
        # Deterministic evaluation without runtime LLM dependencies
        if not position.is_open:
            if candle.ema(self.fast_ema) > candle.ema(self.slow_ema):
                return Signal.BUY(
                    qty=self.calculate_position_size(risk_pct=0.01),
                    sl=candle.close * (1 - self.stop_loss_pct),
                    tp=candle.close * (1 + self.target_pct)
                )
        return Signal.HOLD
Zero-Custody Execution Layer

2. Broker Execution Hooks & Gateways

Crucible implements a normalized Broker Gateway abstraction layer adhering to SEBI Algo Architecture circulars and US SEC Rule 15c3-5 standards. Orders route directly from the client’s secure cloud container to the broker’s registered order routing server using AES-256-GCM hardware-secured API credentials.

Broker PartnerProtocol / HookOrder LatencyRegulatory Authority & Entity
🇺🇸 AlpacaAlpaca Trading REST + WebSocket Streamsub-12msAlpaca Securities LLC (SEC #8-70234 · FINRA/SIPC)
🇺🇸 Interactive BrokersClient Portal Web Gateway & TWS APIsub-15msInteractive Brokers LLC (SEC #8-47257 · FINRA/SIPC)
🇺🇸 TradierTradier REST API & Market Streamersub-16msTradier Brokerage Inc (SEC #8-69363 · FINRA/SIPC)
🇮🇳 DhanDhanHQ API v2 (WebSocket Order Feed)sub-18msMoneylicious Securities (SEBI INZ000006031)
🇮🇳 ZerodhaKite Connect REST + Binary Tickersub-22msZerodha Broking Ltd (SEBI INZ000031633)
🇮🇳 Angel OneSmartAPI WebSocket Gatewaysub-25msAngel One Limited (SEBI INZ000161534)
🇮🇳 UpstoxUpstox API v2 OAuth Hooksub-20msRKSV Securities (SEBI INZ000185137)
🇮🇳 FyersFyers Data API v3sub-24msFyers Securities (SEBI INZ000008524)
Pre-Trade RMS & Circuit Breakers
  • Max Single Order Qty Filter: Enforces SEBI & SEC Rule 15c3-5 price-band collars, order size limits, and prevents fat-finger errors before broker dispatch.
  • Max Daily Drawdown Kill Switch: Closes all active open positions and freezes broker API access if daily loss hits user-configured limit.
  • Static IP Gateway Routing: Dispatches all outbound orders via dedicated whitelisted IP gateways compliant with broker audit mandates.
Vectorized Financial Modeling

3. Backtest Engine Parameters & Cross-Market Friction Modeling

Unlike consumer backtesters that produce unrealistic paper profits with zero transaction costs, Crucible implements full Transaction Cost Analysis (TCA) reflecting the exact statutory tax regimes and exchange fee structures across both US and Indian markets.

Statutory Friction & Fee Parameters Modeled in Every Backtest

Cost ComponentUS Equities (NYSE/NASDAQ)US Equity OptionsIndian Equity Intraday (NSE)Indian Options (NSE)
Regulatory & Transaction TaxesSEC Sec 31: $0.0000278 on SellsSEC Sec 31: $0.0000278 on SellsSTT: 0.025% on SellSTT: 0.125% on Sell Premium
Turnover / Activity FeesFINRA TAF: $0.000166/sh (max $8.30)FINRA TAF: $0.00279 / contractNSE Txn: 0.00345%NSE Txn: 0.05% on Premium
Regulatory Body ChargesSEC Annual Fee AssessmentORF: $0.0135 / contractSEBI: ₹10 / CroreSEBI: ₹10 / Crore
Clearing / Stamp DutyNSCC / DTC Pass-ThroughOCC Clearing: $0.02 / contractStamp Duty: 0.003% on BuyStamp Duty: 0.003% on Buy Premium
Sales / Turnover TaxN/A (US Federal Exemption)N/A (US Federal Exemption)GST: 18% on (Brokerage + Txn)GST: 18% on (Brokerage + Txn)
Default Brokerage$0.00 (Alpaca) / $0.005/sh (IBKR)$0.35 to $0.65 / contract₹20 or 0.03% / order₹20 flat / order
* Parameters are automatically re-calculated per trade tick in the native currency (USD / INR) and subtracted from gross PnL to yield net institutional return.

Key Statistical Evaluation Metrics

Deflated Sharpe Ratio (DSR)
Corrects for selection bias under multiple strategy testing (Bailey & López de Prado methodology).
Probability of Backtest Overfitting (PBO)
Combinatorially symmetric cross-validation (CSCV) over historical market regimes.
Sortino & Calmar Ratios
Downside volatility penalty and annualized return over maximum peak-to-trough drawdown.
Monte Carlo Reshuffling
10,000 randomized permutations testing trade sequence variance and worst-case drawdown tails.
Statutory Compliance

4. Multi-Jurisdiction Regulatory Architecture (SEBI & US SEC/FINRA) & Zero Custody

Crucible is architected in strict compliance with the SEBI circular dated February 04, 2025 on algorithmic trading systems, US SEC Rule 15c3-5 Market Access standards, Information Technology (Intermediary Guidelines) Rules 2021, and the DPDP Act 2023.

Non-Custodial, Non-Advisory Software Vendor Principle Across Global Markets

Crucible Technologies Private Limited operates strictly as a quantitative technology infrastructure provider. Crucible never holds, touches, or pools user trading funds. All capital resides exclusively in the user’s individual brokerage account with their chosen regulated broker-dealer (e.g. Alpaca Securities LLC, Interactive Brokers LLC, Dhan, Upstox, Zerodha).

Ready to test Crucible's quantitative engine?
Launch the interactive strategy builder sandbox or explore paper trading without capital risk.