Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
negative_cycles_market_snapshots.H File Reference

Top-of-book quotes of real Binance spot markets, as a fixture for the cycle searches of Negative_Cycles.H, Min_Mean_Cycle.H and Howard_Min_Mean_Cycle.H. More...

#include <cstddef>
Include dependency graph for negative_cycles_market_snapshots.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Negative_Cycles_Market_Data::Market_Quote
 Best bid and ask of one pair, with the price scale of both. More...
 
struct  Negative_Cycles_Market_Data::Market_Snapshot
 State of the whole market at one instant. More...
 

Namespaces

namespace  Negative_Cycles_Market_Data
 

Variables

constexpr int Negative_Cycles_Market_Data::asset_count = 6
 Number of assets of the market: BTC, ETH, SOL, BNB, USDT and USDC.
 
constexpr int Negative_Cycles_Market_Data::pair_count = 15
 Number of pairs, one for each pair of assets.
 
constexpr const char *const Negative_Cycles_Market_Data::asset_names [asset_count] = {"BTC", "ETH", "SOL", "BNB", "USDT", "USDC"}
 Names of the assets, indexed by Market_Quote::base and Market_Quote::quote.
 
const Market_Snapshot Negative_Cycles_Market_Data::snapshots []
 The snapshots, in chronological order.
 
constexpr std::size_t Negative_Cycles_Market_Data::snapshot_count = sizeof(snapshots) / sizeof(snapshots[0])
 Number of snapshots.
 

Detailed Description

Top-of-book quotes of real Binance spot markets, as a fixture for the cycle searches of Negative_Cycles.H, Min_Mean_Cycle.H and Howard_Min_Mean_Cycle.H.

The quotes come from the best bid and ask stream (bookTicker) of six assets (BTC, ETH, SOL, BNB, USDT, USDC) and their fifteen pairs, captured for 24 hours from 2026-10-02 00:31 UTC. About 4.4 million updates were replayed through the searches; these snapshots were chosen by criteria, not at random:

  • first and typical-1 .. typical-8: the first complete state and eight spread over the day, where nothing is profitable once fees are charged;
  • len3 .. len6: the first state whose most profitable fee-free cycle has that many legs;
  • raw-peak: the largest raw profit with a fee of 0.075 % per leg, made of stale quotes;
  • near-zero: the best cycle closest to break-even with a fee of 0.1 %;
  • bounded-miss: a state where the bounded search with L = 6, a relaxed problem, does not return the best cycle;
  • burst-1 .. burst-3: the peak of each of the three episodes of the day in which every leg was at most one second old and its coverage observed, with a fee of 0.075 % per leg. They fall within seven seconds of each other.

Only prices are kept: quantities, timestamps and connection identifiers are left out. A price is bid / 10^exponent (or ask / 10^exponent). For each quote, age_ms is the time since its last update when the snapshot was taken, and observed tells whether its coverage was confirmed; together they let a test hide the stale arcs with the arc filter of the searches, as an application would.

Definition in file negative_cycles_market_snapshots.H.