20#ifndef ORES_TRADING_DOMAIN_COMMODITY_INSTRUMENT_HPP
21#define ORES_TRADING_DOMAIN_COMMODITY_INSTRUMENT_HPP
26#include <boost/uuid/uuid.hpp>
27#include "ores.utility/uuid/tenant_id.hpp"
29namespace ores::trading::domain {
62 boost::uuids::uuid
id;
Commodity instrument economics for all commodity ORE product types.
Definition commodity_instrument.hpp:48
std::string option_type
Option type: 'Call' or 'Put'. Empty for non-option products.
Definition commodity_instrument.hpp:107
std::string modified_by
Username of the person who last modified this record.
Definition commodity_instrument.hpp:207
std::string commodity_code
Commodity identifier code (e.g. NGAS, WTI, GOLD).
Definition commodity_instrument.hpp:72
std::string spread_commodity_code
Second commodity code for spread options.
Definition commodity_instrument.hpp:137
std::string unit
Unit of measure for the commodity (e.g. BBL, MMBTU, MT).
Definition commodity_instrument.hpp:87
std::optional< double > knock_out_barrier
Knock-out barrier level for accumulator products.
Definition commodity_instrument.hpp:162
std::string exercise_type
Exercise type: 'European' or 'American'.
Definition commodity_instrument.hpp:117
std::string start_date
Start date for swaps, forwards, and strips.
Definition commodity_instrument.hpp:92
std::string change_commentary
Free-text commentary explaining the change.
Definition commodity_instrument.hpp:222
std::string description
Optional free-text description.
Definition commodity_instrument.hpp:202
double quantity
Contract quantity. Must be positive.
Definition commodity_instrument.hpp:82
std::optional< double > spread_amount
Spread amount for spread options. Nullopt when not applicable.
Definition commodity_instrument.hpp:142
std::optional< double > lower_barrier
Lower barrier level. Nullopt when not applicable.
Definition commodity_instrument.hpp:172
std::string swaption_expiry_date
Swaption expiry date for CommoditySwaption products.
Definition commodity_instrument.hpp:197
std::optional< double > variance_strike
Strike variance for variance swap products. Nullopt when not applicable.
Definition commodity_instrument.hpp:152
std::optional< double > upper_barrier
Upper barrier level. Nullopt when not applicable.
Definition commodity_instrument.hpp:177
std::string average_type
Averaging type for Asian options: 'Arithmetic' or 'Geometric'.
Definition commodity_instrument.hpp:122
std::optional< double > accumulation_amount
Per-fixing accumulation amount for accumulator products.
Definition commodity_instrument.hpp:157
std::string strip_frequency_code
Strip frequency code for option strips (e.g. Monthly, Quarterly).
Definition commodity_instrument.hpp:147
std::chrono::system_clock::time_point recorded_at
Timestamp when this version of the record was recorded.
Definition commodity_instrument.hpp:227
std::string averaging_start_date
Start of the averaging window for Asian options.
Definition commodity_instrument.hpp:127
std::optional< double > strike_price
Option strike price. Nullopt for non-option products.
Definition commodity_instrument.hpp:112
std::string basket_json
JSON array of {code, weight} constituents for basket products.
Definition commodity_instrument.hpp:182
std::string payment_frequency_code
Payment frequency code for swap products.
Definition commodity_instrument.hpp:192
boost::uuids::uuid id
UUID uniquely identifying this commodity instrument.
Definition commodity_instrument.hpp:62
int version
Version number for optimistic locking and change tracking.
Definition commodity_instrument.hpp:52
std::string day_count_code
Day count fraction code for swap products.
Definition commodity_instrument.hpp:187
std::optional< double > fixed_price
Fixed price for forwards and fixed-leg swaps. Nullopt if not applicable.
Definition commodity_instrument.hpp:102
std::string maturity_date
Maturity/expiry date.
Definition commodity_instrument.hpp:97
std::string performed_by
Username of the account that performed this action.
Definition commodity_instrument.hpp:212
std::string trade_type_code
ORE product type code (CommodityForward, CommodityOption, etc.).
Definition commodity_instrument.hpp:67
utility::uuid::tenant_id tenant_id
Tenant identifier for multi-tenancy isolation.
Definition commodity_instrument.hpp:57
std::string change_reason_code
Code identifying the reason for the change.
Definition commodity_instrument.hpp:217
std::string currency
ISO 4217 currency code.
Definition commodity_instrument.hpp:77
std::string averaging_end_date
End of the averaging window for Asian options.
Definition commodity_instrument.hpp:132
std::string barrier_type
Barrier type: e.g. 'UpIn', 'UpOut', 'DownIn', 'DownOut'.
Definition commodity_instrument.hpp:167
A strongly-typed wrapper around a UUID representing a tenant identifier.
Definition tenant_id.hpp:66
static tenant_id system()
Creates a tenant_id representing the system tenant.
Definition tenant_id.cpp:41