![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
How small a difference from a target is not worth an order. More...
#include <algotradelib/src/strategy/reconcile.hpp>
Public Member Functions | |
| bool | stated () const noexcept |
| Tests whether any floor is set. | |
Public Attributes | |
| std::optional< Decimal64 > | minimum_quantity_ |
| The smallest drift worth trading, in shares. | |
| std::optional< Decimal64 > | minimum_notional_ |
| The smallest drift worth trading, valued at the reference price. | |
| std::optional< Decimal64 > | minimum_fraction_of_working_ |
| The smallest drift worth trading, as a fraction of the quantity already working (0.02 is 2%). Ignored when nothing is working. | |
How small a difference from a target is not worth an order.
Every floor is optional and absent by default, which trades every share of drift. If any stated floor is met, no order is sent:
| Floor | Compares | Use it for |
|---|---|---|
| minimum_quantity_ | the drift in shares | lot economics, a per-share fee |
| minimum_notional_ | the drift's value at the reference price | a fixed or minimum fee per order |
| minimum_fraction_of_working_ | the drift over the quantity already working | not giving up queue priority |
A floor that cannot be evaluated (a notional floor without a price) does not suppress. A drift is never suppressed when an order on the wrong side has to be cancelled.
Definition at line 233 of file reconcile.hpp.
|
inlinenoexcept |
Tests whether any floor is set.
Definition at line 248 of file reconcile.hpp.
Referenced by algotradelib::strategy::reconcile().
| std::optional<Decimal64> algotradelib::strategy::TradeTolerance::minimum_fraction_of_working_ |
The smallest drift worth trading, as a fraction of the quantity already working (0.02 is 2%). Ignored when nothing is working.
Definition at line 242 of file reconcile.hpp.
Referenced by stated().
| std::optional<Decimal64> algotradelib::strategy::TradeTolerance::minimum_notional_ |
The smallest drift worth trading, valued at the reference price.
Definition at line 237 of file reconcile.hpp.
Referenced by stated().
| std::optional<Decimal64> algotradelib::strategy::TradeTolerance::minimum_quantity_ |
The smallest drift worth trading, in shares.
Definition at line 235 of file reconcile.hpp.
Referenced by stated().