Trade
dataclass backtide.backtest.Trade
A single round-trip trade (open + close of a position).
| Attributes |
symbol : str
The traded instrument's symbol.
quantity : float
Signed quantity. Positive = long round trip, negative = short.
Floating-point so fractional units are tracked exactly for crypto.
entry_ts : int
Open timestamp (in Unix seconds).
exit_ts : int
Close timestamp (in Unix seconds).
entry_price : float
Average fill price at entry, in the instrument's quote currency.
exit_price : float
Average fill price at exit.
pnl : float
Profit and loss in the base currency, after commission.
|
See Also
Order
A trading order submitted during the simulation.
OrderRecord
A record of an order as resolved by the engine.
RunResult
Result of running a single strategy as part of an experiment.