Repository Analysis

stefan-jansen/machine-learning-for-trading

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

26.0 Moderate 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 20,709 GitHub stars. SynthScan v2.0 examined 581,012 lines of code across 1215 source files, recording 11169 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 26.0 places this repository in the Moderate 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).

26.0
Adjusted Score
26.0
Raw Score
100%
Time Factor
2026-08-28
Last Push
20.7K
Stars
Jupyter Notebook
Language
581.0K
Lines of Code
1.2K
Files
11.2K
Pattern Hits
2026-08-29
Scan Date
0.13
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 160MEDIUM 1625LOW 9384

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 11169 distinct pattern matches across 23 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.

Over-Commented Block4950 hits · 4691 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml41COMMENT
LOWpyproject.toml21 "pyarrow>=15.0",COMMENT
LOWpyproject.toml101 # See envs/py312/pyproject.toml; pycausalimpact (ARIMA, 2020-dead) removed.COMMENT
LOWsitecustomize.py141 # it gets the tracked skeleton of data/ and none of the gitignored datasets, which liveCOMMENT
LOWdocker-compose.yml1# ML4T 3rd Edition — Docker Compose ConfigurationCOMMENT
LOWdocker-compose.yml21#COMMENT
LOWdocker-compose.yml221 # ============================================COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py1# ---COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py21#COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py101COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py201COMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py1# ---COMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py21# Market impact is not a fixed cost; it depends on how large an order isCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py81COMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py261 )COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py1# ---COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py21#COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py141 ],COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py161# what the diagnostics in Section 6 measure.COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py1# ---COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py21#COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py141# **MDP Formulation**:COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py161# ### GARCH Market Data GeneratorCOMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py381 ]COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py441 for name, (value, standard_error, _) in all_gaps.items()COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py1# ---COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py21#COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py221COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py241# reference schedule between `pace_min_multiplier` (0.5x) and `pace_max_multiplier`COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py661 "Forced Liq %": f"{results[name]['forced_liq_rate'] * 100:.1f}",COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py1# ---COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py21# > `pfhedge` is a main dependency of the project (`pfhedge>=0.22.0` inCOMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py601#COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py881 yaxis_title="Hedge Position (Δ)",COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py901# $$R(c) = -\mathbb{E}[C] - \lambda \operatorname{Var}[C] \approx -c - \lambda c^2$$COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py941COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py1241 for path_idx, value in enumerate(np.asarray(pnl).tolist())COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py1261# underlier is configured as a Heston stochastic-volatility processCOMMENT
LOW…execution_hedging/06_inverse_reinforcement_learning.py1# ---COMMENT
LOW…execution_hedging/06_inverse_reinforcement_learning.py21# IRL inverts the RL problem: instead of "given reward, find optimal policy,"COMMENT
LOW…execution_hedging/06_inverse_reinforcement_learning.py221 f" Mean shortfall (bps): {np.mean(shortfalls) / (100 * config['total_shares']) * 10_000:.1f}"COMMENT
LOW…execution_hedging/06_inverse_reinforcement_learning.py341# - Assume reward is a linear function of features: $R(s,a) = \mathbf{w}^\top \boldsymbol{\phi}(s,a)$COMMENT
LOW…execution_hedging/06_inverse_reinforcement_learning.py1081 ),COMMENT
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.py981COMMENT
LOW05_synthetic_data/00_classical_simulation.py1041 xaxis_title="Daily Log-Return",COMMENT
LOW05_synthetic_data/00_classical_simulation.py1061# model. They preserve the **empirical distribution** exactly, including fat tails.COMMENT
4890 more matches not shown…
Decorative Section Separators1138 hits · 3708 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml11 # ===================COMMENT
MEDIUMpyproject.toml13 # ===================COMMENT
MEDIUMpyproject.toml22 # ===================COMMENT
MEDIUMpyproject.toml24 # ===================COMMENT
MEDIUMpyproject.toml34 # ===================COMMENT
MEDIUMpyproject.toml36 # ===================COMMENT
MEDIUMpyproject.toml93 # ===================COMMENT
MEDIUMpyproject.toml95 # ===================COMMENT
MEDIUMpyproject.toml104 # ===================COMMENT
MEDIUMpyproject.toml106 # ===================COMMENT
MEDIUMpyproject.toml111 # ===================COMMENT
MEDIUMpyproject.toml113 # ===================COMMENT
MEDIUMpyproject.toml118 # ===================COMMENT
MEDIUMpyproject.toml120 # ===================COMMENT
MEDIUMpyproject.toml132 # ===================COMMENT
MEDIUMpyproject.toml134 # ===================COMMENT
MEDIUMpyproject.toml137 # ===================COMMENT
MEDIUMpyproject.toml139 # ===================COMMENT
MEDIUMpyproject.toml143 # ===================COMMENT
MEDIUMpyproject.toml145 # ===================COMMENT
MEDIUMpyproject.toml147 # ===================COMMENT
MEDIUMpyproject.toml149 # ===================COMMENT
MEDIUMpyproject.toml164 # ===================COMMENT
MEDIUMpyproject.toml166 # ===================COMMENT
MEDIUMpyproject.toml175 # ===================COMMENT
MEDIUMpyproject.toml177 # ===================COMMENT
MEDIUMpyproject.toml50 # ===================COMMENT
MEDIUMpyproject.toml52 # ===================COMMENT
MEDIUMpyproject.toml64 # ===================COMMENT
MEDIUMpyproject.toml66 # ===================COMMENT
MEDIUMpyproject.toml79 # ===================COMMENT
MEDIUMpyproject.toml81 # ===================COMMENT
MEDIUMdocker-compose.yml62 # ============================================COMMENT
MEDIUMdocker-compose.yml65 # ============================================COMMENT
MEDIUMdocker-compose.yml77 # ============================================COMMENT
MEDIUMdocker-compose.yml80 # ============================================COMMENT
MEDIUMdocker-compose.yml100 # ============================================COMMENT
MEDIUMdocker-compose.yml105 # ============================================COMMENT
MEDIUMdocker-compose.yml156 # ============================================COMMENT
MEDIUMdocker-compose.yml160 # ============================================COMMENT
MEDIUMdocker-compose.yml196 # ============================================COMMENT
MEDIUMdocker-compose.yml201 # ============================================COMMENT
MEDIUMdocker-compose.yml221 # ============================================COMMENT
MEDIUMdocker-compose.yml235 # ============================================COMMENT
MEDIUMdocker-compose.yml269 # ============================================COMMENT
MEDIUMdocker-compose.yml272 # ============================================COMMENT
MEDIUMdocker-compose.yml291 # ============================================COMMENT
MEDIUMdocker-compose.yml294 # ============================================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
1078 more matches not shown…
Hyper-Verbose Identifiers2826 hits · 2834 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py225def discrete_almgren_chriss_schedule(CODE
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py355def _collect_execution_diagnostics(env: "ExecutionEnv", result: dict) -> dict:CODE
LOW21_rl_execution_hedging/market_making_env.py24def generate_garch_market_data(CODE
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py367def hedging_pnl_from_positions(CODE
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py395def hedging_pnl_from_positions_torch(CODE
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py440def expected_shortfall_loss_torch(pnl: torch.Tensor, quantile: float) -> torch.Tensor:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py162def collect_expert_trajectories(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py410def compute_feature_expectations(trajectories: list, extract_fn) -> np.ndarray:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py475def sample_candidate_trajectory(env: ExecutionEnv, rng) -> dict:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py497def trajectory_feature_counts(trajectories: list, extract_features_fn) -> np.ndarray:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py578def regularized_log_likelihood(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py680def sample_feature_matching_trajectory(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py896def inferred_boltzmann_action(CODE
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.py1678def plot_path_comparison_unconditional(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1782def tstr_evaluation_unconditional(CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py282def deterministic_neural_sort(s: torch.Tensor, tau: float) -> torch.Tensor:CODE
LOW09_model_based_features/12_wasserstein_regimes.py189def _wasserstein_distance_to_centroid(CODE
LOW09_model_based_features/12_wasserstein_regimes.py588def simulate_merton_jump_log_returns(CODE
LOW09_model_based_features/12_wasserstein_regimes.py620def 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
LOW22_rag_financial_research/03_hybrid_retrieval.py475def semantic_similarity_scores(query: str, model, embeddings: np.ndarray) -> np.ndarray:CODE
LOW…_financial_research/02_domain_embeddings_comparison.py324def get_sentence_transformer_embeddings(CODE
LOW…_financial_research/07_institutional_holdings_graph.py309def compute_coownership_matrix(holdings: pl.DataFrame) -> tuple[np.ndarray, list[str]]:CODE
LOW…_financial_research/07_institutional_holdings_graph.py594def compute_institution_similarity(holdings: pl.DataFrame) -> pl.DataFrame:CODE
LOW12_gradient_boosting/11_conformal_gbm.py106def embargo_steps_from_buffer(label_buffer: str, dates: np.ndarray) -> int:CODE
LOW12_gradient_boosting/11_conformal_gbm.py131def chronological_calibration_masks(CODE
LOW12_gradient_boosting/11_conformal_gbm.py156def conformal_order_statistic(scores: np.ndarray, alpha: float) -> float:CODE
LOW12_gradient_boosting/11_conformal_gbm.py213def deterministic_lgb_parameters(objective: str, alpha: float | None = None) -> dict:CODE
LOW12_gradient_boosting/11_conformal_gbm.py459def summarize_conformal_results(results: list[dict], alpha: float) -> dict | None:CODE
LOW12_gradient_boosting/11_conformal_gbm.py730def compute_adaptive_intervals(CODE
LOW12_gradient_boosting/07_hpo_comparison.py283def optuna_continuous_objective(trial):CODE
LOW12_gradient_boosting/12_case_study_insights.py1480def pairwise_rank_correlation(fold_arrays: list[np.ndarray]) -> tuple[float, float] | 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.py115def 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.py124def _combine_pipeline_sources(CODE
LOW02_financial_data_universe/17_complete_pipeline.py473def _validate_crypto_coverage(df: pl.DataFrame, symbol: str) -> dict[str, Any]:CODE
LOW02_financial_data_universe/17_complete_pipeline.py516def _add_crypto_session_features(df: pl.DataFrame) -> pl.DataFrame:CODE
LOW…ancial_data_universe/15_survivorship_bias_detection.py1025def check_universe_completeness(CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py206def read_parquet_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py243def read_feather_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/02_corporate_actions.py394def demonstrate_split_adjustment(CODE
LOW02_financial_data_universe/02_corporate_actions.py423def demonstrate_dividend_adjustment(price_before_ex: float = 100.0, dividend: float = 5.0) -> None:CODE
2766 more matches not shown…
AI Slop Vocabulary262 hits · 780 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
MEDIUM05_synthetic_data/07_dp_gan.py845# large, robust effect and a great deal of noise around it. The robust effect is the very tightCOMMENT
MEDIUM05_synthetic_data/07_dp_gan.py870# A single 10-epoch run per budget is too noisy to resolve a monotonic curve; the robustCOMMENT
MEDIUM09_model_based_features/01_visual_diagnostics.py150# Using two tests with opposite null hypotheses provides robust conclusions:COMMENT
MEDIUM09_model_based_features/01_visual_diagnostics.py218# The three-test consensus (ADF + KPSS + Phillips-Perron) is more robust thanCOMMENT
MEDIUM09_model_based_features/01_visual_diagnostics.py459# 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.py633# Generate a comprehensive feature set in one pipelineCOMMENT
MEDIUM09_model_based_features/10_uncertainty_features.py455# robust for position sizing.COMMENT
MEDIUM09_model_based_features/10_uncertainty_features.py517# 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.py1005# combine both approaches for robust regime featuresCOMMENT
MEDIUM09_model_based_features/03_fractional_differencing.py97# This is simpler, more robust, and avoids overfitting to in-sample data.COMMENT
MEDIUM09_model_based_features/03_fractional_differencing.py567# `fdiff_diagnostics()` provides a comprehensive diagnostic summary.COMMENT
MEDIUM09_model_based_features/06_path_signatures.py386# a simple GBM as a test harness. This is **feature evaluation, not modelCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py823# 4. **Lightweight diagnostics complement full evaluation**: The harnessCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py507# Section 22.7 uses a broader evaluation harness. Here we compute lightweightCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py781# | **Evaluation** | Lightweight harness diagnostics |COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py785# minimum operating bar before moving to the broader Chapter 22 harness.COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py43# - Fixed-k RRF is score-calibration-free and robust, but not always sufficient on its ownCOMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py552# of top-ranked results, making the fusion more robust.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py22# This notebook implements a finance-oriented evaluation harness that separates:COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py29# RAGAs-style metrics are useful, but they are only one component of this broader harness.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py577# 3. **Lightweight harness, bounded evidence**: These metrics use onlyCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py579# the harness fast enough to run on every pipeline change.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py42# The setup locks the sample budget so the harness can run quickly in testsCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py74# **Interpretation**: The sample-count print defines how broad the harness runCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py199# These cover the failure modes the harness is designed to catch:COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py277# cases so the harness can isolate where failures come from. All six fixturesCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py283# Each metric targets one of the four harness outputs. Together theyCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py414# fixtures are intentional failures that stress-test the harness.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py459# **Interpretation**: The four harness outputs provide a stable dashboard.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py497# The chart packages the harness into a reviewer-friendly snapshot that makesCOMMENT
MEDIUM12_gradient_boosting/05_cross_library_hpo.py594# is the more robust of the two to outliers, which is the reason to expect it toCOMMENT
MEDIUM12_gradient_boosting/01_ensemble_foundations.py325# (§12.2); for robust attributions, see the SHAP analysis in §12.5.COMMENT
MEDIUM12_gradient_boosting/01_ensemble_foundations.py377# four are robust signals; the disagreement is exactly why §12.5 turns to SHAP forCOMMENT
MEDIUM12_gradient_boosting/08_shap_analysis.py527# a robust relationship; declining importance is an early warning ofCOMMENT
MEDIUM12_gradient_boosting/08_shap_analysis.py677# explanation is robust to method choice; where they diverge, theCOMMENT
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.py341# For production systems, we need a robust strategy that handles:COMMENT
MEDIUM16_strategy_simulation/18_vectorbt_engine_parity.py150# - the benchmark harnessCOMMENT
MEDIUM16_strategy_simulation/18_vectorbt_engine_parity.py474# - The default path reads a recorded result. Reproducing it needs the validation harness andCOMMENT
MEDIUM16_strategy_simulation/15_lean_engine_parity.py51# `ml4t-backtest` validation harness, the LEAN CLI, Docker, and the daily equity panel. TheCOMMENT
MEDIUM16_strategy_simulation/15_lean_engine_parity.py91# validation harness. This notebook does not run LEAN. It reads the recorded result, checks it, andCOMMENT
MEDIUM16_strategy_simulation/15_lean_engine_parity.py100# ### Find the harness, if it is hereCOMMENT
202 more matches not shown…
Unused Imports801 hits · 684 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/01_algorithms_comparison.py61CODE
LOW21_rl_execution_hedging/market_making_env.py3CODE
LOW21_rl_execution_hedging/rl_environments.py14CODE
LOW21_rl_execution_hedging/rl_calibration.py25CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py69CODE
LOW21_rl_execution_hedging/crypto_execution_env.py3CODE
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.py60CODE
LOW05_synthetic_data/01_timegan.py70CODE
LOW09_model_based_features/09_har_rough_volatility.py1145CODE
LOW22_rag_financial_research/03_hybrid_retrieval.py72CODE
LOW12_gradient_boosting/02_gbm_comparison.py49CODE
LOW12_gradient_boosting/02_gbm_comparison.py59CODE
LOW12_gradient_boosting/10_shap_nlp_sentiment.py45CODE
LOW12_gradient_boosting/03_dl_vs_gbm.py55CODE
LOW12_gradient_boosting/12_case_study_insights.py59CODE
LOW…_financial_data_universe/11_crypto_premium_analysis.py551CODE
LOW02_financial_data_universe/17_complete_pipeline.py62CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py113CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py75CODE
LOW16_strategy_simulation/_etf_baseline.py15CODE
LOW…_strategy_simulation/validation/_library_validation.py3CODE
LOW16_strategy_simulation/validation/weights.py12CODE
LOW…trategy_simulation/validation/adapters/lean_adapter.py3CODE
LOW…trategy_simulation/validation/adapters/lean_adapter.py5CODE
LOW…trategy_simulation/validation/adapters/lean_adapter.py7CODE
LOW…trategy_simulation/validation/adapters/ml4t_adapter.py16CODE
LOW…trategy_simulation/validation/adapters/ml4t_adapter.py25CODE
LOW13_dl_time_series/12_case_study_insights.py60CODE
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
LOW20_strategy_synthesis/02_feature_evaluation.py49CODE
LOW20_strategy_synthesis/08_recommendations.py49CODE
LOW20_strategy_synthesis/08_recommendations.py49CODE
LOW20_strategy_synthesis/04_signal_to_strategy.py49CODE
LOW20_strategy_synthesis/holdout.py15CODE
LOW20_strategy_synthesis/holdout.py34CODE
LOWtests/test_download_coverage.py13CODE
LOWtests/test_fx_allocation_selection.py3CODE
LOWtests/test_sp500_options_straddle_moves.py3CODE
LOWtests/test_causal_supersedes.py19CODE
LOWtests/test_no_shadowed_tests.py15CODE
LOWtests/test_linear_degenerate_fold.py14CODE
LOWtests/test_research_contract_lifecycle.py1CODE
LOWtests/test_dl_device_contract.py12CODE
LOWtests/test_us_firm_research_workflow.py1CODE
LOWtests/add_missing_parameters_cells.py11CODE
LOWtests/generate_test_microstructure.py13CODE
LOWtests/test_sitecustomize_data_root.py11CODE
LOWtests/conftest.py18CODE
LOWtests/conftest.py489CODE
LOWtests/test_causal_adapter.py1CODE
LOWtests/test_canonical_coverage_days.py12CODE
741 more matches not shown…
Modern AI Meta-Vocabulary195 hits · 643 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml200 # chromadb<1.2, which conflicts with the Ch22 RAG stack.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.py799# during event-driven spikes. Neither is "correct" - they measure differentCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py16# # 10-K Due Diligence Assistant: RAG with Verifiable CitationsCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py20# **Chapter 22: RAG for Financial Research**COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py22# This notebook builds a 10-K due-diligence RAG (Retrieval-Augmented Generation)COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py827# **Next**: `06_esg_rag_vs_finetune` compares this RAG approach againstCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py831# flagship RAG application and Section 22.6 covers constraint prompting.COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py37# - Analyze RAG pipeline error sources and select/justify components.COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py50# dependencies that determine whether the notebook runs a full or fallback RAG path.COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py129# quick tests, but the notebook still exercises the same RAG pipeline that theCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py252# Sets the LLM, embedding model, and chunk strategy. ChromaDB providesCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py499# **Interpretation**: Multi-hop queries (query 2) are the hardest for RAGCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py627# Numeric questions are where RAG most often fails silently: a fluent modelCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py767# what keeps numeric RAG answers auditable.COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py20# **Chapter 22: RAG for Financial Research** (Section 22.5)COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py1145# hypothesis and hallucination risk need a separate controlled evaluation.COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py1148# RAG pipelines using retrieval, grounding, abstention, and security metrics.COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py16# # Security for Financial Document RAGCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py20# **Chapter 22: RAG for Financial Research** (Section 22.7)COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py23# finance assistants, a critical concern when RAG systems operate on untrustedCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py36# **Prerequisites**: Familiarity with RAG pipelines (Sections 22.1-22.6);COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py70# to financial RAG: indirect prompt injection (adversarial instructions hiddenCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py248# vulnerable default that most naive RAG implementations use.COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py457# A RAG system that scores well on RAGAs metrics (Section 22.7) can still failCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py463# 1. Security failures in financial RAG systems are measurable with the sameCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py468# 3. Abstention is preferable to hallucination in regulated financial contexts;COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py470# 4. Adversarial test fixtures should be a standard part of RAG evaluationCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py474# and Chapter 24 (Autonomous Agents) for multi-agent security considerationsCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py475# when RAG systems gain tool-use capabilities.COMMENT
MEDIUM22_rag_financial_research/README.md1# Chapter 22: RAG for Financial ResearchCOMMENT
MEDIUM22_rag_financial_research/README.md49### 22.7 Diagnosing RAG Pipeline BottlenecksCOMMENT
MEDIUM…_financial_research/02_domain_embeddings_comparison.py16# # Domain-Specific Embeddings for Financial RAGCOMMENT
MEDIUM…_financial_research/02_domain_embeddings_comparison.py20# **Chapter 22: RAG for Financial Research** (Section 22.4)COMMENT
MEDIUM…_financial_research/02_domain_embeddings_comparison.py180# **Interpretation**: The corpus-size print confirms that every embedding modelCOMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py21# **Chapter 22: RAG for Financial Research - §22.3 Intelligent Document Ingestion**COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py25# the metadata fields a RAG system needs for point-in-time retrieval.COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py35# this notebook's metadata-integrity scaffolding is designed to prevent.COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py46# for downstream RAG notebooks (Ch22 NB02-08).COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py170# zero filings is a coverage hole that downstream RAG cannot recover fromCOMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py357# and accession number - the minimum metadata a financial RAG systemCOMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py367# RAG pipeline. See alsoCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py17# # ESG Screening and RAG: Implemented Classifier vs Interface ContractCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py27# 2. **RAG interface contract**: evidence requirements for qualitative due diligenceCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py35# (`data/alternative/news/bloomberg/`). No RAG answers are generated in this notebook.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py275# ## Approach B: RAG Interface ContractCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py277# A RAG implementation must answer open-ended questions with retrieved evidence,COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py282# Sample ESG questions for RAGCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py315# **Interpretation**: This is a specification, not a RAG result. Notebook 05COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py320# Run RAG analysisCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py329# does not execute a RAG producer. That boundary prevents interface requirementsCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py333# ## Comparison: Classification vs RAGCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py336# RAG producer must satisfy.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py472# ideological. The result suggests using classification for breadth and RAG forCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py482# 3. **RAG is not audit-ready by definition**: A candidate must prove that everyCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py487# warrant attention; RAG enables *understanding* what they are doing.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py491# RAG latency and answer quality are deliberately left unreported.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py493# **Next**: `07_institutional_holdings_graph` extends the RAG approachCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py496# **Book reference**: Section 22.8 discusses when to use RAG vs.COMMENT
135 more matches not shown…
Cross-Language Confusion86 hits · 524 pts
SeverityFileLineSnippetContext
HIGH12_gradient_boosting/12_case_study_insights.py1690# stays null, and so does a family whose winner was scored over a different numberCOMMENT
HIGH12_gradient_boosting/08_shap_analysis.py566# NaN is a float value, not a null, so filter it explicitly (a top-k of purelyCOMMENT
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
HIGH13_dl_time_series/01_core_architectures.py211# the correlation is undefined; `cross_sectional_ic_series` returns that as a floatCOMMENT
HIGH19_risk_management/03_position_sizing_mae_mfe.py106assert close_prices.index.equals(high_prices.index) and close_prices.index.equals(low_prices.index)CODE
HIGH19_risk_management/03_position_sizing_mae_mfe.py107assert close_prices.columns.equals(high_prices.columns) and close_prices.columns.equals(CODE
HIGH19_risk_management/04_factor_exposure.py158assert returns.index.equals(ff3_aligned.index) and returns.index.equals(ff5_aligned.index)CODE
HIGHtests/test_data_quality.py52 assert out.equals(df)CODE
HIGHtests/test_data_quality.py58 assert out.equals(df)CODE
HIGHtests/test_data_quality.py64 assert out.equals(df)CODE
HIGHtests/test_registry_metrics.py320 undefined, and ``cross_sectional_ic`` returns NaN for that fold.STRING
HIGHtests/test_allocation.py260 assert prefix.equals(full)CODE
HIGHtests/test_deep_learning_adapter.py376 assert context.expected_keys.equals(expected)CODE
HIGHtests/test_research_contract_execution.py745 assert stored_trades.equals(original_trades)CODE
HIGHtests/test_backtest_runner_helpers.py144 assert out.equals(other)CODE
HIGHtests/test_backtest_runner_helpers.py232 assert result.equals(base_weights)CODE
HIGHtests/test_artifact_sidecar_verification.py79 null, so a caller carrying these into a training spec records what it verified andSTRING
HIGHtests/test_feature_engineering_coverage.py5``rolling_mean`` emits null, ``ml4t.engineer.features.momentum.rsi`` emits NaN.STRING
HIGHtests/test_cross_sectional_ic_mean.py4Spearman coefficient. ml4t-diagnostic 0.1.1 reports it as NaN and 0.1.2 as null,STRING
HIGHtests/test_seed_prediction_fixtures.py281 assert leader_after.equals(leader_before), "the cohort leader's real artifact was overwritten"CODE
HIGHtests/test_seed_prediction_fixtures.py282 assert not other_after.equals(other_before), (CODE
HIGHtests/test_latent_factors_no_leak.py790 assert fresh_predictions.equals(cached_predictions)CODE
HIGHtests/test_latent_factors_no_leak.py791 assert fresh_metrics.equals(cached_metrics)CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py1611 .data(graphData.nodes.filter(d => d.group === 1 && d.degree >= 5))CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py1651 d.fx = null;CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py1652 d.fy = null;CODE
HIGH11_ml_pipeline/05_shap_analysis.py131# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/06_conformal_prediction.py144# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/03_logistic_classification.py151# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/01_ols_inference.py120# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/04_nested_cv_hpo.py133# A feature that could not be computed arrives as a null, and every row carryingCOMMENT
HIGH11_ml_pipeline/02_regularization_paths.py132# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGHutils/modeling.py2108 null; the `is_finite` filter is belt-and-braces against an environmentSTRING
HIGH08_financial_features/05_feature_selection.py207# ``pl.corr`` returns a float NaN (not a null) on any date where a feature isCOMMENT
HIGH07_defining_the_learning_task/07_multiple_testing.py352# P-value histogram (should be uniform under null)COMMENT
HIGH07_defining_the_learning_task/05_signal_evaluation.py1112# inherits also lives in the null; across blocks the relabelings are independent.COMMENT
HIGH…efining_the_learning_task/10_ml4t_library_ecosystem.py262# NaN is distinct from null, so guard against both before averaging.COMMENT
HIGH…_defining_the_learning_task/08_causal_sanity_checks.py289 the observed assignment is itself one of the arrangements under the null, andSTRING
HIGHcase_studies/research/catalog.py222 # scores its own label and leaves this null; a regression row has no classes, soCOMMENT
HIGH…tudies/crypto_perps_funding/04_model_based_features.py1121assert reassembled_frame.equals(training_frame), (CODE
HIGH…tudies/crypto_perps_funding/14_portfolio_management.py422 if not persisted_widths.equals(expected_widths):STRING
HIGHcase_studies/crypto_perps_funding/02_labels.py330 # 1. An incomplete forward window is null, never a value.COMMENT
HIGHcase_studies/nasdaq100_microstructure/08_dl_nlinear.py237# A score is unusable when it is absent, undefined, or infinite. Counting onlyCOMMENT
HIGHcase_studies/nasdaq100_microstructure/05_evaluation.py634# is undefined, so they are identified here and left out of the ranking rather thanCOMMENT
HIGHcase_studies/nasdaq100_microstructure/10_dl_tcn.py241# A score is unusable when it is absent, undefined, or infinite. Counting onlyCOMMENT
HIGH…es/nasdaq100_microstructure/04_model_based_features.py1257assert _truncated.equals(_full), (CODE
HIGH…dies/nasdaq100_microstructure/03_financial_features.py556# undefined, because price impact per dollar traded means nothing when nothing traded; theCOMMENT
HIGHcase_studies/nasdaq100_microstructure/09_dl_lstm.py241# A score is unusable when it is absent, undefined, or infinite. Counting onlyCOMMENT
HIGHcase_studies/nasdaq100_microstructure/11_dl_patchtst.py240# A score is unusable when it is absent, undefined, or infinite. Counting onlyCOMMENT
HIGHcase_studies/nasdaq100_microstructure/02_labels.py379 # 1. An incomplete forward window is null, never a value.COMMENT
HIGHcase_studies/us_equities_panel/03_financial_features.py691# **A missing value is a null, and several of the library oscillators return a float NaNCOMMENT
HIGHcase_studies/us_equities_panel/03_financial_features.py1063# null, which is the warm-up at the start of a stock's series. `essential_cols` is the setCOMMENT
HIGHcase_studies/us_equities_panel/02_labels.py361 # 1. A window reaching past the stock's last session is null, never a value.COMMENT
HIGHcase_studies/cme_futures/17_strategy_analysis.py259# null + null is null, so reading the grid value from the wrong place yields a full-height frameCOMMENT
HIGHcase_studies/cme_futures/04_model_based_features.py824 assert other.equals(reference), (CODE
HIGHcase_studies/cme_futures/03_financial_features.py468# that score and is null, not zero, wherever the score is: a flat reading and no reading areCOMMENT
HIGHcase_studies/cme_futures/02_labels.py335 # 1. An incomplete forward window is null, never a value.COMMENT
HIGHcase_studies/cme_futures/02_labels.py404# value instead of a null, which would lift the left end off the floor, and a short labelCOMMENT
HIGHcase_studies/utils/feature_engineering.py397 polars' own ``rolling_mean`` emits null, ``ml4t.engineer.features.momentum``STRING
HIGHcase_studies/utils/linear.py1688 if not reconstructed.equals(published):CODE
26 more matches not shown…
Excessive Try-Catch Wrapping330 hits · 311 pts
SeverityFileLineSnippetContext
LOWsitecustomize.py118 except Exception: # noqa: BLE001 - startup hook: a missing or hung git is not an error hereCODE
LOWsitecustomize.py163except Exception: # noqa: BLE001 - startup hook: never break the interpreterCODE
LOW21_rl_execution_hedging/07_backtest_with_impact.py386 except Exception as exc: # noqa: BLE001 - collected and re-raised belowCODE
LOW21_rl_execution_hedging/rl_calibration.py214 except Exception:CODE
LOW09_model_based_features/01_visual_diagnostics.py369 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…_financial_research/02_domain_embeddings_comparison.py270 except Exception as e:CODE
LOW…_financial_research/02_domain_embeddings_comparison.py309 except Exception as e:CODE
LOW12_gradient_boosting/06_optuna_multi_asset.py119 except Exception as e:CODE
LOW12_gradient_boosting/02_gbm_comparison.py152 except Exception:CODE
LOW12_gradient_boosting/02_gbm_comparison.py159 except Exception:CODE
LOW12_gradient_boosting/02_gbm_comparison.py168 except Exception:CODE
LOW12_gradient_boosting/05_cross_library_hpo.py614 except Exception as e:CODE
MEDIUM…nancial_data_universe/21_storage_benchmark_database.py916def questdb_row_count() -> int:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py240except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py252except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py272except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py292except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py312except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py919 except Exception:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1357 except Exception:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1548 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1579 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1623 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.py293 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py318except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py412 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py473 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py483 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py561 except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py290except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py326except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py367 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.py367 except Exception as e:CODE
LOW03_market_microstructure/14_itch_bar_sampling.py711 except Exception as e:CODE
MEDIUM03_market_microstructure/05_itch_trading_activity.py144 print(f"Error reading {sub.name}: {e}")CODE
270 more matches not shown…
Cross-File Repetition59 hits · 295 pts
SeverityFileLineSnippetContext
HIGH14_latent_factors/04_ipca.py0forecast with an exponentially weighted mean of available factors.STRING
HIGH14_latent_factors/06_conditional_autoencoder.py0forecast with an exponentially weighted mean of available factors.STRING
HIGH14_latent_factors/05_rp_pca.py0forecast with an exponentially weighted mean of available factors.STRING
HIGH17_portfolio_construction/13_deepm_regime_robust.py0return whether a cached state dict matches the current model layout.STRING
HIGH17_portfolio_construction/12_vlstm_portfolio.py0return whether a cached state dict matches the current model layout.STRING
HIGH17_portfolio_construction/11_dl_portfolio_allocation.py0return whether a cached state dict matches the current model layout.STRING
HIGHdata/equities/market/sp500/build_options_eda.py0where the loaders read this dataset from. not ``path(__file__).parent``: the converter writes under ``$ml4t_data_path``,STRING
HIGHdata/equities/market/sp500/materialize_options.py0where the loaders read this dataset from. not ``path(__file__).parent``: the converter writes under ``$ml4t_data_path``,STRING
HIGH…a/equities/market/sp500/build_options_straddles_raw.py0where the loaders read this dataset from. not ``path(__file__).parent``: the converter writes under ``$ml4t_data_path``,STRING
HIGHcase_studies/crypto_perps_funding/16_risk_management.py0index fills, settlements, prices, and engine equity by utc timestamp.STRING
HIGHcase_studies/crypto_perps_funding/13_backtest.py0index fills, settlements, prices, and engine equity by utc timestamp.STRING
HIGH…tudies/crypto_perps_funding/14_portfolio_management.py0index fills, settlements, prices, and engine equity by utc timestamp.STRING
HIGHcase_studies/crypto_perps_funding/15_costs.py0index fills, settlements, prices, and engine equity by utc timestamp.STRING
HIGHcase_studies/crypto_perps_funding/13_backtest.py0select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where bSTRING
HIGH…tudies/crypto_perps_funding/14_portfolio_management.py0select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where bSTRING
HIGHcase_studies/crypto_perps_funding/15_costs.py0select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where bSTRING
HIGHcase_studies/crypto_perps_funding/06_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/cme_futures/06_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/sp500_equity_option_analytics/06_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/sp500_options/06_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/fx_pairs/06_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/us_firm_characteristics/05_linear.py0render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`.STRING
HIGHcase_studies/nasdaq100_microstructure/05_evaluation.py0asymmetric plotly error bars from a pair of interval bounds.STRING
HIGH…studies/sp500_equity_option_analytics/05_evaluation.py0asymmetric plotly error bars from a pair of interval bounds.STRING
HIGHcase_studies/fx_pairs/05_evaluation.py0asymmetric plotly error bars from a pair of interval bounds.STRING
HIGHcase_studies/nasdaq100_microstructure/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGHcase_studies/us_equities_panel/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGHcase_studies/cme_futures/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGHcase_studies/sp500_options/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGHcase_studies/fx_pairs/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGHcase_studies/etfs/07_gbm.py0read the loss function out of a declared configuration name.STRING
HIGH…udies/nasdaq100_microstructure/18_strategy_analysis.py0select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bacSTRING
HIGHcase_studies/etfs/18_strategy_analysis.py0select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bacSTRING
HIGH…tudies/us_firm_characteristics/15_strategy_analysis.py0select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bacSTRING
HIGHcase_studies/nasdaq100_microstructure/12_causal_dml.py0causal dml — walk-forward estimation with refutation tests.STRING
HIGHcase_studies/etfs/12_causal_dml.py0causal dml — walk-forward estimation with refutation tests.STRING
HIGH…studies/sp500_equity_option_analytics/12_causal_dml.py0causal dml — walk-forward estimation with refutation tests.STRING
HIGHcase_studies/sp500_options/10_causal_dml.py0causal dml — walk-forward estimation with refutation tests.STRING
HIGHcase_studies/nasdaq100_microstructure/14_backtest.py0protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_confSTRING
HIGHcase_studies/sp500_options/12_backtest.py0protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_confSTRING
HIGHcase_studies/us_firm_characteristics/11_backtest.py0protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_confSTRING
HIGH…e_studies/sp500_equity_option_analytics/14_backtest.py0protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_confSTRING
HIGHcase_studies/cme_futures/06_linear.py0rank correlation between two labels' orderings, over what both of them charted.STRING
HIGHcase_studies/fx_pairs/06_linear.py0rank correlation between two labels' orderings, over what both of them charted.STRING
HIGHcase_studies/etfs/06_linear.py0rank correlation between two labels' orderings, over what both of them charted.STRING
HIGHcase_studies/cme_futures/research_workflow.py0resolve visible catalog rows through the shared family boundary.STRING
HIGH…ies/sp500_equity_option_analytics/research_workflow.py0resolve visible catalog rows through the shared family boundary.STRING
HIGHcase_studies/sp500_options/research_workflow.py0resolve visible catalog rows through the shared family boundary.STRING
HIGHcase_studies/sp500_equity_option_analytics/11a_pca.py0number of distinct labels the execution published, read from its catalog rows.STRING
HIGH…equity_option_analytics/11c_conditional_autoencoder.py0number of distinct labels the execution published, read from its catalog rows.STRING
HIGHcase_studies/sp500_equity_option_analytics/11b_ipca.py0number of distinct labels the execution published, read from its catalog rows.STRING
HIGH…ity_option_analytics/11d_stochastic_discount_factor.py0number of distinct labels the execution published, read from its catalog rows.STRING
HIGH…_equity_option_analytics/11e_supervised_autoencoder.py0number of distinct labels the execution published, read from its catalog rows.STRING
HIGHcase_studies/etfs/11c_conditional_autoencoder.py0mean daily rank correlation of prediction against realised return, within each fold.STRING
HIGHcase_studies/etfs/11b_ipca.py0mean daily rank correlation of prediction against realised return, within each fold.STRING
HIGHcase_studies/etfs/11d_stochastic_discount_factor.py0mean daily rank correlation of prediction against realised return, within each fold.STRING
HIGH24_autonomous_agents/agent_research.py0\ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news searSTRING
HIGH24_autonomous_agents/01_react_reasoning.py0\ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news searSTRING
HIGH24_autonomous_agents/04_research_agent.py0\ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news searSTRING
Deep Nesting203 hits · 174 pts
SeverityFileLineSnippetContext
LOW…execution_hedging/06_inverse_reinforcement_learning.py458CODE
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.py350CODE
LOW16_strategy_simulation/05_stateful_strategies.py191CODE
LOW16_strategy_simulation/validation/weights.py162CODE
LOW…trategy_simulation/validation/adapters/ml4t_adapter.py299CODE
LOW19_risk_management/06_stress_testing.py1027CODE
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
LOW20_strategy_synthesis/08_recommendations.py276CODE
LOW20_strategy_synthesis/08_recommendations.py427CODE
LOW20_strategy_synthesis/01_aggregate_synthesis.py1088CODE
LOW20_strategy_synthesis/holdout.py990CODE
LOW20_strategy_synthesis/00_holdout_predictions.py188CODE
LOWtests/add_missing_parameters_cells.py45CODE
LOWtests/generate_test_microstructure.py462CODE
LOWtests/generate_test_microstructure.py667CODE
LOWtests/conftest.py132CODE
LOWtests/conftest.py476CODE
LOWtests/sample_registry_for_tests.py396CODE
LOWtests/sample_registry_for_tests.py520CODE
LOWtests/test_notebook_output_hygiene.py242CODE
LOWtests/test_notebook_output_hygiene.py329CODE
LOWtests/test_model_registry.py429CODE
LOWtests/test_causal_rows_are_resolvable.py49CODE
LOWtests/test_leakage_detectors.py187CODE
LOWtests/test_leakage_detectors.py331CODE
LOWtests/test_eoa_universe_roster.py142CODE
LOWtests/test_rung_pins_match_chapter_20.py93CODE
LOWtests/pm_helpers.py235CODE
LOWtests/pm_helpers.py386CODE
LOWtests/pm_helpers.py469CODE
LOWtests/pm_helpers.py497CODE
LOWtests/pm_helpers.py543CODE
LOWtests/pm_helpers.py587CODE
LOWtests/generate_intermediates.py132CODE
LOWtests/generate_skip_data.py75CODE
LOWtests/test_fold_resolution.py142CODE
LOWtests/test_fold_resolution.py218CODE
LOWtests/create_test_data.py746CODE
LOWtests/test_us_equities_panel_feature_ordering.py290CODE
LOWtests/test_us_equities_panel_feature_ordering.py387CODE
LOWtests/test_us_equities_panel_feature_ordering.py395CODE
LOWtests/test_sweep_config_seam.py186CODE
LOWutils/cv_splits.py127CODE
LOWutils/style.py878CODE
143 more matches not shown…
Structural Annotation Overuse46 hits · 80 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.py462# Step 1: AutoARIMA order selection on first training windowCOMMENT
LOW09_model_based_features/10_uncertainty_features.py478# 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
LOW16_strategy_simulation/13_ras_protocol.py736# # Step 1: Standardize without demeaning, then compute native estimatesCOMMENT
LOW16_strategy_simulation/13_ras_protocol.py741# # Step 2: Apply RAS adjustmentCOMMENT
LOW16_strategy_simulation/13_ras_protocol.py750# # Step 3: Annualize only after applying the native-unit boundCOMMENT
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.py316# Step 1: Compute IC (correlation with returns) for each characteristic, per month.COMMENT
LOW…mental_alternative_data/01_academic_characteristics.py328# Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across monthsCOMMENT
LOW14_latent_factors/02_eigenportfolios.py517# Step 1: Intra-sector PCACOMMENT
LOW14_latent_factors/02_eigenportfolios.py546# Step 2: Cross-sector PCACOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py161# ### Step 1: Tree ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py167# ### Step 2: Quasi-DiagonalizationCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py171# ### Step 3: Recursive BisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py294 # Step 1: ClusterCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py297 # Step 2: Quasi-diagonalizeCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py300 # Step 3: Recursive bisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py183# #### Step 1: Hierarchical ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py206# #### Step 2: Leaf OrderingCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py235# #### Step 3: Recursive Bisection AllocationCOMMENT
LOW18_transaction_costs/07_ml4t_volume_participation.py570# Step 1: Apply volume limitCOMMENT
LOW18_transaction_costs/07_ml4t_volume_participation.py574# Step 2: Apply market impactCOMMENT
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
LOW15_causal_estimation/02_dowhy_causal_graph.py208# Step 1: Base features (8h frequency -- 3 bars = 24h, 21 bars = 7 days)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py214# Step 2: Rolling features (backward-looking only)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py225# Step 3: Treatment (measured at time t) and outcomes (forward-looking)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py241# Step 4: Binary treatmentCOMMENT
LOWcase_studies/utils/backtest_loaders.py1354 # Step 1: Calendar-aware schedule resolutionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1357 # Step 2: Apply design-time non-overlapping stepCOMMENT
LOW24_autonomous_agents/agent_fixtures.py534 # Step 2: roll forward within the same event seriesCOMMENT
LOW24_autonomous_agents/agent_fixtures.py519 # Step 1: try the pinned tickerCOMMENT
LOW24_autonomous_agents/agent_fixtures.py546 # Step 3: static Fed-policy stand-inCOMMENT
Verbosity Indicators45 hits · 79 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.py462# Step 1: AutoARIMA order selection on first training windowCOMMENT
LOW09_model_based_features/10_uncertainty_features.py478# 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
LOW16_strategy_simulation/13_ras_protocol.py736# # Step 1: Standardize without demeaning, then compute native estimatesCOMMENT
LOW16_strategy_simulation/13_ras_protocol.py741# # Step 2: Apply RAS adjustmentCOMMENT
LOW16_strategy_simulation/13_ras_protocol.py750# # Step 3: Annualize only after applying the native-unit boundCOMMENT
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.py316# Step 1: Compute IC (correlation with returns) for each characteristic, per month.COMMENT
LOW…mental_alternative_data/01_academic_characteristics.py328# Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across monthsCOMMENT
LOW14_latent_factors/02_eigenportfolios.py517# Step 1: Intra-sector PCACOMMENT
LOW14_latent_factors/02_eigenportfolios.py546# Step 2: Cross-sector PCACOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py161# ### Step 1: Tree ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py167# ### Step 2: Quasi-DiagonalizationCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py171# ### Step 3: Recursive BisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py294 # Step 1: ClusterCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py297 # Step 2: Quasi-diagonalizeCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py300 # Step 3: Recursive bisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py183# #### Step 1: Hierarchical ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py206# #### Step 2: Leaf OrderingCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py235# #### Step 3: Recursive Bisection AllocationCOMMENT
LOW18_transaction_costs/07_ml4t_volume_participation.py570# Step 1: Apply volume limitCOMMENT
LOW18_transaction_costs/07_ml4t_volume_participation.py574# Step 2: Apply market impactCOMMENT
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
LOW15_causal_estimation/02_dowhy_causal_graph.py208# Step 1: Base features (8h frequency -- 3 bars = 24h, 21 bars = 7 days)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py214# Step 2: Rolling features (backward-looking only)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py225# Step 3: Treatment (measured at time t) and outcomes (forward-looking)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py241# Step 4: Binary treatmentCOMMENT
LOWcase_studies/utils/backtest_loaders.py1354 # Step 1: Calendar-aware schedule resolutionCOMMENT
LOWcase_studies/utils/backtest_loaders.py1357 # Step 2: Apply design-time non-overlapping stepCOMMENT
LOW24_autonomous_agents/agent_fixtures.py534 # Step 2: roll forward within the same event seriesCOMMENT
LOW24_autonomous_agents/agent_fixtures.py519 # Step 1: try the pinned tickerCOMMENT
LOW24_autonomous_agents/agent_fixtures.py546 # Step 3: static Fed-policy stand-inCOMMENT
Redundant / Tautological Comments58 hits · 67 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/03_market_making_ppo.py317# Set VecNormalize to eval mode (don't update running stats)COMMENT
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.py85RETRAIN = False # Set True to force retraining even if checkpoint existsCODE
LOW05_synthetic_data/02_tailgan_tail_risk.py557 # 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.py1506 # Check if process started successfullySTRING
LOW…nancial_data_universe/08_options_greeks_computation.py232 # Check if solution exists within boundsCOMMENT
LOW19_risk_management/07_drift_detection.py1644# Check if retraining neededCOMMENT
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py129# Check if we have message data to analyzeCOMMENT
LOW03_market_microstructure/14_itch_bar_sampling.py596 # 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.py711 # Check if paragraph is substantially new (low similarity to all old paragraphs)COMMENT
LOWtests/test_model_registry.py499 # Check if this notebook is expected to register (match on suffix)COMMENT
LOW23_knowledge_graphs/02_supply_chain_kg_construction.py79RERUN_EXTRACTION = False # Set True to force LLM re-extraction; False loads cached triplesCODE
LOWutils/data_quality.py607 # Print resultsCOMMENT
LOWutils/storage_benchmarks.py751 # Assign quotes to symbols (weighted: some symbols more active)COMMENT
LOWutils/storage_benchmarks.py816 # Assign trades to symbols (same distribution as quotes)COMMENT
LOW08_financial_features/07_event_studies.py172 # 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
LOW15_causal_estimation/05_momentum_causal_trading.py104RETRAIN = False # Set True to force retraining; False loads cached artifactsCODE
LOWdata/futures/market/download.py234 # Check if year is completeCOMMENT
LOWdata/equities/loader.py1325 # 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.py642# Display resultsCOMMENT
LOWcase_studies/nasdaq100_microstructure/08_dl_nlinear.py92FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/nasdaq100_microstructure/10_dl_tcn.py96FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/nasdaq100_microstructure/09_dl_lstm.py96FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/nasdaq100_microstructure/11_dl_patchtst.py95FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/nasdaq100_microstructure/14_backtest.py79FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/us_equities_panel/12_dl_weekly.py64FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/utils/model_analysis.py186 # Check if fold_metrics table existsSTRING
LOWcase_studies/utils/registry/store.py663 # Check if backtest_runs table exists at allCOMMENT
LOWcase_studies/utils/registry/store.py898 # Check if this table still has tall formatCOMMENT
LOWcase_studies/utils/registry/queries.py1529 # Check if stage column exists (the CREATE TABLE IF NOT EXISTSSTRING
LOW…e_studies/sp500_equity_option_analytics/14_backtest.py83FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/sp500_options/09b_patchtst.py64FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/sp500_options/08_tabular_dl.py66FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/sp500_options/09a_lstm.py61FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/sp500_options/12_backtest.py117FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/etfs/10_dl_tsmixer.py82FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/etfs/09_dl_lstm.py73FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashesCODE
LOWcase_studies/etfs/14_backtest.py83FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/us_firm_characteristics/11_backtest.py78FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/us_firm_characteristics/07_tabular_dl.py60FORCE_RETRAIN = False # Set True to renew content-addressed training resultsCODE
LOW…gents/operator_artifacts/run_etfs_20260504T223150.json5337 "stdout_tail": "24:# prediction into a backtest across the full prediction \u00d7 entry-scheme grid and\n28:# **CODE
LOW…gents/operator_artifacts/run_etfs_20260504T223150.json5402 "command": "cd ~/ml4t/code && uv run python -c \"\nimport polars as pl\nfrom pathlib import Path\n\nSANDBOX = PaCODE
LOW…facts/run_us_firm_characteristics_20260504T225521.json2553 "content": "# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# formatCODE
AI Structural Patterns73 hits · 58 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/rl_environments.py66CODE
LOW21_rl_execution_hedging/crypto_execution_env.py42CODE
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
LOW16_strategy_simulation/13_ras_protocol.py178CODE
LOW16_strategy_simulation/05_stateful_strategies.py319CODE
LOW16_strategy_simulation/05_stateful_strategies.py1001CODE
LOW16_strategy_simulation/12_dsr_validation.py147CODE
LOW19_risk_management/10_ml4t_backtest_risk_demo.py88CODE
LOW…undamental_alternative_data/14_text_data_extraction.py645CODE
LOWtests/pm_helpers.py1102CODE
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.py233CODE
LOWdata/futures/loader.py12CODE
LOWdata/equities/loader.py289CODE
LOWcase_studies/research/execution.py427CODE
LOWcase_studies/research/cv.py163CODE
LOWcase_studies/crypto_perps_funding/research_workflow.py341CODE
LOWcase_studies/config/patchtst/patchtst.py51CODE
LOWcase_studies/config/patchtst/_reference/backbone.py28CODE
LOWcase_studies/config/patchtst/_reference/backbone.py193CODE
LOWcase_studies/config/patchtst/_reference/backbone.py281CODE
LOWcase_studies/config/patchtst/_reference/backbone.py343CODE
LOWcase_studies/us_equities_panel/03_financial_features.py328CODE
LOWcase_studies/us_equities_panel/03_financial_features.py372CODE
LOWcase_studies/us_equities_panel/03_financial_features.py409CODE
LOWcase_studies/us_equities_panel/03_financial_features.py450CODE
LOWcase_studies/us_equities_panel/03_financial_features.py507CODE
LOWcase_studies/us_equities_panel/03_financial_features.py529CODE
LOWcase_studies/us_equities_panel/03_financial_features.py596CODE
LOWcase_studies/utils/deep_learning.py1753CODE
LOWcase_studies/utils/signals.py324CODE
LOWcase_studies/utils/paired_metrics.py699CODE
LOWcase_studies/utils/notebook_render.py295CODE
LOWcase_studies/utils/tabular_dl.py2209CODE
LOWcase_studies/utils/tabular_dl.py2348CODE
LOWcase_studies/utils/slot_strategy.py228CODE
LOWcase_studies/utils/causal.py402CODE
LOWcase_studies/utils/causal.py793CODE
LOWcase_studies/utils/causal.py1630CODE
LOWcase_studies/utils/analytics.py535CODE
LOWcase_studies/utils/model_viz.py609CODE
LOWcase_studies/utils/model_viz.py740CODE
LOWcase_studies/utils/darts_forecasting.py969CODE
LOWcase_studies/utils/backtest_runner.py910CODE
LOWcase_studies/utils/backtest_runner.py2359CODE
LOWcase_studies/utils/gbm.py649CODE
LOWcase_studies/utils/gbm.py1007CODE
LOWcase_studies/utils/gbm.py1304CODE
LOWcase_studies/utils/latent_factors/library_bridge.py188CODE
LOWcase_studies/utils/latent_factors/library_bridge.py246CODE
LOWcase_studies/utils/latent_factors/library_bridge.py308CODE
LOWcase_studies/utils/latent_factors/sae.py14CODE
13 more matches not shown…
Docstring Block Structure10 hits · 50 pts
SeverityFileLineSnippetContext
HIGHtests/pm_helpers.py1115Execute a notebook via Papermill with parameter injection. This is the core test helper. It: 1. Syncs .py -> .iSTRING
HIGHutils/paths.py149Get the directory path for a chapter. Args: chapter: Chapter number (1-27) Returns: Absolute pSTRING
HIGHutils/paths.py185Get output directory for cross-chapter data flow. This is the primary function for case study data that flows betweSTRING
HIGHutils/paths.py253Get the case study directory for a strategy. Case studies are centralized under CASE_STUDIES_DIR (default: repo_rooSTRING
HIGHutils/data_quality.py557Run all data quality checks before modeling. This is the gate between data preparation (labels + features) and STRING
HIGHutils/storage_benchmarks.py348Block until an asynchronously-ingesting engine reports `expected_rows`. QuestDB (ILP + WAL) and InfluxDB acknowledgSTRING
HIGHdata/futures/loader.py84List CME product codes available in the local data store. Args: frequency: ``"hourly"`` (default) lists proSTRING
HIGHdata/futures/loader.py315Load 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
HIGHdata/etfs/loader.py93Load the traded close and share count, unadjusted for splits and distributions. :func:`load_etfs` returns an adjustSTRING
Modern Structural Boilerplate47 hits · 46 pts
SeverityFileLineSnippetContext
LOW16_strategy_simulation/05_stateful_strategies.py677def _update_pair_position(self, zscore: float, price_a: float, price_b: float, broker) -> None:CODE
LOW16_strategy_simulation/05_stateful_strategies.py948def _update_circuit_state(self, equity: float) -> None:CODE
LOWtests/test_causal_adapter.py172def _set_holdout_start(setup_path, value: str) -> None:CODE
LOWutils/style.py1034__all__ = [CODE
LOWutils/paths.py364__all__ = [CODE
LOWutils/reproducibility.py15def set_global_seeds(seed: int = 42) -> None:CODE
LOWutils/__init__.py63__all__ = [CODE
LOWutils/artifact_specs.py165__all__ = [CODE
LOW17_portfolio_construction/deepm/__init__.py22__all__ = [CODE
LOW17_portfolio_construction/deepm/utils.py13def set_seed(seed: int) -> None:CODE
LOWscripts/download_artifacts.py205def _set_tree_writable(root: Path, *, writable: bool) -> None:CODE
LOW25_live_trading/10_safety_risk_demo.py87logger = logging.getLogger(__name__)CODE
LOW25_live_trading/13_runtime_safety_showcase.py87logger = logging.getLogger(__name__)CODE
LOW25_live_trading/04_alpaca_paper_trading_demo.py83logger = logging.getLogger(__name__)CODE
LOW25_live_trading/04_alpaca_paper_trading_demo.py437 def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None:CODE
LOW25_live_trading/01_unified_framework_demo.py414 def update_price(self, asset: str, price: float, timestamp: datetime) -> None:CODE
LOW25_live_trading/03_ib_paper_trading_demo.py86logger = logging.getLogger(__name__)CODE
LOW25_live_trading/05_alpaca_crypto_live_demo.py77logger = logging.getLogger(__name__)CODE
LOW25_live_trading/05_alpaca_crypto_live_demo.py392 def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None:CODE
LOW25_live_trading/08_pipeline_verification.py71logger = logging.getLogger(__name__)CODE
LOWdata/__init__.py126__all__ = [CODE
LOWcase_studies/research/__init__.py63__all__ = [CODE
LOWcase_studies/config/patchtst/_reference/backbone.py6__all__ = ["PatchTST_backbone"]CODE
LOWcase_studies/config/patchtst/_reference/__init__.py21__all__ = ["PatchTST_backbone"]CODE
LOWcase_studies/config/patchtst/_reference/layers.py3__all__ = [CODE
LOWcase_studies/utils/feature_engineering.py36__all__ = [CODE
LOWcase_studies/utils/temporal.py25__all__ = [CODE
LOWcase_studies/utils/folds.py47__all__ = [CODE
LOWcase_studies/utils/feasibility.py14__all__ = ["cross_sectional_persistence", "exceedance_curve", "fold_timeline", "panel_acf"]CODE
LOWcase_studies/utils/coverage.py47__all__ = [CODE
LOWcase_studies/utils/notebook_render.py736__all__ = [STRING
LOWcase_studies/utils/runtime.py25__all__ = [CODE
LOWcase_studies/utils/uncertainty.py1282__all__ = [CODE
LOWcase_studies/utils/derived_params.py18__all__ = ["DERIVED_PARAM_SIGNIFICANT_DIGITS", "quantize_derived"]CODE
LOWcase_studies/utils/latent_factors/macro_context.py78__all__ = ["MACRO_CONTEXT_ALIGNMENT", "load_configured_macro_context"]CODE
LOWcase_studies/utils/latent_factors/__init__.py37__all__ = [CODE
LOWcase_studies/utils/latent_factors/common.py167__all__ = [CODE
LOWcase_studies/utils/latent_factors/case_study.py23logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/latent_factors/panel.py296__all__ = [CODE
LOWcase_studies/utils/registry/registration.py40logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/specs.py16logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/store.py24logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/metrics.py9logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/__init__.py145__all__ = [CODE
LOWcase_studies/utils/registry/completeness.py506__all__ = [CODE
LOWcase_studies/utils/registry/queries.py32logger = logging.getLogger(__name__)CODE
LOWcase_studies/sp500_options/_underlying_returns.py15__all__ = ["reconcile_underlying_log_returns", "validate_reconciled_returns"]CODE
Self-Referential Comments16 hits · 46 pts
SeverityFileLineSnippetContext
MEDIUM21_rl_execution_hedging/07_backtest_with_impact.py284# ## Define the Momentum StrategyCOMMENT
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.py164# Define the model as a function for reuse across walk-forward folds.COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py353# ### Create the Query InterfaceCOMMENT
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.py124# Create a reference database with standard identifiersCOMMENT
MEDIUM23_knowledge_graphs/02_supply_chain_kg_construction.py204# Define the knowledge graph schema. Each extracted relationship is aCOMMENT
MEDIUM23_knowledge_graphs/02_supply_chain_kg_construction.py1248# Create the pyvis network with supplier risk tooltips and compact companyCOMMENT
MEDIUM23_knowledge_graphs/08_8k_event_extraction.py286# Define the event quadruple structure.COMMENT
MEDIUM17_portfolio_construction/08_library_comparison.py411# Define the shared estimator once in daily units. PyPortfolioOpt consumes annualCOMMENT
MEDIUM17_portfolio_construction/08_library_comparison.py536# Create the portfolio object and pass the already-defined sample moments explicitly.COMMENT
MEDIUM…transaction_costs/12_commission_slippage_comparison.py614# ### Define the Equity-Compatible Commission VariantsCOMMENT
MEDIUM07_defining_the_learning_task/03_label_methods.py504# This method is from De Prado's *Advances in Financial Machine Learning*.COMMENT
MEDIUM15_causal_estimation/09_adia_causal_benchmark.py156# Define the 8 causal categoriesCOMMENT
MEDIUMcase_studies/utils/model_analysis.py819 # Create a key for mergeSTRING
Magic Placeholder Names4 hits · 30 pts
SeverityFileLineSnippetContext
HIGHdata/futures/market/dataset_card.py93# DATABENTO_API_KEY=db-your-api-key-hereCOMMENT
HIGHdata/fx/market/dataset_card.py82# OANDA_API_KEY=your-api-key-hereCOMMENT
HIGHdata/equities/market/microstructure/dataset_card.py87# DATABENTO_API_KEY=db-your-api-key-hereCOMMENT
HIGHdata/equities/market/us_equities/dataset_card.py81# QUANDL_API_KEY=your-api-key-hereCOMMENT
Fake / Example Data10 hits · 9 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
LOW22_rag_financial_research/01_sec_filing_pipeline.py109 'for example: EDGAR_IDENTITY="Jane Doe jane@example.org".'CODE
LOW…undamental_alternative_data/14_text_data_extraction.py807# export EDGAR_IDENTITY="Jane Doe jane@example.org"STRING
LOW…undamental_alternative_data/14_text_data_extraction.py820 '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.'STRING
LOW…fundamental_alternative_data/02_sec_filing_explorer.py83# `export EDGAR_IDENTITY="Jane Doe jane@example.org"`.COMMENT
LOW…fundamental_alternative_data/02_sec_filing_explorer.py90 '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.'CODE
LOWtests/test_pm_helpers.py142 monkeypatch.setenv("ML4T_FAKE_KEY", "Jane Doe jane@example.org")CODE
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/generate_test_data.sh26# 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
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH06_strategy_definition/exploration.md35├── figures/ # Book figures (AI-generated + notebook)CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUM…/01_react_reasoning_20260615T191047Z_04eb6e7c603d.json217 "snippet": "# US - FedWatch Probability of Rate Hike/Cut | US Fed | Collection | MacroMicro. #### NotificaCODE
Overly Generic Function Names2 hits · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_import_resolution.py246 (pkg / "__init__.py").write_text("CONSTANT = 3\n\n\ndef helper():\n pass\n")CODE
LOWtests/test_import_resolution.py471 "def helper():\n from pathlib import Path\n", # binds inside the function onlyCODE