|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Empirical Validation Binary — Regime Classification + Return Recording. More...
#include "srfm/manifold.hpp"#include "srfm/normalizer.hpp"#include "srfm/tensor.hpp"#include "srfm/geodesic_signal.hpp"#include "srfm/constants.hpp"#include <algorithm>#include <cmath>#include <cstdlib>#include <fstream>#include <iostream>#include <optional>#include <sstream>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | OhlcvBar |
| struct | ClassifiedBar |
| struct | Args |
Functions | |
| static std::vector< std::string > | split_csv (const std::string &line) |
| Split a CSV line on commas (no quote handling needed for numeric data). | |
| static std::optional< double > | safe_parse_double (const std::string &s) |
| Safely parse a double from a string. Returns nullopt on failure. | |
| static int | find_col (const std::vector< std::string > &header, const std::string &name) |
| Find the column index of a header name (case-insensitive). | |
| static std::optional< std::vector< OhlcvBar > > | load_csv (const std::string &path, std::string &err) |
| static std::vector< ClassifiedBar > | classify_bars (const std::vector< OhlcvBar > &bars, const std::string &ticker) |
| static bool | write_output (const std::string &ticker, const std::vector< ClassifiedBar > &bars, const std::string &output_path, std::string &err) |
| static std::optional< Args > | parse_args (int argc, char *argv[]) |
| int | main (int argc, char *argv[]) |
Empirical Validation Binary — Regime Classification + Return Recording.
Reads a 1-minute OHLCV CSV file (produced by validation/fetch_data.py), runs the full SRFM pipeline on each bar, and writes one output row per bar:
ticker, bar_index, interval_type, next_bar_abs_return, beta, geodesic_deviation
This output feeds the Q1 and Q2 Python analysis scripts.
regime_validator –input <csv> –output <csv> –ticker <name>
0 — success 1 — fatal error (missing file, bad args, etc.)
Definition in file regime_validator.cpp.
|
static |
Definition at line 196 of file regime_validator.cpp.
|
static |
Find the column index of a header name (case-insensitive).
Definition at line 92 of file regime_validator.cpp.
|
static |
Definition at line 104 of file regime_validator.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 374 of file regime_validator.cpp.
|
static |
Definition at line 347 of file regime_validator.cpp.
|
static |
Safely parse a double from a string. Returns nullopt on failure.
Definition at line 78 of file regime_validator.cpp.
|
static |
Split a CSV line on commas (no quote handling needed for numeric data).
Definition at line 60 of file regime_validator.cpp.
|
static |
Definition at line 311 of file regime_validator.cpp.