Strategy performance chart - add benchmark #356
Labels
enhancement
New feature or request
priority: P1
An important issue that must be fixed before the next release, but does nto require immediate focus.
size: M
An ordinary task that can be completed in a few days or in a week
Depends on #355
Goal
Add a benchmark indicator to the Strategy performance chart. The benchmark should show the buy-and-hold performance for the same trading pair being traded by the strategy.
Details
For v1, we can show some hard-coded tokens (BTC, ETH, MATIC). In the future, each strategy can include info in the
metadata
API payload to indicate which benchmark tokens to show.We currently have this "hack" for determining which tokens a strategy trades (displayed in the upper-left corder of strategy tiles) – we could use this to identify which benchmarks to display as well:
frontend/src/routes/strategies/StrategyTile.svelte
Lines 36 to 44 in ceaf396
One thing we'll need to do is to "normalize" the benchmark price data to a profitability % (which is what we show for strategies). For any given timeframe that we display (
1w
,1m
,3m
, etc.) I would assume we'd want to basline the benchmark price to the same starting value as the strategy (so the two lines start at the same point on the left), then calculate the % profitability change from that baseline forward – so you get a genuine comparison of how the strategy performed relative to the benchmark for that time period.The text was updated successfully, but these errors were encountered: