![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
What RiskGuard::check needs besides the order and the portfolio. More...
#include <algotradelib/src/strategy/risk.hpp>
Public Attributes | |
| std::chrono::system_clock::time_point | now_ {} |
| The current instant; RiskLimits::rate_window_ counts back from it. | |
| MarketPhase | phase_ {MarketPhase::UNKNOWN} |
| The market phase the order would be sent in. | |
| std::optional< Decimal64 > | reference_price_ |
| A price to value a market order, which carries none. | |
| std::vector< InstrumentBasis > | exposure_basis_ |
| The currency and mark of every instrument held or working, plus the order's. | |
| std::optional< Currency > | order_currency_ |
| The currency the order is priced in, from its reference data. | |
What RiskGuard::check needs besides the order and the portfolio.
| std::vector<InstrumentBasis> algotradelib::strategy::GuardInputs::exposure_basis_ |
The currency and mark of every instrument held or working, plus the order's.
Needed only by RiskLimits::max_gross_exposure_. A missing entry, or two entries for one instrument, refuses with GuardReason::VALUE_NOT_KNOWN. The runner fills it from reference data.
Definition at line 367 of file risk.hpp.
Referenced by algotradelib::strategy::RiskGuard::evaluate().
| std::chrono::system_clock::time_point algotradelib::strategy::GuardInputs::now_ {} |
The current instant; RiskLimits::rate_window_ counts back from it.
Definition at line 355 of file risk.hpp.
Referenced by algotradelib::strategy::RiskGuard::evaluate().
| std::optional<Currency> algotradelib::strategy::GuardInputs::order_currency_ |
The currency the order is priced in, from its reference data.
Needed by the buying-power check (absent refuses with INSUFFICIENT_BUYING_POWER) and by the gross-exposure ceiling (absent refuses with VALUE_NOT_KNOWN).
Definition at line 374 of file risk.hpp.
Referenced by algotradelib::strategy::RiskGuard::evaluate().
| MarketPhase algotradelib::strategy::GuardInputs::phase_ {MarketPhase::UNKNOWN} |
The market phase the order would be sent in.
Definition at line 357 of file risk.hpp.
Referenced by algotradelib::strategy::RiskGuard::evaluate().
| std::optional<Decimal64> algotradelib::strategy::GuardInputs::reference_price_ |
A price to value a market order, which carries none.
Definition at line 359 of file risk.hpp.
Referenced by algotradelib::strategy::RiskGuard::evaluate().