Skip to content

#1047 Add vault strategy backtesting engine #574

Description

@vic-Gray

Area: backend · Effort: XL

What: Build a backtesting engine that simulates a vault strategy against historical price and yield data to show projected past performance.

Why: Backtesting is the industry standard for evaluating strategy quality. Vault operators and sophisticated depositors expect to see historical simulations before committing capital.

Acceptance Criteria:

  • POST /vaults/:id/backtest accepts a date range and strategy parameters
  • Engine replays historical APY, TVL, and price data for the specified period
  • Results include: simulated return, maximum drawdown, Sharpe ratio, volatility
  • Backtest runs asynchronously; results are emailed when ready

Hints:

  • backend/src/analytics/backtesting.service.ts
  • Store historical data in a market_data_history table (fetched from CoinGecko or Pyth)
  • Run via Bull background job with a 10-minute timeout

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions