Repository Analysis

stefan-jansen/machine-learning-for-trading

Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.

34.0 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of stefan-jansen/machine-learning-for-trading, a Jupyter Notebook project with 19,844 GitHub stars. SynthScan v2.0 examined 170,049 lines of code across 352 source files, recording 3511 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 34.0 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

34.0
Adjusted Score
34.0
Raw Score
100%
Time Factor
2026-07-13
Last Push
19.8K
Stars
Jupyter Notebook
Language
170.0K
Lines of Code
352
Files
3.5K
Pattern Hits
2026-07-14
Scan Date
0.08
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 27MEDIUM 994LOW 2490

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3511 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators881 hits · 2872 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml11 # ===================COMMENT
MEDIUMpyproject.toml13 # ===================COMMENT
MEDIUMpyproject.toml22 # ===================COMMENT
MEDIUMpyproject.toml24 # ===================COMMENT
MEDIUMpyproject.toml29 # ===================COMMENT
MEDIUMpyproject.toml31 # ===================COMMENT
MEDIUMpyproject.toml42 # ===================COMMENT
MEDIUMpyproject.toml44 # ===================COMMENT
MEDIUMpyproject.toml50 # ===================COMMENT
MEDIUMpyproject.toml52 # ===================COMMENT
MEDIUMpyproject.toml79 # ===================COMMENT
MEDIUMpyproject.toml81 # ===================COMMENT
MEDIUMpyproject.toml90 # ===================COMMENT
MEDIUMpyproject.toml92 # ===================COMMENT
MEDIUMpyproject.toml97 # ===================COMMENT
MEDIUMpyproject.toml99 # ===================COMMENT
MEDIUMpyproject.toml104 # ===================COMMENT
MEDIUMpyproject.toml106 # ===================COMMENT
MEDIUMpyproject.toml118 # ===================COMMENT
MEDIUMpyproject.toml120 # ===================COMMENT
MEDIUMpyproject.toml123 # ===================COMMENT
MEDIUMpyproject.toml125 # ===================COMMENT
MEDIUMpyproject.toml129 # ===================COMMENT
MEDIUMpyproject.toml131 # ===================COMMENT
MEDIUMpyproject.toml133 # ===================COMMENT
MEDIUMpyproject.toml135 # ===================COMMENT
MEDIUMpyproject.toml150 # ===================COMMENT
MEDIUMpyproject.toml152 # ===================COMMENT
MEDIUMpyproject.toml161 # ===================COMMENT
MEDIUMpyproject.toml163 # ===================COMMENT
MEDIUMpyproject.toml65 # ===================COMMENT
MEDIUMpyproject.toml67 # ===================COMMENT
MEDIUMdocker-compose.yml60 # ============================================COMMENT
MEDIUMdocker-compose.yml63 # ============================================COMMENT
MEDIUMdocker-compose.yml75 # ============================================COMMENT
MEDIUMdocker-compose.yml78 # ============================================COMMENT
MEDIUMdocker-compose.yml98 # ============================================COMMENT
MEDIUMdocker-compose.yml103 # ============================================COMMENT
MEDIUMdocker-compose.yml137 # ============================================COMMENT
MEDIUMdocker-compose.yml141 # ============================================COMMENT
MEDIUMdocker-compose.yml177 # ============================================COMMENT
MEDIUMdocker-compose.yml182 # ============================================COMMENT
MEDIUMdocker-compose.yml202 # ============================================COMMENT
MEDIUMdocker-compose.yml213 # ============================================COMMENT
MEDIUMdocker-compose.yml232 # ============================================COMMENT
MEDIUMdocker-compose.yml235 # ============================================COMMENT
MEDIUMdocker-compose.yml254 # ============================================COMMENT
MEDIUMdocker-compose.yml257 # ============================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py196# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py198# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py202# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py379# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py381# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py385# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py423# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py425# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py428# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py999 # =================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py1001 # =================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py1004 # =================================================================COMMENT
821 more matches not shown…
Over-Commented Block1154 hits · 1130 pts
SeverityFileLineSnippetContext
LOWpyproject.toml81 # ===================COMMENT
LOWdocker-compose.yml1# ML4T 3rd Edition — Docker Compose ConfigurationCOMMENT
LOWdocker-compose.yml21# WHICH IMAGE DO I NEED?COMMENT
LOWdocker-compose.yml201COMMENT
LOW05_synthetic_data/00_classical_simulation.py1# ---COMMENT
LOW05_synthetic_data/00_classical_simulation.py21#COMMENT
LOW05_synthetic_data/00_classical_simulation.py41#COMMENT
LOW05_synthetic_data/00_classical_simulation.py61# ## Statistical NoteCOMMENT
LOW05_synthetic_data/00_classical_simulation.py101# ---COMMENT
LOW05_synthetic_data/00_classical_simulation.py121# differential equation:COMMENT
LOW05_synthetic_data/00_classical_simulation.py221# ### GBM LimitationsCOMMENT
LOW05_synthetic_data/00_classical_simulation.py241# - $dN$ = Poisson process with intensity $\lambda$ (jumps per year)COMMENT
LOW05_synthetic_data/00_classical_simulation.py361COMMENT
LOW05_synthetic_data/00_classical_simulation.py381# - **Stationary**: Prices fluctuate around equilibriumCOMMENT
LOW05_synthetic_data/00_classical_simulation.py521# %% [markdown]COMMENT
LOW05_synthetic_data/00_classical_simulation.py541# - $\theta$ = long-term varianceCOMMENT
LOW05_synthetic_data/00_classical_simulation.py681# %%COMMENT
LOW05_synthetic_data/00_classical_simulation.py701# - $\omega$ = base variance (intercept)COMMENT
LOW05_synthetic_data/00_classical_simulation.py981sns.despine(ax=ax)COMMENT
LOW05_synthetic_data/00_classical_simulation.py1041 title="Return Distributions by Model (Log-Returns)",COMMENT
LOW05_synthetic_data/00_classical_simulation.py1061#COMMENT
LOW05_synthetic_data/00_classical_simulation.py1101#COMMENT
LOW05_synthetic_data/00_classical_simulation.py1161print(f"arch IIDBootstrap (100 samples): mean of means = {np.mean(means):.6f}")COMMENT
LOW05_synthetic_data/00_classical_simulation.py1241print(f"arch MovingBlockBootstrap (100 samples): mean of means = {np.mean(means):.6f}")COMMENT
LOW05_synthetic_data/00_classical_simulation.py1401# **Stationary** bootstrap. The ACF of squared returns shows preservation quality.COMMENT
LOW05_synthetic_data/00_classical_simulation.py1421#COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py1# ---COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py21#COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py41#COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py61# - Variable time intervals between observationsCOMMENT
LOW05_synthetic_data/04_gtgan_irregular.py81#COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py101# ### Results ContextCOMMENT
LOW05_synthetic_data/04_gtgan_irregular.py441sequences_norm = (sequences - seq_min) / (seq_max - seq_min + 1e-8)COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py701COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py1281 fig.show()COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py1541COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py1641# ## Key TakeawaysCOMMENT
LOW05_synthetic_data/04_gtgan_irregular.py1661# **Use Cases**:COMMENT
LOW05_synthetic_data/05_diffusion_ts.py1# ---COMMENT
LOW05_synthetic_data/05_diffusion_ts.py21# **Section Reference**: Section 5.5 (Diffusion Models for Financial Time Series)COMMENT
LOW05_synthetic_data/05_diffusion_ts.py41# predicts $x_0$ directly. The Fourier-domain loss further regularizes spectralCOMMENT
LOW05_synthetic_data/05_diffusion_ts.py61# ---COMMENT
LOW05_synthetic_data/05_diffusion_ts.py81# for General Time Series Generation." ICLR 2024.COMMENT
LOW05_synthetic_data/05_diffusion_ts.py141# %% [markdown]COMMENT
LOW05_synthetic_data/05_diffusion_ts.py401COMMENT
LOW05_synthetic_data/05_diffusion_ts.py801# ## 5. Diffusion ProcessCOMMENT
LOW05_synthetic_data/05_diffusion_ts.py1381COMMENT
LOW05_synthetic_data/05_diffusion_ts.py1401# ### Visual ComparisonCOMMENT
LOW05_synthetic_data/05_diffusion_ts.py1461 synthetic_sequences,COMMENT
LOW05_synthetic_data/05_diffusion_ts.py1661COMMENT
LOW05_synthetic_data/05_diffusion_ts.py1681# ### Hidden Markov Models for Regime DetectionCOMMENT
LOW05_synthetic_data/05_diffusion_ts.py2061COMMENT
LOW05_synthetic_data/05_diffusion_ts.py2221COMMENT
LOW05_synthetic_data/05_diffusion_ts.py2241#COMMENT
LOW05_synthetic_data/06_llm_tabular_great.py1# ---COMMENT
LOW05_synthetic_data/06_llm_tabular_great.py21# **Section Reference**: Section 5.6 (LLMs for Structured Financial Data)COMMENT
LOW05_synthetic_data/06_llm_tabular_great.py41# - Fine-tune GPT-2 on serialized financial records using the GReaT frameworkCOMMENT
LOW05_synthetic_data/06_llm_tabular_great.py61# - Captures complex feature dependencies through attentionCOMMENT
LOW05_synthetic_data/06_llm_tabular_great.py121 "n_generate": N_GENERATE,COMMENT
LOW05_synthetic_data/06_llm_tabular_great.py321print(f"Generated {len(synthetic_df)} samples")COMMENT
1094 more matches not shown…
Hyper-Verbose Identifiers590 hits · 599 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/00_classical_simulation.py398def simulate_mean_reversion_euler(CODE
LOW05_synthetic_data/00_classical_simulation.py456def simulate_mean_reversion_exact(CODE
LOW05_synthetic_data/04_gtgan_irregular.py230def generate_synthetic_irregular_bars(n_bars: int = 1000, seed: int = 42) -> pl.DataFrame:CODE
LOW05_synthetic_data/04_gtgan_irregular.py330def compute_inter_arrival_times(df: pl.DataFrame) -> np.ndarray:CODE
LOW05_synthetic_data/04_gtgan_irregular.py361def create_irregular_sequences(CODE
LOW05_synthetic_data/timegan_metrics.py186def compute_predictive_score_yoon(CODE
LOW05_synthetic_data/timegan_metrics.py298def compute_discriminative_score_yoon(CODE
LOW05_synthetic_data/timegan_metrics.py549def compute_discriminative_score(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py651def compute_signature_with_factorial_norm(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py700def augment_and_signature_paper(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py814def compute_signatures_batch_paper(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1204def compute_expected_signature_gpu(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1672def plot_path_comparison_unconditional(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1776def tstr_evaluation_unconditional(CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py277def deterministic_neural_sort(s: torch.Tensor, tau: float) -> torch.Tensor:CODE
LOW09_model_based_features/12_wasserstein_regimes.py188def _wasserstein_distance_to_centroid(CODE
LOW09_model_based_features/12_wasserstein_regimes.py587def simulate_merton_jump_log_returns(CODE
LOW09_model_based_features/12_wasserstein_regimes.py619def simulate_two_regime_stream(CODE
LOW09_model_based_features/02_structural_breaks.py608def distribution_shift_features(series: np.ndarray, boundary: int, n_bins: int = 50) -> dict:CODE
LOW09_model_based_features/02_structural_breaks.py650def dependence_shift_features(series: np.ndarray, boundary: int) -> dict:CODE
LOW09_model_based_features/02_structural_breaks.py724def compute_all_break_features(series: np.ndarray, boundary: int) -> dict:CODE
LOW09_model_based_features/09_har_rough_volatility.py1032def compute_features_for_symbol(symbol: str, etf_df: pl.DataFrame) -> dict | None:CODE
LOW02_financial_data_universe/06_futures_continuous.py269def identify_front_month_calendar(CODE
LOW…financial_data_universe/14_point_in_time_validation.py187def leakage_corr_scale_invariant(df: pl.DataFrame, feature: str, price: str = "close") -> float:CODE
LOW…financial_data_universe/14_point_in_time_validation.py234def validate_signal_trade_lag(signals: pl.DataFrame, execution_lag: int = 1) -> pl.DataFrame:CODE
LOW02_financial_data_universe/09_options_continuous.py114def select_constant_maturity_straddle(raw_options: pl.DataFrame) -> pl.DataFrame:CODE
LOW02_financial_data_universe/09_options_continuous.py567def build_continuous_straddle_series(cm_series: pl.DataFrame) -> pl.DataFrame:CODE
LOW02_financial_data_universe/17_complete_pipeline.py123def _combine_pipeline_sources(CODE
LOW02_financial_data_universe/17_complete_pipeline.py472def _validate_crypto_coverage(df: pl.DataFrame, symbol: str) -> dict[str, Any]:CODE
LOW02_financial_data_universe/17_complete_pipeline.py515def _add_crypto_session_features(df: pl.DataFrame) -> pl.DataFrame:CODE
LOW…ancial_data_universe/15_survivorship_bias_detection.py1028def check_universe_completeness(CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py175def read_parquet_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py215def read_feather_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/02_corporate_actions.py389def demonstrate_split_adjustment(CODE
LOW02_financial_data_universe/02_corporate_actions.py418def demonstrate_dividend_adjustment(price_before_ex: float = 100.0, dividend: float = 5.0) -> None:CODE
LOW02_financial_data_universe/16_provider_comparison.py539def compare_providers_detailed(CODE
LOW03_market_microstructure/16_itch_information_bars.py165def calculate_tick_imbalance_bars_manual(CODE
LOW03_market_microstructure/07_itch_stylized_facts.py229def load_add_cancel_for_ticker(base_dir: Path, ticker: str) -> tuple[pl.DataFrame, pl.DataFrame]:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py302def analyze_order_flow_for_ticker(base_dir: Path, ticker: str) -> tuple[dict, pl.DataFrame]:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py483def compute_tick_autocorrelation(trades_df: pl.DataFrame, ticker: str, max_lags: int = 20) -> dict:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py587def compare_liquidity_metrics(trades_df: pl.DataFrame, tickers: list[str]) -> pl.DataFrame:CODE
LOW03_market_microstructure/15_itch_lee_ready.py275def classify_trades_lee_ready_databento(CODE
LOW03_market_microstructure/17_databento_bar_sampling.py646def _calibrate_imbalance_bars(CODE
LOW03_market_microstructure/limit_orderbook.py1000def classify_trades_lee_ready(CODE
LOW03_market_microstructure/18_algoseek_jump_detection.py235def lee_mykland_jumps_session(rets: pl.DataFrame, k: int, threshold: float) -> pl.DataFrame:CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py486def reconstruct_lob_snapshots(CODE
LOW03_market_microstructure/05_itch_trading_activity.py417def enrich_execution_messages(message_dir: Path) -> dict[str, int]:CODE
LOW03_market_microstructure/03_itch_lob_analysis.py123def discover_available_symbols(base_dir: Path) -> list[str]:CODE
LOW03_market_microstructure/03_itch_lob_analysis.py1223def compute_liquidity_summary(lob_df: pl.DataFrame) -> dict:CODE
LOW…undamental_alternative_data/14_text_data_extraction.py567def calculate_text_statistics(text: str) -> dict:STRING
LOW…undamental_alternative_data/14_text_data_extraction.py663def calculate_text_similarity(text1: str, text2: str) -> dict:CODE
LOW…fundamental_alternative_data/08_futures_positioning.py215def calculate_positioning_zscore(CODE
LOWtests/test_download_coverage.py40def test_every_free_script_is_mapped_to_a_drift_source():CODE
LOWtests/test_download_coverage.py61def test_mapped_scripts_exist_on_disk():CODE
LOWtests/test_download_coverage.py67def test_drift_sources_match_mapping():CODE
LOWtests/test_download_coverage.py77def test_every_drift_source_has_a_test():CODE
LOWtests/generate_test_microstructure.py667def generate_individual_futures() -> None:CODE
LOWtests/conftest.py303def _migrate_predictions_schema(preds_root: Path) -> None:CODE
LOWtests/conftest.py323def _patch_presets_for_testing(config_dir: Path) -> None:CODE
LOWtests/conftest.py400def pytest_collection_modifyitems(items):CODE
530 more matches not shown…
Unused Imports317 hits · 262 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/04_gtgan_irregular.py137CODE
LOW05_synthetic_data/timegan_metrics.py35CODE
LOW05_synthetic_data/05_diffusion_ts.py105CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py148CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py59CODE
LOW05_synthetic_data/01_timegan.py70CODE
LOW09_model_based_features/09_har_rough_volatility.py1145CODE
LOW…_financial_data_universe/11_crypto_premium_analysis.py544CODE
LOW02_financial_data_universe/17_complete_pipeline.py62CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py66CODE
LOW03_market_microstructure/07_itch_stylized_facts.py74CODE
LOW03_market_microstructure/13_algoseek_minute_bars_eda.py68CODE
LOW03_market_microstructure/18_algoseek_jump_detection.py64CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py153CODE
LOW…rket_microstructure/08_databento_lob_reconstruction.py55CODE
LOW03_market_microstructure/03_itch_lob_analysis.py84CODE
LOWtests/test_download_coverage.py13CODE
LOWtests/add_missing_parameters_cells.py11CODE
LOWtests/generate_test_microstructure.py13CODE
LOWtests/conftest.py413CODE
LOWtests/test_artifact_specs.py1CODE
LOWtests/test_data_quality.py11CODE
LOWtests/test_notebook_output_hygiene.py15CODE
LOWtests/notebook_catalog.py1CODE
LOWtests/test_signals.py20CODE
LOWtests/test_case_study_analytics.py31CODE
LOWtests/test_registry_metrics.py28CODE
LOWtests/notebook_worker.py1CODE
LOWtests/test_backtest_presets.py1CODE
LOWtests/test_import_coverage.py19CODE
LOWtests/test_import_coverage.py21CODE
LOWtests/test_import_coverage.py26CODE
LOWtests/test_download_all_dispatch.py16CODE
LOWtests/test_data_exceptions.py9CODE
LOWtests/test_uncertainty_cscv.py13CODE
LOWtests/test_compose_mounts.py16CODE
LOWtests/test_allocation.py24CODE
LOWtests/test_registry_specs.py11CODE
LOWtests/test_cv_window_fold_splits.py17CODE
LOWtests/test_chapter_imports.py16CODE
LOWtests/test_slot_strategy.py18CODE
LOWtests/test_firm_characteristics_extract.py12CODE
LOWtests/generate_skip_data.py23CODE
LOWtests/test_download_scripts_registry.py11CODE
LOWtests/test_external_drift.py26CODE
LOWtests/test_warmup_periods_for.py8CODE
LOWtests/test_backtest_runner_helpers.py13CODE
LOWtests/test_list_loaders.py11CODE
LOWtests/test_download_helpers.py14CODE
LOWtests/test_notebook_sync.py15CODE
LOWtests/test_cv_splits.py20CODE
LOWtests/test_registry_completeness.py15CODE
LOWtests/test_paths.py9CODE
LOWtests/test_registry_queries_cohort.py19CODE
LOWtests/test_latent_factors_no_leak.py3CODE
LOWtests/test_sequence_dataset.py16CODE
LOWtests/test_sequence_dataset.py20CODE
LOWtests/test_sweep_config_seam.py18CODE
LOWtests/test_futures_loader.py8CODE
LOWutils/cv_splits.py29CODE
257 more matches not shown…
AI Slop Vocabulary78 hits · 230 pts
SeverityFileLineSnippetContext
MEDIUM05_synthetic_data/00_classical_simulation.py112# | **Heston** | Stochastic volatility | Vol surfaces, leverage effect |COMMENT
MEDIUM05_synthetic_data/00_classical_simulation.py543# - $\rho$ = correlation between price and variance shocks (leverage effect)COMMENT
MEDIUM05_synthetic_data/00_classical_simulation.py660 rho=-0.7, # Strong leverage effectCODE
MEDIUM09_model_based_features/01_visual_diagnostics.py140# Using two tests with opposite null hypotheses provides robust conclusions:COMMENT
MEDIUM09_model_based_features/01_visual_diagnostics.py208# The three-test consensus (ADF + KPSS + Phillips-Perron) is more robust thanCOMMENT
MEDIUM09_model_based_features/01_visual_diagnostics.py443# 2. **Use both ADF and KPSS**: opposite null hypotheses give robustCOMMENT
MEDIUM09_model_based_features/02_structural_breaks.py517# The core test is Welch's t-test on absolute values (robust to scale differences).COMMENT
MEDIUM09_model_based_features/02_structural_breaks.py589 # Fligner-Killeen test (robust to non-normality, Alphabot f05)COMMENT
MEDIUM09_model_based_features/02_structural_breaks.py997# 5. **Fisher aggregation** combines p-values across window sizes for robustCOMMENT
MEDIUM09_model_based_features/14_panel_features.py961# scale-invariant, outlier-robust, and stationary, making heterogeneousCOMMENT
MEDIUM09_model_based_features/09_har_rough_volatility.py729# DFA is more robust than R/S for non-stationary series. It removes local trendsCOMMENT
MEDIUM09_model_based_features/09_har_rough_volatility.py917 # DFA is more robust than R/S for shorter windowsCOMMENT
MEDIUM09_model_based_features/13_regime_as_feature.py606# Generate a comprehensive feature set in one pipelineCOMMENT
MEDIUM09_model_based_features/10_uncertainty_features.py447# robust for position sizing.COMMENT
MEDIUM09_model_based_features/10_uncertainty_features.py509# Forecast std from the CI width on original scale (robust to negative log-CIs)COMMENT
MEDIUM09_model_based_features/05_spectral_features.py23# production spectral features, and Welch's method for robust powerCOMMENT
MEDIUM09_model_based_features/05_spectral_features.py443# variance at the cost of frequency resolution. It is more robust than aCOMMENT
MEDIUM09_model_based_features/05_spectral_features.py684# 3. **Welch's method is more robust**: Averaging over overlapping segmentsCOMMENT
MEDIUM09_model_based_features/08_garch_volatility.py22# conditional volatility, persistence parameters, and leverage effects.COMMENT
MEDIUM09_model_based_features/08_garch_volatility.py266# EGARCH allows for asymmetric responses (leverage effect):COMMENT
MEDIUM09_model_based_features/08_garch_volatility.py271# Fit EGARCH(1,1,1) — the o=1 asymmetry order adds the gamma leverage term soCOMMENT
MEDIUM09_model_based_features/08_garch_volatility.py328# negative shocks (the leverage effect). (b) Standardized residuals should look likeCOMMENT
MEDIUM09_model_based_features/08_garch_volatility.py657# 3. **EGARCH captures leverage effect** — negative shocks increase volatility moreCOMMENT
MEDIUM09_model_based_features/11_hmm_regimes.py932# combine both approaches for robust regime featuresCOMMENT
MEDIUM09_model_based_features/03_fractional_differencing.py92# This is simpler, more robust, and avoids overfitting to in-sample data.COMMENT
MEDIUM09_model_based_features/03_fractional_differencing.py501# comprehensive diagnostic summary.COMMENT
MEDIUM09_model_based_features/06_path_signatures.py381# a simple GBM as a test harness. This is **feature evaluation, not modelCOMMENT
MEDIUM02_financial_data_universe/13_data_quality_framework.py247# **MAD** (median absolute deviation, robust to extreme tails), **Z-score**COMMENT
MEDIUM…nancial_data_universe/08_options_greeks_computation.py207# We'll use Brent's method (a robust root-finding algorithm) to solve this.COMMENT
MEDIUM02_financial_data_universe/16_provider_comparison.py339# For production systems, we need a robust strategy that handles:COMMENT
MEDIUM03_market_microstructure/13_algoseek_minute_bars_eda.py25# This notebook provides a comprehensive exploration of the AlgoSeek TAQ minute bar dataset.COMMENT
MEDIUM03_market_microstructure/02_itch_lob_reconstruction.py316# This approach is more robust than order-by-order tracking because it doesn'tCOMMENT
MEDIUM03_market_microstructure/15_itch_lee_ready.py390# Run validation across multiple days to get robust statistics.COMMENT
MEDIUM03_market_microstructure/17_databento_bar_sampling.py28# robust are imbalance-bar parameters across market conditions?COMMENT
MEDIUM03_market_microstructure/17_databento_bar_sampling.py1559# (more robust to outlier days)COMMENT
MEDIUM03_market_microstructure/17_databento_bar_sampling.py1663# DataBento's multi-day MBO data enables robust threshold selection thatCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py152# is jump-robust: a single large $|r_i|$ is multiplied by its smallCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py205# intraday volatility regimes and is robust to the jumps it is trying toCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py478# jumps; bipower variation gives a jump-robust continuous-varianceCOMMENT
MEDIUM03_market_microstructure/03_itch_lob_analysis.py59# microstructure. See Bouchaud et al. (2018) for a comprehensive treatment.COMMENT
MEDIUM…undamental_alternative_data/14_text_data_extraction.py45# - **10-K**: Annual report with comprehensive company informationCOMMENT
MEDIUMtests/conftest.py338# Max configs per family in label config files (keep tests fast but comprehensive).COMMENT
MEDIUMtests/test_chapter_imports.py31 # exercises the sitecustomize hook rather than a path the harness added.COMMENT
MEDIUM08_financial_features/02_microstructure_features.py588# dollar traded. Using multiple liquidity proxies provides a more robust pictureCOMMENT
MEDIUM08_financial_features/07_event_studies.py546# The `ml4t-diagnostic` library adds robust variance adjustment (BMP test,COMMENT
MEDIUM08_financial_features/07_event_studies.py612# | BMP test (robust variance) | No | Yes |COMMENT
MEDIUM08_financial_features/01_price_volume_features.py902# Rank-based features are robust to outliers.COMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py26# A robust signal maintains performance across reasonable variations inCOMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py167# surface** and identify a **robust region**.COMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py255# within 90% of the best. A robust signal has a broad plateau; a fragileCOMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py265 """Compute the robust region as parameters within threshold_pct of best."""STRING
MEDIUM08_financial_features/06_robustness_sensitivity.py305# Visualize robust regionCOMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py410# A robust signal maintains predictive power across market regimes. We useCOMMENT
MEDIUM08_financial_features/06_robustness_sensitivity.py715# Different implementation choices are hyperparameters. A robust signalCOMMENT
MEDIUM08_financial_features/05_feature_selection.py708# 5. **Bootstrap stability** separates features with robust IC from thoseCOMMENT
MEDIUM…ining_the_learning_task/01_data_quality_diagnostics.py1251# excess kurtosis (fat tails). This confirms that robust scaling andCOMMENT
MEDIUM07_defining_the_learning_task/06_ic_inference.py28# IC series and block bootstrap for robust confidence intervals.COMMENT
MEDIUM07_defining_the_learning_task/06_ic_inference.py277# We use the `arch` library's `StationaryBootstrap` for robust inference.COMMENT
MEDIUM07_defining_the_learning_task/06_ic_inference.py656# 2. **Report block bootstrap CIs** - distribution-free and robustCOMMENT
MEDIUM07_defining_the_learning_task/05_signal_evaluation.py812# 3. **Overfitting detection**: Consistent IC across folds suggests robust signalCOMMENT
18 more matches not shown…
Excessive Try-Catch Wrapping176 hits · 169 pts
SeverityFileLineSnippetContext
LOW09_model_based_features/01_visual_diagnostics.py355 except Exception:CODE
LOW09_model_based_features/09_har_rough_volatility.py1050 except Exception:CODE
LOW09_model_based_features/09_har_rough_volatility.py1061 except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py181except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py193except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py213except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py233except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py253except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py1194 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1208 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1246 except Exception as e:STRING
LOW…_financial_data_universe/22_pandas_polars_benchmark.py142except Exception:CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py155except Exception:CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py218 except Exception:CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py875 except Exception:CODE
MEDIUM…nancial_data_universe/08_options_greeks_computation.py259print(f"Error: {abs(test_vol - recovered_iv):.2e}")CODE
LOW02_financial_data_universe/16_provider_comparison.py291 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py316except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py410 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py471 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py481 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py559 except Exception as e:CODE
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py268 except Exception as e:CODE
MEDIUM…ket_microstructure/04_itch_order_lifecycle_analysis.py269 print(f"Error loading {msg_type}: {e}")CODE
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py288 except Exception:CODE
LOW03_market_microstructure/01_itch_parser.py500 except Exception as e:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py250 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py253 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py258 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py273 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py282 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py285 except Exception:CODE
LOW03_market_microstructure/07_itch_stylized_facts.py290 except Exception:CODE
LOW03_market_microstructure/15_itch_lee_ready.py417 except Exception as e:CODE
MEDIUM03_market_microstructure/15_itch_lee_ready.py418 print(f"Error processing {file.name}: {e}")CODE
LOW03_market_microstructure/17_databento_bar_sampling.py427 except Exception as e:CODE
MEDIUM03_market_microstructure/17_databento_bar_sampling.py428 print(f"Error building {bar_type} bars: {e}")CODE
LOW03_market_microstructure/17_databento_bar_sampling.py612 except Exception:CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py138except Exception:CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py309 except Exception:CODE
LOW03_market_microstructure/14_itch_bar_sampling.py335 except Exception as e:CODE
LOW03_market_microstructure/14_itch_bar_sampling.py636 except Exception as e:CODE
MEDIUM03_market_microstructure/05_itch_trading_activity.py144 print(f"Error reading {sub.name}: {e}")CODE
LOW03_market_microstructure/05_itch_trading_activity.py145 except Exception as e:CODE
MEDIUM03_market_microstructure/05_itch_trading_activity.py554 print(f"Error loading {msg_type}: {e}")CODE
LOW03_market_microstructure/05_itch_trading_activity.py555 except Exception as e:CODE
LOW…_alternative_data/03_sec_form4_insider_transactions.py234 except Exception as exc:CODE
LOW04_fundamental_alternative_data/05_entity_resolution.py388except Exception as exc: # offline + uncached, or optional dependency missingCODE
LOW…fundamental_alternative_data/02_sec_filing_explorer.py252 except Exception as exc:CODE
LOW…fundamental_alternative_data/02_sec_filing_explorer.py274 except Exception:CODE
MEDIUM…fundamental_alternative_data/02_sec_filing_explorer.py271def _has_sales(f):CODE
LOWtests/notebook_worker.py120 except Exception as exc:CODE
LOWtests/pm_helpers.py315 except Exception:CODE
LOWtests/pm_helpers.py336 except Exception as e:CODE
LOWtests/test_external_drift.py222 except Exception as exc: # network/geo block — optional datasetCODE
LOWutils/downloading.py308 except Exception as e:CODE
LOWutils/modeling.py510 except Exception as exc:CODE
LOWutils/modeling.py1291 except Exception as exc:CODE
LOWutils/storage_benchmarks.py260 except Exception:CODE
LOWutils/storage_benchmarks.py308 except Exception:CODE
116 more matches not shown…
Deep Nesting107 hits · 90 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/timegan_metrics.py549CODE
LOW05_synthetic_data/07_dp_gan.py353CODE
LOW09_model_based_features/02_structural_breaks.py422CODE
LOW09_model_based_features/13_regime_as_feature.py342CODE
LOW03_market_microstructure/09_databento_mbo_analysis.py362CODE
LOW03_market_microstructure/09_databento_mbo_analysis.py398CODE
LOW03_market_microstructure/07_itch_stylized_facts.py229CODE
LOW03_market_microstructure/15_itch_lee_ready.py183CODE
LOW03_market_microstructure/15_itch_lee_ready.py229CODE
LOW03_market_microstructure/15_itch_lee_ready.py275CODE
LOW03_market_microstructure/15_itch_lee_ready.py394CODE
LOW03_market_microstructure/17_databento_bar_sampling.py379CODE
LOW03_market_microstructure/limit_orderbook.py234CODE
LOW03_market_microstructure/limit_orderbook.py484CODE
LOW03_market_microstructure/limit_orderbook.py1000CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py202CODE
LOW…rket_microstructure/08_databento_lob_reconstruction.py476CODE
LOW03_market_microstructure/05_itch_trading_activity.py527CODE
LOWtests/add_missing_parameters_cells.py45CODE
LOWtests/generate_test_microstructure.py462CODE
LOWtests/generate_test_microstructure.py667CODE
LOWtests/conftest.py60CODE
LOWtests/conftest.py143CODE
LOWtests/conftest.py400CODE
LOWtests/generate_intermediates.py179CODE
LOWtests/generate_skip_data.py75CODE
LOWtests/test_sweep_config_seam.py175CODE
LOWutils/cv_splits.py93CODE
LOWutils/style.py617CODE
LOWutils/downloading.py177CODE
LOWutils/downloading.py189CODE
LOWutils/modeling.py168CODE
LOWutils/modeling.py1002CODE
LOWutils/storage_benchmarks.py382CODE
LOW08_financial_features/07_event_studies.py140CODE
LOW08_financial_features/06_robustness_sensitivity.py126CODE
LOW08_financial_features/06_robustness_sensitivity.py453CODE
LOW08_financial_features/06_robustness_sensitivity.py721CODE
LOW08_financial_features/05_feature_selection.py280CODE
LOW07_defining_the_learning_task/03_label_methods.py1100CODE
LOW…efining_the_learning_task/02_preprocessing_pipeline.py442CODE
LOW…_defining_the_learning_task/08_causal_sanity_checks.py510CODE
LOW07_defining_the_learning_task/_benchmark_utils.py395CODE
LOWscripts/download_artifacts.py100CODE
LOWscripts/verify_installation.py627CODE
LOWenvs/scan_imports.py121CODE
LOWenvs/test_all_imports.py407CODE
LOWdata/futures/loader.py174CODE
LOWdata/futures/market/download.py125CODE
LOWdata/futures/market/download.py483CODE
LOWdata/futures/market/download.py557CODE
LOWdata/prediction_markets/download.py101CODE
LOWdata/prediction_markets/download.py198CODE
LOWdata/fx/market/download.py84CODE
LOWdata/equities/fundamentals/xbrl_download.py185CODE
LOWdata/equities/fundamentals/filings_download.py278CODE
LOWdata/equities/firm_characteristics/download.py82CODE
LOWdata/equities/firm_characteristics/download.py125CODE
LOWdata/equities/market/microstructure/mbo_download.py96CODE
LOWdata/equities/market/microstructure/dataset_card.py166CODE
47 more matches not shown…
Cross-Language Confusion14 hits · 81 pts
SeverityFileLineSnippetContext
HIGH02_financial_data_universe/13_data_quality_framework.py195# Fault 3: null close at row 30. Use a genuine null, not NumPy NaN: Polars storesCOMMENT
HIGHtests/test_data_quality.py49 assert out.equals(df)CODE
HIGHtests/test_data_quality.py55 assert out.equals(df)CODE
HIGHtests/test_data_quality.py61 assert out.equals(df)CODE
HIGHtests/test_registry_metrics.py271 """With only one fold, cross-fold stddev is undefined; the function reports 0."""STRING
HIGHtests/test_backtest_runner_helpers.py40 assert out.equals(other)CODE
HIGHutils/data_quality.py439 """Check feature columns for infinities, all-null, and extreme values.STRING
HIGH08_financial_features/05_feature_selection.py177# ``pl.corr`` returns a float NaN (not a null) on any date where a feature isCOMMENT
HIGH07_defining_the_learning_task/07_multiple_testing.py351# P-value histogram (should be uniform under null)COMMENT
HIGH…efining_the_learning_task/10_ml4t_library_ecosystem.py260# NaN is distinct from null, so guard against both before averaging.COMMENT
HIGH…_defining_the_learning_task/08_causal_sanity_checks.py406# that vanishes by 21d and flips sign across VIX regimes): a near-null,COMMENT
HIGHcase_studies/utils/notebook_render.py321 raise ValueError("forest plot received empty (or fully-null) data")STRING
HIGHcase_studies/utils/sweep_config.py482 exit_signal_q: [null, 0.30, ...] # slot only — stay threshold, null disablesSTRING
HIGHcase_studies/utils/registry/registration.py854 completeness contract (``ic_mean`` non-null, etc.) does not apply toSTRING
Modern AI Meta-Vocabulary20 hits · 59 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml186 # chromadb<1.2, which conflicts with the Ch22 RAG stack.COMMENT
MEDIUMREADME.md311### [22. RAG for Financial Research](22_rag_financial_research/)COMMENT
MEDIUM05_synthetic_data/06_llm_tabular_great.py335# limitation of autoregressive generation: the model can "hallucinate" tokens thatCOMMENT
MEDIUM05_synthetic_data/06_llm_tabular_great.py369# indicate parsing errors or LLM hallucination on certain feature combinations.COMMENT
MEDIUM09_model_based_features/11_hmm_regimes.py755# during event-driven spikes. Neither is "correct" — they measure differentCOMMENT
MEDIUM02_financial_data_universe/13_data_quality_framework.py395# `AnomalyManager` orchestrates the three detectors and provides batchCOMMENT
MEDIUM03_market_microstructure/01_itch_parser.py250# frame, `_decode_message` unpacks and converts it, and `parse_itch_file` orchestratesCOMMENT
MEDIUM…fundamental_alternative_data/11_defi_tvl_evaluation.py374# A weighted composite is a teaching scaffold, not a calibrated metric:COMMENT
MEDIUM04_fundamental_alternative_data/05_entity_resolution.py366# matching entirely. A sentence-embedding model maps each name to a vector whoseCOMMENT
MEDIUM08_financial_features/07_event_studies.py361# The wrapper orchestrates the three stages: estimate market model, computeCOMMENT
MEDIUM08_financial_features/04_fundamentals_macro_calendar.py89# ### Scope: scaffolding for the construction mechanics, not a real-data value pipelineCOMMENT
MEDIUM08_financial_features/04_fundamentals_macro_calendar.py96# **scaffolding** value: it lets the downstream `compute_value_factors()` cellCOMMENT
MEDIUM08_financial_features/04_fundamentals_macro_calendar.py165# > `market_cap` is the `2 × book_value` scaffolding from §1.1. The cellCOMMENT
MEDIUM…_defining_the_learning_task/08_causal_sanity_checks.py1166# event-driven, so the check does not apply here. Chapter 8 demonstratesCOMMENT
MEDIUM10_text_feature_engineering/03_sentiment_evolution.py361# **Critical Note**: This is NOT "zero-shot" since FinBERT-tone already has aCOMMENT
MEDIUM10_text_feature_engineering/03_sentiment_evolution.py573# specific fine-tuning" — not "zero-shot" in the prompted-LLM sense,COMMENT
MEDIUM10_text_feature_engineering/02_asset_embeddings.py490 # Get context window (positions around the masked one)COMMENT
MEDIUM10_text_feature_engineering/01_word2vec_training.py47# - Familiarity with token-level NLP terminology (vocabulary, context window).COMMENT
MEDIUM10_text_feature_engineering/06_finbert_cross_dataset.py238# This notebook measures **one** number: ProsusAI/finbert's zero-shotCOMMENT
MEDIUM01_process_is_edge/README.md61- **Justina Lee** (2025). [Man Group Says Agentic AI Is Now Devising Quant Trading Signals](https://www.bloomberg.com/neCODE
Structural Annotation Overuse26 hits · 44 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/03_sigcwgan_signatures.py590 # Step 1: Scale(2, dim=0) - scale first dimension by 2COMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py593 # Step 2: AddTime - prepend time coordinateCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py596 # Step 3: LeadLag - lead-lag transformCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py599 # Step 4: VisiTrans("I") - I-visibility transformCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1181 # Step 1: Scale(2, dim=0)COMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1184 # Step 2: AddTimeCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1187 # Step 3: LeadLagCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1190 # Step 4: VisiTrans("I")COMMENT
LOW09_model_based_features/14_panel_features.py898# WARNING: This ranks each asset's volatility over its FULL history — a look-aheadCOMMENT
LOW09_model_based_features/10_uncertainty_features.py454# Step 1: AutoARIMA order selection on first training windowCOMMENT
LOW09_model_based_features/10_uncertainty_features.py470# Step 2: Rolling forecast with fixed order (fast)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py90# ### Step 1: Initial Load (Full History)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py107# ### Step 2: Incremental Update (Only New Data)COMMENT
LOW03_market_microstructure/01_itch_parser.py199# Step 1: Raw binary from downloadCOMMENT
LOW03_market_microstructure/01_itch_parser.py207# Step 2: Parsed messages (single uppercase letter = message type)COMMENT
LOW…mental_alternative_data/01_academic_characteristics.py307# Step 1: Compute IC (correlation with returns) for each characteristic, per monthCOMMENT
LOW…mental_alternative_data/01_academic_characteristics.py314# Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across monthsCOMMENT
LOWtests/generate_test_data.sh25# Step 1: Generate subsampled raw dataCOMMENT
LOWtests/generate_test_data.sh34# Step 2: Deploy latest notebooks from third-edition -> review repoCOMMENT
LOWtests/generate_test_data.sh40# Step 3: Generate intermediates (runs pipeline notebooks via Papermill)COMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py558# ### Step 1: Remove penny stocksCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py573# ### Step 2: Domain filtersCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py601# ### Step 3: Extreme returnsCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py615# ### Step 4: Spike detectionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1263 # Step 1: Calendar-aware schedule resolutionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1266 # Step 2: Apply design-time non-overlapping stepCOMMENT
Redundant / Tautological Comments35 hits · 43 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/04_gtgan_irregular.py186RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/04_gtgan_irregular.py1483 # Check if interpolated values are bounded by adjacent real values (soft check)COMMENT
LOW05_synthetic_data/timegan_metrics.py226 # Check if data appears to be normalized to [0, 1]COMMENT
LOW05_synthetic_data/05_diffusion_ts.py178RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/06_llm_tabular_great.py127RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/03_sigcwgan_signatures.py189RETRAIN = False # Set True to force retraining even if checkpoint existsCODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1365# Check if checkpoint exists and RETRAIN is FalseCOMMENT
LOW05_synthetic_data/07_dp_gan.py128RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/02_tailgan_tail_risk.py84RETRAIN = False # Set True to force retraining even if checkpoint existsCODE
LOW05_synthetic_data/02_tailgan_tail_risk.py552 # Check if constraint violated: W*v >= eCOMMENT
LOW05_synthetic_data/01_timegan.py92RETRAIN = True # Set True to force re-training even if checkpoint existsCODE
LOW…nancial_data_universe/21_storage_benchmark_database.py1171 # Check if process started successfullySTRING
LOW…nancial_data_universe/08_options_greeks_computation.py232 # Check if solution exists within boundsCOMMENT
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py129# Check if we have message data to analyzeCOMMENT
LOW03_market_microstructure/14_itch_bar_sampling.py522 # Check if we have actual buy/sell varianceCOMMENT
LOW03_market_microstructure/05_itch_trading_activity.py107# Check if we have message data to analyzeCOMMENT
LOW03_market_microstructure/05_itch_trading_activity.py458 # Check if enrichment already doneCOMMENT
LOW03_market_microstructure/05_itch_trading_activity.py582 # Print message type breakdownCOMMENT
LOW03_market_microstructure/03_itch_lob_analysis.py926 # Check if OFI column exists (generated by reconstruct_lob_with_ofi)COMMENT
LOW…undamental_alternative_data/14_text_data_extraction.py706 # Check if paragraph is substantially new (low similarity to all old paragraphs)COMMENT
LOWtests/test_model_registry.py394 # Check if this notebook is expected to register (match on suffix)COMMENT
LOWutils/data_quality.py546 # Print resultsCOMMENT
LOWutils/storage_benchmarks.py671 # Assign quotes to symbols (weighted: some symbols more active)COMMENT
LOWutils/storage_benchmarks.py736 # Assign trades to symbols (same distribution as quotes)COMMENT
LOW08_financial_features/07_event_studies.py171 # Check if new highCOMMENT
LOW07_defining_the_learning_task/_benchmark_utils.py680 # Assign quotes to symbols (weighted: some symbols more active)COMMENT
LOW07_defining_the_learning_task/_benchmark_utils.py745 # Assign trades to symbols (same distribution as quotes)COMMENT
LOWdata/futures/market/download.py234 # Check if year is completeCOMMENT
LOWdata/equities/loader.py1147 # Check if raw files exist but aren't parsedCOMMENT
LOWdata/equities/market/us_equities/download.py90 # Check if already existsCOMMENT
LOW10_text_feature_engineering/02_asset_embeddings.py635# Display resultsCOMMENT
LOWcase_studies/utils/model_analysis.py180 # Check if fold_metrics table existsSTRING
LOWcase_studies/utils/registry/store.py383 # Check if backtest_runs table exists at allCOMMENT
LOWcase_studies/utils/registry/store.py561 # Check if this table still has tall formatCOMMENT
LOWcase_studies/utils/registry/queries.py1072 # Check if stage column exists (the CREATE TABLE IF NOT EXISTSSTRING
Verbosity Indicators25 hits · 43 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/03_sigcwgan_signatures.py590 # Step 1: Scale(2, dim=0) - scale first dimension by 2COMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py593 # Step 2: AddTime - prepend time coordinateCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py596 # Step 3: LeadLag - lead-lag transformCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py599 # Step 4: VisiTrans("I") - I-visibility transformCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1181 # Step 1: Scale(2, dim=0)COMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1184 # Step 2: AddTimeCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1187 # Step 3: LeadLagCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py1190 # Step 4: VisiTrans("I")COMMENT
LOW09_model_based_features/10_uncertainty_features.py454# Step 1: AutoARIMA order selection on first training windowCOMMENT
LOW09_model_based_features/10_uncertainty_features.py470# Step 2: Rolling forecast with fixed order (fast)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py90# ### Step 1: Initial Load (Full History)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py107# ### Step 2: Incremental Update (Only New Data)COMMENT
LOW03_market_microstructure/01_itch_parser.py199# Step 1: Raw binary from downloadCOMMENT
LOW03_market_microstructure/01_itch_parser.py207# Step 2: Parsed messages (single uppercase letter = message type)COMMENT
LOW…mental_alternative_data/01_academic_characteristics.py307# Step 1: Compute IC (correlation with returns) for each characteristic, per monthCOMMENT
LOW…mental_alternative_data/01_academic_characteristics.py314# Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across monthsCOMMENT
LOWtests/generate_test_data.sh25# Step 1: Generate subsampled raw dataCOMMENT
LOWtests/generate_test_data.sh34# Step 2: Deploy latest notebooks from third-edition -> review repoCOMMENT
LOWtests/generate_test_data.sh40# Step 3: Generate intermediates (runs pipeline notebooks via Papermill)COMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py558# ### Step 1: Remove penny stocksCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py573# ### Step 2: Domain filtersCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py601# ### Step 3: Extreme returnsCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py615# ### Step 4: Spike detectionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1263 # Step 1: Calendar-aware schedule resolutionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1266 # Step 2: Apply design-time non-overlapping stepCOMMENT
Docstring Block Structure8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHtests/pm_helpers.py185Execute a notebook via Papermill with parameter injection. This is the core test helper. It: 1. Syncs .py -> .iSTRING
HIGHutils/paths.py136Get the directory path for a chapter. Args: chapter: Chapter number (1-27) Returns: Absolute pSTRING
HIGHutils/paths.py172Get output directory for cross-chapter data flow. This is the primary function for case study data that flows betweSTRING
HIGHutils/paths.py240Get the case study directory for a strategy. Case studies are centralized under CASE_STUDIES_DIR (default: repo_rooSTRING
HIGHutils/data_quality.py507Run all data quality checks before modeling. This is the gate between data preparation (labels + features) and STRING
HIGHdata/futures/loader.py78List CME product codes available in the local data store. Args: frequency: ``"hourly"`` (default) lists proSTRING
HIGHdata/futures/loader.py309Load CFTC Commitment of Traders (COT) data. Reads per-product parquets written by ``data/futures/positioning/cot_doSTRING
HIGHdata/fx/loader.py13List currency pairs available in the local data store. Args: frequency: Which parquet to probe (``"daily"``STRING
AI Structural Patterns35 hits · 30 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/04_gtgan_irregular.py704CODE
LOW05_synthetic_data/timegan_metrics.py388CODE
LOW05_synthetic_data/timegan_metrics.py549CODE
LOW05_synthetic_data/timegan_metrics.py697CODE
LOW05_synthetic_data/05_diffusion_ts.py728CODE
LOW05_synthetic_data/05_diffusion_ts.py831CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py602CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1193CODE
LOW…undamental_alternative_data/14_text_data_extraction.py640CODE
LOW…efining_the_learning_task/02_preprocessing_pipeline.py214CODE
LOW…efining_the_learning_task/02_preprocessing_pipeline.py337CODE
LOW…earning_task/04_maximum_favorable_adverse_excursion.py215CODE
LOWdata/futures/loader.py12CODE
LOWdata/equities/loader.py141CODE
LOWcase_studies/utils/deep_learning.py410CODE
LOWcase_studies/utils/signals.py322CODE
LOWcase_studies/utils/notebook_render.py289CODE
LOWcase_studies/utils/tabular_dl.py292CODE
LOWcase_studies/utils/slot_strategy.py228CODE
LOWcase_studies/utils/causal.py452CODE
LOWcase_studies/utils/analytics.py467CODE
LOWcase_studies/utils/model_viz.py482CODE
LOWcase_studies/utils/model_viz.py591CODE
LOWcase_studies/utils/latent_factors/library_bridge.py133CODE
LOWcase_studies/utils/latent_factors/library_bridge.py188CODE
LOWcase_studies/utils/latent_factors/library_bridge.py245CODE
LOWcase_studies/utils/latent_factors/sae.py13CODE
LOWcase_studies/utils/latent_factors/sdf.py14CODE
LOWcase_studies/utils/latent_factors/cv.py68CODE
LOWcase_studies/utils/latent_factors/cae.py13CODE
LOWcase_studies/utils/registry/registration.py277CODE
LOWcase_studies/utils/registry/registration.py514CODE
LOWcase_studies/utils/registry/specs.py123CODE
LOWcase_studies/utils/registry/metrics.py10CODE
LOWcase_studies/utils/registry/metrics.py416CODE
Magic Placeholder Names4 hits · 30 pts
SeverityFileLineSnippetContext
HIGHdata/futures/market/dataset_card.py78# DATABENTO_API_KEY=db-your-api-key-hereCOMMENT
HIGHdata/fx/market/dataset_card.py67# OANDA_API_KEY=your-api-key-hereCOMMENT
HIGHdata/equities/market/microstructure/dataset_card.py72# DATABENTO_API_KEY=db-your-api-key-hereCOMMENT
HIGHdata/equities/market/us_equities/dataset_card.py66# QUANDL_API_KEY=your-api-key-hereCOMMENT
Modern Structural Boilerplate19 hits · 19 pts
SeverityFileLineSnippetContext
LOWutils/style.py773__all__ = [CODE
LOWutils/paths.py351__all__ = [CODE
LOWutils/reproducibility.py15def set_global_seeds(seed: int = 42) -> None:CODE
LOWutils/__init__.py42__all__ = [CODE
LOWutils/artifact_specs.py128__all__ = [CODE
LOWdata/__init__.py126__all__ = [CODE
LOWcase_studies/utils/notebook_render.py763__all__ = [STRING
LOWcase_studies/utils/uncertainty.py1171__all__ = [CODE
LOWcase_studies/utils/latent_factors/__init__.py30__all__ = [CODE
LOWcase_studies/utils/latent_factors/common.py156__all__ = [CODE
LOWcase_studies/utils/latent_factors/case_study.py17logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/latent_factors/panel.py273__all__ = [CODE
LOWcase_studies/utils/registry/registration.py30logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/specs.py10logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/store.py18logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/metrics.py7logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/__init__.py124__all__ = [CODE
LOWcase_studies/utils/registry/completeness.py373__all__ = [CODE
LOWcase_studies/utils/registry/queries.py30logger = logging.getLogger(__name__)CODE
Self-Referential Comments7 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUM05_synthetic_data/07_dp_gan.py374 # Create a clean discriminator copy for generator training (no DP hooks)COMMENT
MEDIUM09_model_based_features/10_uncertainty_features.py163# Define the model as a function for reuse across walk-forward folds.COMMENT
MEDIUM…_financial_data_universe/22_pandas_polars_benchmark.py917# Create a smaller lookup table for join benchmarkCOMMENT
MEDIUM03_market_microstructure/01_itch_parser.py150# Create a sample Add Order message to demonstrate parsingCOMMENT
MEDIUM04_fundamental_alternative_data/05_entity_resolution.py120# Create a reference database with standard identifiersCOMMENT
MEDIUM07_defining_the_learning_task/03_label_methods.py504# This method is from De Prado's *Advances in Financial Machine Learning*.COMMENT
MEDIUMcase_studies/utils/model_analysis.py741 # Create a key for mergeSTRING
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/generate_test_data.sh9# Usage:COMMENT
LOWdata/crypto/market/config.yaml11# Usage:COMMENT
LOWdata/prediction_markets/config.yaml8# Usage:COMMENT
LOWdata/fx/market/config.yaml10# Usage:COMMENT
LOWdata/macro/config.yaml10# Usage:COMMENT
LOWdata/etfs/market/config.yaml17# Usage:COMMENT
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/07_dp_gan.py416 fake_data = generator(z)CODE
LOW05_synthetic_data/07_dp_gan.py420 d_fake = discriminator_private(fake_data)CODE
LOW05_synthetic_data/07_dp_gan.py448 fake_data = generator(z)CODE
LOW05_synthetic_data/07_dp_gan.py451 d_fake = discriminator_for_g(fake_data)CODE
LOW…undamental_alternative_data/14_text_data_extraction.py802# export EDGAR_IDENTITY="Jane Doe jane@example.org"STRING
LOW…undamental_alternative_data/14_text_data_extraction.py815 '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.'STRING
LOW…fundamental_alternative_data/02_sec_filing_explorer.py78# `export EDGAR_IDENTITY="Jane Doe jane@example.org"`.COMMENT
LOW…fundamental_alternative_data/02_sec_filing_explorer.py85 '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.'CODE
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH06_strategy_definition/exploration.md35├── figures/ # Book figures (AI-generated + notebook)CODE