Skip to content

Commit 9845270

Browse files
committed
ADD: Add volatility and delta stat types
1 parent 85ee346 commit 9845270

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
## 0.17.0 - TBD
44

55
### Enhancements
6-
- Add `StatusMsg` record, and `StatusAction`, `StatusReason`, `TradingEvent`, and
6+
- Added `StatusMsg` record, and `StatusAction`, `StatusReason`, `TradingEvent`, and
77
`TriState` enums
8-
- Format `unit_of_measure_qty` as a fixed-precision decimal
8+
- Added `Volatility` and `Delta` `StatType` variants
9+
- Added `Undefined` and `TimeProRata` `MatchAlgorithm` variants
10+
- Changed format of `unit_of_measure_qty` to a fixed-precision decimal
911
- Added logic to skip `find_package` call if `nlohmann_json` and `httplib` targets
1012
already exist (credit: @akovachev)
11-
- Add specific instructions for installing dependencies on Ubuntu and macOS (credit: @camrongodbout)
13+
- Added specific instructions for installing dependencies on Ubuntu and macOS (credit: @camrongodbout)
1214

1315
### Bug fixes
14-
- Fix out-of-order initialization in `DbnDecoder` (credit: @Hailios)
16+
- Fixed out-of-order initialization in `DbnDecoder` (credit: @Hailios)
17+
- Renamed `MatchAlgorithm::EurodollarOptions` to `MatchAlgorithm::EurodollarFutures`
1518

1619
## 0.16.0 - 2024-03-01
1720

include/databento/enums.hpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,16 @@ using instrument_class::InstrumentClass;
188188

189189
namespace match_algorithm {
190190
enum MatchAlgorithm : char {
191+
Undefined = ' ',
191192
Fifo = 'F',
192193
Configurable = 'K',
193194
ProRata = 'C',
194195
FifoLmm = 'T',
195196
ThresholdProRata = 'O',
196197
FifoTopLmm = 'S',
197198
ThresholdProRataLmm = 'Q',
198-
EurodollarOptions = 'Y',
199+
EurodollarFutures = 'Y',
200+
TimeProRata = 'P',
199201
};
200202
} // namespace match_algorithm
201203
using match_algorithm::MatchAlgorithm;
@@ -259,6 +261,12 @@ enum StatType : std::uint16_t {
259261
/// `price` will be set to the VWAP while `quantity` will be the traded
260262
/// volume.
261263
Vwap = 13,
264+
// The implied volatility associated with the settlement price. `price` will
265+
// be set with the standard precision.
266+
Volatility = 14,
267+
// The option delta associated with the settlement price. `price` will be set
268+
// with the standard precision.
269+
Delta = 15,
262270
};
263271
} // namespace stat_type
264272
using stat_type::StatType;

src/enums.cpp

+14-2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ const char* ToString(InstrumentClass instrument_class) {
372372

373373
const char* ToString(MatchAlgorithm match_algorithm) {
374374
switch (match_algorithm) {
375+
case match_algorithm::Undefined: {
376+
return "Undefined";
377+
}
375378
case match_algorithm::Fifo: {
376379
return "Fifo";
377380
}
@@ -393,8 +396,11 @@ const char* ToString(MatchAlgorithm match_algorithm) {
393396
case match_algorithm::ThresholdProRataLmm: {
394397
return "ThresholdProRataLmm";
395398
}
396-
case match_algorithm::EurodollarOptions: {
397-
return "EurodollarOptions";
399+
case match_algorithm::EurodollarFutures: {
400+
return "EurodollarFutures";
401+
}
402+
case match_algorithm::TimeProRata: {
403+
return "TimeProRata";
398404
}
399405
default: {
400406
return "Unknown";
@@ -474,6 +480,12 @@ const char* ToString(StatType stat_type) {
474480
case StatType::Vwap: {
475481
return "Vwap";
476482
}
483+
case StatType::Volatility: {
484+
return "Volatility";
485+
}
486+
case StatType::Delta: {
487+
return "Delta";
488+
}
477489
default: {
478490
return "Unknown";
479491
}

0 commit comments

Comments
 (0)