OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::param::AdjustmentAmount Class Referencefinal

One exact balance adjustment expressed as either a delta or an absolute. More...

Public Member Functions

std::optional< PositionSizeAsAbsolute () const noexcept
 
std::optional< PositionSizeAsDelta () const noexcept
 
std::string ToString () const
 Formats the adjustment using the native exact-value representation. More...
 

Static Public Member Functions

static AdjustmentAmount Absolute (PositionSize value) noexcept
 Creates an absolute replacement value. More...
 
static AdjustmentAmount Delta (PositionSize value) noexcept
 Creates a relative adjustment. More...
 

Detailed Description

One exact balance adjustment expressed as either a delta or an absolute.

Factory methods create the valid alternatives.

Member Function Documentation

◆ Absolute()

static AdjustmentAmount openpit::param::AdjustmentAmount::Absolute ( PositionSize  value)
inlinestaticnoexcept

Creates an absolute replacement value.

◆ AsAbsolute()

std::optional<PositionSize> openpit::param::AdjustmentAmount::AsAbsolute ( ) const
inlinenoexcept

◆ AsDelta()

std::optional<PositionSize> openpit::param::AdjustmentAmount::AsDelta ( ) const
inlinenoexcept

◆ Delta()

static AdjustmentAmount openpit::param::AdjustmentAmount::Delta ( PositionSize  value)
inlinestaticnoexcept

Creates a relative adjustment.

◆ ToString()

std::string openpit::param::AdjustmentAmount::ToString ( ) const
inline

Formats the adjustment using the native exact-value representation.