|
OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
|
Non-negative monetary position exposure used for margin and risk. More...


Public Member Functions | |
| Notional | CalculateMarginRequired (const Leverage &leverage) const |
| Calculates required margin at the supplied leverage. More... | |
| Volume | ToVolume () const |
| Converts notional exposure to an equivalent volume. More... | |
Public Member Functions inherited from openpit::param::detail::ExactValue< Notional, detail::NotionalTraits > | |
| Notional | CheckedAdd (const Notional &other) const |
Adds another value and throws openpit::Error on overflow. More... | |
| Notional | CheckedDivFloat (double divisor) const |
Divides by an imprecise boundary double. More... | |
| Notional | CheckedDivInt (std::int64_t divisor) const |
Divides by a signed integer and throws openpit::Error on failure. More... | |
| Notional | CheckedDivUint (std::uint64_t divisor) const |
Divides by an unsigned integer and throws openpit::Error on failure. More... | |
| Notional | CheckedMulFloat (double scalar) const |
Multiplies by an imprecise boundary double. More... | |
| Notional | CheckedMulInt (std::int64_t scalar) const |
Multiplies by a signed integer and throws openpit::Error on failure. More... | |
| Notional | CheckedMulUint (std::uint64_t scalar) const |
Multiplies by an unsigned integer and throws openpit::Error on failure. More... | |
| Notional | CheckedRemFloat (double divisor) const |
Computes the remainder for an imprecise boundary double divisor. More... | |
| Notional | CheckedRemInt (std::int64_t divisor) const |
| Computes the remainder for a signed integer divisor. More... | |
| Notional | CheckedRemUint (std::uint64_t divisor) const |
| Computes the remainder for an unsigned integer divisor. More... | |
| Notional | CheckedSubtract (const Notional &other) const |
Subtracts another value and throws openpit::Error on failure. More... | |
| int | Compare (const Notional &other) const |
| Compares this value with another value of the same domain type. More... | |
| ::openpit::param::Decimal | Decimal () const noexcept |
| Returns the lossless decimal representation. More... | |
| bool | IsZero () const |
| Returns whether the value is exactly zero. More... | |
| bool | operator!= (const Notional &other) const |
| bool | operator< (const Notional &other) const |
| bool | operator<= (const Notional &other) const |
| bool | operator== (const Notional &other) const |
| bool | operator> (const Notional &other) const |
| bool | operator>= (const Notional &other) const |
| double | ToDouble () const |
Converts to an imprecise boundary double. More... | |
| std::string | ToString () const |
| Formats the exact value as a decimal string. More... | |
Static Public Member Functions | |
| static Notional | FromVolume (const Volume &volume) |
| Creates notional exposure from an equivalent volume. More... | |
Static Public Member Functions inherited from openpit::param::detail::ExactValue< Notional, detail::NotionalTraits > | |
| static Notional | FromDecimal (Decimal value) |
| Validates an exact decimal representation. More... | |
| static Notional | FromDecimalRounded (Decimal value, std::uint32_t scale, RoundingStrategy rounding) |
Rounds an exact decimal representation to scale digits. More... | |
| static Notional | FromDouble (double value) |
Creates a value from an imprecise boundary double. More... | |
| static Notional | FromDoubleRounded (double value, std::uint32_t scale, RoundingStrategy rounding) |
Converts and rounds an imprecise boundary double. More... | |
| static Notional | FromInt64 (std::int64_t value) |
| Creates a value from a signed integer. More... | |
| static Notional | FromString (std::string_view value) |
| Parses an exact decimal string. More... | |
| static Notional | FromStringRounded (std::string_view value, std::uint32_t scale, RoundingStrategy rounding) |
Parses and rounds an exact decimal string to scale digits. More... | |
| static Notional | FromUint64 (std::uint64_t value) |
| Creates a value from an unsigned integer. More... | |
Non-negative monetary position exposure used for margin and risk.
|
inline |
Calculates required margin at the supplied leverage.
Creates notional exposure from an equivalent volume.
|
inline |
Converts notional exposure to an equivalent volume.