![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
One position row in a holdings snapshot. More...
#include <algotradelib/src/core/types.hpp>
Public Attributes | |
| InstrumentId | instrument_ |
| The instrument held (brokers report holdings without a trading venue). | |
| std::string | name_ |
| The instrument's name as the broker spells it. | |
| Decimal64 | quantity_ |
| The quantity in this row. | |
| std::optional< Decimal64 > | sellable_quantity_ |
| How much the broker says may be sold now. | |
| std::optional< SellableBasis > | sellable_basis_ |
| What this row's sellable_quantity_ covers, when the figure came from a per-instrument inquiry rather than the holdings read. | |
| Decimal64 | average_purchase_price_ |
| The broker's average purchase price. | |
| Decimal64 | last_price_ |
| The price the broker valued the position at. | |
| Money | purchase_value_ |
| The cost basis, as the broker computed it. | |
| Money | market_value_ |
| The market value, as the broker computed it. | |
| Money | unrealized_profit_loss_ |
| The unrealized profit or loss, as the broker reported it. | |
| Decimal64 | unrealized_return_ |
| The broker's return figure, as a fraction (0.05 is 5%). | |
| Decimal64 algotradelib::HoldingPosition::average_purchase_price_ |
| InstrumentId algotradelib::HoldingPosition::instrument_ |
The instrument held (brokers report holdings without a trading venue).
Definition at line 1290 of file types.hpp.
Referenced by algotradelib::strategy::Portfolio< Broker >::net_quantity_of(), algotradelib::strategy::Portfolio< Broker >::quantity_of(), algotradelib::strategy::Portfolio< Broker >::sellable_quantity_of(), and algotradelib::strategy::Portfolio< Broker >::sellable_reading_for().
| Decimal64 algotradelib::HoldingPosition::last_price_ |
| Money algotradelib::HoldingPosition::market_value_ |
| std::string algotradelib::HoldingPosition::name_ |
| Money algotradelib::HoldingPosition::purchase_value_ |
| Decimal64 algotradelib::HoldingPosition::quantity_ |
The quantity in this row.
One instrument may span several rows; size a holding with Portfolio::net_quantity_of.
Definition at line 1298 of file types.hpp.
Referenced by algotradelib::strategy::Portfolio< Broker >::quantity_of().
| std::optional<SellableBasis> algotradelib::HoldingPosition::sellable_basis_ |
What this row's sellable_quantity_ covers, when the figure came from a per-instrument inquiry rather than the holdings read.
Empty in the ordinary case, where HoldingsSnapshot::sellable_basis_ applies.
Definition at line 1312 of file types.hpp.
Referenced by algotradelib::strategy::Portfolio< Broker >::sellable_reading_for().
| std::optional<Decimal64> algotradelib::HoldingPosition::sellable_quantity_ |
How much the broker says may be sold now.
Empty if the broker did not say, which is not zero. What it covers is the row's sellable_basis_, or else the snapshot's HoldingsSnapshot::sellable_basis_.
Definition at line 1305 of file types.hpp.
Referenced by algotradelib::strategy::Portfolio< Broker >::sellable_quantity_of(), and algotradelib::strategy::Portfolio< Broker >::sellable_reading_for().
| Money algotradelib::HoldingPosition::unrealized_profit_loss_ |
| Decimal64 algotradelib::HoldingPosition::unrealized_return_ |