Commit Graph
23 Commits
Author SHA1 Message Date
Claude e768be9ec9 Add Carry & RV Scanner: Deribit basis/funding, SVI rich/cheap net of bid/ask, parity and static-arb checks
- core/rv_scanner.py: futures basis curve and perp funding; options-implied forward vs listed
  future; raw-SVI residuals per option netted against half the bid/ask in vol (Black-76 coin
  inversion) and ranked by USD edge; coin-settled put-call parity with executable edge; vertical
  and butterfly static-arbitrage checks on marks and at the touch; VRP vs 30d realised.
- routers/rvscan.py: GET /api/rvscan/{BTC|ETH}, Deribit public API with 60 s cache, 503 on failure.
- RV Scanner tab: carry chart, smile-residual scatter with spread bars, trade ideas, expiry ladder,
  parity and static-arbitrage panel.
- Tests on a synthetic Black-76 book: parity/inversion, carry, clean book, planted mispricings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-25 05:15:57 +00:00
Claude fa335b5718 feat: Margin Desk — SPAN & portfolio margin, hike shocks, margin-call odds
CME SPAN-style 16-scenario scan risk with short-option minimum and COMEX
%-of-notional defaults, Deribit-style portfolio-margin risk matrix with
extended table and delta contingency, margin-hike shocks, liquidation
ladder and Monte-Carlo margin-call / liquidation probabilities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-23 05:12:18 +00:00
Claude e957475a66 feat: Smile Dynamics — SABR fits, Bartlett/sticky deltas, spot-vol regime
SABR (Hagan with Obloj leading term) per Deribit expiry or from ATM/RR/BF
quotes; forward deltas under sticky strike, sticky delta, SABR and Bartlett;
backbones vs the realised spot-vol beta from DVOL/GVZ/VXSLV with a regime
call and rolling correlation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-21 05:11:24 +00:00
Claude 3a29553495 feat: Positioning Desk — Deribit dealer GEX, gamma flip, walls, vanna/charm, max pain
Live BTC/ETH positioning from Deribit open interest: Black-76 Greeks on each
expiry's forward, dealer gamma exposure per 1% move under switchable dealer
conventions, gamma profile and flip level, call/put walls, vanna and charm
exposure, per-expiry max pain, ATM IV and implied moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-19 05:10:57 +00:00
Claude 8328114379 feat: AI Hedger — deep hedging (No-Transaction-Band net) under costs and jumps
Numpy-only deep hedging of a short call: a No-Transaction-Band network
trained by back-propagation through time and a feed-forward deep hedge,
both minimising CVaR, benchmarked out of sample against BS delta and a
tuned Whalley-Wilmott band, with regime-shift tests (vol up, crash jumps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-17 05:27:03 +00:00
Claude fb2b15c596 feat: TARF Desk — target redemption forwards under flat vol, SSVI-Dupire local vol and jumps
Importer/exporter TARFs with leverage and full/exact/no-payout targets,
priced by Monte Carlo on the forward under Black, Dupire local vol from an
arbitrage-free SSVI surface fitted to ATM/RR/BF, and Merton jumps:
zero-cost strike, model-risk spread, KO timing, expected cash flows, client
P&L tail and Greeks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-15 05:26:28 +00:00
Claude 1615dd6751 feat: Risk Desk — full-reval VaR/ES, stressed window, backtest, P&L explain
Option-book market risk on joint spot x implied-vol history (DVOL, GVZ,
VXSLV or EWMA proxy): HS, filtered HS, delta-gamma Cornish-Fisher,
Student-t Monte Carlo and delta-normal VaR 99% / ES 97.5% at 1 and 10
days; stressed 250-day window; rolling FHS backtest with Kupiec and
Christoffersen tests and Basel zones; spot x vol ladder; worst-day and
what-if Greek P&L explain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-13 05:25:43 +00:00
Claude 459cea18f0 feat: Event & Weekend Vol — vol-time term structure, event moves, forward vols
Strips FOMC/CPI/NFP variance lumps and the weekend weight out of the ATM
term structure (NNLS on total variance with a weekend-weight grid): live
Deribit fit for BTC/ETH, assumptions or broker quotes for metals/FX.
Event-implied moves, forward vols with calendar-arbitrage flags, fair vol
for any expiry, built-in 2026 FOMC/CPI/NFP calendar merged with live Forex
Factory events, and a realised day-of-week / FOMC-lump study.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-11 05:26:49 +00:00
Claude 78cd5c2ef7 feat: Exotics Desk — barriers (BGK), touches, smile digitals, DCI audit, accumulators
Reiner-Rubinstein/Haug single barriers with rebates and Broadie-Glasserman-Kou
discrete-monitoring correction, touch ladder, smile-consistent digitals on the
vanna-volga smile, Dual Currency Investment fair-APR ladder with offer audit
(platform margin, implied vol paid), and a KO accumulator Monte Carlo with
zero-cost strike and optional Merton jumps. Validated against Haug Table 4-13
and discrete Monte Carlo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-09 05:28:52 +00:00
Claude cb1723b6f2 feat: Jump Lab — Merton & Bates calibrated to the Deribit smile
- core/jump_models.py: Black-76 helpers and implied vol; Merton series in
  forward form (Poisson(lambda T) weights, F_n = F e^{-lambda k T}(1+k)^n);
  Bates characteristic function in the 'little Heston trap' form with COS
  pricing (puts + parity) and risk-neutral density; vega-weighted bounded
  least-squares calibration across expiries; jump statistics (crash-jump
  odds, jump share of variance) and density vs lognormal.
- GET /api/jumps/calibrate/{BTC,ETH}: fits both models to every Deribit
  expiry from the Vol Lab feed (cached 30 min, 503 when Deribit is down).
- POST /api/jumps/merton: manual Merton smile/density for metals and FX
  event and gap risk.
- Jump Lab tab: fit KPIs, market vs Merton vs Bates smiles per expiry,
  30-day density, parameter table, and a hand-off of the calibrated jumps
  to Hedge Lab (store.hedgeJump -> Hedge Lab defaults to the jump model).
- 5 tests: Black/Merton/Bates limits, parity, density mass and martingale,
  exact-MC Merton and Euler-MC Bates checks, parameter recovery (clean and
  noisy), Merton-vs-Bates misspecification, endpoints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-07 05:27:12 +00:00
Claude 042a11dc3f feat: Cross-Asset Desk — correlations, gold/silver ratio, Margrabe outperformance options
- core/xasset.py: common-calendar returns (yields as changes), rolling and
  EWMA correlation matrices, correlation-break monitor (z of 30D corr vs its
  own history); gold/silver ratio stats, OU half-life, Engle-Granger ADF
  cointegration (MacKinnon CVs), Kalman random-walk hedge ratio with centred
  regressor and data-scaled noise; Margrabe exchange option with deltas,
  ratio/leg vegas and analytic correlation sensitivity, plus an MC check.
- GET /api/xasset (yfinance, cached 30 min, 503 on failure) and
  POST /api/xasset/margrabe (ATM outperformance on notional, premium vs rho).
- Cross-Asset tab: GSR KPIs, ratio chart with 1Y bands + Kalman z, heatmap,
  break monitor, rolling correlations, Margrabe pricer for XAG/XAU, BTC/XAU,
  ETH/BTC.
- 5 tests: Margrabe vs MC / BS limit / parity / d rho, EG power and size, OU
  half-life, Kalman tracking, reports and endpoints on a synthetic market.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-05 05:25:22 +00:00
Claude 1eecc06bc2 feat: Hedge Lab — Monte Carlo delta-hedging / gamma-scalping P&L
- core/hedge_sim.py: vectorised Garman-Kohlhagen, self-financing delta hedge
  of the whole portfolio (legs settle at their own expiries) with domestic
  financing, foreign/lease carry and proportional costs; time-based or
  delta-band rebalancing.
- Path models: GBM, Merton jump-diffusion at equal total variance, and a
  stationary block bootstrap of the asset's own daily returns (Brownian-bridge
  intraday steps); Monday-open weekend gaps for 24/5 assets.
- Benchmarks: theoretical edge V(sigma_r)-V(sigma_i), Derman-Kamal
  discrete-hedging error, Leland cost; hedge-frequency sweep (risk vs cost).
- POST /api/hedge/simulate with work caps; bootstrap reuses cached history.
- Hedge Lab tab: scenario controls, 'use Vol Forecast' for realised vol,
  KPIs, P&L histogram, frequency sweep, attribution, sample paths.
- 7 tests: GK parity, unbiased fair-vol hedge with Derman-Kamal sd, mean
  P&L vs theoretical edge, sqrt(N) sweep, band/Leland costs, gaps/jumps
  tails, endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-03 05:25:36 +00:00
Claude c646e80e35 feat: Vol Forecast & Regime engine (HAR-RV, GJR-GARCH, gradient boosting, HMM)
- core/vol_forecast.py: forecasts average variance over the next 1D/1W/1M
  with HAR-RV (weekend dummy for 24/7 crypto), GJR-GARCH(1,1) QMLE with a
  vectorised filter, HistGradientBoosting on HAR/return/calendar features,
  and EWMA as benchmark. Garman-Klass + overnight-gap proxy scaled to
  close-to-close on pre-backtest data only.
- Rolling out-of-sample backtest (refit every 21 days, no look-ahead),
  QLIKE / RMSE / bias per model (Patton 2011), inverse-QLIKE ensemble.
- 2-state Gaussian HMM (Baum-Welch) regime probabilities and durations.
- For BTC/ETH: ensemble forecast vs Deribit ATM implied -> rich/cheap view.
- GET /api/vol/forecast/{pair} (cached 30 min; 503 when history is short
  or sources are down); scikit-learn added (models degrade gracefully
  without it).
- Vol Forecast tab: KPIs, forecast term structure vs implied, HMM regime
  history, OOS backtest vs realised (+DVOL), model leaderboard per horizon.
- 7 new tests on simulations with known answers (proxy bias, GARCH and HMM
  parameter recovery, weekend effect, look-ahead check, endpoint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-10-01 05:21:59 +00:00
Claude 88e4d48000 feat: BTC/ETH/XAG support and Vol Lab (live Deribit SVI surface, vol cone, VRP)
Volatile instruments
- Add XAGUSD (SI=F, silver lease rate as r_f), BTCUSD and ETHUSD end to end:
  pair metadata, live rates/OHLC/signals, CFTC positioning mappings
- Asset-class calendars: crypto annualised on 365 days, FX/metals on 252,
  threaded through the signal engine
- Pair switch loads a typical ATM vol, rescales legs by moneyness, and
  strategy templates use a ~1%-of-spot strike step

Vol Lab tab
- /api/vol/crypto/{BTC,ETH}: Deribit book summaries -> raw SVI fit per
  expiry with Durrleman butterfly-arbitrage check, ATM / 25d RR / 25d BF
  (Black-76 forward delta), DVOL, 30d constant-maturity IV, realised vol
  and vol risk premium; cached 60s, 503 when Deribit is unreachable
- /api/vol/cone/{pair}: Burghardt-Lane realised-vol cone on the asset's
  calendar
- UI: KPIs, cone with implied term-structure overlay, per-expiry smile
  (market vs SVI), term-structure table with 'Use' to load T/sigma/RR/BF
  into pricing and the Vol Smile tab

Fixes in the signal engine
- OU half-life divided by 252 twice; stationary sd used sqrt(252k) not sqrt(2k)
- Fallback realised vol returned decimals under *_pct keys

Tests: backend/tests (pytest) validate SVI recovery, exact 25d strikes,
cone calibration on both calendars and the endpoints with mocked feeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-09-29 05:17:14 +00:00
Claude 23a5a975ff feat: Vanna-Volga FX volatility smile tab
Builds the implied-vol smile from the three standard FX market quotes
(ATM delta-neutral straddle, 25-delta risk reversal, 25-delta butterfly)
using Castagna & Mercurio's second-order Vanna-Volga approximation, and
reprices each portfolio leg off the smile vs the flat vol.

- backend: core/vanna_volga.py (delta->strike, DNS ATM, VV smile) and
  POST /api/smile
- frontend: new "Vol Smile" dashboard tab with quote inputs, smile
  chart, pillar table and smile-vs-flat leg repricing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
2026-09-28 16:45:11 +00:00
KansaramandClaude Sonnet 4.6 c3c8cd8f98 feat: add logout button to navbar
Clears session and returns user to login page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 13:21:34 +05:30
Kansaram c0bf6a9416 fix: update login username to nexus.quant 2026-06-08 13:20:41 +05:30
KansaramandClaude Sonnet 4.6 c24bd6dd44 feat: vivid neon glowing forex cards on login background
High-opacity cards with neon borders, glow shadows, area-fill sparklines,
glowing price text, color-coded badges, floating quant data particles.
Login card has gradient border glow animation + stronger backdrop blur.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 13:10:50 +05:30
KansaramandClaude Sonnet 4.6 4971ddceaf feat: animated forex cards background on login page
Canvas animation with 14 floating forex pair cards (price + sparkline chart),
30 floating data particles, grid overlay and center glow radial gradient.
Cards drift upward with sine-wave wobble. Login card has backdrop-blur overlay.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 12:44:38 +05:30
KansaramandClaude Sonnet 4.6 09488edeb1 feat: add terminal-style login page with LinkedIn DM for credentials
Static auth (no DB) — users must DM on LinkedIn to get access.
Animated NEXUS login card with scanline effect, shake on wrong creds,
LinkedIn button linking to mihir-kansara-043275187 profile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 12:32:41 +05:30
KansaramandClaude Sonnet 4.6 e0bc00265a fix: rename footer from QUANTRISK FX to NEXUS TERMINAL, add copyright
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 19:31:21 +05:30
KansaramandClaude Sonnet 4.6 aaa0acf64b chore: prepare for Vercel + Koyeb deployment
- API base URL now reads from VITE_API_URL env var (frontend)
- WorldMap localhost URLs replaced with env-aware API constant
- Added httpx to backend requirements (live data proxy)
- Added Procfile for Koyeb backend deployment
- Added vercel.json for frontend SPA routing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 18:46:51 +05:30
KansaramandClaude Sonnet 4.6 61e145a442 feat: launch NEXUS TERMINAL — Bloomberg-style FX options analytics platform
Full-stack forex options analytics terminal with Bloomberg-inspired UI.

Backend (FastAPI + Python):
- Garman-Kohlhagen options pricing engine with full Greeks
- Goldman Sachs gs-quant AI signals (RSI, MACD, Bollinger, Hurst, OU)
- Monte Carlo GBM simulation and volatility surface generation
- CFTC COT institutional positioning + Forex Factory economic calendar
- Live data proxy: OpenSky aircraft + USGS earthquakes (CORS-safe)
- Multi-leg strategy library (straddle, iron condor, butterfly, spreads)

Frontend (React 18 + Vite):
- NEXUS animated orbital logo (3-ring SVG) + canvas favicon animation
- Bloomberg terminal design: JetBrains Mono, color-mix() tokens
- 11 dashboard tabs: Greeks, Chart, AI Signals, 3D Surfaces, Breakeven,
  Scenarios, Monte Carlo, Institutional, Calendar, Live Map, Live Feeds
- Live World Map (react-leaflet): aircraft, earthquakes, weather radar
- Live Feeds: CoinGecko crypto top-12 + Windy.com global webcams
- Economic calendar with filters + institutional flow (CFTC COT)
- Animated landing page + session-based routing
- Fully responsive dark-only terminal design system

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 18:19:23 +05:30