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).
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
trigger = (cross_above(data['close'], ema(data, 20))) and (rsi(data, 14) > 55) 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.HOLD2. 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 Partner | Protocol / Hook | Order Latency | Regulatory Authority & Entity |
|---|---|---|---|
| 🇺🇸 Alpaca | Alpaca Trading REST + WebSocket Stream | sub-12ms | Alpaca Securities LLC (SEC #8-70234 · FINRA/SIPC) |
| 🇺🇸 Interactive Brokers | Client Portal Web Gateway & TWS API | sub-15ms | Interactive Brokers LLC (SEC #8-47257 · FINRA/SIPC) |
| 🇺🇸 Tradier | Tradier REST API & Market Streamer | sub-16ms | Tradier Brokerage Inc (SEC #8-69363 · FINRA/SIPC) |
| 🇮🇳 Dhan | DhanHQ API v2 (WebSocket Order Feed) | sub-18ms | Moneylicious Securities (SEBI INZ000006031) |
| 🇮🇳 Zerodha | Kite Connect REST + Binary Ticker | sub-22ms | Zerodha Broking Ltd (SEBI INZ000031633) |
| 🇮🇳 Angel One | SmartAPI WebSocket Gateway | sub-25ms | Angel One Limited (SEBI INZ000161534) |
| 🇮🇳 Upstox | Upstox API v2 OAuth Hook | sub-20ms | RKSV Securities (SEBI INZ000185137) |
| 🇮🇳 Fyers | Fyers Data API v3 | sub-24ms | Fyers Securities (SEBI INZ000008524) |
- 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.
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 Component | US Equities (NYSE/NASDAQ) | US Equity Options | Indian Equity Intraday (NSE) | Indian Options (NSE) |
|---|---|---|---|---|
| Regulatory & Transaction Taxes | SEC Sec 31: $0.0000278 on Sells | SEC Sec 31: $0.0000278 on Sells | STT: 0.025% on Sell | STT: 0.125% on Sell Premium |
| Turnover / Activity Fees | FINRA TAF: $0.000166/sh (max $8.30) | FINRA TAF: $0.00279 / contract | NSE Txn: 0.00345% | NSE Txn: 0.05% on Premium |
| Regulatory Body Charges | SEC Annual Fee Assessment | ORF: $0.0135 / contract | SEBI: ₹10 / Crore | SEBI: ₹10 / Crore |
| Clearing / Stamp Duty | NSCC / DTC Pass-Through | OCC Clearing: $0.02 / contract | Stamp Duty: 0.003% on Buy | Stamp Duty: 0.003% on Buy Premium |
| Sales / Turnover Tax | N/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 |
Key Statistical Evaluation Metrics
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.
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).