अस्त्र · a weapon invoked, not merely wielded

The weapon of wealth,
forged from evidence.

Dhan Astra is an Indian index-options intelligence engineered the way a Formula 1 team builds a car. Every part is designed, measured, raced on days it has never seen, and bolted on only if it survives. Nothing is believed. Everything is proven, or it is refused.

specialist agents
0
capability layers
0
promotion gates
0
live index chains
0
अध्याय १ · The Astra

An astra is earned, never borrowed.

In the Itihāsas, an astra is not a sword in the hand. It is a force invoked by mantra, given only to one who has earned it through discipline, and it answers only to true knowledge.

Karṇa learned the Brahmāstra from Paraśurāma under a false identity. When the deception was found, the curse was precise: the knowledge would desert him at the moment he needed it most. It did.

That is overfitting, described in the Mahābhārata long before statistics had a name. A model that has seen its own answers performs in every rehearsal and fails on the battlefield. Dhan Astra is built so that no knowledge enters it by deception.

कर्मण्येवाधिकारस्ते मा फलेषु कदाचन
karmaṇy evādhikāras te mā phaleṣu kadācana
“Your right is to the work alone, never to its fruits.” Bhagavad Gītā 2.47

Our first hard rule: never tune toward a return target. Measure, and report what was measured.

अध्याय २ · The Principle

Three vows the engine cannot break.

सत्य · Satya

Measured, or refused

No invented constant, no synthetic row, no plausible default. A value is measured and its source cited, or the engine returns Refused with the reason. A zero that flows into a P&L is a lie that looks like arithmetic.

सत्यमेव जयते “Truth alone triumphs.” · Muṇḍaka Upaniṣad 3.1.6
तपस् · Tapas

Held out, or it is nothing

Every result is split by time, purged and embargoed, charged every statutory cost, and raced against a shuffled-label control and its own majority-class baseline. A number fitted on its own test is not a result.

योगः कर्मसु कौशलम् “Yoga is skill in action.” · Bhagavad Gītā 2.50
रक्षा · Rakṣā

A halt stops entries, never exits

When the system falters it stops reaching for new risk, but it always lets open inventory out. Blocking an exit strands a position and turns a bounded loss into an unbounded one.

समत्वं योग उच्यते “Evenness of mind is called yoga.” · Bhagavad Gītā 2.48
अध्याय ३ · The Concept

We built a trading system the way a team builds a Formula 1 car.

Not the look of F1. Its discipline. Every Dhan Astra component exists because a part of a racing car taught us what it must do, how it must be tested, and when it must be thrown away.

00
F1 The idea

The most evidence-driven machine people build.

Every surface of a Formula 1 car is simulated, tunnel-tested and track-tested. It stays on the car only if the stopwatch agrees.

became
DA The method

Every Dhan Astra component has a job, a benchmark that could prove it wrong, and a place in the parts bin with its measured reason if it fails. Scroll to take the car apart.

01
F1 Telemetry

Hundreds of sensors. One source of truth.

Pressures, temperatures and loads stream from the car to the pit wall on every lap, through every corner.

became
DA The evidence plane

Every tick enters through one decoder that mirrors the Upstox V3 protobuf schema field for field: touch, five-level depth, chain, OI, IV and greeks, each stamped with its source and venue time. Missing depth is reported dark, never filled with a zero.

  • 32 byte-exact decoder tests
  • 4 live index chains
  • venue clock, never the PC clock
02
F1 Power unit

Energy is useless if it cannot be measured.

A hybrid power unit harvests, stores and deploys energy, and every joule of it is metered so it is spent at exactly the right moment.

became
DA The measurement core

Raw prints become features without look-ahead: microprice, touch imbalance, Lee-Ready trade signs, VPIN and depth imbalance at levels 1, 2, 3 and 5. Each estimator is O(1) per observation, allocates nothing on the hot path, and refuses below its 385-sample floor.

  • Computed<T>: Measured or Refused
  • 385-sample floor, 95% Wilson
  • O(1) observe, no hot-path allocation
03
F1 Control unit & wheel

Every command passes one controller.

The driver's every input runs through a single electronic control unit. When a subsystem reports a fault, the wheel knows, and the strategy changes.

became
DA The ALTRON taskforce & gate

21 specialists across 16 capability layers: Greeks, volatility, liquidity, order flow, microstructure, regime, expiry, risk, data quality and more. Each must pass its own falsification benchmark when it is registered. One that fails is quarantined, and a faulted taskforce closes the decision gate.

  • 21 specialists, 3 honestly dark
  • no default benchmark exists
  • default state: DISARMED
04
F1 Aerodynamics

Downforce is what lets you go fast.

Air pressed onto the car keeps it planted when it is pushed hardest. Without it, speed is only a faster way to leave the track.

became
DA The risk controller

Size is clamped down to whole lots and never rounded up. Orders are sliced under the exchange's quantity freeze. One losing round trip ends new entries for the day. The book stays planted when the market turns.

  • NIFTY lot 65
  • child orders ≤ 1,755 units
  • one loss ends the session's entries
05
F1 Tyres

Four hand-sized patches decide the race.

Everything the car does reaches the track through four contact patches. Grip, wear and temperature are where theory meets asphalt.

became
DA The execution laboratory

Everything a strategy does reaches the market through its fills. Market orders walk the visible depth and the rest is cancelled. Resting limits fill only when the opposite touch reaches them or a print trades through. Every statutory charge and brokerage is deducted before expectancy is judged.

  • no imaginary fills
  • ₹20 + 18% GST per child order
  • STT 0.15% on sell premium
06
F1 DRS, 2011–2025

Power unlocked by conditions, never by hope.

The rear-wing flap could open only in a designated zone, only within one second of the car ahead, and only when race control enabled it.

became
DA The promotion gates

Capital is unlocked the same way. A strategy earns authority only when all ten gates pass together: data integrity, causality, purged walk-forward, held-out stability, shuffled-label control, inverse controls, execution realism, regime coverage, paper confirmation and risk approval.

  • 10 gates, all or nothing
  • a fold must beat its majority baseline
  • 20 counted sessions to promote
07
F1 Halo & red flag

When everything fails, the driver comes home.

The halo protects the driver when all else has failed. Under a red flag the race stops, but every car is still brought back to the pit lane.

became
DA The survival cell

A Dhan Astra halt is a red flag: it stops new entries at once and never stops an exit. The cell is the architecture itself. There is no broker order path in the crate, a source scan fails the build if one appears, and every fill is simulated and labelled paper.

  • halt blocks entries, never exits
  • no broker path, source-scanned
  • credentials only in Windows Credential Manager
08

Five red lights. Then darkness.

Then everything that was measured is tested at once, on a track the car has never seen.

Enter the race weekend
अध्याय ४ · The F1 Method

Every strategy runs a full race weekend.

A part is not fast because its designer believes it is. It is fast when it wins on a track it has never seen, under the same rules as everyone else. Every Dhan Astra candidate races the same weekend, in the same order, with no way to skip a session.

  1. S1 · FactoryBlueprint & build

    A candidate is assembled from explicit primitives, entry, exit, sizing and context, and stamped with an immutable version, parameter hash, feature list and lineage.

  2. S2 · Free practiceThe training interval

    Fitting happens only on the training window. The test window stays sealed, and look-ahead is refused at the type level.

  3. S3 · QualifyingPurged walk-forward

    Expanding chronological folds with an embargo. Every fold must clear its cost-adjusted bar and beat its own majority-class baseline.

  4. S4 · Parc ferméSealed parameters

    Once qualifying starts nobody touches the setup. The shuffled-label, inverse and no-signal controls race the frozen car.

  5. S5 · The raceThe gym & the paper desk

    ₹10,000, one position, every charge, and the first losing round trip ends entries for the day, on days the strategy never saw.

  6. S6 · ScrutineeringPromote, or the parts bin

    All ten gates and twenty counted sessions, or the part is archived with the measured reason it failed.

यथा पिण्डे तथा ब्रह्माण्डे
“As in the part, so in the whole.” A car is only as honest as its least-tested component.
अध्याय ५ · The ALTRON Engine

Read it like a yantra: from the gates inward, to one point.

A yantra is read from the outside in. Its bhupura admits you only through four gates, and every enclosure refines you until you reach the bindu. ALTRON is built the same way. Evidence enters through a gate, is refined plane by plane, and converges on a single decision, or on a refusal.

    The taskforce: 21 specialists, 16 layers

    एकं सद्विप्रा बहुधा वदन्ति
    “Truth is one; the wise call it by many names.” · Ṛgveda 1.164.46
    • expiry_clockPerception
    • oi_build_directionOptions chain
    • theta_dragGreeks
    • gamma_theta_balanceGreeks
    • volatility_premiumVolatility
    • expiry_itm_probabilityProbability
    • book_pressureLiquidity
    • executable_liquidityLiquidity
    • order_flow_imbalanceOrder flow
    • touch_imbalanceMicrostructure
    • microprice_displacementMicrostructure
    • mid_momentumPrice structure
    • net_edge_after_feesQuantitative
    • chain_oi_skewRegime
    • strike_gravityExpiry
    • spread_costExecution
    • single_tick_ruin_riskRisk
    • observation_freshnessData quality
    • iceberg_detectionOrder flow · dark
    • spoof_detectionOrder flow · dark
    • event_proximityEvent · dark

    Dark means registered and visible but unable to measure: iceberg and spoof detection need per-order book detail no Upstox tier provides, and event proximity needs a licensed calendar. A dark capability is reported, never faked.

    अध्याय ६ · The Mathematics

    Eight equations the engine actually runs.

    Not illustrations. Each is shown with the exact line of Rust that computes it and the file it lives in. Each returns a measured value or a refusal that carries its reason.

    Microprice

    micro = bid · Qask + ask · QbidQbid + Qask

    Fair value inside the spread. Each price is weighted by the opposite side's size, so a heavy offer pulls fair value down toward the bid. A crossed or one-sided touch refuses.

    (bid * ask_qty as f64 + ask * bid_qty as f64) / total
    src/flow_metrics.rs · microprice()

    Touch imbalance

    I = Qbid − QaskQbid + Qask ∈ [−1, 1]

    Order-flow pressure at the touch. ±1 are real extremes. Both sides empty is an absent book, not a balanced one, so it refuses instead of returning zero.

    if total == 0 { return Computed::refuse(..) }
    src/flow_metrics.rs · touch_imbalance()

    The compounding breakeven

    p* = − ln Lln W − ln L

    W and L are the ledger multipliers after every charge. Below p* full-capital compounding shrinks the ledger however many cycles run. At ₹0.20, one tick each way, p* is 56.79%.

    let p = -ln_l / denom;
    src/altron/economics.rs · breakeven_win_rate()

    The 385-sample floor

    n = z² · p(1 − p)E² = 1.96² · 0.250.05² = 384.16 → 385

    Below 385 observations a worst-case proportion's 95% Wilson half-width exceeds five points, which is too vague to size on. Every estimator below its floor refuses.

    pub const MIN_FLOW_SAMPLES: usize = MIN_CALIBRATION_SAMPLES;
    src/flow_metrics.rs · MIN_FLOW_SAMPLES

    VPIN

    VPIN = 1n Σ |Vbuy − Vsell|Vbucket

    Volume-synchronised probability of informed trading over the last n complete buckets. A partial bucket is an unfinished measurement, so it refuses until the window is full.

    Computed::Measured(sum / self.window as f64)
    src/flow_metrics.rs · Vpin::value()

    Lee-Ready trade sign

    sign = Buy if p > mid · Sell if p < mid · tick rule at mid

    Who crossed the spread. An exact-midpoint print is broken by the price path. A zero tick is Indeterminate and adds nothing to any sum, rather than leaning it in a direction.

    let mid = 0.5 * (bid + ask);
    src/flow_metrics.rs · classify_lee_ready()

    Statutory charges

    STT 0.15% × sell · Exch 0.03553% × T · SEBI 0.0001% × T
    IPFT 0.0005% × T · Stamp 0.003% × buy
    GST 18% × (Exch + SEBI + IPFT + brokerage)

    T is buy plus sell turnover. GST is charged on services only, never on STT or stamp duty, because those are taxes. Rates are dated: these apply from 1 April 2026.

    let gst = (exchange_txn + sebi + ipft + brokerage) * self.gst_on_services;
    src/mm/fees.rs · StatutoryRates::breakdown()

    The promotion bound

    lower95 = 0.051/n  ·  n = 20 → 86.1%

    Passing every day of a finite sample does not prove a perfect daily pass rate. The verdict carries the one-sided 95% Clopper-Pearson lower bound for n of n.

    pub fn assess( .. ) // every counted day, or nothing
    src/promotion.rs · assess()
    अध्याय ७ · The Research

    Most teams publish their wins. We publish the classification.

    Every candidate below raced on held-out days, under real costs, against its controls. None has taken the chequered flag yet, and the engine says so: its default state is still DISARMED. A result nobody could attack was never a result.

    0
    recorded records, 8 sessions
    0
    five-level depth snapshots
    0
    trading days of NSE end-of-day history
    0
    false results caught and voided
    Race classification · held-out results only
    PosCandidateHeld-outBarResult
    —Queue-imbalance predictor71,666 labelled samples; slope positive in every fold54.98%56.79%DNFbelow breakeven
    —Passive maker, real fill model10–25 band, ~91% of resting bids filled49.28%53.50%DNF−4.21 pts, the closest gap measured
    —Depth feature sweepsix causal features; best: ask-touch concentration66.39%78.67% baselineDSQlost to the majority class
    —Queue priority sweepback of queue to a front no retail account can have9.80–33.53%53–63%DNFadverse selection at every level
    —16 pre-commitment conditionspassive entry filters2 invertedheld-out edgeDSQpositive in-sample, inverted out
    —Oscillation veto (0.97 → 0.95 → 0.97)in-sample z −3.50, held-out z +6.69invertedheld-out edgeDSQthe sign flipped out of sample
    —DeepLOB-style network2 conv layers + GRU, walk-forward, label-shuffle placebo0 of 9 folds55–89% per sliceDNFit read real structure, and still lost money
    —Open-time selector, 975 dayspassed L0, then attacked1.444 paybackno-model control 1.449DSQa control did as well
    —4,250-node consensus meshpinned by its own testsalways BUYa real decisionDSQa constant function, removed
    —Daily +500% gate, shipped makerone loss ends the day; every order billed0 of 6+500% netDNFmeasured, never tuned toward

    Three candidates looked brilliant in-sample and inverted the moment they met unseen days. That is Karṇa's curse in a spreadsheet: knowledge gained by seeing the answers deserts you when it matters. The gates exist so that it deserts us in research, not with capital.

    अध्याय ८ · How it operates

    From the wire to the ledger, in one straight line.

    The live path has no shortcuts and no side doors. Every stage can refuse, and a refusal travels forward with its reason instead of becoming a zero.

    1. Upstox V3protobuf WebSocket
    2. Decoder32 byte-exact tests
    3. Live bookvenue clock
    4. Taskforce21 specialists
    5. Gatesarming · promotion
    6. Riskhalts entries only
    7. Paper desksimulated fills
    8. Ledgersimulated: true
    1. The probe

      The credential is read from Windows Credential Manager, the venue clock is synced, and contract masters load for NIFTY, BANKNIFTY, FINNIFTY and MIDCPNIFTY, each contract with its own lot and freeze. Any failure stops the start, and says why.

    2. Feed live

      One decoder, one book per contract, every update stamped with venue time. A stale quote is flagged, never traded on.

    3. Entries allowed

      Market orders walk the visible depth and cancel the rest. Resting limits fill only when the opposite touch reaches them or a print trades through.

    4. The red flag

      Kill switch, daily loss limit, stale feed or stale quote: entries stop at once. An exit that cannot be priced waits for the first fresh book, then fills.

    5. Close

      The ledger is sealed. Every record says simulated: true, and the schema cannot say otherwise.

    6. Research

      Replay, folds, controls and attacks. Settled questions are written down so nobody relitigates them, and open ones are argued in the room.

    अध्याय ९ · The Engine Room

    The real formulas, in your hands.

    Five instruments run the engine's own arithmetic in your browser, transcribed line for line from the Rust and checked against the engine's pinned results: the 56.79% breakeven, the 53.45% minimum, 49,985 units and ₹1,368.80 of brokerage all reproduce exactly. When the engine would refuse, so do they.

    Where does fair value sit?

    Set a two-sided touch. Cross it, or empty a side, and watch the engine refuse.

    mid
    microprice
    displacement
    touch imbalance