OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::accountadjustment Namespace Reference

Classes

struct  AccountAdjustment
 
struct  AccountOutcomeEntry
 
class  AccountPnlOperation
 Replaces the account-wide realized-PnL accumulator. More...
 
struct  AccountPnlOutcome
 Account-level realized-PnL outcome. More...
 
struct  Amount
 
struct  BalanceOperation
 Balance-operation payload of an account adjustment. More...
 
class  BatchError
 
struct  Bounds
 
class  Context
 
class  Operation
 
struct  Outcome
 
struct  OutcomeAmount
 
class  OutcomeList
 
struct  PnlOutcome
 
struct  PnlOutcomeAmount
 Realized-PnL change and resulting absolute value. More...
 
struct  PositionOperation
 

Typedefs

using AccountPnlResult = PnlOutcomeResult
 Account-level realized-PnL result: either the amount or a halt reason. More...
 
using OutcomeAmountOptional = OpenPitOutcomeAmountOptional
 
using PnlOutcomeOptional = OpenPitPnlOutcomeOptional
 
using PnlOutcomeResult = std::variant< PnlOutcomeAmount, PnlHaltReason >
 Realized-PnL result: either the amount or a halt reason. More...
 

Enumerations

enum class  PnlHaltReason : std::uint8_t {
  MissingFx = OPENPIT_PNL_HALT_REASON_MISSING_FX , MissingAccountCurrency = OPENPIT_PNL_HALT_REASON_MISSING_ACCOUNT_CURRENCY , MissingInitialPnl = OPENPIT_PNL_HALT_REASON_MISSING_INITIAL_PNL , MissingCostBasis = OPENPIT_PNL_HALT_REASON_MISSING_COST_BASIS ,
  ArithmeticOverflow = OPENPIT_PNL_HALT_REASON_ARITHMETIC_OVERFLOW
}
 Reason why a realized-PnL amount could not be calculated. More...
 

Typedef Documentation

◆ AccountPnlResult

Account-level realized-PnL result: either the amount or a halt reason.

A newly halted calculation emits its reason once; later checks can reject or block on the stored halt without emitting another account outcome. A manager explicitly force-sets the account PnL to re-arm it. Position accumulators are independent.

◆ OutcomeAmountOptional

using openpit::accountadjustment::OutcomeAmountOptional = typedef OpenPitOutcomeAmountOptional

◆ PnlOutcomeOptional

using openpit::accountadjustment::PnlOutcomeOptional = typedef OpenPitPnlOutcomeOptional

◆ PnlOutcomeResult

Realized-PnL result: either the amount or a halt reason.

Enumeration Type Documentation

◆ PnlHaltReason

enum openpit::accountadjustment::PnlHaltReason : std::uint8_t
strong

Reason why a realized-PnL amount could not be calculated.

Enumerator
MissingFx 

No quote has been published for a required FX conversion.

The last available quote remains valid even when it is stale.

MissingAccountCurrency 

The account currency required for the ledger was unavailable.

MissingInitialPnl 

The initial realized PnL needed to continue the ledger was unavailable.

MissingCostBasis 

The position cost basis needed to calculate PnL was unavailable.

ArithmeticOverflow 

Exact realized-PnL arithmetic overflowed.