Quantitative Architecture & Execution 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.
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. 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 | SEBI Intermediary Role |
|---|---|---|---|
| Dhan | DhanHQ API v2 (WebSocket Order Feed) | sub-18ms | Moneylicious Securities (INZ000006031) |
| Zerodha | Kite Connect REST + Binary Ticker | sub-22ms | Zerodha Broking Ltd (INZ000031633) |
| Angel One | SmartAPI WebSocket Gateway | sub-25ms | Angel One Limited (INZ000161534) |
| Upstox | Upstox API v2 OAuth Hook | sub-20ms | RKSV Securities (INZ000185137) |
| Fyers | Fyers Data API v3 | sub-24ms | Fyers Securities (INZ000008524) |
- Max Single Order Qty Filter: Enforces SEBI price-band collars 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 & Statutory Friction (STT) Modeling
Unlike consumer backtesters that produce unrealistic paper profits with zero transaction costs, Crucible implements full Transaction Cost Analysis (TCA) reflecting the exact Indian statutory tax regime and exchange fee structures.
Statutory Friction & Fee Parameters Modeled in Every Backtest
| Cost Component | Equity Intraday | Equity Delivery | Futures (NSE/MCX) | Options (NSE) |
|---|---|---|---|---|
| Securities Transaction Tax (STT) | 0.025% on Sell | 0.1% Buy & Sell | 0.02% on Sell | 0.125% on Sell Premium |
| Exchange Turnover Fee | 0.00345% (NSE) | 0.00345% (NSE) | 0.002% (NSE) | 0.05% on Premium |
| SEBI Turnover Charges | ₹10 / Crore | ₹10 / Crore | ₹10 / Crore | ₹10 / Crore |
| Stamp Duty | 0.003% on Buy | 0.015% on Buy | 0.002% on Buy | 0.003% on Buy Premium |
| GST (Goods & Services Tax) | 18% on (Brokerage + Txn) | 18% on (Brokerage + Txn) | 18% on (Brokerage + Txn) | 18% on (Brokerage + Txn) |
| Default Brokerage | ₹20 or 0.03% / order | ₹0 / delivery | ₹20 flat / order | ₹20 flat / order |
Key Statistical Evaluation Metrics
4. SEBI Regulatory Positioning & Zero Custody Architecture
Crucible is architected in strict compliance with the SEBI circular dated February 04, 2025 on algorithmic trading systems, 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 demat and trading account with their chosen SEBI-registered stock broker.