![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
Commission and tax the broker stated on the orders a loop happened to poll (Toss states them; KIS does not). More...
#include <algotradelib/src/runner/loop.hpp>
Classes | |
| struct | StatedTotal |
| One currency's running figure and how many statements contributed to it. More... | |
Public Member Functions | |
| std::optional< Decimal64 > | commission_in (const Currency ¤cy) const |
| Returns the commission stated in a currency. | |
| std::optional< Decimal64 > | tax_in (const Currency ¤cy) const |
| Returns the tax stated in a currency. | |
| std::size_t | commission_statements_in (const Currency ¤cy) const |
| Returns how many commission statements a currency has. | |
| std::size_t | tax_statements_in (const Currency ¤cy) const |
| Returns how many tax statements a currency has. | |
| bool | add (std::vector< StatedTotal > &totals, const Money &amount) |
| Adds an amount to its currency's figure in a list of totals. | |
| ChargedCosts | since (const ChargedCosts &before) const |
| Returns what was observed since an earlier copy, for one run's report. | |
Static Public Member Functions | |
| static std::optional< Decimal64 > | figure_in (const std::vector< StatedTotal > &totals, const Currency ¤cy) |
| Returns a currency's figure from a list of totals. | |
| static std::size_t | statements_in (const std::vector< StatedTotal > &totals, const Currency ¤cy) |
| Returns a currency's statement count from a list of totals. | |
Public Attributes | |
| std::vector< StatedTotal > | commission_ |
| Commission stated, per currency; a currency with no statement has no entry (not zero). | |
| std::vector< StatedTotal > | tax_ |
| Tax stated, per currency, on the same terms. | |
| std::size_t | orders_stating_cost_ {0} |
| How many orders have stated a cost (including zero); counted once per order, never decreased. | |
| std::size_t | orders_stating_none_ {0} |
| How many orders were first seen stating no cost (every KIS order); never decreased, so an order that later states one is counted in both. | |
| std::size_t | working_list_disappearances_ {0} |
| How many orders left the working-order listing between two polls (filled, cancelled or expired); a diagnostic, not a completeness measure. | |
| std::size_t | conflicting_restatements_ {0} |
| How many times an order restated a different cost at the same filled quantity; the first figure is kept. | |
| std::size_t | unrepresentable_sums_ {0} |
| How many additions or subtractions did not fit a Decimal64; nonzero means the figures are short (it counts attempts, and a re-polled row counts again). | |
Commission and tax the broker stated on the orders a loop happened to poll (Toss states them; KIS does not).
A subtotal of unknown coverage, not a total: an order that fills and leaves the working-order listing between two polls, or is placed and filled between them, is never seen with its final cost.
|
inline |
Adds an amount to its currency's figure in a list of totals.
| totals | commission_ or tax_. |
| amount | The amount. |
|
inline |
|
inlinestatic |
Returns a currency's figure from a list of totals.
| totals | The totals. |
| currency | The currency. |
Definition at line 409 of file loop.hpp.
Referenced by commission_in(), and tax_in().
|
inline |
Returns what was observed since an earlier copy, for one run's report.
A currency appears if its statement count rose (so a stated zero is kept). A money delta can be negative if the broker revised a figure down.
| before | The earlier copy. |
Definition at line 448 of file loop.hpp.
Referenced by algotradelib::runner::PollingLoop< Runner, Source, Clock >::run().
|
inlinestatic |
Returns a currency's statement count from a list of totals.
| totals | The totals. |
| currency | The currency. |
Definition at line 427 of file loop.hpp.
Referenced by commission_statements_in(), and tax_statements_in().
|
inline |
| std::vector<StatedTotal> algotradelib::runner::ChargedCosts::commission_ |
Commission stated, per currency; a currency with no statement has no entry (not zero).
Definition at line 317 of file loop.hpp.
Referenced by commission_in(), commission_statements_in(), and since().
| std::size_t algotradelib::runner::ChargedCosts::conflicting_restatements_ {0} |
| std::size_t algotradelib::runner::ChargedCosts::orders_stating_cost_ {0} |
| std::size_t algotradelib::runner::ChargedCosts::orders_stating_none_ {0} |
| std::vector<StatedTotal> algotradelib::runner::ChargedCosts::tax_ |
Tax stated, per currency, on the same terms.
Definition at line 319 of file loop.hpp.
Referenced by since(), tax_in(), and tax_statements_in().
| std::size_t algotradelib::runner::ChargedCosts::unrepresentable_sums_ {0} |
| std::size_t algotradelib::runner::ChargedCosts::working_list_disappearances_ {0} |