Files
Predictalytics/src/Predictalytics.Domain/Entities/TradeContext.cs
T
Richard a564c016bb feat: Implement copytrading analytics and update WebUI
- Add v4 Tape-based CopytradingEstimator (Clustering, MAE, Tape Fills)
- Add CopytradingBacktestHarness (Walk-Forward testing, Shrinkage, LCB ranking)
- Add EF Core Migrations for FollowerFillPrice and Scoring fields
- Update WebUI: Fix Trader Detail tab layout blowout
- Update WebUI: Redesign Trader Detail menubar
- Update WebUI: Display separate Quality and Copyability metric cards
- Update WebUI: Add 'Highly Copyable' filter to Trader List
2026-07-06 11:55:38 +02:00

36 lines
1.5 KiB
C#

using Predictalytics.Domain.Enums;
namespace Predictalytics.Domain.Entities;
/// <summary>
/// High-resolution analytics context for a specific trade.
/// Collected asynchronously after a trade is discovered to calculate Slippage and Edge.
/// Only collected for Watchlisted or high-scoring traders to conserve database space.
/// </summary>
public class TradeContext
{
public long Id { get; set; }
/// <summary>The ID of the parent trade.</summary>
public long TradeId { get; set; }
public Trade Trade { get; set; } = null!;
/// <summary>The estimated mid-price of the asset roughly 1 minute before the trade execution.</summary>
public decimal? PriceBefore1m { get; set; }
/// <summary>The estimated mid-price of the asset roughly 1 minute after the trade execution.</summary>
public decimal? PriceAfter1m { get; set; }
/// <summary>The volume-weighted exact follower fill price 10 seconds after the trade execution (excluding the trader's own trades).</summary>
public decimal? FollowerFillPrice10s { get; set; }
/// <summary>The volume-weighted exact follower fill price 60 seconds after the trade execution (excluding the trader's own trades).</summary>
public decimal? FollowerFillPrice60s { get; set; }
/// <summary>Calculated slippage: execution price vs PriceBefore1m.</summary>
public decimal? EstimatedSlippage { get; set; }
/// <summary>Estimated order type based on fee or exact price matching.</summary>
public OrderType EstimatedOrderType { get; set; } = OrderType.Unknown;
}