algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::backtest::Execution Struct Reference

One execution a backtest produced, and what it cost. More...

#include <algotradelib/src/backtest/ledger.hpp>

Collaboration diagram for algotradelib::backtest::Execution:

Public Attributes

strategy::Fill fill_
 The fill, as on_fill receives it.
Decimal64 commission_
 The broker's commission; includes the institution fee when institution_fee_ is empty.
std::optional< Decimal64 > institution_fee_
 The institution fee (유관기관제비용), if the rate was split; empty is not zero.
Currency currency_ {Currency{"KRW"}}
 The currency of the cost figures.
AppliedRate applied_
 The commission rate that charged this execution.
Decimal64 slippage_
 The price given up to slippage (already included in the fill price).
Decimal64 tax_
 The sale tax charged; zero unless a sell tax applies (NextBarFillModel::with_sell_tax).

Detailed Description

One execution a backtest produced, and what it cost.

Definition at line 31 of file ledger.hpp.

Member Data Documentation

◆ applied_

AppliedRate algotradelib::backtest::Execution::applied_

The commission rate that charged this execution.

Definition at line 45 of file ledger.hpp.

Referenced by algotradelib::backtest::NextBarFillModel::decide().

◆ commission_

Decimal64 algotradelib::backtest::Execution::commission_

The broker's commission; includes the institution fee when institution_fee_ is empty.

Definition at line 35 of file ledger.hpp.

Referenced by algotradelib::backtest::ReplayLedger::apply(), and algotradelib::backtest::NextBarFillModel::decide().

◆ currency_

Currency algotradelib::backtest::Execution::currency_ {Currency{"KRW"}}

The currency of the cost figures.

Definition at line 43 of file ledger.hpp.

◆ fill_

strategy::Fill algotradelib::backtest::Execution::fill_

The fill, as on_fill receives it.

Definition at line 33 of file ledger.hpp.

Referenced by algotradelib::backtest::ReplayLedger::apply(), and algotradelib::backtest::NextBarFillModel::decide().

◆ institution_fee_

std::optional<Decimal64> algotradelib::backtest::Execution::institution_fee_

The institution fee (유관기관제비용), if the rate was split; empty is not zero.

Both this and commission_ are deducted from cash.

Definition at line 41 of file ledger.hpp.

Referenced by algotradelib::backtest::ReplayLedger::apply(), and algotradelib::backtest::NextBarFillModel::decide().

◆ slippage_

Decimal64 algotradelib::backtest::Execution::slippage_

The price given up to slippage (already included in the fill price).

Definition at line 47 of file ledger.hpp.

Referenced by algotradelib::backtest::NextBarFillModel::decide().

◆ tax_

Decimal64 algotradelib::backtest::Execution::tax_

The sale tax charged; zero unless a sell tax applies (NextBarFillModel::with_sell_tax).

Deducted from cash; like the fees, not part of realized profit, which is price alone.

Definition at line 53 of file ledger.hpp.

Referenced by algotradelib::backtest::ReplayLedger::apply(), and algotradelib::backtest::NextBarFillModel::decide().


The documentation for this struct was generated from the following file: