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

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.

Detailed Description

What RiskGuard::check needs besides the order and the portfolio.

Definition at line 353 of file risk.hpp.

Member Data Documentation

◆ exposure_basis_

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().

◆ now_

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().

◆ order_currency_

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().

◆ phase_

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().

◆ reference_price_

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().


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