|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Real Binance quotes through the cycle searches, against an exact oracle. More...
#include <gtest/gtest.h>#include <gmp.h>#include <algorithm>#include <cmath>#include <cstddef>#include <functional>#include <limits>#include <set>#include <string>#include <vector>#include <Howard_Min_Mean_Cycle.H>#include <Min_Mean_Cycle.H>#include <Negative_Cycles.H>#include <tpl_graph.H>#include "negative_cycles_market_snapshots.H"Go to the source code of this file.
Functions | |
| TEST (NegativeCyclesMarketTest, TheOracleCountsEveryCycleOfTheCompleteMarket) | |
| TEST (NegativeCyclesMarketTest, RealQuotesAgreeWithTheExhaustiveOracle) | |
| TEST (NegativeCyclesMarketTest, ARaisedFeeNeverImprovesTheBestCycle) | |
| TEST (NegativeCyclesMarketTest, QuietStatesOnlyOfferTheRoundTripThatCostsTwoFees) | |
| TEST (NegativeCyclesMarketTest, TheFreshBurstReproducesTheEpisodesOfTheDay) | |
| TEST (NegativeCyclesMarketTest, TrianglesUnderestimateTheFourLegOpportunityOfTheBurst) | |
| TEST (NegativeCyclesMarketTest, StaleQuotesOverstateTheBurstAndFakeTheBiggestProfitOfTheDay) | |
| TEST (NegativeCyclesMarketTest, TheRelaxedBoundLeavesAGapOnARealState) | |
| TEST (NegativeCyclesMarketTest, TheNearBreakEvenStateIsAnUnprofitableTriangle) | |
Real Binance quotes through the cycle searches, against an exact oracle.
The fixture (negative_cycles_market_snapshots.H) holds eighteen states of a six-asset market taken from a 24-hour capture. Each one becomes a digraph whose arcs weigh -ln(rate) - ln(1 - fee), for four fees, with and without hiding the quotes that are stale or whose coverage is not confirmed (the arc filter an application would use). The oracle enumerates every simple cycle of the visible arcs (409 in the complete market) and adds the double weights as exact rationals, so it shares nothing with the library. It is compared with most_negative_cycle_up_to_3(), most_negative_cycle_bounded(), find_disjoint_negative_cycles(), howard_minimum_mean_cycle() and karp_minimum_mean_cycle(). The sign of the best cycle is also checked against the money it moves, with integer arithmetic on the quoted prices.
Definition in file negative_cycles_market_test.cc.
| TEST | ( | NegativeCyclesMarketTest | , |
| ARaisedFeeNeverImprovesTheBestCycle | |||
| ) |
Definition at line 582 of file negative_cycles_market_test.cc.
References Negative_Cycles_Market_Data::Market_Snapshot::label, m, r, and Negative_Cycles_Market_Data::snapshots.
| TEST | ( | NegativeCyclesMarketTest | , |
| QuietStatesOnlyOfferTheRoundTripThatCostsTwoFees | |||
| ) |
Definition at line 616 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), Negative_Cycles_Market_Data::Market_Snapshot::label, m, r, and Negative_Cycles_Market_Data::snapshots.
| TEST | ( | NegativeCyclesMarketTest | , |
| RealQuotesAgreeWithTheExhaustiveOracle | |||
| ) |
Definition at line 566 of file negative_cycles_market_test.cc.
References Negative_Cycles_Market_Data::snapshots.
| TEST | ( | NegativeCyclesMarketTest | , |
| StaleQuotesOverstateTheBurstAndFakeTheBiggestProfitOfTheDay | |||
| ) |
Definition at line 719 of file negative_cycles_market_test.cc.
References Aleph::all(), and Aleph::enumerate().
| TEST | ( | NegativeCyclesMarketTest | , |
| TheFreshBurstReproducesTheEpisodesOfTheDay | |||
| ) |
Definition at line 650 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), and m.
| TEST | ( | NegativeCyclesMarketTest | , |
| TheNearBreakEvenStateIsAnUnprofitableTriangle | |||
| ) |
Definition at line 791 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), m, and r.
| TEST | ( | NegativeCyclesMarketTest | , |
| TheOracleCountsEveryCycleOfTheCompleteMarket | |||
| ) |
Definition at line 550 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), m, and Negative_Cycles_Market_Data::snapshots.
| TEST | ( | NegativeCyclesMarketTest | , |
| TheRelaxedBoundLeavesAGapOnARealState | |||
| ) |
Definition at line 761 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), m, and r.
| TEST | ( | NegativeCyclesMarketTest | , |
| TrianglesUnderestimateTheFourLegOpportunityOfTheBurst | |||
| ) |
Definition at line 683 of file negative_cycles_market_test.cc.
References Aleph::enumerate(), and m.