SPB Git

spb/wp40_uqo

Public MIT
1.4 KB · 34 lines cpp
1#pragma once2#include <string>3#include <vector>4#include <map>5#include <nlohmann/json.hpp>6#include "raid/core/types.hpp"78namespace raid {910/// QualityReport: counts of data issues found by BarSeries::validate(); prices are never altered.11struct QualityReport {12  std::string symbol;13  usize n_bars{0};14  usize n_sessions{0};15  usize ohlc_inconsistent{0};   // high < max(open,close) or low > min(open,close) or high < low16  usize nonpositive_price{0};17  usize negative_volume{0};18  usize zero_volume{0};19  usize duplicates{0};          // duplicate (timestamp) rows removed20  usize off_interval{0};        // timestamp not aligned on the interval grid21  usize outside_session{0};     // bar outside 04:00–20:00 ET (extended) / outside regular when policy=regular22  usize non_trading_day{0};23  usize unsorted{0};            // rows reordered24  usize missing_regular_bars{0}; // sum over sessions of (expected − present) regular bars25  usize price_jumps{0};         // |close/prev close − 1| > jump_threshold within a session26  f64 coverage{1.0};            // present / expected regular bars27  std::map<std::string, usize> per_session_missing;  // session → missing bars (only sessions with gaps)28  std::vector<std::string> notes;29  bool has_errors() const { return ohlc_inconsistent || nonpositive_price || negative_volume || off_interval || non_trading_day; }30  nlohmann::json to_json() const;31};3233}  // namespace raid34
Files · main
Menu

Theme