Home /Modules/advantage/README.md

README.md

advantage/trading/README.md · 150 line(s) · markdown

advantage/trading — eleven cross-asset trading models (C core + C++ layer)

The same three business models apply whether the asset is a token or a mid-century dresser; only the numbers differ (fees, holding cost, days held, fill odds). This directory implements them as pure computation and joins them to the advantage model so counsel can rank approaches.

ModelIdeaDigital examplePhysical example
Arbitrage (tm_arbitrage)Same asset, two venues, price gapDEX → CEXRegional listing → premium relist
Market making (tm_marketmaking, tm_quote)Be the instant buyer and seller; earn the spread, bear stuck-inventory riskOrder book / AMM quoting"Cash for estate lots"
Refurbishment (tm_refurbishment)Buy raw/distressed, improve, sell to a higher tier; result is a distributionGraded numismatic coinsRestored mid-century furniture
Regional arbitrage (tm_regional, tm_regional_premium)Buy low in one place, move it, sell high in another; the move can fail or damage the goodsCountry-exclusive premium (capital-control barrier)Estate sale → dense urban resale
Supply aggregation (tm_aggregation)Collect many small items into a cohesive set; an incomplete set is worth only its partsSorted, attributed coin setsMatched dining-chair sets
Informational asymmetry (tm_asymmetry, tm_mispricing)A listing is mislabeled or misunderstood. One evaluation = one candidate: you pay to look every time, buy only if you win the race, and profit only if your read was rightMispriced listings / panic discounts"Old wooden table" that is a designer piece
Distressed inventory (tm_distressed)Buy from sellers who want speed and certainty over price, then sell on. Institutional liquidators compete, so there is a win probability and a cost to chase every lotForced-liquidation dips on thin booksOffice/eviction/storage-auction truckloads
Virtual inventory (tm_virtual)Take the customer's payment first, source the item after. The sale funds the purchase; the risk is being unable to fulfilDealer-fulfilled graded coin salesPick-up-after-payment resale
Synthetic bundling (tm_synthetic)Turn one thing into many (break up a collection) or many into one (assemble parts); wrap/unwrap is the one-output caseWrapped-token spreads; estate breakups with melt valueBespoke assembled pieces
Event momentum (tm_momentum, tm_hype_decay)Enter on a news or trend shock, exit while demand is elevated; hype decays on a half-life and exit liquidity is the dominant riskNews-driven micro-cap entriesTrend-driven vintage buying
Consignment / zero inventory (tm_consignment)Match buyers and sellers for a commission; no inventory, almost no capital, but your time and counterparty risk are the real inputsLocal OTC / escrow deskStaging and sales for people moving out

Files

FileRole
trade_models.{h,c}C core: the three models, validation, advantage bridge
trade_models.{hpp,cpp}C++ layer: Checked<T> results, vector outcomes, the trade-off tables as data (profiles(), advancedModelMatrix(), nicheModelMatrix()), addEvidence into an AdvantageStore
rate_budget.{h,c,hpp}Pure rate-limit budget: reads X-RateLimit-* / Retry-After values and says how long to wait. No sockets, no sleeping
trading_demo.cpp22 approaches (eleven models × digital and physical), 67 illustrative scenarios, all comparison tables, a rate-budget walkthrough, then a ranked counsel
Makefilemake / make run / make clean. No OpenSSL, no network

Build and run

make run

How it connects to the advantage model

tm_advantage expresses a trade as reward = expected proceeds against baseline = total cost + opportunity cost of the capital for hold_days. That is the same advantage_value the rest of the module uses. addEvidence appends the result as an <observation> on a source, so counsel scores it with the usual mean × confidence × trust, and doubted assumptions (for example "listings may be gathered within each platform's terms") discount it.

Scale::PerUnitCost divides reward and baseline by total cost, so a $20,000 token trade and a $100 dresser flip are compared per unit of capital instead of the larger one winning on size. Use Scale::Absolute within a single approach.

Care taken

Honest limits

Rate budget (rate_budget.*)

The polite use of rate-limit headers: take what the server allows at the fastest pace it allows, and no faster.

Model notes

Deliberately not built

Next

SLeeLa source versioning for these models is deferred (planned as a follow-up).