Skip to content
Applied engineeringPrototype

Verace Tradewind

A spot-market trading loop built from heuristic signal modules, an order-execution pricer, exit rules and an SQLite trade ledger.

Verace Research
  1. Ticker data: polled with order-book data for each traded symbol
  2. Momentum score: harmonic-weighted, squashed by tanh
  3. Buy signal: emitted when the score is above 0.15
Figure 1. Heuristic signals firing on a market series in Verace Tradewind. Schematic on a synthetic series: a heuristic score read from market data emits buy, sell or hold signals. Tradewind is a prototype with no measured trading performance.
Open the simulator on its own pageA rule reading a series: an interactive toy model of the principle. You can also try it below

Overview

Verace Tradewind is a trading loop for cryptocurrency spot markets. It polls ticker and order-book data, turns them into buy, sell or hold signals, prices limit orders, manages exits and records every trade in a local ledger. The question it addresses is practical: how a small set of simple market heuristics, combined with exchange rules on order size and price precision, can drive an automated trading loop that keeps its cash usable for new signals instead of leaving it locked in token holdings.

The system is organised as a hierarchy of modules that the design specification labels with dimensions from 3D to 26D, called the 15 yantras, arranged as a nine-stage pipeline from a 26D tick streamer to a 06D trade ledger. The labels are names only. Each module computes a plain heuristic: a harmonic-weighted momentum score, order-book depth imbalance, a return z-score scaled by volume surge, triangular and funding-rate arbitrage checks, a time-decaying take-profit schedule and urgency-scaled maker pricing. A main daemon sweeps the traded symbols, asks an orchestrator module for decisions and sends signed REST orders. A C++20 engine applies a similar harmonic-weighted dot product to a 4-feature vector.

The code implements the polling daemon, a signed REST client, the signal and exit modules, a closed-loop asset recycler, an SQLite ledger, a terminal dashboard, a web dashboard and launch and stop scripts. The recycler implements a minimum-order guard: when free USDT falls below the 5 USDT minimum notional, it proposes selling non-USDT holdings worth at least 5 USDT after step flooring, largest first, so the trading loop's allocator has cash for new signals. A design note describes this rule. The lab's code review found that several physics labels on modules, such as Ramanujan Delta and Yang-Mills field strength, do not correspond to the computation performed.

The trading loop, its signal modules, the ledger and the dashboards are implemented as code, and a test suite exists. The decision logic of the orchestrator module is not documented, and the C++ engine runs a single demonstration tick. No backtest, evaluation run or measured performance is recorded for the system. The records do not show whether any orders were placed against a live account or a test account. One script prints a narrative with randomly generated profits and places no orders; it is not part of the trading loop. Whether the heuristics have any predictive value remains unmeasured.

Status

Prototype. The trading loop, signal modules, ledger and dashboards exist as code with a test suite, but no evaluation run or measured result is recorded.

Simulator

A made-up series, and a rule that fires when a point lies far from the average of the points before it. Set how far, and how many points it looks back over.

  • synthetic data: not a record of any market
  • score: distance from the average, in units of the spread
Times the rule fired
15
Points outside the band
25%
Longest stretch without firing
44 points
The series
Synthetic

Narrow the band and the rule fires on noise; widen it and it misses moves. A longer window makes the band slower to follow.

This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.

Architecture

  1. Main trading daemon

    A loop that sweeps the configured symbols, builds tick data from ticker and order-book requests, obtains decisions from the orchestrator module ToposAlphaOrchestrator and submits limit or market orders.

  2. Signed REST client

    A client for spot account, open-order, cancel and order calls that signs every request and holds hardcoded per-symbol lot and price steps.

  3. Heuristic signal modules

    Modules that compute momentum, breakout, order-book imbalance and arbitrage scores from recent ticks and order-book depth, each emitting a buy, sell or hold signal or a flag.

  4. Execution pricer

    The module Kamalatmi13DMatcher chooses a maker limit price at the best bid or ask and moves into the spread, or switches to a market order, as urgency rises.

  5. Exit rule module

    The module Bagalamukhi07DStasisShield computes a position's profit or loss in percent and closes it on take-profit, time expiry or stop-loss, and caps any allocation at 35% of equity.

  6. Closed-loop asset recycler

    The module ClosedLoopAssetRecycler proposes sell-to-USDT orders for holdings worth at least 5 USDT when free cash is below the minimum order size.

  7. SQLite trade ledger

    The module Shiva06DSymplecticLedger creates trades and equity snapshot tables, inserts trades and summarises profit, volume and win rate.

  8. C++20 signal engine

    A singleton engine YantraHftEngine that builds a 4-feature vector from bid, ask, volume and funding rate and emits a buy, sell or hold maker signal from a similar harmonic-weighted dot product with tanh, not the same rule as the 24-channel Python momentum module.

  9. Dashboards

    A terminal dashboard that redraws every 2 s with realized profit, win rate, volume and the last 10 trades, and a web dashboard served over HTTP.

Implementation

Mechanisms as they are implemented in the source code, with the constants the code uses.

Harmonic-weighted momentum filter
Market features are expanded into 24 channels and dotted with fixed weights wk=sin⁡(2πk/24) e−0.05kw_k = \sin(2\pi k/24)\, e^{-0.05k} for k=1,…,24k = 1, \dots, 24, then squashed as s=tanh⁡(5x)s = \tanh(5x). A score above 0.15 emits a buy signal and below -0.15 a sell signal. The code labels this a Ramanujan Delta filter, but no Dedekind eta computation is performed.
Order-book depth imbalance signals
Tripura11DWorldModel sums bid and ask volume over the top 20 levels and takes their ratio, with a log1p liquidity term. A cascade flag is raised when the ratio exceeds 3 or falls below 0.33, and a normalised imbalance enters a score 1−∣imb∣1 - |\mathrm{imb}|.
Z-score times volume-surge breakout
From the last 10 prices the module forms 9 returns and computes z=(rlast−μ)/(σ+10−9)z = (r_{\mathrm{last}} - \mu)/(\sigma + 10^{-9}) and a surge ratio of the last volume to the mean of the earlier volumes. A signal fires when ∣z∣surge>2.5|z| \sqrt{\mathrm{surge}} > 2.5; the Yang-Mills label in the docstring is decorative.
Triangular and funding-rate arbitrage checks
The triangle check compares a direct pair price with the product of the two leg prices and flags a gap above 5 bps. The funding check annualises an 8 h rate as r×3×365r \times 3 \times 365 and accepts yields above 10% APY. Both detect only and place no orders.
Urgency-scaled maker price pegging
The limit price pegs to the bid for buys and the ask for sells. When urgency exceeds 0.7 it moves into the spread by 0.2⋅spread⋅u0.2 \cdot \mathrm{spread} \cdot u, and at u≥0.85u \ge 0.85 the order becomes a market order. Depth imbalance over the top 5 levels feeds a score the code calls supercurrent.
Time-decaying take-profit schedule
The take-profit target is 0.85% for the first 60 s, 0.45% up to 180 s, 0.22% up to 300 s and 0.05% after that. The stop-loss sits at the negative maximum drawdown of 1.8%. The class uses a 300 s horizon while the configuration sets 180 s.
Lot-size step quantization
Order quantity is floored to a multiple of the exchange step, Q(q,s)=⌊q/s⌋⋅sQ(q, s) = \lfloor q/s \rfloor \cdot s. Decimal precision is round(−log⁡10s)\mathrm{round}(-\log_{10} s) when s<1s < 1 and 0 otherwise, so orders satisfy lot-size filters.
Stale limit order cancel and re-peg
A resting order is cancelled when its age exceeds UNFILLED_ORDER_TIMEOUT_SEC (45 s) and the price has moved more than 0.35% from the order price. The freed cash is used for new top-of-book orders on later cycles.
Fixed-rate polling loop
After each symbol sweep the daemon sleeps 1/f1/f with ff set by GAMMA_ENTRAINMENT_HZ at 40 Hz, that is 25 ms. Balances sync every 3 s and telemetry is logged every 400 iterations. Tick volume is synthetic, computed as 5 plus the iteration count modulo 10.
HMAC-SHA256 request signing
Each authenticated request adds a server timestamp, computes an HMAC-SHA256 of the urlencoded query with the secret key, appends it as a signature parameter and sends the API key in a request header.
Ring-buffer tick memory
Tara08DSolitonMemory keeps a fixed-capacity numpy ring buffer of 10000 by 8 tick vectors. It reports the mean state and its squared norm, which the code names soliton energy.
Trades ledger schema
The ledger table holds id, timestamp, symbol, side, price, quantity, cost in USDT, profit in USDT, strategy, status and a column symplectic_det_j. The dashboards read realized profit, win rate and volume from it.

Results

From the lab's own experiments and records. They have not been independently replicated.

  1. Physics labels do not match the computations

    The lab's code review found that the Ramanujan Delta filter computes a fixed harmonic-weighted dot product, the Yang-Mills breakout computes a return z-score scaled by volume surge, and soliton energy is the squared norm of a mean vector.

  2. Holding horizon differs between code and configuration

    The exit rule module uses a 300 s horizon in its take-profit schedule, while the configuration sets the holding horizon at 180 s.

  3. No measured trading performance is recorded

    The system's records contain no backtest or evaluation run. Tick volume inside the polling loop is synthetic, and one script produces randomly generated profits without placing orders.

Concepts

Minimum notional
The smallest order value an exchange accepts, set at 5 USDT in the configuration. Orders below it are refused, which is why the recycler and allocator check it.
Closed-loop liquidity recycling
The rule that when free USDT drops below the minimum notional, existing holdings worth at least 5 USDT are sold back to USDT, largest first, and the cash is redeployed into new signals.
Step-size quantization
Exchanges accept quantities only in multiples of a fixed step. Flooring each quantity to that step, with matching decimal precision, prevents orders from being refused for invalid size.
Maker order
A limit order that rests on the book at or near the best price instead of crossing the spread. The execution pricer places maker orders unless urgency is high.
Order-book imbalance
The ratio or normalised difference between total bid and total ask volume over the top levels of the book, used here as a signal of one-sided pressure.
Funding-rate arbitrage
A delta-neutral position, long spot and short perpetual future, that earns the periodic funding payment. The system only computes the annualised yield and flags it.
Triangular arbitrage
A mismatch between a direct exchange rate and the rate implied by two other pairs, here BTC, ETH and USDT.
The 15 yantras hierarchy
The naming scheme of the design specification, which labels modules with dimensions from 3D to 26D and arranges them as a nine-stage pipeline. The labels do not describe the computations.

About this page

Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.

Market results here are backtests and logs kept by the lab. Nothing on this page is financial advice.

Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.