# Graph Report - trading-lab (2026-09-23) ## Corpus Check - cluster-only mode — file stats not available ## Summary - 1502 nodes · 3752 edges · 77 communities (64 shown, 13 thin omitted) - Extraction: 98% EXTRACTED · 2% INFERRED · 0% AMBIGUOUS · INFERRED: 88 edges (avg confidence: 0.85) - Token cost: 0 input · 0 output ## Graph Freshness - Built from commit: `a2415c3d` - Run `git rev-parse HEAD` and compare to check if the graph is stale. - Run `graphify update .` after code changes (no API cost). ## Community Hubs (Navigation) - Community 0 - Community 1 - Community 2 - Community 3 - Community 4 - Community 5 - Community 6 - Community 7 - Community 8 - Community 9 - Community 10 - Community 11 - Community 12 - Community 13 - Community 14 - Community 15 - Community 16 - Community 17 - Community 18 - Community 19 - Community 20 - Community 21 - Community 22 - Community 23 - Community 24 - Community 25 - Community 26 - Community 27 - Community 28 - Community 29 - Community 30 - Community 31 - Community 32 - Community 33 - Community 34 - Community 35 - Community 36 - Community 37 - Community 38 - Community 39 - Community 40 - Community 41 - Community 42 - Community 43 - Community 44 - Community 45 - Community 46 - Community 47 - Community 48 - Community 49 - Community 50 - Community 51 - Community 52 - Community 53 - Community 54 - Community 55 - Community 56 - Community 57 - Community 58 - Community 59 - Community 60 - Community 61 - Community 62 - Community 63 - Community 64 - Community 65 - Community 66 - Community 67 - Community 68 - Community 69 - Community 70 - Community 71 - Community 72 - Community 73 - Community 74 ## God Nodes (most connected - your core abstractions) 1. `tn` - 127 edges 2. `n()` - 59 edges 3. `s()` - 45 edges 4. `o()` - 32 edges 5. `ho()` - 30 edges 6. `i()` - 30 edges 7. `wa` - 29 edges 8. `write_result()` - 28 edges 9. `l()` - 27 edges 10. `e()` - 27 edges ## Surprising Connections (you probably didn't know these) - `smc_score()` --calls--> `Costs` [EXTRACTED] experiments/exp003_walkforward.py → lab/backtest.py - `main()` --calls--> `Costs` [EXTRACTED] experiments/exp006_gate_futures.py → lab/backtest.py - `t_fees()` --calls--> `Costs` [EXTRACTED] tests/test_engine.py → lab/backtest.py - `run_cell()` --calls--> `BreakoutParams` [EXTRACTED] experiments/exp007_regime_breakout.py → lab/breakout.py - `lab_run()` --calls--> `BreakoutParams` [EXTRACTED] freqtrade/resolve_intrabar.py → lab/breakout.py ## Import Cycles - None detected. ## Communities (77 total, 13 thin omitted) ### Community 0 - "Community 0" Cohesion: 0.02 Nodes (3): numpy, calculate(), calculate() ### Community 1 - "Community 1" Cohesion: 0.05 Nodes (10): labelColor(), labelPointStyle(), m(), Nn(), p(), pe(), rt(), v() (+2 more) ### Community 2 - "Community 2" Cohesion: 0.09 Nodes (47): cells(), compare(), db(), live(), meta(), Trading Lab dashboard API — FastAPI over the ETL'd SQLite DB. Read-only. Serves…, rows(), run_detail() (+39 more) ### Community 3 - "Community 3" Cohesion: 0.05 Nodes (42): files, kind, producer, source, source_dir, total_bytes, total_rows, files (+34 more) ### Community 4 - "Community 4" Cohesion: 0.11 Nodes (33): main(), bar_replay_1m(), build_rows(), full_replay(), load_1h(), load_1m(), main(), DataFrame (+25 more) ### Community 5 - "Community 5" Cohesion: 0.09 Nodes (26): datetime, freqtrade_persistence, _atr(), DataFrame, Series, Regime-filtered volatility breakout — our lab's rule, running inside freqtrade.…, Index of the last candle at or before (or strictly before) `when`., Post-only limit: rest the order at the SIGNAL candle's close (one ATR-offset… (+18 more) ### Community 6 - "Community 6" Cohesion: 0.09 Nodes (15): Bn(), buildTicks(), _calculateBarValuePixels(), getLabelAndValue(), getLabelForValue(), ii(), jn(), mo() (+7 more) ### Community 7 - "Community 7" Cohesion: 0.08 Nodes (16): Bt(), color(), Ee(), Ft(), Gt(), It(), jt(), kt() (+8 more) ### Community 8 - "Community 8" Cohesion: 0.12 Nodes (33): bootstrap(), day_index(), load(), main(), outlier_dependence(), profile(), DataFrame, ndarray (+25 more) ### Community 9 - "Community 9" Cohesion: 0.10 Nodes (31): argparse, atr14(), enrich(), funding_R_for_trade(), funding_series(), main(), pair_plan(), DataFrame (+23 more) ### Community 10 - "Community 10" Cohesion: 0.18 Nodes (32): api(), bars(), baseOpts(), boot(), C, cls(), down(), dt() (+24 more) ### Community 11 - "Community 11" Cohesion: 0.10 Nodes (6): an(), as(), on, rs(), ts(), xt ### Community 12 - "Community 12" Cohesion: 0.09 Nodes (26): ai(), average(), beforeDraw(), dataset(), draw(), fo(), getCenterPoint(), getMaxOverflow() (+18 more) ### Community 14 - "Community 14" Cohesion: 0.12 Nodes (18): beforeLayout(), bs(), ct(), ge(), Go(), is(), ks(), ms() (+10 more) ### Community 15 - "Community 15" Cohesion: 0.15 Nodes (14): dataclasses, Regression guard: path1h with fine=None must reproduce the exp012 numbers bit…, Decisive check: match lab trades to freqtrade trades on the ENTRY bar, crosstab…, Compare lab engine vs freqtrade on BTC 4h, matched entries. Columns from the…, Side-by-side of matched BTC 4h trades: lab engine vs freqtrade, same bars., Cross-engine check: the same gate 4h bars through the lab engine and through…, importlib_util, Volatility breakout, regime-filtered, with a volatility-normalised stop. Entry… (+6 more) ### Community 16 - "Community 16" Cohesion: 0.12 Nodes (16): collections, EXP-001 — SMC (smart money / liquidity) baseline across assets and timeframes.…, EXP-002 — deterministic strategy baselines on multi-year daily data. gc…, EXP-004 — is "follow the big money" measurable? Funding-rate crowding test.…, main(), Series, EXP-006 — permutation control: are the passing strategies better than their own…, Same multiset of non-zero signals, positions permuted. (+8 more) ### Community 17 - "Community 17" Cohesion: 0.10 Nodes (21): fetch(), get(), main(), DataFrame, Fetch 1h USDT-perp candles for the full gate test windows (1d from 2020-01, 4h…, fetch_window(), http_json(), main() (+13 more) ### Community 18 - "Community 18" Cohesion: 0.17 Nodes (7): afterDraw(), afterEvent(), Ba(), f(), Ta(), wa, za() ### Community 19 - "Community 19" Cohesion: 0.13 Nodes (10): ao(), co(), da(), Do(), getBasePixel(), inXRange(), inYRange(), Oe() (+2 more) ### Community 20 - "Community 20" Cohesion: 0.10 Nodes (14): bo, et(), getRange(), H(), _i(), j(), ji(), ko() (+6 more) ### Community 22 - "Community 22" Cohesion: 0.15 Nodes (21): buy_and_hold(), candles_from(), causality_check(), load_calculate(), main(), max_dd_hold(), DataFrame, EXP-010 — Optima's shipped TRIX example script, run through Optima's OWN… (+13 more) ### Community 23 - "Community 23" Cohesion: 0.15 Nodes (7): buildLookupTable(), _generate(), _getTimestampsForTable(), ho(), initOffsets(), nt(), Vo() ### Community 25 - "Community 25" Cohesion: 0.17 Nodes (3): fn(), gn(), n() ### Community 26 - "Community 26" Cohesion: 0.19 Nodes (20): main(), main(), strat_score(), main(), score_dir(), stats_for(), atr_plan(), Costs (+12 more) ### Community 27 - "Community 27" Cohesion: 0.11 Nodes (16): load(), main(), DataFrame, load(), main(), DataFrame, apply_cooldown(), BreakoutParams (+8 more) ### Community 28 - "Community 28" Cohesion: 0.13 Nodes (3): rn(), xn(), Ye() ### Community 30 - "Community 30" Cohesion: 0.17 Nodes (7): a(), determineDataLimits(), Di(), pi(), r(), ri(), So ### Community 31 - "Community 31" Cohesion: 0.22 Nodes (19): best_cell(), cell_tag(), main(), markdown(), phase_ablation(), phase_cost_curve(), phase_costs(), phase_grid() (+11 more) ### Community 32 - "Community 32" Cohesion: 0.17 Nodes (19): check(), DataFrame, Engine sanity tests — the properties that make the numbers in results/…, Regime, ATR and breakout signals at bar k must not change when bars > k change., Costs in R must equal round-trip bps / stop distance, funding must scale with…, Fill at next open, stop checked before target, gap fills at the open., The trail must not move the stop until the trade has earned +arm_R., A signal on the last bar must not be filled at that bar's own open. (+11 more) ### Community 33 - "Community 33" Cohesion: 0.15 Nodes (17): csv, _cache_path(), fetch_ohlcv(), _get(), load_csv(), Market data access for the trading lab. Primary source: KuCoin public REST (no…, CoinGecko spot cross-check (independent of KuCoin)., Download (paginated) and cache OHLCV. Returns the cache path. start defaults to… (+9 more) ### Community 34 - "Community 34" Cohesion: 0.14 Nodes (11): Ae(), l(), lo(), Ls(), o(), po(), Qs(), ra() (+3 more) ### Community 35 - "Community 35" Cohesion: 0.15 Nodes (15): _calculateBarIndexPixels(), Fs(), _getAxis(), _getAxisCount(), getFirstScaleIdForIndexAxis(), getPixelForTick(), getPixelForValue(), _getRuler() (+7 more) ### Community 36 - "Community 36" Cohesion: 0.17 Nodes (17): load_feather(), main(), DataFrame, EXP-006 — parity + extension: run the lab engine on the GATE USDT-perp candles…, build(), Levels, Params, _pools_at() (+9 more) ### Community 37 - "Community 37" Cohesion: 0.16 Nodes (17): DataFrame, ndarray, Series, Intra-bar path engine: manage a 4h-signalled trade with 1h candles. The…, Positional [start, end) of the 1h bars inside the 4h bar opening at start_ns., fine: optional {bar_open_ns: (open, high, low, close) arrays} to evaluate…, run_path1h(), _sub_slice() (+9 more) ### Community 38 - "Community 38" Cohesion: 0.16 Nodes (12): ca, ea(), fa(), ga(), ha(), ia(), la(), ma() (+4 more) ### Community 39 - "Community 39" Cohesion: 0.19 Nodes (4): ce(), de, dt(), he() ### Community 40 - "Community 40" Cohesion: 0.31 Nodes (15): add_all(), atr(), donchian(), ema(), obv(), DataFrame, Series, Indicators. Pure pandas, no third-party TA libs, all causal (no lookahead):… (+7 more) ### Community 41 - "Community 41" Cohesion: 0.18 Nodes (7): addBox(), beforeUpdate(), configure(), initialize(), reset(), start(), u() ### Community 42 - "Community 42" Cohesion: 0.32 Nodes (5): ki(), Oi(), Si(), x(), zs() ### Community 43 - "Community 43" Cohesion: 0.27 Nodes (14): Fixed-fractional, compounding, with a cap on simultaneous open positions., run_portfolio(), cfg_tag(), load_wf_cells(), main(), markdown(), panel_a_repriced(), panel_b_and_e() (+6 more) ### Community 44 - "Community 44" Cohesion: 0.16 Nodes (8): blended_round_trip_bps(), breakeven_taker_fee_bps(), ExecModel, Execution models: taker (market/stop) vs post-only maker (resting limit). Why…, Per-side TAKER fee at which average net R crosses zero. Algebra: the round trip…, The round-trip bps under each execution scenario, for the report., Fill-weighted average round trip (bps) actually paid across a trade list., scenario_table() ### Community 45 - "Community 45" Cohesion: 0.27 Nodes (14): bootstrap(), day_index(), describe(), load(), main(), DataFrame, ndarray, Series (+6 more) ### Community 46 - "Community 46" Cohesion: 0.18 Nodes (5): addElements(), kn(), qn(), removeBox(), stop() ### Community 47 - "Community 47" Cohesion: 0.15 Nodes (13): at(), b(), cn(), dn(), e(), eo(), fe(), gi() (+5 more) ### Community 48 - "Community 48" Cohesion: 0.25 Nodes (3): Bi(), Ci(), Fi() ### Community 49 - "Community 49" Cohesion: 0.24 Nodes (11): load_pairs(), bootstrap(), enrich_oos_trades(), main(), markdown(), net_at_fee(), portfolio(), EXP-009 — how much of the breakout edge survives fees, and how confident are… (+3 more) ### Community 50 - "Community 50" Cohesion: 0.19 Nodes (8): beforeDatasetDraw(), beforeDatasetsDraw(), es(), generateLabels(), Ie(), Ni(), oa(), ua() ### Community 51 - "Community 51" Cohesion: 0.19 Nodes (6): ei(), je(), qe(), ti(), yn(), ze() ### Community 52 - "Community 52" Cohesion: 0.19 Nodes (10): load_results(), os, cross_engine_section(), main(), Summarise every results/*.json into a single human-readable results/RESULTS.md., chosen_breakout_cells(), main(), Daily signal sheet — what the lab says TODAY, for every tracked asset. This is… (+2 more) ### Community 54 - "Community 54" Cohesion: 0.24 Nodes (10): main(), EXP-003 — walk-forward validation of the parameter-sensitive parts. The SMC…, smc_make_signals(), smc_score(), strat_make_signals(), grid(), DataFrame, Walk-forward / out-of-sample harness. The single most common way a hobby… (+2 more) ### Community 55 - "Community 55" Cohesion: 0.24 Nodes (11): bootstrap_ci(), main(), markdown(), phase_ablation_paired(), phase_portfolio(), ndarray, EXP-008 — the portfolio answer: what is actually left after fees? EXP-007…, Same lookback/stop/tp, regime gate on vs off. Paired, per stream. (+3 more) ### Community 56 - "Community 56" Cohesion: 0.29 Nodes (3): aa(), afterDatasetsUpdate(), onClick() ### Community 57 - "Community 57" Cohesion: 0.27 Nodes (3): afterUpdate(), va(), ya ### Community 58 - "Community 58" Cohesion: 0.24 Nodes (4): io(), no(), oo, zi() ### Community 59 - "Community 59" Cohesion: 0.33 Nodes (4): ndarray, OOS trades of every fold (windows as in EXP-008) + signals that expired…, (caught_gross_R, skipped_gross_R) — the taker outcome of every signal the…, Runner ### Community 60 - "Community 60" Cohesion: 0.36 Nodes (8): all_signals(), dnc(), gc(), DataFrame, Series, Deterministic strategies (the "known recipe" baseline) + agreement vote. gc :…, rsi(), vol() ### Community 61 - "Community 61" Cohesion: 0.22 Nodes (3): getDecimalForValue(), getValueForPixel(), jo() ### Community 63 - "Community 63" Cohesion: 0.39 Nodes (8): dip_dir(), main(), make_signals(), DataFrame, Series, random_dir(), EXP-005 — "buy the deep dip" (mean reversion), with a matched random control.…, +1 on bars where the close is at least `depth` below the close `lookback` bars… ### Community 64 - "Community 64" Cohesion: 0.44 Nodes (8): atr_series(), classify(), efficiency_ratio(), DataFrame, Series, Market-regime classification — the filter layer for breakout strategies.…, Kaufman efficiency ratio: net move / sum of absolute moves (0..1)., realised_vol() ### Community 65 - "Community 65" Cohesion: 0.36 Nodes (7): capacity_ratio(), eff_fee(), ev_per_attempt(), main(), Account-size economics for SGB CLASS B. Input: the Plan B fee for every account…, dollars of virtual capital bought per dollar of fee, EV of one attempt, USD, with the 120% refund on full success. p : probability… ### Community 66 - "Community 66" Cohesion: 0.40 Nodes (5): _compound(), main(), DataFrame, Turn freqtrade/out/fee_study.json into the markdown report…, Same fills, costs re-priced per leg, compounded at `risk` per trade (close… ### Community 67 - "Community 67" Cohesion: 0.40 Nodes (3): Be(), ne(), numeric() ### Community 68 - "Community 68" Cohesion: 0.40 Nodes (3): g(), g(), updateRangeFromParsed() ### Community 70 - "Community 70" Cohesion: 0.67 Nodes (3): forward_returns(), DataFrame, Series ## Knowledge Gaps - **44 isolated node(s):** `T`, `C`, `GR`, `S`, `files` (+39 more) These have ≤1 connection - possible missing edges or undocumented components. (Counts symbols only; 384 node(s) total have ≤1 connection when file, concept and rationale nodes are included.) - **13 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes. ## Suggested Questions _Questions this graph is uniquely positioned to answer:_ - **Why does `tn` connect `Community 13` to `Community 1`, `Community 6`, `Community 12`, `Community 14`, `Community 19`, `Community 20`, `Community 21`, `Community 23`, `Community 24`, `Community 29`, `Community 30`, `Community 34`, `Community 35`, `Community 39`, `Community 41`, `Community 46`, `Community 48`, `Community 50`, `Community 51`, `Community 56`, `Community 61`, `Community 62`?** _High betweenness centrality (0.045) - this node is a cross-community bridge._ - **Why does `n()` connect `Community 25` to `Community 1`, `Community 6`, `Community 11`, `Community 13`, `Community 14`, `Community 18`, `Community 19`, `Community 23`, `Community 24`, `Community 28`, `Community 29`, `Community 30`, `Community 34`, `Community 35`, `Community 38`, `Community 41`, `Community 42`, `Community 46`, `Community 47`, `Community 51`, `Community 56`, `Community 58`, `Community 67`, `Community 68`?** _High betweenness centrality (0.018) - this node is a cross-community bridge._ - **Why does `ho()` connect `Community 23` to `Community 1`, `Community 34`, `Community 69`, `Community 12`, `Community 13`, `Community 14`, `Community 61`, `Community 19`, `Community 29`, `Community 30`?** _High betweenness centrality (0.016) - this node is a cross-community bridge._ - **Are the 13 inferred relationships involving `s()` (e.g. with `ao()` and `co()`) actually correct?** _`s()` has 13 INFERRED edges - model-reasoned connections that need verification._ - **What connects `T`, `C`, `GR` to the rest of the system?** _44 weakly-connected nodes found - possible documentation gaps or missing edges._ - **Should `Community 0` be split into smaller, more focused modules?** _Cohesion score 0.024096385542168676 - nodes in this community are weakly interconnected._ - **Should `Community 1` be split into smaller, more focused modules?** _Cohesion score 0.049678550555230856 - nodes in this community are weakly interconnected._