Files
foxhunt/services/backtesting_service
jgrusewski 2da5bafc0e refactor: rename tli→fxt, delete legacy scripts/RunPod/deploy artifacts
- Rename tli/ directory to fxt/, update package + binary name to "fxt"
- Replace all `use tli::` → `use fxt::` across 52 Rust files
- Update build.rs proto paths (tli/proto → fxt/proto) in 6 services
- Update Dockerfiles, CI workflows, deploy.sh for new paths
- Delete ~170 legacy shell scripts (kept 15 essential ones)
- Delete RunPod Python client (runpod/), tests (tests/runpod/)
- Delete foxhunt-deploy crate (RunPod-only deployment tool)
- Delete terraform/runpod/ (moved to Scaleway)
- Delete ML Python hyperopt scripts (replaced by Rust Argmin PSO)
- Delete .gitlab-ci.yml (using GitHub + Gitea)
- Remove foxhunt-deploy from workspace members

504 files changed, -74,355 lines of legacy code removed.
Workspace compiles clean (0 errors, 0 warnings).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:32:21 +01:00
..

Backtesting Service

Overview

The backtesting_service offers an independent and isolated environment for rigorously testing and validating trading strategies against historical market data. It provides a robust platform for simulating trading performance, analyzing strategy efficacy, and generating comprehensive performance reports before live deployment.

Features

  • Independent Backtesting Service: Operates autonomously, allowing for parallel and isolated strategy evaluations.
  • gRPC API for Backtest Execution: Exposes a clear API for submitting and managing backtesting jobs.
  • Strategy Testing and Validation: Enables comprehensive testing of various trading strategies under different market conditions.
  • Performance Reporting: Generates detailed reports including metrics like P&L, Sharpe ratio, drawdown, and win rate.
  • Data Replay Engine: Accurately replays historical market data, simulating real-world order book dynamics and trade execution.
  • Results Persistence: Stores backtesting results and reports for historical analysis and comparison.

gRPC API

The backtesting_service exposes a gRPC API for initiating and retrieving backtest results. Key endpoints include:

  • RunBacktest - Submit backtest configuration and strategy
  • GetBacktestResults - Retrieve results for completed backtests
  • ListAvailableStrategies - List registered strategies
  • GetBacktestReport - Get detailed performance report

Running the service

To run the backtesting_service binary:

cargo run --bin backtesting_service

Data Requirements

The service requires historical market data in Parquet format:

  • Data should be stored in the configured data directory
  • Supports tick data, order book snapshots, and OHLCV candles
  • Data must include instrument, timestamp, and price/quantity fields

Testing

To run the tests for the backtesting_service crate:

cargo test --package backtesting_service

Documentation

Comprehensive API documentation is available at docs.rs/backtesting_service.