This document is confidential and covered by NDA. Enter the access code to continue.
Five-layer end-to-end system specification covering the VCSE signal engine, signal validation, trade construction, order management, and PnL attribution. Internal use only — NDA required.
Every deliverable in this document is assigned to a primary owner. Colour coding is used consistently throughout.
| Component | Primary Owner | Supporting | Status |
|---|---|---|---|
| Backend infrastructure & DevOps | Sam | — | Active |
| Dashboard (frontend) | Sam | Senior Quant | Live |
| VCSE research & methodology | Sam | Senior Quant | In Progress |
| Shared data backbone (DB, event bus) | Sam | Senior Quant | Build |
| Market scanner | Senior Quant | Sam | Partial |
| L1 Signal pipeline (VCSE → event store) | Senior Quant | Sam | Build |
| L2 Signal validation & confluence scoring | Engineer 2 | Senior Quant | Build |
| L3 Trade construction engine | Senior Quant | Sam | Build |
| L4 OMS & order routing | Sam | Senior Quant | Build |
| L4 Bankroll management model | Senior Quant | Sam | Build |
| Options pricing & vol engine | Engineer 1 | Senior Quant | Deribit TBD |
| L5 PnL attribution & feedback loop | Senior Quant | Sam | Build |
| Kraken API integration | Sam | — | Partial |
| Deribit integration | Engineer 1 | Sam | Pending account |
One pipeline, five layers. A validated signal flows from detection through construction, execution, management, and close — with every event logged to a shared data backbone. The loop closes by feeding trade outcomes back into signal quality scoring.
| Component | Status | Notes |
|---|---|---|
| Dashboard (React frontend) | Live | Dark theme, admin routes, 5s polling, risk aggregator |
| BingX + Binance APIs | Live | Position feeds, partial execution, real-time data |
| VCSE Research Paper | Complete | v0.1 Architecture Draft — April 2026 |
| Jupiter–Saturn PineScript Indicator | Built | v3.0 with 20 aspects, retrograde, projection |
| Planet Ingress PineScript Indicator | Built | MFE/MAE stats per transit |
| Live risk aggregator | Live | Leverage, liquidation distance, VaR, VCSE overlay |
| Kraken API | Partial | Account live, full integration needed |
| VCSE ML pipeline | In Progress | Paper complete, XGBoost baseline underway |
| Market scanner | Partial | Running; output standardisation needed |
| Shared event store (DB backbone) | Build | Priority zero — blocks all other layers |
| L2 Confluence scoring engine | Build | Owned by Engineer 2 |
| L3 Trade construction | Build | Decision tree + sizing |
| OMS (unified order router) | Build | BingX + Binance + Kraken |
| Bankroll management model | Build | Kelly / fractional sizing |
| Options pricing & vol engine | TBD | Owned by Engineer 1, blocked until Deribit live |
| Deribit integration | TBD | Account setup pending |
| L5 PnL attribution | Build | Signal feedback loop |
The single most important infrastructure piece. Every layer reads from and writes to it. Build this before any other layer.
| Table | Purpose | Written by | Read by |
|---|---|---|---|
signals | Every signal from any source with metadata | L1 | L2, L5 |
validated_signals | Signals that passed L2 with confluence score | L2 | L3 |
trade_plans | Constructed trades: instrument, size, entries, stops, targets | L3 | L4 |
orders | Every order sent to any exchange (all states) | L4 | L4, L5 |
positions | Live position state synced from exchanges every 5s | L4 | L4, L5, Dashboard |
trades_closed | Completed trades with full PnL and attribution | L5 | L1, L5, Dashboard |
events | Append-only audit log of every system event | All layers | All layers |
portfolio_state | Current snapshot: capital, exposure, drawdown, allocation | L4 | L3, L4, Dashboard |
vcse_snapshots | Daily PSV(t) computed by ephemeris pipeline | VCSE engine | L1, L2 |
Structured data (trades, orders, positions) in Postgres. TimescaleDB extension for time-series (signals, events, VCSE snapshots) — fast time-range queries without a separate TSDB. Primary data store for all layers.
Current position state, live risk metrics, active alerts. This is what the dashboard polls every 5 seconds. Also serves as Celery broker for background task queuing. Sub-millisecond reads for live trading.
Background jobs: signal scoring, PnL calculation, VCSE ephemeris updates, model inference. Decouples heavy computation from API request cycles. Workers can be scaled horizontally.
Cross-layer event emission. A validated signal emits signal_validated; L3 listens and builds a trade plan; L4 listens and stages orders. Enables async pipeline without tight coupling.
VCSE engine computes daily PSV(t)
→ writes to vcse_snapshots table
→ detects inflection window (P_inflection > 0.65)
→ writes to signals table { source: "vcse", confidence: 0.78, direction: "short" }
→ emits event: "signal_created"
L2 listener picks up "signal_created"
→ scores confluence across all inputs
→ writes to validated_signals { score: 0.84, recommendation: "high_conviction" }
→ emits event: "signal_validated"
L3 listener picks up "signal_validated"
→ queries portfolio_state (available capital, open exposure)
→ constructs trade plan { instrument: "perp", exchange: "binance", size: $12k, lev: 3x }
→ writes to trade_plans
→ emits event: "trade_plan_ready"
→ TODAY: Sam reviews on dashboard and approves
→ FUTURE: auto-approve if score > 0.80 and within bankroll limits
L4 OMS sends orders to exchange
→ writes to orders table (status: "pending")
→ monitors fills → updates orders (status: "filled")
→ writes to positions table
→ updates portfolio_state and Redis cache
L5 detects position close event
→ writes to trades_closed with full attribution
→ computes signal source accuracy
→ updates VCSE signal quality score in signals table
→ loop feeds back into L1 confidence calibration
Provisions Postgres + TimescaleDB + Redis. Manages server sizing, backups, API keys, secrets management. Defines deployment environment.
Defines all table schemas, column types, indices. Writes migration scripts. Ensures schemas support all downstream query patterns across all five layers.
A quantitative ML framework treating planetary positions as a structured, deterministic feature space. Not a metaphysical system — a correlational and empirical one. Full specification: VCSE Research Paper v0.1, March 2026.
Financial astrology is the practice of correlating planetary cycles with market behaviour. It has been documented in academic and practitioner research for over a century — not as a mystical claim, but as the observation that planetary cycles produce measurable, recurring periodicities that overlap with cycles in human sentiment and economic activity. The mechanism hypothesis is straightforward: markets are driven by collective human psychology, and if planetary cycles correlate with recurring shifts in that psychology, they carry statistical signal regardless of the reason.
The field was formalised in the 20th century by researchers including W.D. Gann, who embedded cycle analysis into his trading methodology, and has since been extended quantitatively by Merriman, Pesavento, and Adkins, who documented statistically significant correlations between specific planetary configurations and commodity price extremes across multi-decade datasets. The VCSE is a modern, ML-native continuation of this lineage — replacing manual interpretation with a calibrated probabilistic model trained on the full history of Bitcoin.
For engineers without an astrology background, these are the core structural concepts the system encodes:
The ecliptic (the Sun's apparent path through the sky) is divided into 12 equal 30° sectors, each named after a constellation. Every planet moves through all 12 signs continuously — the Sun completes one full cycle per year, Saturn takes 29.5 years. A planet's sign determines its elemental quality (Fire, Earth, Air, Water) and modality (Cardinal, Fixed, Mutable), which are encoded as categorical features.
Each planet has signs where it operates at maximum strength (domicile, exaltation) and signs where it is weakened (detriment, fall). Saturn in Capricorn (domicile) is at full strength; Saturn in Cancer (detriment) is at its weakest. These dignity states are encoded as a signed integer score (−2 to +2) and represent historically significant regime transition markers — particularly when slow-moving planets like Saturn or Jupiter change dignity state.
The moment a planet crosses a 30° sign boundary is called an ingress. For outer planets (Saturn, Jupiter, Uranus), ingresses are rare, multi-year events that historically mark macroeconomic regime shifts. For inner planets (Sun, Mercury, Venus, Mars), ingresses occur weekly to monthly and provide shorter-term timing signals. The VCSE treats ingresses as discrete regime transition events and labels them in the training data.
When two planets form specific angular separations as viewed from Earth, they are said to be "in aspect." The primary aspects are conjunction (0° — same position), opposition (180° — directly opposite), trine (120° — harmonious), square (90° — tension), and sextile (60° — mild support). Hard aspects (conjunction, opposition, square) correlate historically with increased volatility and trend reversals. Soft aspects (trine, sextile) correlate with smoother, lower-volatility regimes.
Due to the geometry of planetary orbits, planets periodically appear to move backward through the zodiac from Earth's perspective. Mercury goes retrograde roughly three times per year; Saturn and Jupiter retrograde annually for months at a time. Retrograde periods are encoded as binary flags and have historically correlated with increased indecision, reversals, and volatility in speculative markets — particularly Mercury retrograde overlapping with key technical levels.
An aspect is "applying" when two planets are converging toward an exact angle, and "separating" once they have passed exactness and are moving apart. Applying aspects are treated as leading indicators — the energy is building. Separating aspects are treated as lagging — the event has already peaked. This distinction allows the model to differentiate between an incoming inflection and one that has already resolved, which is critical for timing precision.
Three properties make planetary data unusual as a feature set and difficult to arbitrage away:
Unlike price-derived indicators (RSI, moving averages), planetary positions are computed from orbital mechanics and carry zero look-ahead bias — they can be calculated for any future date without reference to price data. This eliminates the feature leakage that plagues most technical indicator models and provides genuine forward-looking predictive power. The feature space is also fully deterministic and reproducible: given the same date, every engineer running the pipeline will compute identical features via the Swiss Ephemeris (pyswisseph), the same VSOP87-based astronomical engine used by professional observatories.
At any bar, all 10 bodies are encoded as a structured feature vector. The concatenation of all per-planet features plus aspect and aggregate dimensions produces 200+ features total.
PSV(t) = [ f_Sun(t), f_Moon(t), f_Mercury(t), ... , f_Pluto(t), A(t), E(t) ] where: f_p(t) = per-planet feature sub-vector (sign, dignity, position, speed, retrograde) A(t) = 45-pair aspect matrix (all C(10,2) unique planet pairs) E(t) = elemental & modal aggregate statistics
| Feature | Description | Encoding |
|---|---|---|
sign_idx | Zodiac sign: 0=Aries … 11=Pisces | OHE / embed |
dignity_score | Domicile +2, Exaltation +1, Detriment −1, Fall −2, neutral 0 — measures planetary strength | Ordinal int |
deg_in_sign | Degrees elapsed in current sign (0.0 – 30.0) | Continuous |
pct_in_sign | Percent through current sign (0–100) | Continuous |
days_since_ingress | Calendar days since last sign boundary crossing | Continuous |
is_retrograde | Planet moving retrograde at time t — retrograde often signals reversals | Binary |
element_idx | Fire=0, Earth=1, Air=2, Water=3 — elemental quality of sign | Categorical |
modality_idx | Cardinal=0 (initiating), Fixed=1 (sustaining), Mutable=2 (transitioning) | Categorical |
lon_sin / lon_cos | Circular encoding of ecliptic longitude — preserves cyclical continuity across 360° | Continuous ×2 |
speed_norm | Daily angular velocity normalised to planet mean speed — captures acceleration / deceleration | Continuous |
Beyond sign placement, planets form angular relationships that carry independent predictive signals. At every bar, all C(10,2) = 45 unique planet pairs are evaluated for active aspects across 13 aspect types: conjunction (0°), opposition (180°), trine (120°), square (90°), sextile (60°), and 8 minor aspects. Each pair encodes orb, applying/separating direction, and orb-as-percentage-of-max.
| Feature | Description | Dim |
|---|---|---|
aspect_type[i,j] | 0=none, 1=conjunction, 2=opposition, 3=trine, 4=square, 5=sextile, 6–13=minor aspects | 45 categorical |
orb[i,j] | Angular distance from exact aspect in degrees | 45 continuous |
orb_pct[i,j] | Orb as fraction of allowed maximum (0–1). Tighter orb = stronger signal | 45 continuous |
applying[i,j] | Boolean: planets converging toward exact angle. Weighted more heavily in model | 45 binary |
n_active_aspects | Total active aspects at time t across all 45 pairs | 1 count |
n_hard / n_soft | Hard (conj/opp/square) vs soft (trine/sextile) counts — hard aspects correlate with volatility | 2 count |
tension_score | Weighted sum: hard aspects +1, soft aspects −0.5 — net sky tension index | 1 continuous |
jup_sat_angle | Raw Jupiter–Saturn separation 0–180°. Historical top predictive signal in BTC backtests | 1 continuous |
saturn_aspect_active | Boolean: Saturn in any active aspect. Saturn aspects consistently flag high-volatility windows | 1 binary |
A planetary ingress — the moment a planet crosses a 30° zodiac boundary — is treated as a discrete regime transition event. Empirically, ingresses by Saturn, Jupiter, and Mars into dignity-relevant signs (domicile or fall) show statistically elevated MFE and MAE in BTC backtests. The PineScript Ingress Indicator already built for this framework provides the full historical dataset of all ingress events with per-transit returns, MFE, MAE, retrograde status, and dignity context — forming the labelled training set for supervised models.
Validated example: Saturn ingressed Capricorn (domicile — maximum dignity) on December 17, 2017. This coincided with the exact BTC all-time high of that cycle. Used as an ephemeris validation checkpoint.
| Feature | Description |
|---|---|
ingress_today[p] | Binary: planet p ingressed on this bar |
ingress_into_dignity[p] | Ingress into domicile or exaltation — historically strongest signal events |
ingress_into_weakness[p] | Ingress into detriment or fall — also historically significant |
n_ingresses_7d | Count of any-planet ingresses in past 7 days — ingress clustering flags transition zones |
slow_planet_ingress_90d | Boolean: Saturn/Uranus/Neptune/Pluto ingressed in past 90 days — slow planet ingresses define multi-month regimes |
saturn_days_in_sign | Days Saturn has been in current sign (0 – ~900) — position within its 2.5yr sign transit |
moon_sign_idx | Moon's current sign — changes every ~2.5 days, adds short-term timing layer |
| Feature | Description |
|---|---|
n_fire / n_earth / n_air / n_water | Planet count in each element at time t — elemental dominance affects market temperament |
n_cardinal / n_fixed / n_mutable | Planet count in each modality — cardinal = trend initiation, fixed = trend continuation, mutable = reversals |
n_domicile / n_exalted | Planets in strongest dignity positions — high counts indicate collectively "strong" sky |
n_detriment / n_fall | Planets in weakest dignity positions — associated with disruption and volatility |
dignity_sum | Net celestial strength: sum of all 10 dignity scores. Range: −20 to +20 |
n_retrograde | Total planets retrograde simultaneously — high counts historically correlate with confusion / reversal |
mutual_reception | Pairs where each planet is in the other's domicile sign — mutual support between planets |
stellium_size | Largest cluster of planets sharing one sign — stelliums concentrate energy and are historically significant |
Tree-based models as the primary interpretability layer. Handles mixed feature types natively, robust to collinearity, produces SHAP values revealing exactly which planetary combinations drive each prediction. Objective: binary:logistic. Class balance via scale_pos_weight (inflection events are ~15% of bars). Regularisation tuned via Bayesian optimisation (Optuna). This is the layer that proves or disproves the hypothesis.
Captures long-range sequential dependencies in planetary cycles — a Saturn ingress 60 days after a Jupiter–Saturn square carries different weight than one in isolation. 60–90 day lookback window. Positional encoding seeded with known cycle periods (Saturn=29.5yr, Jupiter=11.86yr, Mars=1.88yr) rather than learned — embeds domain knowledge directly, reducing training data requirements dramatically.
Stacks Stage 1 and Stage 2 using a logistic regression meta-learner trained on out-of-fold predictions. Final probabilities calibrated with isotonic regression — a predicted 70% inflection probability must correspond to an actual 70% historical hit rate. Uncalibrated probabilities cause systematic over/under-betting regardless of model accuracy. Essential for Kelly-based position sizing.
Standard k-fold cross-validation violates the temporal structure of financial data. The VCSE uses expanding-window walk-forward validation with a 90-day purging embargo between each training cutoff and test period — preventing leakage through overlapping multi-day return windows (López de Prado, 2018).
| Fold | Training Period | Embargo | Test Period |
|---|---|---|---|
| 1 | Oct 2013 – Dec 2016 | 90 days | Mar 2017 – Dec 2017 |
| 2 | Oct 2013 – Dec 2017 | 90 days | Mar 2018 – Dec 2018 |
| 3 | Oct 2013 – Dec 2018 | 90 days | Mar 2019 – Dec 2019 |
| 4 | Oct 2013 – Dec 2019 | 90 days | Mar 2020 – Dec 2020 |
| 5 | Oct 2013 – Dec 2020 | 90 days | Mar 2021 – Dec 2021 |
| 6 | Oct 2013 – Dec 2021 | 90 days | Mar 2022 – Dec 2022 |
| 7 | Oct 2013 – Dec 2022 | 90 days | Mar 2023 – Dec 2023 |
| 8 (OOS) | Oct 2013 – Dec 2023 | 90 days | Mar 2024 – Present (live) |
| Metric | What It Measures |
|---|---|
| AUC-ROC | Discrimination: model correctly ranks bullish vs bearish bars |
| Precision-Recall AUC | More informative than ROC for rare events (~15% inflection rate) |
| Brier Score | Calibration: how well predicted probabilities match actual frequencies |
| Matthews Correlation Coeff. | Balanced accuracy for binary classifiers under class imbalance |
| Simulated Sharpe Ratio | Signal-weighted P&L divided by daily return volatility |
| Profit Factor | Gross wins ÷ gross losses — directly comparable to trading edge |
| Max Drawdown (simulated) | Worst peak-to-trough on signal-generated positions across all folds |
| SHAP Stability Index | Consistency of feature importance rankings across all folds |
All outputs are calibrated probabilities or continuous scores — not binary buy/sell signals. This supports position-sizing decisions in L3 and bankroll management in L4.
Calibrated probability that bar t falls within a ±N bar window of a local price extreme (reversal or acceleration). Threshold guidance: P > 0.65 = high-conviction inflection window; 0.45–0.65 = moderate; P < 0.45 = trend regime favoured. Strongest signals historically coincide with slow-planet ingresses into dignity-relevant signs + active hard aspects between Jupiter and Saturn.
Computed as B(t) = 2 × P(return > 0) − 1, where P is the calibrated probability from the direction classifier. B = +1.0 is maximum bull conviction; B = −1.0 is maximum bear. Can be used directly for exposure scaling: long exposure = max(0, B(t)), short exposure = max(0, −B(t)). Horizon: 3–30 day forward return.
Three-class label for expected volatility over the next 14 days. Low regime: favour mean-reversion, tighter stops. High regime (typically Saturn/Uranus applying squares, multiple retrogrades, Moon in cardinal signs): favour wider stops, reduced leverage, trend-following over mean reversion. Direct input to L3 trade construction decision tree.
| Stage | Process | Libraries | Output |
|---|---|---|---|
| 1 Ingest | Pull OHLCV from Kraken / Binance REST APIs. Validate gaps, outliers. Daily primary; hourly secondary for timing precision. | ccxt, pandas | Raw OHLCV DataFrame |
| 2 Ephemeris | Compute 10-planet longitudes, speeds, retrograde flags at each timestamp. pyswisseph queried at 00:00 UTC per bar. | pyswisseph | Planet position array |
| 3 Ingress | Detect sign changes, compute dignity, days in sign, MFE/MAE per transit. | pandas, numpy | Ingress event table |
| 4 Aspects | Evaluate 45 pairs × 13 types: orb, applying/separating, tension score. Vectorised. | numpy | Aspect matrix N×45×4 |
| 5 Aggregates | Element/modal counts, dignity sum, mutual receptions, stellium detection. | pandas | Aggregate feature columns |
| 6 Targets | Forward returns, vol, drawdown, MFE/MAE, inflection labels for every bar. | pandas, scipy | Target variable columns |
| 7 Store | Merge all features. Save to Parquet + TimescaleDB for fast indexed queries. | pyarrow, sqlalchemy | Master feature store |
| 8 Split | Temporal walk-forward splits with 90-day purging embargo per fold. | mlfinlab, sklearn | Train / validation sets |
The pipeline is asset-agnostic — only the OHLCV source changes. Expanding to additional assets both validates the cross-market hypothesis and dramatically increases statistical power for slow-planet features where BTC history alone provides insufficient cycles.
| Asset | Data from | Why |
|---|---|---|
| ETH/USD | Jul 2015 – Present | Shares BTC market cycle structure. Unique natal chart (Jul 30, 2015). Cross-asset validation. |
| Gold (XAU/USD) | 1975 – Present | 50+ years provides multiple Saturn full cycles — dramatically increases slow-planet statistical power. |
| S&P 500 (SPX) | 1950 – Present | Validates that planetary signals are not BTC-specific artifacts but reflect broader market psychology. |
| Crude Oil (WTI) | 1983 – Present | Commodity with well-documented sensitivity to Saturn–Jupiter cycles. Strong academic literature support. |
| DXY (USD Index) | 1971 – Present | Macro regime indicator. Saturn–Capricorn periods historically correlate with USD strength. |
Sam owns the astro research framework and signal definitions. Defines what constitutes a valid VCSE signal. The research paper is the canonical reference.
Leads the XGBoost baseline, walk-forward CV, SHAP analysis, Transformer architecture, and ensemble calibration. Directs Engineer 2 on integrating VCSE outputs into L2.
Three signal sources producing a unified output format. Each fires independently; confluence scoring happens in L2. All signals are written to the signals table on the shared event store.
Primary signal source. Produces P_inflection, B(t), and V(t) daily from the PSV(t) feature vector. Pipeline: ccxt OHLCV → pyswisseph ephemeris → feature assembly → XGBoost/Transformer ensemble → calibrated outputs. Needs: automated daily ephemeris runner that writes to vcse_snapshots and emits signals to the event store.
Technical signal source operating independently of VCSE. Currently running in dashboard. Gap: Output must be standardised into the unified signal schema before being written to the event store. Scope to define: is it scanning for technical setups (breakouts, divergences), or market microstructure (funding rates, OI, volume anomalies), or both?
Third signal source, owned by Engineer 1. Blocked until Deribit account is active. Will produce: IV surface signals (skew, term structure), vol regime transitions, and premium dislocations. Even pre-Deribit, Deribit's public API can be used for vol data as a signal input to existing perp trades.
{
id: "sig_20260417_vcse_001",
timestamp: "2026-04-17T00:00:00Z",
source: "vcse" | "scanner" | "vol_engine" | "manual",
type: "inflection" | "breakout" | "divergence" | "vol_regime" | "funding_extreme",
asset: "BTC" | "ETH" | ...,
direction: "long" | "short" | "neutral",
timeframe: "4h" | "1d" | "1w",
confidence: 0.0 – 1.0, // calibrated probability from model
metadata: {
// VCSE: P_inflection, B(t), V(t), active aspects, dignity sum, jup_sat_angle
// Scanner: pattern type, key levels, volume context
// Vol: IV percentile, skew, term structure shape
},
expires_at: "2026-04-19T00:00:00Z" // signals have a validity window
}
Build adapters that take raw VCSE outputs, scanner outputs, and vol engine outputs and write standardised signals to the event store. Define confidence scoring per source type.
Once Deribit is live: IV surface computation, skew analysis, term structure signals. Short-term: build vol signal layer using Deribit public API data even before trading account is active.
Owned by Engineer 2, directed by Senior Quant. The goal is not noise filtering — it's scoring the strength of agreement across all signal sources so L3 knows how aggressively to size and structure the trade.
| Input | Initial Weight | What it checks |
|---|---|---|
| VCSE inflection probability | 0.25 | P_inflection threshold crossed; B(t) direction aligns with proposed trade |
| VCSE volatility regime | 0.15 | V(t) regime compatible with trade structure (expanding for directional, contracting for mean reversion) |
| Scanner technical signal | 0.25 | Breakout, divergence, or setup aligns with direction and timeframe |
| Volatility / options signal | 0.15 | IV expanding or cheap (good for directional); skew supports direction |
| Funding & sentiment | 0.10 | Funding rate extreme, OI structure, liquidation cascade risk |
| Macro alignment | 0.10 | DXY, rates, risk-on/off environment supports trade direction |
{
signal_id: "sig_20260417_vcse_001",
confluence_score: 0.84,
recommendation: "high_conviction", // high_conviction | standard | reduced | pass
direction_consensus: "short", // do sources agree on direction?
conflict_flag: false, // true if sources disagree on direction
components: {
vcse_inflection: { score: 0.78, active: true, note: "P_inflection=0.72, B=-0.41" },
vcse_vol: { score: 0.75, active: true, note: "V=HIGH, tension_score=4.2" },
scanner: { score: 0.82, active: true, note: "4H breakdown below support" },
vol_signal: { score: 0.60, active: false, note: "Deribit TBD — using IV proxy" },
funding: { score: 0.70, active: true, note: "Longs overfunded at 0.08%" },
macro: { score: 0.65, active: true, note: "DXY strengthening" }
},
sizing_suggestion: "aggressive", // aggressive | standard | reduced | skip
trade_structure_hint: "perp_short" // first-pass instrument suggestion for L3
}
Builds and maintains the scoring engine. Implements the weight model, per-source adapters, conflict detection, and the validated_signals write path. Primary technical owner of this layer.
Directs Engineer 2 on architecture and scoring logic. Owns weight calibration using L5 attribution data. Responsible for backtesting the scoring model and validating it doesn't introduce its own leakage.
Defines initial weights based on trading experience. Defines the score thresholds for auto-advance vs manual review. Reviews and approves trade plans that flow from validated signals.
Given a validated signal, determine how to express the trade: which instrument, which exchange, what structure, what size. Instrument selection is driven by the VCSE V(t) regime, B(t) directional score, and available instruments per exchange.
| Instrument | Exchange | Use Case | Status | Owner |
|---|---|---|---|---|
| Perpetual futures | BingX, Binance, Kraken | Directional with leverage, delta-1 exposure, primary vehicle | Live | Sam |
| Spot | Kraken, Binance | Basis trades (spot + short perp), lower-risk directional | Available | Sam |
| Options | Deribit | Vol trades, hedging, defined-risk directional, premium selling | TBD | Engineer 1 |
| Basis / cash-and-carry | Spot + Perp | Market-neutral funding rate capture | Can build | Senior Quant |
validated_signal arrives { direction, confluence_score, V(t), B(t) }
│
├─ HIGH CONVICTION DIRECTIONAL (score > 0.80, |B(t)| > 0.6)
│ ├─ V(t) = HIGH → Perp (leveraged, 3–5x) + OTM option hedge (when Deribit live)
│ ├─ V(t) = MEDIUM → Perp (moderate leverage, 2–3x) + defined stops
│ └─ V(t) = LOW → Perp (conservative, 1–2x) or spot directional
│
├─ STANDARD CONVICTION (score 0.65–0.80)
│ ├─ Directional → Perp (reduced leverage), tighter sizing from bankroll module
│ └─ Neutral → Wait for stronger confluence or vol trade when Deribit live
│
├─ VOL PLAY (V(t) signal strong, |B(t)| < 0.3)
│ ├─ Vol cheap (IV low percentile) → Long straddle / long gamma [Deribit]
│ ├─ Vol rich (IV high percentile) → Short premium / iron condor [Deribit]
│ └─ Skew dislocated → Risk reversal / collar [Deribit]
│
└─ FUNDING / BASIS PLAY (funding rate extreme flag from L2)
├─ Funding positive extreme → Long spot + short perp (earn funding)
└─ Funding negative extreme → Short spot + long perp (earn funding)
Before constructing the trade, L3 queries portfolio_state. No trade plan is generated unless bankroll rules are satisfied.
{
signal_id: "sig_20260417_vcse_001",
plan_id: "plan_20260417_001",
created_at: "2026-04-17T08:15:00Z",
instrument: "perp",
exchange: "binance",
asset: "BTC",
direction: "short",
leverage: 3.0,
size_usd: 12000,
entry_zone: { low: 83500, high: 84200 },
stop_loss: 85800,
targets: [
{ price: 79500, exit_pct: 50, note: "first target" },
{ price: 76000, exit_pct: 50, note: "full exit / VCSE window close" }
],
risk_reward: "1:2.6",
max_loss_usd: 600,
max_loss_pct: 1.5,
confluence: 0.84,
sizing_basis: "confluence_scaled",
expires_at: "2026-04-19T00:00:00Z",
status: "pending_approval" // → approved → executing → active
}
Builds the instrument selection logic and sizing formulas. Backtests different structure choices against historical signal data. Owns the interaction with the bankroll module.
Once Deribit is live: options strategy selection (straddle, collar, risk reversal), strike/expiry selection logic, and options-specific sizing (premium budget, delta target). Interfaces with vol engine outputs.
Defines the bankroll parameters (max risk per trade, max portfolio heat, leverage limits) that L3 queries. Approves trade plans via dashboard before L4 executes.
Three sub-systems: Order Management (OMS), active trade management, and bankroll management. Sam owns OMS infrastructure; Senior Quant owns the bankroll model.
Single Python/Node layer abstracting BingX, Binance, Kraken (and Deribit via Engineer 1). Accepts a trade plan from L3, translates to exchange-specific params via ccxt, sends, monitors fills, handles retries. Every order written to the orders table at every state transition.
Market, limit, stop-market, stop-limit, trailing stop, scaled entries (split entry across price range), bracket orders (entry + stop + TP as one unit). TWAP for larger orders. WebSocket fill monitoring for sub-second state updates across all exchanges.
| Rule | Parameter | Default |
|---|---|---|
| Max risk per trade | % of total equity | 1.5% (Sam to confirm) |
| Max portfolio heat | Total % of equity at risk simultaneously | 6% across all positions (Sam to confirm) |
| Max portfolio leverage | Aggregate weighted effective leverage | ≤ 5x (Sam to confirm) |
| Max concentration | Single position as % of capital | 25% (Sam to confirm) |
| Drawdown circuit breaker | % from equity peak | 10% → halt new trades 24h (Sam to confirm) |
| Correlation limit | Pairwise correlation threshold | If two positions correlation > 0.85, size as one |
| Confluence scaling | Size multiplier by score | Score 0.90+ = 100%, 0.75 = 70%, 0.65 = 50% |
| Win streak scaling | Modified Kelly adjustment | Scale up after edge confirmed, scale down after losses |
Builds and maintains the unified order router. Manages exchange API keys, rate limit handling, geo-routing (Binance US restrictions), WebSocket connections. Monitors OMS health via dashboard.
Implements Kelly / fractional sizing formula. Backtests against Sam's trade history to find optimal parameters. Builds the drawdown circuit breaker. Updates model parameters from L5 attribution data.
Deribit-specific order management: options order types, delta-hedge rebalancing, expiry management, exercise handling. Interfaces with the unified OMS router but owns Deribit-specific logic.
Defines all bankroll parameters above. These are Sam's rules — the system enforces them. Reviewed monthly using L5 attribution data and adjusted as fund AUM grows.
Closes positions, captures full PnL with fee and funding accounting, attributes performance to signal sources, and feeds results back into L1 and L2 to continuously improve signal quality and confluence weights.
| Trigger | Description | Action |
|---|---|---|
| Target hit | Price reaches TP level from trade plan | Partial or full exit per defined % |
| Stop-loss hit | Stop triggered by exchange | Full exit, log as loss with MFE recorded |
| Trailing stop | Dynamic stop triggered after favourable move | Full exit, capture profit vs original target |
| VCSE window close | P_inflection drops below 0.45 while trade is open | Tighten management; close if marginal P&L |
| Signal expiry | Trade plan expires_at timestamp reached | Alert Sam; close if no new signal confirmation |
| Time decay rule | Position open beyond max hold time with no movement | Reduce or close to free capital |
| Manual override | Sam closes via dashboard | Immediate close, flag as manual in attribution |
| Circuit breaker | Portfolio drawdown limit hit | Close all positions or reduce to target heat |
{
trade_id: "trade_20260417_001",
signal_id: "sig_20260417_vcse_001",
plan_id: "plan_20260417_001",
// Execution data
entry_price: 84050,
avg_exit_price: 79800,
size_usd: 12000,
leverage: 3.0,
exchange: "binance",
instrument: "perp",
direction: "short",
// Returns
gross_pnl: 1530.00,
exchange_fees: -52.40,
funding_paid: -18.20,
net_pnl: 1459.40,
return_pct: 12.16,
risk_adjusted: 2.43, // net_pnl / max_adverse_excursion
// Trade quality metrics
hold_time_hrs: 31,
max_favorable: 5.8, // % max move in favour during trade
max_adverse: -1.4, // % max drawdown during trade
exit_reason: "target_1_hit",
entry_vs_plan: "within_zone",
// Attribution feedback
confluence_at_entry: 0.84,
vcse_p_inflection: 0.72,
vcse_direction_correct: true,
vcse_vol_correct: true,
scanner_correct: true,
signal_source_scores: {
vcse: { accurate: true, contribution_est: 0.45 },
scanner: { accurate: true, contribution_est: 0.35 },
funding: { accurate: true, contribution_est: 0.20 }
}
}
This is the highest long-term value component of the system. Every closed trade creates data that improves signal detection and confluence weighting:
Builds the full PnL computation (gross, fees, funding), attribution model, and feedback loop. Monthly performance reports aggregating signal source accuracy and confluence effectiveness.
Uses attribution data for investor updates and LP reporting. "Our astro-technical confluence model: X% hit rate, Y Sharpe, Z max drawdown." PnL attribution is the quantitative narrative for fundraising.
Built on the existing dashboard (React + Python + Node hybrid). Node serves the API/WebSocket layer to the frontend; Python handles all quantitative work, exchange connectivity, and ML.
| Component | Language | Libraries / Tools | Notes |
|---|---|---|---|
| Frontend dashboard | React (TS) | Recharts / lightweight-charts, WebSocket, TailwindCSS, Radix UI | Live — extends with new panels per layer |
| API / WebSocket server | Node.js | Express or Fastify, ws, Redis pub-sub consumer | REST + WebSocket serving the React frontend |
| VCSE signal engine | Python | pyswisseph, pandas, numpy, XGBoost, LightGBM, PyTorch (Transformer) | Core of the system. Runs as daily Celery job |
| Market scanner | Python | ccxt, TA-Lib, pandas | Technical analysis scanning + signal standardisation |
| Options / vol engine | Python | QuantLib or py_vollib, scipy, numpy | Engineer 1 — blocked until Deribit live |
| L2 Confluence engine | Python | numpy, sklearn (future ML scoring) | Engineer 2 — rule engine + scoring model |
| L3 Trade constructor | Python | Custom rule engine, ccxt (exchange instrument info) | Decision tree + sizing formulas |
| OMS / order router | Python | ccxt (unified exchange API), asyncio, WebSocket clients | BingX + Binance + Kraken + Deribit (Eng-1) |
| Database | — | PostgreSQL + TimescaleDB extension | Structured + time-series. All layers read/write. |
| Real-time cache | — | Redis | Position state, live metrics, dashboard feed |
| Task queue | Python | Celery + Redis broker | Background jobs: VCSE daily run, PnL calc, scoring |
| ML interpretability | Python | SHAP TreeExplainer, Optuna (hyperparameter search) | VCSE model validation and feature importance |
| Feature store | Python | Apache Parquet (pyarrow), SQLite secondary | Master VCSE feature DataFrame persisted to disk |
| Backtesting validation | Python | mlfinlab (purged CV), sklearn, scipy | Walk-forward with 90-day embargo |
Five phases. Each phase produces a usable, integrated system that improves on the last. Do not start a phase until its dependencies are live.
Deliverables: Postgres + TimescaleDB deployed. Redis configured. Event bus wired. VCSE ephemeris runner automated (daily Celery job → vcse_snapshots). Market scanner output writing standardised signals to event store. Kraken fully integrated for position data.
Owners: Sam infra · Senior Quant schemas
Result: Every signal and every position flows through one system. Dashboard reads from it.
Deliverables: L2 confluence scoring engine live (Engineer 2). L3 trade plan generator (instrument selection, sizing, entries/stops/targets). Bankroll rules enforced. Trade plans visible on dashboard for Sam to approve.
Owners: Engineer 2 L2 · Senior Quant L3 · Sam review
Result: System says "here's the trade, here's why, here's the size." Sam approves or rejects.
Deliverables: Unified OMS across BingX, Binance, Kraken. Approved plans execute via API. Trailing stops, partial exits, time-based rules automated. Sam approves plan; system executes and manages.
Owners: Sam OMS · Engineer 1 Deribit (when live)
Result: You approve the plan. The system executes and manages. You monitor on dashboard.
Deliverables: Full PnL engine (fee + funding accounting). Signal attribution by source. Feedback loop updating L2 weights. Monthly performance reports. VCSE signal accuracy validated against live trades.
Owners: Senior Quant attribution model · Sam investor reporting
Result: Every trade improves the next. Investor-grade reporting. VCSE hypothesis validated or refined empirically.
Deliverables: High-confluence signals auto-execute within bankroll limits. Manual override always available. Options strategies live on Deribit (Engineer 1). ML-based L2 weight optimisation. VCSE Transformer stage in production.
Owners: All · Engineer 1 options · Sam system oversight
Result: The system trades. You manage the system. Sam shifts from operator to portfolio director.