Skip to content

Unrealised profit data for open credit positions #1101

@kenkunz

Description

@kenkunz

Goal

As a prospective investor analysing strategies, I want credit positions' unrealised profit to be properly reflected in charts, position statistics and strategy summary metrics, so that I can properly assess the strategy's performance.

Background

See Discord threads:

Originally, unrealised profit was not reflected for any positions. Various updates were implemented to properly reflect the unrealised profitability of open spot positions. However, this is still not captured or reflected for open credit positions.

In a bear market, and with no current support for short positions in vault-based strategies, credit positions can remain open for long time periods. It is crucial that our data and UI properly reflects the profit associated with these positions to prospective investors and other stakeholders.

Acceptance criteria

  1. The state stats entries for an open credit position (stats.positions[position_id][index]) should reflect the open position's unrealised profitability in the entry's profitability, profit_usd and value fields.
  2. The chart data returned from the chart endpoint for type compounding_unrealised_trading_profitability_sampled should reflect credit positions' unrealised profitability.
  3. The chart data included in the metadata endpoint at summary_statistics.compounding_unrealised_trading_profitability should reflect credit positions' unrealised profitability.
  4. The strategy summary cagr value included in the metadata endpoint at summary_statistics.key_metrics.cagr should reflect credit positions' unrealised profitability.
  5. The unrealised metrics on the long/short metrics table of the state endpoint at stats.long_short_metrics_latest.live_stats should reflect credit positions' unrealised profitability (unrealised_profit_and_loss, portfolio_unrealised_value … and possibly return_percent and annualised_return_percent if these metrics also include unrealised profits).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: P1An important issue that must be fixed before the next release, but does nto require immediate focus.size: SA small task that can be completed in less than a day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions