ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
commodity_instrument Struct Referencefinal

Commodity instrument economics for all commodity ORE product types. More...

#include <commodity_instrument.hpp>

Collaboration diagram for commodity_instrument:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
utility::uuid::tenant_id tenant_id = utility::uuid::tenant_id::system()
 Tenant identifier for multi-tenancy isolation.
 
boost::uuids::uuid id
 UUID uniquely identifying this commodity instrument.
 
std::string trade_type_code
 ORE product type code (CommodityForward, CommodityOption, etc.).
 
std::string commodity_code
 Commodity identifier code (e.g. NGAS, WTI, GOLD).
 
std::string currency
 ISO 4217 currency code.
 
double quantity = 0.0
 Contract quantity. Must be positive.
 
std::string unit
 Unit of measure for the commodity (e.g. BBL, MMBTU, MT).
 
std::string start_date
 Start date for swaps, forwards, and strips.
 
std::string maturity_date
 Maturity/expiry date.
 
std::optional< double > fixed_price
 Fixed price for forwards and fixed-leg swaps. Nullopt if not applicable.
 
std::string option_type
 Option type: 'Call' or 'Put'. Empty for non-option products.
 
std::optional< double > strike_price
 Option strike price. Nullopt for non-option products.
 
std::string exercise_type
 Exercise type: 'European' or 'American'.
 
std::string average_type
 Averaging type for Asian options: 'Arithmetic' or 'Geometric'.
 
std::string averaging_start_date
 Start of the averaging window for Asian options.
 
std::string averaging_end_date
 End of the averaging window for Asian options.
 
std::string spread_commodity_code
 Second commodity code for spread options.
 
std::optional< double > spread_amount
 Spread amount for spread options. Nullopt when not applicable.
 
std::string strip_frequency_code
 Strip frequency code for option strips (e.g. Monthly, Quarterly).
 
std::optional< double > variance_strike
 Strike variance for variance swap products. Nullopt when not applicable.
 
std::optional< double > accumulation_amount
 Per-fixing accumulation amount for accumulator products.
 
std::optional< double > knock_out_barrier
 Knock-out barrier level for accumulator products.
 
std::string barrier_type
 Barrier type: e.g. 'UpIn', 'UpOut', 'DownIn', 'DownOut'.
 
std::optional< double > lower_barrier
 Lower barrier level. Nullopt when not applicable.
 
std::optional< double > upper_barrier
 Upper barrier level. Nullopt when not applicable.
 
std::string basket_json
 JSON array of {code, weight} constituents for basket products.
 
std::string day_count_code
 Day count fraction code for swap products.
 
std::string payment_frequency_code
 Payment frequency code for swap products.
 
std::string swaption_expiry_date
 Swaption expiry date for CommoditySwaption products.
 
std::string description
 Optional free-text description.
 
std::string modified_by
 Username of the person who last modified this record.
 
std::string performed_by
 Username of the account that performed this action.
 
std::string change_reason_code
 Code identifying the reason for the change.
 
std::string change_commentary
 Free-text commentary explaining the change.
 
std::chrono::system_clock::time_point recorded_at
 Timestamp when this version of the record was recorded.
 

Detailed Description

Commodity instrument economics for all commodity ORE product types.

Discriminated by trade_type_code. Optional fields are empty/zero when not applicable to the specific sub-type: option_type/strike_price/exercise_type: CommodityOption* products barrier_type/lower_barrier/upper_barrier: barrier option products average_type/averaging_start_date/averaging_end_date: Asian/average-price spread_commodity_code/spread_amount: CommoditySpreadOption strip_frequency_code: CommodityOptionStrip variance_strike: CommodityVarianceSwap and variants accumulation_amount/knock_out_barrier: CommodityAccumulator, CommodityTaRF basket_json: CommodityBasketOption, CommodityRainbowOption, CommodityWorstOfBasketSwap day_count_code/payment_frequency_code: CommoditySwap swaption_expiry_date: CommoditySwaption