Commit Graph

3046 Commits

Author SHA1 Message Date
jgrusewski
e136abeb32 feat(trading_engine): replace ICMarkets stub with cTrader BrokerInterface
Wire the ctrader-openapi client behind the BrokerInterface trait for
live order routing, position queries, and execution streaming.
Feature-gated behind `icmarkets` flag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
2c3a070a9b feat(ctrader-openapi): complete client API with orders, symbols, account, market data
Add rate limiter (50/s + 5/s historical), symbol mapper, order builders,
account queries, market data subscriptions, and high-level CTraderClient
that orchestrates the full connect/auth/symbol-load lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
1a3dd5409a feat(ctrader-openapi): message dispatcher with request correlation
MessageDispatcher spawns a reader task that routes responses to pending
requests by clientMsgId (UUID + oneshot channels), and broadcasts
server-pushed events (executions, spots, errors) via tokio broadcast.
Handles connection closure with pending request cleanup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
891085dd96 feat(ctrader-openapi): OAuth2 token exchange and connection authentication
HTTP OAuth2 flow (auth code exchange + refresh) via reqwest, plus
protobuf-level two-phase auth (ApplicationAuth → AccountAuth) over
the TCP connection. Error extraction from OA error responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
64210b1519 feat(ctrader-openapi): TCP+TLS connection with heartbeat keepalive
CTraderConnection establishes TCP+TLS via tokio-native-tls, wraps in
framed codec, splits into shared sender + exclusive receiver, and
spawns a heartbeat task at configurable interval (default 10s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
b2a3447fd8 feat(ctrader-openapi): length-delimited protobuf codec
CTraderCodec implements tokio_util Decoder+Encoder with 4-byte BE length
prefix framing. Handles partial frames, multiple frames in buffer, and
rejects oversized frames (16 MiB max). 5 unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
43edbeaa36 feat(ctrader-openapi): vendor and compile cTrader protobuf definitions
Downloads 4 proto files from spotware/openapi-proto-messages (MIT license),
compiles with prost-build, and adds payload-type constants + dispatch helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
73fbd76e44 feat(ctrader-openapi): scaffold crate with config and error types
New workspace crate for cTrader Open API client (Protobuf over TCP+TLS).
Adds CTraderConfig (environment, credentials, timeouts), CTraderError
enum covering all failure modes, and lib.rs module structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
f63ba8627c feat(ctrader-openapi): scaffold crate with config and error types
New workspace crate for cTrader Open API client (Protobuf over TCP+TLS).
Includes CTraderConfig, CTraderEnvironment, CTraderError, and RateLimitBucket types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 19:23:30 +01:00
jgrusewski
8b81138262 docs: rewrite outdated READMEs and add web-gateway docs
Rewrite 7 crate READMEs to reflect current architecture: correct
model types (DQN/PPO/TFT/Mamba2), AtomicKillSwitch, real
EnsembleConfig source from ml, actual data crate purpose,
web-dashboard project details, ml_training_service ports.

Fix 5 api_gateway/TLI docs: strip swarm agent framing, update
service endpoints to api_gateway:50050, remove deleted dashboard
references and hardcoded paths.

Add missing web-gateway/README.md documenting 24 REST endpoints,
WebSocket support, JWT auth, and 3-tier rate limiting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:39:12 +01:00
jgrusewski
f672c0c584 docs: delete stale swarm agent artifacts and reports
Remove 45+ AGENT_*, WAVE_*, and completion report files that were
one-time swarm deliverables with no living documentation value.
Remove reports/2025-11-16_17_hyperopt_analysis/ (55 files, code
changes already landed). Content preserved in git history.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:32:32 +01:00
jgrusewski
328bf202ae safety(services): replace placeholder stubs with proper error handling
- ml_training_service: health check now validates orchestrator readiness
  via AtomicBool flag instead of always returning "healthy"
- broker_gateway_service: replace hardcoded $100k account data with
  explicit FAILED_PRECONDITION errors for unimplemented broker queries
- data_acquisition_service: spawn background download task instead of
  leaving jobs stuck in Pending, add real health check with job counts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:32:38 +01:00
jgrusewski
2e43600bda safety(web-dashboard): add error boundaries to MLDashboard and ConfigDashboard
- Wrap Model Cards, Ensemble Panel, Training Progress in ComponentErrorBoundary
- Wrap Configuration Form in ComponentErrorBoundary
- Prevents full-page crash if individual sections throw render errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:47:28 +01:00
jgrusewski
576ad25d25 safety(web-gateway,web-dashboard): WS topic validation, audit logging, API timeouts
- Add VALID_TOPICS whitelist to WS handler, reject unknown topic subscriptions
- Add per-connection rate limit (50 topic changes/min) and max 20 subscriptions
- Remove wildcard "*" subscription (security risk)
- Add tracing::info! audit logging to all 8 mutation handlers
- Add 30s AbortController timeout to frontend API calls
- Fix clippy: rename _claims → claims in handlers that now use it

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:45:01 +01:00
jgrusewski
d966f30c7f safety(web-gateway,web-dashboard): validate tune/risk mutation endpoints, config a11y
- Add model_type + num_trials validation to tune.rs start_tune (3 tests)
- Add emergency_stop validation: require confirm, valid stop_type, non-empty reason, symbol format (4 tests)
- Add a11y to ConfigDashboard: role=tablist/tab, aria-selected, htmlFor/id on config inputs, role=alert on error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:37:04 +01:00
jgrusewski
d42a0da105 safety(web-gateway,web-dashboard): server-side validation for backtesting and training routes
- Add validate_backtest(): strategy_name, symbols format, date range,
  initial_capital checks with 6 unit tests
- Add model_type validation against known types (dqn, ppo, tft, mamba2)
  with 1 integration test
- Add error banner to ConfigDashboard for failed config fetch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:30:13 +01:00
jgrusewski
71d988e5f1 safety(web-gateway,web-dashboard): security headers, server-side validation, prod build hardening
- Add HTTP security headers to all responses: X-Frame-Options: DENY,
  X-Content-Type-Options: nosniff, X-XSS-Protection: 0,
  Referrer-Policy: strict-origin-when-cross-origin,
  Strict-Transport-Security: max-age=31536000
- Add server-side input validation to submit_order: symbol format,
  side/order_type enum range, quantity range, price positivity,
  limit orders require price — 12 new tests
- Disable sourcemaps in production builds (vite.config.ts)
- Add global unhandled promise rejection handler (main.tsx)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:27:29 +01:00
jgrusewski
cab4fcda4c safety(web-dashboard): theme-consistent chart colors, a11y attributes, WS reconnect, loading skeletons
- Replace all hardcoded hex colors in chart components with CSS custom
  properties (getCssVar helper), making charts respect theme changes
- Add scope="col" to all table headers (PositionsTable, OrdersTable,
  BacktestingDashboard trade list)
- Connect form labels to inputs via htmlFor/id pairs (OrderForm,
  BacktestingDashboard)
- Add role="alert" to validation error messages
- Add aria-label to cancel button, progressbar role to backtest progress
- Add WsManager.reconnect() method with backoff reset
- Add Reconnect button to StatusBar when WS disconnected
- Add shimmer skeleton loading states to CandlestickChart and PnLChart

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:22:34 +01:00
jgrusewski
c7d336ec59 safety(web-dashboard): token expiry detection, session-expired banner, mutation error feedback
- Add isTokenExpired() / getTokenExpiry() JWT helpers to auth.ts
- Pre-flight token expiry check in apiFetch (60s margin)
- Graceful 401 handling: set session_expired flag before redirect
- LoginPage shows "session expired" banner when flag is set
- OrdersTable cancel button: add pending state + inline error display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:16:31 +01:00
jgrusewski
2ebacae0e0 safety(web-gateway): add per-route-group rate limiting middleware
Token-bucket rate limiter (no new dependencies) with three tiers:
- Auth routes: 10 req/min, burst 5 (brute-force protection)
- Trading/read routes: 200 req/min, burst 20
- Compute routes (backtest/training/tune): 30 req/min, burst 5

Includes background cleanup task for stale entries and 7 unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:13:19 +01:00
jgrusewski
35b7f6e27b feat(web-gateway,web-dashboard): request-id middleware, lazy routes, form validation
- Add X-Request-Id middleware with UUID v4 generation and header propagation
- Convert 6 dashboard routes to React.lazy() with Suspense for code splitting
- Add inline validation errors to OrderForm (symbol, quantity, price)
- Add date range + symbol validation to BacktestingDashboard form
- Fix !Send future issue: use .instrument(span) instead of span.entered()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:09:44 +01:00
jgrusewski
3c3bf30062 safety(web-gateway,web-dashboard): clippy clean, gRPC timeouts, health probes, responsive grids, error boundaries
- Fix all 98 clippy warnings (0 remaining with -D warnings)
- Add 30s default gRPC timeout on all channels via Endpoint::timeout()
- Replace readiness probe is_some() with actual gRPC health check (returns 503 when degraded)
- Add responsive Tailwind breakpoints to all 5 dashboard pages
- Add ComponentErrorBoundary for crash-prone chart components
- Log JWT validation errors at debug level instead of silently discarding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:59:20 +01:00
jgrusewski
bee0591ea1 safety: enforce JWT secret min length, validate order symbol input
- Require JWT_SECRET >= 32 characters at startup (prevents weak secrets)
- Add SECURITY comment documenting auth.rs login as dev-only stub
- Add symbol input validation in OrderForm: uppercase, alphanumeric
  with dots/hyphens/underscores, max 20 chars, visual error state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:40:50 +01:00
jgrusewski
3d3a84e0b0 feat(web-gateway,web-dashboard): WS ping/pong keepalive, vite build config
- Respond to WebSocket Ping frames with Pong for keepalive detection
- Refactor WS handler to share sender between broadcast and recv tasks
  via Arc<Mutex> (required for pong responses from recv task)
- Add vite production build config: source maps, manual chunk splitting
  for vendor/charts/query bundles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:37:29 +01:00
jgrusewski
544315e351 safety(web-gateway,web-dashboard): harden for production deployment
Backend:
- Fail fast on empty JWT_SECRET at startup
- Restrict CORS to explicit methods (GET/POST/PUT/DELETE/OPTIONS) and
  headers (Authorization, Content-Type) instead of Any
- Add 1MB request body size limit (DefaultBodyLimit)
- Add gRPC status mappings: DeadlineExceeded->408, Cancelled->499,
  AlreadyExists->409, ResourceExhausted->429, Unavailable->503

Frontend:
- Guard ErrorBoundary console.error behind import.meta.env.DEV
- Read VITE_API_URL and VITE_WS_URL from env vars with fallbacks
- Add max reconnect attempts (50) to WebSocket manager
- Tune React Query: staleTime 10s, refetchInterval 15s,
  disable refetchOnWindowFocus to prevent thundering herd

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:34:37 +01:00
jgrusewski
bd3f558e5a fix(web-gateway): use :id path param syntax for Axum 0.7, add route handler tests
Axum 0.7 uses :id path param syntax, not {id} (which is 0.8+).
The {id} routes silently returned 404 at runtime with no compile error.
Also adds comprehensive handler tests across all 6 remaining route
modules (ml, training, backtesting, performance, config, tune) covering
auth gating, no-service errors, and body validation — 37 new tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:29:39 +01:00
jgrusewski
f4586f8982 test(web-gateway): add trading and risk route handler tests, env example
Trading tests (7): auth gating, no-service 500, order body validation, cancel/account paths
Risk tests (5): auth gating, no-service 500, emergency stop body validation

Total: 61 tests (up from 49)

Also adds web-dashboard/.env.example for production deployment configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:09:25 +01:00
jgrusewski
f930b4f1b7 a11y(web-dashboard): add aria labels, roles, and live regions to interactive components
- EmergencyControls: aria-label on all buttons and confirmation input
- OrderForm: aria-label and aria-pressed on buy/sell toggle buttons
- DashboardLayout: aria-label on navigation
- StatusBar: aria-live on connection status, aria-hidden on decorative indicator dot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:06:46 +01:00
jgrusewski
5b96d64432 fix(web-dashboard): add 401 auto-logout, error states, WS backoff fix, regime data wiring
- api.ts: intercept 401 responses, clear tokens, redirect to /login
- websocket.ts: fix backoff ordering (increase before scheduling retry)
- All dashboards: add error banners with retry buttons when API queries fail
- MLDashboard: replace hardcoded regime data with WebSocket metrics stream

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:04:54 +01:00
jgrusewski
f2340c2ecf test(web-gateway): add state, health endpoint, and router integration tests
Adds 10 new tests:
- state.rs: AppState creation, empty URL channel handling, broadcast, config wrapping, Clone trait
- routes/mod.rs: health check, readiness with/without services, auth gating, public routes

Total: 49 tests (up from 39)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:04:30 +01:00
jgrusewski
c688d7281f safety(web-gateway): replace silent unwrap_or_default with error-logged fallbacks in gRPC stream bridges
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:57:15 +01:00
jgrusewski
08c487bb17 feat(web-dashboard): show username in StatusBar, add Sign Out button
- Display logged-in username (from JWT sub claim) in status bar
- Add Sign Out button that clears tokens and disconnects WebSocket
- Fix useWebSocket hook with stable empty topics reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:53:23 +01:00
jgrusewski
65ca5372f2 safety(web-gateway): use configured CORS origins, add health/readiness probes
- Replace CorsLayer::allow_origin(Any) with configured cors_origins whitelist
- Add GET /health liveness probe (returns {"status":"ok"})
- Add GET /ready readiness probe (reports gRPC channel availability)
- Fix unused import warning in auth middleware tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:53:02 +01:00
jgrusewski
356bd39810 feat(web-gateway): add public /api/auth/login route for JWT token issuance
- POST /api/auth/login accepts username/password, returns JWT token
- Route is public (no auth middleware) to allow initial authentication
- Validates non-empty credentials and configured JWT secret
- 3 tests: successful login, empty username, missing JWT secret

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:48:56 +01:00
jgrusewski
4ae5fc7b0e feat(web-dashboard): add login page, route guards, and error boundary
- ErrorBoundary: catches unhandled render errors, shows recovery UI
- ProtectedRoute: redirects to /login when not authenticated
- LoginPage: username/password form that calls /api/auth/login
- All dashboard routes now require authentication
- Login page redirects to /trading on success

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:47:21 +01:00
jgrusewski
066d85d766 fix(web-dashboard): wire P&L chart data from API in PerformanceDashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:33:45 +01:00
jgrusewski
af2a17a827 test(web-gateway): add auth middleware and WebSocket token validation tests
- 6 auth middleware tests: missing header, malformed Bearer, invalid JWT,
  wrong secret, expired token, valid token passthrough
- 4 WebSocket token validation tests: valid token, invalid token,
  wrong secret, expired token
- Web-gateway now has 36 tests (up from 26)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:32:37 +01:00
jgrusewski
9630d915b4 fix(web-dashboard): wire API data into dashboard pages, fix stub panels
- ConfigDashboard: merge fetched API config over defaults instead of ignoring it
- TradingDashboard: wire OrderBook with market_data WebSocket topic
- BacktestingDashboard: wire active backtest status polling and trade results
- PerformanceDashboard: wire sortino_ratio from API, add to PerformanceMetrics type
- Remove unused Vite scaffold react.svg asset
- Set page title to "Foxhunt Trading System"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:32:13 +01:00
jgrusewski
4363f779ab safety(trading-service): replace expect() with if-let in allocation
Replace two .expect() calls on HashMap lookups with safe if-let pattern
to comply with deny(clippy::expect_used) rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:03:10 +01:00
jgrusewski
29aca309aa fix: resolve clippy warnings in common and web-gateway
- Replace redundant closures with function references in correlation.rs
- Use unwrap_or_default() instead of unwrap_or_else(T::new)
- Allow clippy::infinite_loop on intentional reconnect/heartbeat loops
- Allow clippy::empty_structs_with_brackets in generated proto code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:40:06 +01:00
jgrusewski
254ffa5736 feat(web-gateway): wire gRPC stream bridges to real streaming RPCs
Replace placeholder futures with actual gRPC streaming client calls for
market data, order updates, risk alerts, and metrics. Each bridge
reconnects with exponential backoff on disconnection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:36:08 +01:00
jgrusewski
9ed4fdd489 safety(api-gateway): remove debug token logging from JWT interceptor
Removed error!() call that logged the full JWT token on decode failure.
This was a security risk - tokens should never appear in logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:27:10 +01:00
jgrusewski
f46591dc9e feat(trading-service): add RealMamba2Model, eliminate last Status::unimplemented
Wire Mamba2 model type into the gRPC model loading match in enhanced_ml.rs.
All four model types (DQN, PPO, TFT, Mamba2) now have real loading paths.
The wildcard arm now returns invalid_argument instead of unimplemented.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:23:38 +01:00
jgrusewski
55ec8b3e1d feat(trading-agent): wire GenerateOrders and SubmitAgentOrders to real logic
Replace last 2 stub gRPC handlers with real implementations:
- GenerateOrders: loads allocation, generates orders via OrderGenerator with
  ML signal context, contract price estimation, and dynamic stop-loss
- SubmitAgentOrders: validates orders, supports dry_run mode, persists to
  agent_orders table with full metadata
Trading agent service: 15/15 endpoints now have real implementations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:15:18 +01:00
jgrusewski
a79a151588 feat(trading-service): implement 5 gRPC streaming endpoints
Replace Status::unimplemented() with real streaming implementations:
- stream_va_r_updates: periodic VaR recalculation with change detection
- stream_risk_alerts: kill switch status + VaR breach monitoring
- stream_system_status: real-time health, CPU/memory/disk metrics
- stream_metrics: trading performance counters (connections, requests, latency)
- stream_alerts: operational alerts for health/CPU/memory/disk anomalies
All use tokio::time::interval with graceful client disconnect handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:14:52 +01:00
jgrusewski
c83271bd14 safety: remove hardcoded dev credentials, add clippy deny to broker_gateway
- api_gateway: DATABASE_URL now required (was fallback to hardcoded dev password)
- broker_gateway: DATABASE_URL now required (was fallback to hardcoded dev password)
- broker_gateway: add deny(clippy::unwrap_used, clippy::expect_used) to lib.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:14:20 +01:00
jgrusewski
0cd9ce53c0 feat(trading-service): initialize EnsembleCoordinator with real ML adapters
Wire EnsembleCoordinator with 4 candle-backed inference adapters:
- DQN (0.30 weight), PPO (0.30), TFT (0.20), Mamba2 (0.20)
Add InferenceAdapterBridge to convert ModelInferenceAdapter→MLModel trait.
Models initialize with random weights; production checkpoints hot-loaded
via ModelRegistry shadow-buffer swap. PredictionGenerationLoop now active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:41:06 +01:00
jgrusewski
e3f0cf7c7d feat(trading-agent): wire GetAllocation, RebalancePortfolio, GetAgentPerformance, StreamAgentActivity
Replace 4 stub gRPC handlers with real implementations:
- GetAllocation: re-computes allocation from latest asset selection via PortfolioAllocator
- RebalancePortfolio: compares target vs current positions, generates drift-based actions
- GetAgentPerformance: queries agent_orders for P&L, win rate, Sharpe, max drawdown
- StreamAgentActivity: sends 5-second heartbeat events until client disconnects
Trading agent service: 14/15 endpoints now have real implementations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:40:35 +01:00
jgrusewski
9036dec71c feat(risk): replace hardcoded zero metrics with real calculations
Compute real values for 5 previously-zero risk metrics:
- current_drawdown: from unrealized PnL vs market value
- volatility: annualized std dev from execution price returns
- sharpe_ratio: excess return / volatility * sqrt(252)
- sortino_ratio: excess return / downside deviation * sqrt(252)
- position_risks: per-position VaR contribution and concentration
Wire get_position_risk() to real positions with filtering.
beta/alpha remain 0.0 (requires benchmark data integration).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:31:04 +01:00
jgrusewski
66717fa67f feat(trading-agent): wire SelectAssets and GetSelectedAssets to AssetSelector
Replace 2 stub gRPC handlers with real implementations:
- SelectAssets: scores instruments via MLFeatureExtractor, ranks with
  AssetSelector (TopN/Threshold/Quantile modes), persists to DB
- GetSelectedAssets: loads latest selection from asset_selections table
Add helper methods: score_instrument, store/load_asset_selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:30:33 +01:00