AI Slop Code RIsk Monitor

stefan-jansen/machine-learning-for-trading

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

27.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for stefan-jansen/machine-learning-for-trading, a Jupyter Notebook project with 21,291 GitHub stars. SynthScan examined 724,059 lines of code across 1515 source files, recording 15558 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 27.4 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

27.4
Adjusted Signal
27.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
21.3K
Stars
Jupyter Notebook
Language
724.1K
Lines of Code
1.5K
Files
15.6K
Pattern Hits
2026-10-12
Scan Date
0.18
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 60.2/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 12752 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.9/100 · LOW

Are imports declared and package/API names verified? 1134 finding(s).

Agent Over-Engineering Ratio 50.3/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 6881 finding(s).

PR Review Velocity Impact 75.1/100 · CRITICAL

Which changes need focused human review? 15558 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 279MEDIUM 1603LOW 13676

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 15558 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block6727 hits · 6311 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml41COMMENT
LOW.pre-commit-config.yaml61 - id: strip-plotly-jsonCOMMENT
LOWpyproject.toml21 "pyarrow>=15.0",COMMENT
LOWpyproject.toml101 # ===================COMMENT
LOWpyproject.toml261 # ruff versions format the same code differently, so a notebook formatted byCOMMENT
LOWsitecustomize.py161 configured = _data_root_from_dotenv(repo_root)COMMENT
LOWdocker-compose.yml1# ML4T 3rd Edition — Docker Compose ConfigurationCOMMENT
LOWdocker-compose.yml21#COMMENT
LOWdocker-compose.yml41 # local_files_only=True, so a container run has to see the host's cache or theCOMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py1# ---COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py41# - Train a value-based agent (DQN) and two actor-critic agents (PPO, A2C) withCOMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py101COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py141# GARCH(1,1) models the variance of a return series as a function of its ownCOMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py301COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py321# sees the return $r_t$ that has just happened. The reward it collects isCOMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py401 obs = build_observation(self.returns, self.step_idx, self.position)COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py421# means and why it needs fewer fresh environment steps per unit of progress.COMMENT
LOW21_rl_execution_hedging/01_algorithms_comparison.py701 }COMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py1# ---COMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py41# - Compute a name's participation rate - the size of an order against theCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py101LIQUID_MAX_PARTICIPATION = 0.10 # order below this share of daily volume is the liquid cohortCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py321# ## The Square-Root Impact ModelCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py481summaryCOMMENT
LOW21_rl_execution_hedging/07_backtest_with_impact.py561after selection and does not feed back into it.COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py1# ---COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py41# basis points of the arrival notional, and say which part of that cost comesCOMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py141# %% [markdown]COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py221)COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py241# depth falls. The simulator therefore makes a stressed regime a wider, deeperCOMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py261stressed state and the rest to the normal state.COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py281# walks down the available bids, and the size of that effect grows with theCOMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py301# The action is a pace multiplier rather than a quantity so that no policy canCOMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py401)COMMENT
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py461#COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py1# ---COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py41# After working through this notebook you will be able to:COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py141 a half-spread that already widens with volatility.COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py201# ### What the maker sees and doesCOMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py221# notebook quote symmetrically around exactly this price, at three differentCOMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py241# $$r_t = \Delta W_t - \lambda_q \left(\frac{q_t}{q_{\max}}\right)^2 p_{t+1}$$COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py321#COMMENT
LOW21_rl_execution_hedging/03_market_making_ppo.py741# ## 7. Which part of the inventory response is the policy'sCOMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py1# ---COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py41# drawn from bars that had closed when the decision was made, and say whichCOMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py141)COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py181# %%COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py321)COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py341#COMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py721# The flag fires when a policy reaches the final hour still holding more than itCOMMENT
LOW21_rl_execution_hedging/04_crypto_execution_rl.py761# %% [markdown]COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py1# ---COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py21# ## PurposeCOMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py41# After working through this notebook you will be able to:COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py61#COMMENT
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py141# expressed the same way and P&L is scaled back to currency at the end.COMMENT
6667 more matches not shown…
Hyper-Verbose Identifiers5124 hits · 5248 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py476def discrete_almgren_chriss_schedule(CODE
LOW21_rl_execution_hedging/market_making_env.py24def generate_garch_market_data(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py205def collect_expert_trajectories(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py565def compute_feature_expectations(trajectories: list, extract_fn) -> np.ndarray:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py630def sample_candidate_trajectory(env: ExecutionEnv, rng) -> dict:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py652def trajectory_feature_counts(trajectories: list, extract_features_fn) -> np.ndarray:CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py733def regularized_log_likelihood(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py835def sample_feature_matching_trajectory(CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py1030def inferred_boltzmann_action(CODE
LOW05_synthetic_data/00_classical_simulation.py460def simulate_mean_reversion_euler(CODE
LOW05_synthetic_data/00_classical_simulation.py518def simulate_mean_reversion_exact(CODE
LOW05_synthetic_data/04_gtgan_irregular.py252def generate_synthetic_irregular_bars(n_bars: int = 1000, seed: int = 42) -> pl.DataFrame:CODE
LOW05_synthetic_data/04_gtgan_irregular.py352def compute_inter_arrival_times(df: pl.DataFrame) -> np.ndarray:CODE
LOW05_synthetic_data/04_gtgan_irregular.py383def create_irregular_sequences(CODE
LOW05_synthetic_data/timegan_metrics.py192def compute_predictive_score_yoon(CODE
LOW05_synthetic_data/timegan_metrics.py304def compute_discriminative_score_yoon(CODE
LOW05_synthetic_data/timegan_metrics.py555def 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.py810def compute_signatures_batch_paper(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1186def compute_expected_signature_gpu(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1666def plot_path_comparison_unconditional(CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1802def tstr_evaluation_unconditional(CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py286def deterministic_neural_sort(s: torch.Tensor, tau: float) -> torch.Tensor:CODE
LOW09_model_based_features/12_wasserstein_regimes.py501def simulate_two_regime_stream(CODE
LOW09_model_based_features/02_structural_breaks.py743def distribution_shift_features(series: np.ndarray, boundary: int, n_bins: int = 50) -> dict:CODE
LOW09_model_based_features/02_structural_breaks.py778def dependence_shift_features(series: np.ndarray, boundary: int) -> dict:CODE
LOW09_model_based_features/02_structural_breaks.py849def compute_all_break_features(series: np.ndarray, boundary: int) -> dict:CODE
LOW09_model_based_features/13_regime_as_feature.py289def evaluate_mixture_of_experts(estimator, features: list[str]) -> pd.DataFrame:CODE
LOW09_model_based_features/10_uncertainty_features.py195def fit_stochastic_volatility(observations: np.ndarray):CODE
LOW09_model_based_features/07_arima_features.py348def fit_recording_convergence(series: pd.Series, order: tuple[int, int, int]):CODE
LOW22_rag_financial_research/03_hybrid_retrieval.py507def semantic_similarity_scores(query: str, model, embeddings: np.ndarray) -> np.ndarray:CODE
LOW…_financial_research/02_domain_embeddings_comparison.py351def get_sentence_transformer_embeddings(CODE
LOW…_financial_research/07_institutional_holdings_graph.py329def compute_coownership_matrix(holdings: pl.DataFrame) -> tuple[np.ndarray, list[str]]:CODE
LOW…_financial_research/07_institutional_holdings_graph.py729def compute_institution_similarity(holdings: pl.DataFrame) -> pl.DataFrame:CODE
LOW12_gradient_boosting/11_conformal_gbm.py110def embargo_steps_from_buffer(label_buffer: str, dates: np.ndarray) -> int:CODE
LOW12_gradient_boosting/11_conformal_gbm.py136def chronological_calibration_masks(CODE
LOW12_gradient_boosting/11_conformal_gbm.py161def conformal_order_statistic(scores: np.ndarray, alpha: float) -> float:CODE
LOW12_gradient_boosting/11_conformal_gbm.py218def deterministic_lgb_parameters(objective: str, alpha: float | None = None) -> dict:CODE
LOW12_gradient_boosting/11_conformal_gbm.py503def summarize_conformal_results(results: list[dict], alpha: float) -> dict | None:CODE
LOW12_gradient_boosting/11_conformal_gbm.py779def compute_adaptive_intervals(CODE
LOW12_gradient_boosting/07_hpo_comparison.py291def optuna_continuous_objective(trial):CODE
LOW12_gradient_boosting/12_case_study_insights.py1624def pairwise_rank_correlation(fold_arrays: list[np.ndarray]) -> tuple[float, float] | None:CODE
LOW02_financial_data_universe/06_futures_continuous.py479def identify_front_month_calendar(CODE
LOW…financial_data_universe/14_point_in_time_validation.py274def leakage_corr_scale_invariant(df: pl.DataFrame, feature: str, price: str = "close") -> float:CODE
LOW…financial_data_universe/14_point_in_time_validation.py327def validate_signal_trade_lag(signals: pl.DataFrame, execution_lag: int = 1) -> pl.DataFrame:CODE
LOW02_financial_data_universe/09_options_continuous.py117def select_constant_maturity_straddle(raw_options: pl.DataFrame) -> pl.DataFrame:CODE
LOW02_financial_data_universe/09_options_continuous.py737def build_continuous_straddle_series(cm_series: pl.DataFrame, held: pl.DataFrame) -> pl.DataFrame:CODE
LOW02_financial_data_universe/17_complete_pipeline.py192def _combine_pipeline_sources(CODE
LOW02_financial_data_universe/17_complete_pipeline.py561def _validate_crypto_coverage(df: pl.DataFrame, symbol: str) -> dict[str, Any]:CODE
LOW02_financial_data_universe/17_complete_pipeline.py604def _add_crypto_session_features(df: pl.DataFrame) -> pl.DataFrame:CODE
LOW…ancial_data_universe/15_survivorship_bias_detection.py1073def check_universe_completeness(CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py213def read_parquet_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py250def read_feather_materialized() -> pl.DataFrame:CODE
LOW02_financial_data_universe/02_corporate_actions.py446def demonstrate_split_adjustment(CODE
LOW02_financial_data_universe/02_corporate_actions.py475def demonstrate_dividend_adjustment(price_before_ex: float = 100.0, dividend: float = 5.0) -> None:CODE
LOW02_financial_data_universe/16_provider_comparison.py560def compare_providers_detailed(CODE
LOW16_strategy_simulation/08_signal_method_comparison.py164def select_registered_prediction(db_path: Path, family: str, label: str) -> dict[str, object]:STRING
LOW16_strategy_simulation/08_signal_method_comparison.py239def load_registered_predictions(CODE
LOW16_strategy_simulation/02_futures_backtesting.py114def load_contract_specs_from_yaml(yaml_path: Path) -> dict[str, ContractSpec]:CODE
5064 more matches not shown…
Decorative Section Separators1171 hits · 3809 pts
SeverityFileLineSnippetContext
MEDIUM⚡pyproject.toml11 # ===================COMMENT
MEDIUM⚡pyproject.toml13 # ===================COMMENT
MEDIUM⚡pyproject.toml22 # ===================COMMENT
MEDIUM⚡pyproject.toml24 # ===================COMMENT
MEDIUM⚡pyproject.toml99 # ===================COMMENT
MEDIUM⚡pyproject.toml101 # ===================COMMENT
MEDIUM⚡pyproject.toml110 # ===================COMMENT
MEDIUM⚡pyproject.toml112 # ===================COMMENT
MEDIUM⚡pyproject.toml117 # ===================COMMENT
MEDIUM⚡pyproject.toml119 # ===================COMMENT
MEDIUM⚡pyproject.toml124 # ===================COMMENT
MEDIUM⚡pyproject.toml126 # ===================COMMENT
MEDIUM⚡pyproject.toml138 # ===================COMMENT
MEDIUM⚡pyproject.toml140 # ===================COMMENT
MEDIUM⚡pyproject.toml143 # ===================COMMENT
MEDIUM⚡pyproject.toml145 # ===================COMMENT
MEDIUM⚡pyproject.toml149 # ===================COMMENT
MEDIUM⚡pyproject.toml151 # ===================COMMENT
MEDIUM⚡pyproject.toml153 # ===================COMMENT
MEDIUM⚡pyproject.toml155 # ===================COMMENT
MEDIUM⚡pyproject.toml170 # ===================COMMENT
MEDIUM⚡pyproject.toml172 # ===================COMMENT
MEDIUM⚡pyproject.toml181 # ===================COMMENT
MEDIUM⚡pyproject.toml183 # ===================COMMENT
MEDIUMpyproject.toml37 # ===================COMMENT
MEDIUMpyproject.toml39 # ===================COMMENT
MEDIUMpyproject.toml53 # ===================COMMENT
MEDIUMpyproject.toml55 # ===================COMMENT
MEDIUMpyproject.toml70 # ===================COMMENT
MEDIUMpyproject.toml72 # ===================COMMENT
MEDIUMpyproject.toml85 # ===================COMMENT
MEDIUMpyproject.toml87 # ===================COMMENT
MEDIUMdocker-compose.yml77 # ============================================COMMENT
MEDIUMdocker-compose.yml80 # ============================================COMMENT
MEDIUMdocker-compose.yml92 # ============================================COMMENT
MEDIUMdocker-compose.yml95 # ============================================COMMENT
MEDIUMdocker-compose.yml115 # ============================================COMMENT
MEDIUMdocker-compose.yml120 # ============================================COMMENT
MEDIUMdocker-compose.yml171 # ============================================COMMENT
MEDIUMdocker-compose.yml175 # ============================================COMMENT
MEDIUMdocker-compose.yml211 # ============================================COMMENT
MEDIUMdocker-compose.yml216 # ============================================COMMENT
MEDIUMdocker-compose.yml236 # ============================================COMMENT
MEDIUMdocker-compose.yml250 # ============================================COMMENT
MEDIUMdocker-compose.yml284 # ============================================COMMENT
MEDIUMdocker-compose.yml287 # ============================================COMMENT
MEDIUMdocker-compose.yml306 # ============================================COMMENT
MEDIUMdocker-compose.yml309 # ============================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py852# =============================================================================COMMENT
MEDIUM05_synthetic_data/03_sigcwgan_signatures.py854# =============================================================================COMMENT
MEDIUM05_synthetic_data/02_tailgan_tail_risk.py717 # ---------------------COMMENT
MEDIUM05_synthetic_data/02_tailgan_tail_risk.py719 # ---------------------COMMENT
MEDIUM05_synthetic_data/02_tailgan_tail_risk.py739 # ---------------------COMMENT
MEDIUM05_synthetic_data/02_tailgan_tail_risk.py741 # ---------------------COMMENT
MEDIUM13_dl_time_series/dl_sequences.py42# =============================================================================COMMENT
MEDIUM13_dl_time_series/dl_sequences.py44# =============================================================================COMMENT
MEDIUM13_dl_time_series/dl_sequences.py113# =============================================================================COMMENT
MEDIUM13_dl_time_series/dl_sequences.py115# =============================================================================COMMENT
MEDIUM⚡13_dl_time_series/dl_sequences.py153# =============================================================================COMMENT
MEDIUM⚡13_dl_time_series/dl_sequences.py155# =============================================================================COMMENT
1111 more matches not shown…
Unused Imports995 hits · 864 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/01_algorithms_comparison.py88CODE
LOW21_rl_execution_hedging/07_backtest_with_impact.py80CODE
LOW21_rl_execution_hedging/02_optimal_execution_ppo.py95CODE
LOW21_rl_execution_hedging/market_making_env.py3CODE
LOW21_rl_execution_hedging/rl_environments.py14CODE
LOW21_rl_execution_hedging/03_market_making_ppo.py95CODE
LOW21_rl_execution_hedging/04_crypto_execution_rl.py91CODE
LOW21_rl_execution_hedging/rl_calibration.py25CODE
LOW21_rl_execution_hedging/05_deep_hedging_pfhedge.py103CODE
LOW…execution_hedging/06_inverse_reinforcement_learning.py89CODE
LOW21_rl_execution_hedging/crypto_execution_env.py3CODE
LOW05_synthetic_data/04_gtgan_irregular.py138CODE
LOW05_synthetic_data/04_gtgan_irregular.py140CODE
LOW05_synthetic_data/04_gtgan_irregular.py142CODE
LOW05_synthetic_data/timegan_metrics.py35CODE
LOW05_synthetic_data/05_diffusion_ts.py105CODE
LOW05_synthetic_data/06_llm_tabular_great.py84CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py148CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py150CODE
LOW05_synthetic_data/07_dp_gan.py93CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py60CODE
LOW05_synthetic_data/02_tailgan_tail_risk.py67CODE
LOW05_synthetic_data/01_timegan.py83CODE
LOW09_model_based_features/09_har_rough_volatility.py62CODE
LOW09_model_based_features/13_regime_as_feature.py64CODE
LOW09_model_based_features/10_uncertainty_features.py56CODE
LOW22_rag_financial_research/03_hybrid_retrieval.py84CODE
LOW22_rag_financial_research/01_sec_filing_pipeline.py87CODE
LOW12_gradient_boosting/02_gbm_comparison.py48CODE
LOW12_gradient_boosting/02_gbm_comparison.py58CODE
LOW12_gradient_boosting/10_shap_nlp_sentiment.py45CODE
LOW12_gradient_boosting/03_dl_vs_gbm.py55CODE
LOW12_gradient_boosting/12_case_study_insights.py64CODE
LOW…financial_data_universe/14_point_in_time_validation.py56CODE
LOW02_financial_data_universe/17_complete_pipeline.py63CODE
LOW02_financial_data_universe/20_storage_benchmark_file.py82CODE
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.py72CODE
LOW03_market_microstructure/07_itch_stylized_facts.py70CODE
LOW03_market_microstructure/13_algoseek_minute_bars_eda.py68CODE
LOW03_market_microstructure/18_algoseek_jump_detection.py64CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py151CODE
LOW…rket_microstructure/08_databento_lob_reconstruction.py55CODE
LOW20_strategy_synthesis/02_feature_evaluation.py47CODE
LOW20_strategy_synthesis/08_recommendations.py49CODE
LOW20_strategy_synthesis/08_recommendations.py49CODE
LOW20_strategy_synthesis/04_signal_to_strategy.py49CODE
LOWtests/test_download_coverage.py13CODE
LOWtests/test_backtest_coverage_exclusion.py19CODE
LOWtests/test_allocation_width_asks_for_all.py29CODE
LOWtests/test_artifact_audit_names_its_scope.py11CODE
LOWtests/test_contiguous_run.py10CODE
LOWtests/test_fx_allocation_selection.py3CODE
935 more matches not shown…
Cross-Language Confusion130 hits · 779 pts
SeverityFileLineSnippetContext
HIGH05_synthetic_data/00_classical_simulation.py1898# only one.** Measured against GBM as the null, jump-diffusion has theCOMMENT
HIGH12_gradient_boosting/12_case_study_insights.py1853# stays null, and so does a family whose selection was scored over a different numberCOMMENT
HIGH12_gradient_boosting/08_shap_analysis.py588# 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.py241# A genuine null, not NumPy NaN: polars stores np.nan as a float NaN that the null checkCOMMENT
HIGH02_financial_data_universe/07_sp500_options_eda.py841# side. A quantile of an empty frame is null, and formatting a null against a percentageCOMMENT
HIGH13_dl_time_series/12_case_study_insights.py1095# grid could not be derived, both comparisons return null on a null, and `filter` dropsCOMMENT
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
HIGH⚡tests/test_contiguous_run.py45 assert got.equals(expected)CODE
HIGHtests/test_prediction_timestamp_zone.py204 assert as_read.equals(as_written)CODE
HIGH⚡tests/test_data_quality.py58 assert out.equals(df)CODE
HIGH⚡tests/test_data_quality.py64 assert out.equals(df)CODE
HIGH⚡tests/test_data_quality.py70 assert out.equals(df)CODE
HIGH⚡tests/test_ranking_a_bankrupt_member.py75 """That is the other reason a Sharpe is null, and it is still a broken run."""STRING
HIGH⚡tests/test_registry_metrics.py320 undefined, and ``cross_sectional_ic`` returns NaN for that fold.STRING
HIGHtests/test_benchmark_grid.py150 of 100 with factors [8, null, 8] would read as -87.5% then +700%, and the residualSTRING
HIGHtests/test_backtest_rekey.py648 is null, `null > tolerance` is null, and polars' `.any()` skips nulls.STRING
HIGHtests/test_allocation.py260 assert prefix.equals(full)CODE
HIGHtests/test_deep_learning_adapter.py390 assert context.expected_keys.equals(expected)CODE
HIGH⚡tests/test_candidate_index_retirement.py118 assert rejoined.equals(index.sort("prediction_hash"))CODE
HIGHtests/test_insight_chapter.py131 assert defaulted.equals(explicit)CODE
HIGH⚡…sts/test_candidate_set_ranks_a_bankrupt_member_last.py89 """That is the other reason a Sharpe is null, and it is still an ineligible member."""STRING
HIGHtests/test_research_contract_execution.py743 assert stored_trades.equals(original_trades)CODE
HIGH⚡tests/test_sp500_options_research.py1175 assert unchanged.equals(cohorts)CODE
HIGH⚡tests/test_backtest_runner_helpers.py144 assert out.equals(other)CODE
HIGHtests/test_backtest_runner_helpers.py232 assert result.equals(base_weights)CODE
HIGHtests/test_full_coverage_selection.py580 assert restricted.equals(unrestricted)CODE
HIGH⚡tests/test_artifact_sidecar_verification.py79 null, so a caller carrying these into a training spec records what it verified andSTRING
HIGHtests/test_sp500_options_garch_pit.py580 """A block the optimizer never converged on is left null, not filled and not hidden.STRING
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
HIGH⚡tests/test_us_equities_lazy_projection.py86 assert pushed.equals(materialized)CODE
HIGH⚡tests/test_us_equities_lazy_projection.py98 assert deferred.equals(eager)CODE
HIGHtests/test_us_equities_lazy_projection.py115 assert reduced.equals(projected.filter(pl.col("symbol").is_in(["AAA", "BBB"])))CODE
HIGH⚡tests/test_seed_prediction_fixtures.py294 assert leader_after.equals(leader_before), "the cohort leader's real artifact was overwritten"CODE
HIGH⚡tests/test_seed_prediction_fixtures.py295 assert other_after.equals(other_before), "an ordinary shipped artifact was overwritten"CODE
HIGHtests/test_notebook_render.py171 assert defaulted.equals(explicit)CODE
HIGHtests/test_notebook_render.py172 assert not defaulted.equals(CODE
HIGHtests/test_algoseek_convert.py559 assert df.equals(df.sort("symbol", "timestamp")), "not ordered by (symbol, timestamp)"CODE
HIGH⚡tests/test_latent_factors_no_leak.py805 assert fresh_predictions.equals(cached_predictions)CODE
HIGH⚡tests/test_latent_factors_no_leak.py806 assert fresh_metrics.equals(cached_metrics)CODE
HIGHtests/test_common_sample_daily_ic.py81 """The second intersection: constant scores make a date undefined, for every model.STRING
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py1988 .data(graphData.nodes.filter(d => d.group === 1 && d.degree >= 5))CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py2028 d.fx = null;CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py2029 d.fy = null;CODE
HIGH11_ml_pipeline/05_shap_analysis.py126# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/06_conformal_prediction.py141# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/03_logistic_classification.py148# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/01_ols_inference.py116# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGH11_ml_pipeline/04_nested_cv_hpo.py130# A feature that could not be computed arrives as a null, and every row carryingCOMMENT
HIGH11_ml_pipeline/02_regularization_paths.py128# Replace inf/NaN with null, then drop all nullsCOMMENT
HIGHutils/downloading.py524 if merged.equals(stored.sort("timestamp")):CODE
HIGHutils/modeling.py2414 null; the `is_finite` filter is belt-and-braces against an environmentSTRING
HIGH08_financial_features/02_microstructure_features.py376 polars returns a null, not an error, when a correlation or a median has nothing toSTRING
HIGH07_defining_the_learning_task/06_ic_inference.py577 "dotted line at the null, which falls on the mode. "CODE
HIGH07_defining_the_learning_task/07_multiple_testing.py392# P-value histogram (should be uniform under null)COMMENT
HIGH07_defining_the_learning_task/05_signal_evaluation.py1300# inherits also lives in the null; across blocks the relabelings are independent.COMMENT
HIGH…efining_the_learning_task/10_ml4t_library_ecosystem.py261# NaN is distinct from null, so guard against both before averaging.COMMENT
HIGH…_defining_the_learning_task/08_causal_sanity_checks.py300 the observed assignment is itself one of the arrangements under the null, andSTRING
70 more matches not shown…
AI Slop Vocabulary243 hits · 704 pts
SeverityFileLineSnippetContext
MEDIUM21_rl_execution_hedging/01_algorithms_comparison.py151# it is the single most robust statistical regularity in speculative priceSTRING
MEDIUM05_synthetic_data/00_classical_simulation.py139# | **Heston** | Stochastic volatility | Vol surfaces, leverage effect |COMMENT
MEDIUM05_synthetic_data/00_classical_simulation.py624# - $\rho$ = correlation between price and variance shocks (leverage effect)COMMENT
MEDIUM09_model_based_features/14_panel_features.py671# were nearly identical. That is the trade: a rank is robust because it discards the distances,COMMENT
MEDIUM09_model_based_features/14_panel_features.py917# the distances between assets, which is what makes them robust and what makes them inventCOMMENT
MEDIUM09_model_based_features/09_har_rough_volatility.py620# residuals. `HC3` relaxes the first assumption with a leverage adjustment. The last twoCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py965# | **Evaluation** | Lightweight harness diagnostics |COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py585# of top-ranked results, making the fusion more robust.COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py221# These cover the failure modes the harness is designed to catch:COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py306# Each metric targets one of the four harness outputs. Together theyCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py494# ## 5. The four harness outputsCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py609# ## 7. The harness as a chartCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py684# the harness doing its job: every gold term was retrieved for every answerableCOMMENT
MEDIUM12_gradient_boosting/05_cross_library_hpo.py610# is the more robust of the two to outliers, which is the reason to expect it toCOMMENT
MEDIUM12_gradient_boosting/01_ensemble_foundations.py382# (§12.2); for robust attributions, see the SHAP analysis in §12.5.COMMENT
MEDIUM12_gradient_boosting/08_shap_analysis.py548# a robust relationship; declining importance is an early warning ofCOMMENT
MEDIUM12_gradient_boosting/08_shap_analysis.py710# explanation is robust to method choice; where they diverge, theCOMMENT
MEDIUM02_financial_data_universe/13_data_quality_framework.py370# has it backwards. MAD is a robust scale estimate, meaning the extreme returns barely move it:COMMENT
MEDIUM…nancial_data_universe/08_options_greeks_computation.py225# We'll use Brent's method (a robust root-finding algorithm) to solve this.COMMENT
MEDIUM02_financial_data_universe/16_provider_comparison.py359# For production systems, we need a robust strategy that handles:COMMENT
MEDIUM16_strategy_simulation/18_vectorbt_engine_parity.py99# comparisons. VectorBT Pro also supplies contract multipliers and futures-style leverage for theCOMMENT
MEDIUM16_strategy_simulation/02_futures_backtesting.py531 # Futures require short selling and leverageCOMMENT
MEDIUM16_strategy_simulation/12_dsr_validation.py23# This notebook demonstrates comprehensive **backtest validation using the Deflated Sharpe Ratio (DSR)** from `ml4t-diagCOMMENT
MEDIUM16_strategy_simulation/12_dsr_validation.py1207# 5. **Combine methods**: DSR, PBO, and RAS for comprehensive overfitting detectionCOMMENT
MEDIUM13_dl_time_series/04_transformers.py298# making the model robust to distribution shift.COMMENT
MEDIUM19_risk_management/06_stress_testing.py470# The heatmap is the compact committee view: it shows immediately which portfolios are robustCOMMENT
MEDIUM19_risk_management/07_drift_detection.py1027# The `analyze_drift()` function provides a comprehensive analysis combining all methods.COMMENT
MEDIUM19_risk_management/04_factor_exposure.py86# are made robust to. Daily return residuals carry some, and ignoring it makes every t-statisticCOMMENT
MEDIUM03_market_microstructure/13_algoseek_minute_bars_eda.py25# This notebook provides a comprehensive exploration of the AlgoSeek TAQ minute bar dataset.COMMENT
MEDIUM03_market_microstructure/15_itch_lee_ready.py385# Run validation across multiple days to get robust statistics.COMMENT
MEDIUM03_market_microstructure/17_databento_bar_sampling.py28# robust are imbalance-bar parameters across market conditions?COMMENT
MEDIUM03_market_microstructure/17_databento_bar_sampling.py1728# DataBento's multi-day MBO data enables robust threshold selection thatCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py167# is jump-robust: a single large $|r_i|$ is multiplied by its smallCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py244# intraday volatility regimes and is robust to the jumps it is trying toCOMMENT
MEDIUM03_market_microstructure/18_algoseek_jump_detection.py563# jumps; bipower variation gives a jump-robust continuous-varianceCOMMENT
MEDIUM…ntal_alternative_data/10_institutional_holdings_13f.py176# median across a filing's positions is what makes the test robust to one bad row in an otherwiseCOMMENT
MEDIUM20_strategy_synthesis/01_aggregate_synthesis.py66# (a missing selection fails loudly); the test harness sets it True so cost/riskCOMMENT
MEDIUM20_strategy_synthesis/01_aggregate_synthesis.py71# backtests, so a partial aggregation cannot be published as a complete one. The test harnessCOMMENT
MEDIUMtests/preset_patches.py83# Max configs per family in training menu YAMLs (keep tests fast but comprehensive).COMMENT
MEDIUMtests/test_model_registry.py559 # Resolved through the harness rather than named here: `research_preview=True` belowCOMMENT
MEDIUMtests/test_fixture_registry_identity.py141 # incomplete. The harness must not be able to reach that path at all.COMMENT
MEDIUMtests/overrides.yaml387 # timeout plus harness overhead, not a runtime. The fine-tuning cell had never completed onCOMMENT
MEDIUMtests/overrides.yaml402 # Measured at 20 steps and 100 sentences, all three checkpoints, through this harness withCOMMENT
MEDIUMtests/overrides.yaml582 # `n_jobs=-1`, which wins over the harness's OMP_NUM_THREADS cap (tests/pm_helpers.py:113), soCOMMENT
MEDIUMtests/overrides.yaml1433 # Nothing asserts the verdict, in this notebook or in the harness, so a fixture rebuildCOMMENT
MEDIUMtests/overrides.yaml1630 # The budget is stated rather than left to the harness default so the number has somewhere toCOMMENT
MEDIUMtests/overrides.yaml1711 # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" forCOMMENT
MEDIUMtests/overrides.yaml1827 # harness fallback would fit five names here too. Without it this would register aCOMMENT
MEDIUMtests/overrides.yaml1844 # harness fallback would fit five names here too. Without it this would register aCOMMENT
MEDIUMtests/overrides.yaml1858 # harness fallback would fit five names here too. Without it this would register aCOMMENT
MEDIUMtests/overrides.yaml2411 # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" forCOMMENT
MEDIUMtests/overrides.yaml2692 # Declared here rather than left to the harness default of max_symbols alone.COMMENT
MEDIUMtests/overrides.yaml2902 # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for anyCOMMENT
MEDIUMtests/overrides.yaml2995 # the name it declares. The tier comes from the harness: research_preview_parameters seesCOMMENT
MEDIUMtests/overrides.yaml2999 # The reduction is stated rather than left to the max_symbols: 5 the harness wouldCOMMENT
MEDIUMtests/overrides.yaml3031 # stated rather than left to the max_symbols the harness would substitute, so the previewCOMMENT
MEDIUMtests/overrides.yaml3055 # The harness forces EXECUTION_TIER=preview and WORKSPACE for any notebook declaring both, andCOMMENT
MEDIUMtests/overrides.yaml3165 # so the parameter carries the resolver's name rather than the notebook's own. The harness setsCOMMENT
MEDIUMtests/overrides.yaml3247 # 07_gbm take the harness default), and the sweep ranks the predictions those stagesCOMMENT
MEDIUMtests/overrides.yaml3683 # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for anyCOMMENT
183 more matches not shown…
Modern AI Meta-Vocabulary165 hits · 494 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml206 # chromadb<1.2, which conflicts with the Ch22 RAG stack.COMMENT
MEDIUM05_synthetic_data/06_llm_tabular_great.py374# This is a known limitation of autoregressive generation: the model can "hallucinate"COMMENT
MEDIUM09_model_based_features/case_study_temporal_summary.py321# object is an embedding model and the binding constraint is when it was trained.COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py17# # 10-K Due Diligence Assistant: RAG with Verifiable CitationsCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py21# **Chapter 22: RAG for Financial Research**COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py56# - A CUDA GPU for the embeddings. No API key: the embedding model is local andCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py227# substituting synthetic text. A RAG demo that invents a corpus when the realCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py260# Sets the LLM, embedding model, and chunk strategy. The Chroma collection isCOMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py691# of this corpus, this embedding model and this distance metric together,COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py797# Numeric questions are where RAG most often fails silently: a fluent modelCOMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py21# **Chapter 22: RAG for Financial Research** (Section 22.5)COMMENT
MEDIUM22_rag_financial_research/03_hybrid_retrieval.py1288# RAG pipelines on retrieval, grounding and abstention.STRING
MEDIUM22_rag_financial_research/08_rag_security.py17# # Security for Financial Document RAGCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py21# **Chapter 22: RAG for Financial Research** (Section 22.7)COMMENT
MEDIUM22_rag_financial_research/08_rag_security.py52# **Prerequisites**: the RAG pipeline of sections 22.1 to 22.6, andCOMMENT
MEDIUM22_rag_financial_research/08_rag_security.py91# to financial RAG: indirect prompt injection (adversarial instructions hiddenCOMMENT
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.py17# # Domain-Specific Embeddings for Financial RAGCOMMENT
MEDIUM…_financial_research/02_domain_embeddings_comparison.py21# **Chapter 22: RAG for Financial Research** (Section 22.4)COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py19# **Chapter 22: RAG for Financial Research**COMMENT
MEDIUM22_rag_financial_research/01_sec_filing_pipeline.py349# does well here has done well on one topic, so a domain embedding model'sSTRING
MEDIUM⚡22_rag_financial_research/06_esg_rag_vs_finetune.py385# ## Approach B: RAG Interface ContractCOMMENT
MEDIUM⚡22_rag_financial_research/06_esg_rag_vs_finetune.py387# A RAG implementation must answer open-ended questions with retrieved evidence,COMMENT
MEDIUM⚡22_rag_financial_research/06_esg_rag_vs_finetune.py392# Sample ESG questions for RAGCOMMENT
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.py29# 2. **A RAG assistant.** Not built here. What is recorded instead is theCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py50# - State the evidence contract a RAG producer has to meet before its outputCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py54# (`data/alternative/news/bloomberg/`). No RAG answers are generated here.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py430# Run RAG analysisCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py442# ## Comparison: Classification vs RAGCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py445# RAG producer must satisfy.COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py495# | Question | Choose Classification | Choose RAG |COMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py517# RAG contract statusCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py635# 5. **The RAG side of this notebook is a contract, not a result.** No answersCOMMENT
MEDIUM22_rag_financial_research/06_esg_rag_vs_finetune.py643# **Book reference**: Section 22.8, on choosing between RAG and fine-tuning.COMMENT
MEDIUM…_financial_research/07_institutional_holdings_graph.py21# **Chapter 22: RAG for Financial Research** (Section 22.8)COMMENT
MEDIUM…_financial_research/07_institutional_holdings_graph.py1181# representations, while Chapter 24 uses the same entities in agentic workflows.COMMENT
MEDIUM⚡22_rag_financial_research/04_ragas_evaluation.py17# # Financial RAG Evaluation HarnessCOMMENT
MEDIUM⚡22_rag_financial_research/04_ragas_evaluation.py21# **Chapter 22: RAG for Financial Research** (Section 22.7)COMMENT
MEDIUM⚡22_rag_financial_research/04_ragas_evaluation.py23# A RAG pipeline can fail in four unrelated ways - it can retrieve the wrongCOMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py53# **Book reference**: Section 22.7, on the three RAG failure modes - retrieval,COMMENT
MEDIUM22_rag_financial_research/04_ragas_evaluation.py722# **Next**: [`05_10k_rag_assistant`](05_10k_rag_assistant.ipynb) builds a RAGCOMMENT
MEDIUM12_gradient_boosting/03_dl_vs_gbm.py363# * **TabPFN**: zero-shot: no training, no validation needed.COMMENT
MEDIUM12_gradient_boosting/03_dl_vs_gbm.py551 # TabPFN, zero-shot, no training, no validationCOMMENT
MEDIUM02_financial_data_universe/13_data_quality_framework.py518# `AnomalyManager` orchestrates the three detectors and reports per symbol. It concatenatesCOMMENT
MEDIUM16_strategy_simulation/04_single_asset_ml4t_backtest.py21# This notebook introduces the **ml4t-backtest** event-driven backtesting engine.COMMENT
MEDIUM16_strategy_simulation/04_single_asset_ml4t_backtest.py39# 2. Run an event-driven backtest with next-open execution and explicit costs.COMMENT
MEDIUM16_strategy_simulation/05_stateful_strategies.py68# **Book Reference:** Chapter 16, Section 16.3 - when event-driven simulation isCOMMENT
MEDIUM16_strategy_simulation/05_stateful_strategies.py1308# 2. **The important question is not "vectorized or event-driven?" in theCOMMENT
MEDIUM16_strategy_simulation/05_stateful_strategies.py1324# stateful strategies are most naturally expressed as event-driven simulation.COMMENT
MEDIUM16_strategy_simulation/README.md56### 16.3 Vectorized and event-driven backtestingCOMMENT
MEDIUM16_strategy_simulation/03_single_asset_vectorbt.py33# **Book Reference:** Chapter 16, Section 16.3 - vectorized and event-driven engines.COMMENT
MEDIUM16_strategy_simulation/03_single_asset_vectorbt.py694# strategy implemented with ml4t-backtest's event-driven engine. The main differenceCOMMENT
MEDIUM16_strategy_simulation/03_single_asset_vectorbt.py715# - **06_framework_parity**: Compare vectorized and event-driven implementationsCOMMENT
MEDIUM16_strategy_simulation/02_futures_backtesting.py42# event-driven validation.COMMENT
MEDIUM⚡13_dl_time_series/09_foundation_models.py26# Two are run here in that zero-shot mode: **Chronos** (Amazon), which quantises aCOMMENT
MEDIUM⚡13_dl_time_series/09_foundation_models.py34# **What the comparison actually asks.** The zero-shot models forecast the contextCOMMENT
MEDIUM⚡13_dl_time_series/09_foundation_models.py37# the two horizons are not tied together. So this is a probe of whether a zero-shotCOMMENT
MEDIUM⚡13_dl_time_series/09_foundation_models.py159# **Design note on horizon and target alignment.** The zero-shot baselineCOMMENT
105 more matches not shown…
Cross-File Repetition83 hits · 415 pts
SeverityFileLineSnippetContext
HIGH13_dl_time_series/09_foundation_models.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/07_mamba_ssm.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/10_uncertainty.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/06_tsmixer.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/05_tcn.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/08_cnn_image_encoding.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGH13_dl_time_series/04_transformers.py0mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts.STRING
HIGHtests/test_allocation_width_asks_for_all.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_full_coverage_selection.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_compare_families_solvency.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_best_reports_concentration.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_best_reports_the_checkpoint.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_compare_allocators_ruin.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_universe_scoped_selection.py0create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table pSTRING
HIGHtests/test_allocation_width_asks_for_all.py0insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' )STRING
HIGHtests/test_compare_families_solvency.py0insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' )STRING
HIGHtests/test_full_coverage_selection.py0insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' )STRING
HIGHtests/test_latent_factors_identity.py0a 64-character hex string here means the source-hashing scheme came back.STRING
HIGHtests/test_tabular_dl_identity.py0a 64-character hex string here means the source-hashing scheme came back.STRING
HIGHtests/test_linear_identity.py0a 64-character hex string here means the source-hashing scheme came back.STRING
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
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
HIGH…studies/crypto_perps_funding/17_holdout_predictions.py0select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predicSTRING
HIGHcase_studies/cme_futures/17_holdout_predictions.py0select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predicSTRING
HIGHcase_studies/utils/strategy_analysis.py0select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predicSTRING
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
HIGH…se_studies/crypto_perps_funding/18_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGH…tudies/nasdaq100_microstructure/19_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGHcase_studies/us_equities_panel/21_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGHcase_studies/cme_futures/18_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGHcase_studies/etfs/19_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGH…studies/us_firm_characteristics/16_holdout_backtest.py0the backtest hashes already registered against one holdout prediction set.STRING
HIGH…se_studies/crypto_perps_funding/18_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGH…tudies/nasdaq100_microstructure/19_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/us_equities_panel/21_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/cme_futures/18_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/sp500_options/17_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/etfs/19_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGH…studies/us_firm_characteristics/16_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/fx_pairs/19_strategy_analysis.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
HIGHcase_studies/fx_pairs/18_holdout_backtest.py0select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and cSTRING
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
HIGHcase_studies/cme_futures/06_linear.py0rank correlation between two labels' orderings, over what both of them charted.STRING
23 more matches not shown…
Excessive Try-Catch Wrapping319 hits · 299 pts
SeverityFileLineSnippetContext
LOWsitecustomize.py82except Exception: # noqa: BLE001 - startup hook: never break the interpreterCODE
LOWsitecustomize.py147 except Exception: # noqa: BLE001 - startup hook: a missing or hung git is not an error hereCODE
LOWsitecustomize.py192except Exception: # noqa: BLE001 - startup hook: never break the interpreterCODE
LOW21_rl_execution_hedging/07_backtest_with_impact.py437 except Exception as exc: # noqa: BLE001 - collected and re-raised belowCODE
LOW21_rl_execution_hedging/rl_calibration.py214 except Exception:CODE
LOW…_financial_research/02_domain_embeddings_comparison.py297 except Exception as e:CODE
LOW…_financial_research/02_domain_embeddings_comparison.py336 except Exception as e:CODE
LOW12_gradient_boosting/06_optuna_multi_asset.py127 except Exception as e:CODE
LOW⚡12_gradient_boosting/02_gbm_comparison.py169 except Exception:CODE
LOW⚡12_gradient_boosting/02_gbm_comparison.py176 except Exception:CODE
LOW⚡12_gradient_boosting/02_gbm_comparison.py185 except Exception:CODE
LOW12_gradient_boosting/05_cross_library_hpo.py630 except Exception as e:CODE
MEDIUM…nancial_data_universe/21_storage_benchmark_database.py1074def questdb_row_count() -> int:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py281except Exception as exc:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py299except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py311except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py331except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py352except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py372except Exception:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py426 except Exception as exc:CODE
LOW…nancial_data_universe/21_storage_benchmark_database.py1077 except Exception:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1547 except Exception:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1745 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1776 except Exception as e:STRING
LOW…nancial_data_universe/21_storage_benchmark_database.py1820 except Exception as e:STRING
LOW…_financial_data_universe/22_pandas_polars_benchmark.py161except Exception:CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py172except Exception:CODE
MEDIUM…nancial_data_universe/08_options_greeks_computation.py277print(f"Error: {abs(test_vol - recovered_iv):.2e}")CODE
LOW02_financial_data_universe/16_provider_comparison.py311 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py336except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py430 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py492 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py502 except Exception as e:CODE
LOW02_financial_data_universe/16_provider_comparison.py580 except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py363except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py402except Exception as e:CODE
LOW13_dl_time_series/09_foundation_models.py447 except Exception as e:CODE
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py269 except Exception as e:CODE
MEDIUM…ket_microstructure/04_itch_order_lifecycle_analysis.py270 print(f"Error loading {msg_type}: {e}")CODE
LOW03_market_microstructure/01_itch_parser.py551 except Exception as e:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py242 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py245 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py250 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py265 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py274 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py277 except Exception:CODE
LOW⚡03_market_microstructure/07_itch_stylized_facts.py282 except Exception:CODE
LOW03_market_microstructure/15_itch_lee_ready.py412 except Exception as e:CODE
MEDIUM03_market_microstructure/15_itch_lee_ready.py413 print(f"Error processing {file.name}: {e}")CODE
LOW03_market_microstructure/17_databento_bar_sampling.py457 except Exception as e:CODE
MEDIUM03_market_microstructure/17_databento_bar_sampling.py458 print(f"Error building {bar_type} bars: {e}")CODE
LOW03_market_microstructure/17_databento_bar_sampling.py646 except Exception:CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py136except Exception:CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py307 except Exception:CODE
LOW03_market_microstructure/14_itch_bar_sampling.py366 except Exception as e:CODE
LOW03_market_microstructure/14_itch_bar_sampling.py721 except Exception as e:CODE
MEDIUM03_market_microstructure/05_itch_trading_activity.py620 print(f"Error loading {msg_type}: {e}")CODE
LOW03_market_microstructure/05_itch_trading_activity.py621 except Exception as e:CODE
LOW04_fundamental_alternative_data/05_entity_resolution.py561except Exception as exc: # noqa: BLE001 - offline and uncached, or the optional dep is absentCODE
LOW…fundamental_alternative_data/02_sec_filing_explorer.py325 except Exception as exc: # noqa: BLE001 - a source-malformed filing must not stop the scanCODE
259 more matches not shown…
Empty Error Handlers49 hits · 245 pts
SeverityFileLineSnippetContext
HIGHsitecustomize.py82except Exception: # noqa: BLE001 - startup hook: never break the interpreterCODE
HIGHsitecustomize.py192except Exception: # noqa: BLE001 - startup hook: never break the interpreterCODE
HIGH12_gradient_boosting/02_gbm_comparison.py153except (FileNotFoundError, subprocess.TimeoutExpired):CODE
HIGH12_gradient_boosting/02_gbm_comparison.py169except Exception:CODE
HIGH12_gradient_boosting/02_gbm_comparison.py176except Exception:CODE
HIGH12_gradient_boosting/02_gbm_comparison.py185except Exception:CODE
HIGH03_market_microstructure/07_itch_stylized_facts.py250except Exception:CODE
HIGH03_market_microstructure/07_itch_stylized_facts.py265except Exception:CODE
HIGH03_market_microstructure/07_itch_stylized_facts.py282except Exception:CODE
HIGHtests/test_killed_sequence_run_keeps_its_checkpoints.py43except RuntimeError:CODE
HIGHtests/pm_helpers.py1688except Exception:CODE
HIGH23_knowledge_graphs/02_supply_chain_kg_construction.py385except (json.JSONDecodeError, KeyError):CODE
HIGHutils/reproducibility.py42except ImportError:CODE
HIGHutils/__init__.py75except ImportError:CODE
HIGHutils/__init__.py63except Exception: # noqa: BLE001CODE
HIGHutils/downloading.py49except (ImportError, FileNotFoundError):CODE
HIGHutils/modeling.py186except ImportError:CODE
HIGH07_defining_the_learning_task/05_signal_evaluation.py1782except ValueError:CODE
HIGHscripts/verify_installation.py43except ImportError:CODE
HIGHscripts/verify_installation.py550except Exception:CODE
HIGH.github/scripts/notebook_provenance.py385except (ValueError, TypeError):CODE
HIGH.github/scripts/check_constant_subscripts.py873except ValueError:CODE
HIGH25_live_trading/13_runtime_safety_showcase.py619except asyncio.CancelledError:CODE
HIGH25_live_trading/13_runtime_safety_showcase.py516except TypeError:CODE
HIGH25_live_trading/04_alpaca_paper_trading_demo.py77except ImportError:CODE
HIGH25_live_trading/09_crypto_funding_deployment_loop.py501except ImportError:CODE
HIGH25_live_trading/03_ib_paper_trading_demo.py448except asyncio.CancelledError:CODE
HIGH25_live_trading/05_alpaca_crypto_live_demo.py74except ImportError:CODE
HIGHdata/equities/fundamentals/filings_download.py259except Exception:CODE
HIGHdata/equities/fundamentals/filings_download.py270except Exception:CODE
HIGHdata/equities/market/microstructure/mbo_download.py213except Exception:CODE
HIGH…ext_feature_engineering/05_financial_ner_finetuning.py467except Exception:CODE
HIGHcase_studies/utils/folds.py750except OSError:CODE
HIGHcase_studies/utils/uncertainty.py906except Exception:CODE
HIGHcase_studies/utils/uncertainty.py917except Exception:CODE
HIGHcase_studies/utils/strategy_analysis.py2564except Exception:CODE
HIGHcase_studies/utils/registry/store.py544except sqlite3.DatabaseError:CODE
HIGHcase_studies/utils/registry/store.py1376except ImportError: # pragma: no coverCODE
HIGH24_autonomous_agents/agent_research.py96except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/agent_research.py109except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/agent_research.py122except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/agent_research.py138except (TypeError, ValueError):CODE
HIGH24_autonomous_agents/agent_providers.py554except Exception:CODE
HIGH24_autonomous_agents/04_research_agent.py179except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/04_research_agent.py192except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/04_research_agent.py205except json.JSONDecodeError:CODE
HIGH24_autonomous_agents/04_research_agent.py232except (TypeError, ValueError):CODE
HIGH24_autonomous_agents/agent_tools.py477except ValueError:CODE
HIGH24_autonomous_agents/agent_tools.py483except (ValueError, TypeError):CODE
Deep Nesting253 hits · 210 pts
SeverityFileLineSnippetContext
LOW…execution_hedging/06_inverse_reinforcement_learning.py613CODE
LOW05_synthetic_data/timegan_metrics.py555CODE
LOW05_synthetic_data/07_dp_gan.py378CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py242CODE
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.py360CODE
LOW03_market_microstructure/09_databento_mbo_analysis.py394CODE
LOW03_market_microstructure/07_itch_stylized_facts.py220CODE
LOW03_market_microstructure/15_itch_lee_ready.py178CODE
LOW03_market_microstructure/15_itch_lee_ready.py224CODE
LOW03_market_microstructure/15_itch_lee_ready.py270CODE
LOW03_market_microstructure/15_itch_lee_ready.py389CODE
LOW03_market_microstructure/17_databento_bar_sampling.py409CODE
LOW03_market_microstructure/limit_orderbook.py234CODE
LOW03_market_microstructure/limit_orderbook.py484CODE
LOW03_market_microstructure/limit_orderbook.py1016CODE
LOW03_market_microstructure/10_iex_lob_reconstruction.py200CODE
LOW…rket_microstructure/08_databento_lob_reconstruction.py478CODE
LOW03_market_microstructure/05_itch_trading_activity.py593CODE
LOW20_strategy_synthesis/08_recommendations.py294CODE
LOW20_strategy_synthesis/08_recommendations.py444CODE
LOW20_strategy_synthesis/05_portfolio_allocation.py755CODE
LOW20_strategy_synthesis/01_aggregate_synthesis.py1168CODE
LOWtests/test_sequence_lookup_reaches_registration.py66CODE
LOWtests/add_missing_parameters_cells.py44CODE
LOWtests/test_fixture_registry_self_consistency.py127CODE
LOWtests/generate_test_microstructure.py522CODE
LOWtests/generate_test_microstructure.py718CODE
LOWtests/generate_test_microstructure.py942CODE
LOWtests/conftest.py156CODE
LOWtests/conftest.py573CODE
LOWtests/sample_registry_for_tests.py518CODE
LOWtests/sample_registry_for_tests.py714CODE
LOWtests/test_notebook_output_hygiene.py297CODE
LOWtests/test_notebook_output_hygiene.py384CODE
LOWtests/test_notebook_output_hygiene.py478CODE
LOWtests/test_model_registry.py515CODE
LOWtests/test_fixture_prediction_panels.py48CODE
LOWtests/test_fixture_prediction_panels.py67CODE
LOWtests/test_ch24_agent_contracts.py286CODE
LOWtests/test_causal_rows_are_resolvable.py59CODE
LOWtests/test_pm_helpers.py723CODE
LOWtests/test_pm_helpers.py747CODE
LOWtests/test_holdout_boundary.py1030CODE
LOWtests/test_leakage_detectors.py182CODE
LOWtests/test_leakage_detectors.py326CODE
LOWtests/test_eoa_universe_roster.py142CODE
LOWtests/pm_helpers.py236CODE
LOWtests/pm_helpers.py390CODE
LOWtests/pm_helpers.py541CODE
LOWtests/pm_helpers.py624CODE
LOWtests/pm_helpers.py652CODE
LOWtests/pm_helpers.py698CODE
LOWtests/pm_helpers.py802CODE
LOWtests/generate_intermediates.py220CODE
LOWtests/test_fold_resolution.py208CODE
LOWtests/test_fold_resolution.py290CODE
193 more matches not shown…
Verbosity Indicators39 hits · 77 pts
SeverityFileLineSnippetContext
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py590 # Step 1: Scale(2, dim=0) - scale first dimension by 2COMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py593 # Step 2: AddTime - prepend time coordinateCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py596 # Step 3: LeadLag - lead-lag transformCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py599 # Step 4: VisiTrans("I") - I-visibility transformCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1163 # Step 1: Scale(2, dim=0)COMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1166 # Step 2: AddTimeCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1169 # Step 3: LeadLagCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1172 # Step 4: VisiTrans("I")COMMENT
LOW02_financial_data_universe/19_incremental_updates.py108# ### Step 1: Initial Load (Full History)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py124# ### Step 2: Incremental Update (Only New Data)COMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py755# # Step 1: Standardize without demeaning, then compute native estimatesCOMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py760# # Step 2: Apply RAS adjustmentCOMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py769# # Step 3: Annualize only after applying the native-unit boundCOMMENT
LOW⚡03_market_microstructure/01_itch_parser.py243# Step 1: Raw binary from downloadCOMMENT
LOW⚡03_market_microstructure/01_itch_parser.py251# Step 2: Parsed messages (single uppercase letter = message type)COMMENT
LOW14_latent_factors/02_eigenportfolios.py563# Step 1: Intra-sector PCACOMMENT
LOW14_latent_factors/02_eigenportfolios.py592# Step 2: Cross-sector PCACOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py167# ### Step 1: Tree ClusteringCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py173# ### Step 2: Quasi-DiagonalizationCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py177# ### Step 3: Recursive BisectionCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py301 # Step 1: ClusterCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py304 # Step 2: Quasi-diagonalizeCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py307 # Step 3: Recursive bisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py189# #### Step 1: Hierarchical ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py212# #### Step 2: Leaf OrderingCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py242# #### Step 3: Recursive Bisection AllocationCOMMENT
LOW⚡18_transaction_costs/07_ml4t_volume_participation.py583# Step 1: Apply volume limitCOMMENT
LOW⚡18_transaction_costs/07_ml4t_volume_participation.py587# Step 2: Apply market impactCOMMENT
LOW⚡…efining_the_learning_task/02_preprocessing_pipeline.py556# ### Step 1: Remove penny stocksCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py571# ### Step 2: Domain filtersCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py599# ### Step 3: Implausibly large one-day movesCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py637# ### Step 4: Spike detectionCOMMENT
LOW⚡15_causal_estimation/02_dowhy_causal_graph.py250# Step 1: Base featuresCOMMENT
LOW⚡15_causal_estimation/02_dowhy_causal_graph.py256# Step 2: Rolling features (backward-looking only)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py267# Step 3: Treatment (measured at time t) and outcomes (forward-looking)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py280# Step 4: Binary treatmentCOMMENT
LOW⚡24_autonomous_agents/agent_fixtures.py541 # Step 2: roll forward within the same event seriesCOMMENT
LOW24_autonomous_agents/agent_fixtures.py526 # Step 1: try the pinned tickerCOMMENT
LOW24_autonomous_agents/agent_fixtures.py553 # Step 3: static Fed-policy stand-inCOMMENT
Structural Annotation Overuse39 hits · 76 pts
SeverityFileLineSnippetContext
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py590 # Step 1: Scale(2, dim=0) - scale first dimension by 2COMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py593 # Step 2: AddTime - prepend time coordinateCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py596 # Step 3: LeadLag - lead-lag transformCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py599 # Step 4: VisiTrans("I") - I-visibility transformCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1163 # Step 1: Scale(2, dim=0)COMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1166 # Step 2: AddTimeCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1169 # Step 3: LeadLagCOMMENT
LOW⚡05_synthetic_data/03_sigcwgan_signatures.py1172 # Step 4: VisiTrans("I")COMMENT
LOW02_financial_data_universe/19_incremental_updates.py108# ### Step 1: Initial Load (Full History)COMMENT
LOW02_financial_data_universe/19_incremental_updates.py124# ### Step 2: Incremental Update (Only New Data)COMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py755# # Step 1: Standardize without demeaning, then compute native estimatesCOMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py760# # Step 2: Apply RAS adjustmentCOMMENT
LOW⚡16_strategy_simulation/13_ras_protocol.py769# # Step 3: Annualize only after applying the native-unit boundCOMMENT
LOW⚡03_market_microstructure/01_itch_parser.py243# Step 1: Raw binary from downloadCOMMENT
LOW⚡03_market_microstructure/01_itch_parser.py251# Step 2: Parsed messages (single uppercase letter = message type)COMMENT
LOW14_latent_factors/02_eigenportfolios.py563# Step 1: Intra-sector PCACOMMENT
LOW14_latent_factors/02_eigenportfolios.py592# Step 2: Cross-sector PCACOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py167# ### Step 1: Tree ClusteringCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py173# ### Step 2: Quasi-DiagonalizationCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py177# ### Step 3: Recursive BisectionCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py301 # Step 1: ClusterCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py304 # Step 2: Quasi-diagonalizeCOMMENT
LOW⚡…_portfolio_construction/06_hierarchical_risk_parity.py307 # Step 3: Recursive bisectionCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py189# #### Step 1: Hierarchical ClusteringCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py212# #### Step 2: Leaf OrderingCOMMENT
LOW…_portfolio_construction/06_hierarchical_risk_parity.py242# #### Step 3: Recursive Bisection AllocationCOMMENT
LOW⚡18_transaction_costs/07_ml4t_volume_participation.py583# Step 1: Apply volume limitCOMMENT
LOW⚡18_transaction_costs/07_ml4t_volume_participation.py587# Step 2: Apply market impactCOMMENT
LOW⚡…efining_the_learning_task/02_preprocessing_pipeline.py556# ### Step 1: Remove penny stocksCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py571# ### Step 2: Domain filtersCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py599# ### Step 3: Implausibly large one-day movesCOMMENT
LOW…efining_the_learning_task/02_preprocessing_pipeline.py637# ### Step 4: Spike detectionCOMMENT
LOW⚡15_causal_estimation/02_dowhy_causal_graph.py250# Step 1: Base featuresCOMMENT
LOW⚡15_causal_estimation/02_dowhy_causal_graph.py256# Step 2: Rolling features (backward-looking only)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py267# Step 3: Treatment (measured at time t) and outcomes (forward-looking)COMMENT
LOW15_causal_estimation/02_dowhy_causal_graph.py280# Step 4: Binary treatmentCOMMENT
LOW⚡24_autonomous_agents/agent_fixtures.py541 # Step 2: roll forward within the same event seriesCOMMENT
LOW24_autonomous_agents/agent_fixtures.py526 # Step 1: try the pinned tickerCOMMENT
LOW24_autonomous_agents/agent_fixtures.py553 # Step 3: static Fed-policy stand-inCOMMENT
AI Structural Patterns85 hits · 64 pts
SeverityFileLineSnippetContext
LOW21_rl_execution_hedging/rl_environments.py66CODE
LOW21_rl_execution_hedging/crypto_execution_env.py42CODE
LOW05_synthetic_data/timegan_metrics.py394CODE
LOW05_synthetic_data/timegan_metrics.py555CODE
LOW05_synthetic_data/timegan_metrics.py703CODE
LOW05_synthetic_data/05_diffusion_ts.py739CODE
LOW05_synthetic_data/05_diffusion_ts.py843CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py602CODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1175CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py767CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py774CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py797CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py808CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py830CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py841CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py889CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py901CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py984CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py991CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py1028CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py1036CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py1079CODE
LOW…_financial_data_universe/22_pandas_polars_benchmark.py1097CODE
LOW16_strategy_simulation/13_ras_protocol.py180CODE
LOW16_strategy_simulation/05_stateful_strategies.py319CODE
LOW16_strategy_simulation/05_stateful_strategies.py1030CODE
LOW16_strategy_simulation/12_dsr_validation.py149CODE
LOW19_risk_management/10_ml4t_backtest_risk_demo.py88CODE
LOWtests/pm_helpers.py1521CODE
LOW…efining_the_learning_task/02_preprocessing_pipeline.py212CODE
LOW…efining_the_learning_task/02_preprocessing_pipeline.py335CODE
LOW…earning_task/04_maximum_favorable_adverse_excursion.py237CODE
LOWdata/futures/loader.py12CODE
LOWdata/equities/loader.py314CODE
LOWcase_studies/research/execution.py364CODE
LOWcase_studies/research/cv.py272CODE
LOWcase_studies/crypto_perps_funding/research_workflow.py538CODE
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.py369CODE
LOWcase_studies/us_equities_panel/03_financial_features.py413CODE
LOWcase_studies/us_equities_panel/03_financial_features.py446CODE
LOWcase_studies/us_equities_panel/03_financial_features.py487CODE
LOWcase_studies/us_equities_panel/03_financial_features.py544CODE
LOWcase_studies/us_equities_panel/03_financial_features.py566CODE
LOWcase_studies/us_equities_panel/03_financial_features.py633CODE
LOWcase_studies/utils/deep_learning.py2297CODE
LOWcase_studies/utils/signals.py324CODE
LOWcase_studies/utils/sequence_dataset.py912CODE
LOWcase_studies/utils/coverage.py997CODE
LOWcase_studies/utils/notebook_render.py370CODE
LOWcase_studies/utils/tabular_dl.py2345CODE
LOWcase_studies/utils/tabular_dl.py2484CODE
LOWcase_studies/utils/backtest_presets.py524CODE
LOWcase_studies/utils/slot_strategy.py228CODE
LOWcase_studies/utils/causal.py444CODE
LOWcase_studies/utils/causal.py951CODE
25 more matches not shown…
Docstring Block Structure11 hits · 55 pts
SeverityFileLineSnippetContext
HIGHtests/pm_helpers.py1534Execute a notebook via Papermill with parameter injection. This is the core test helper. It: 1. Syncs .py -> .iSTRING
HIGHtests/create_test_data.py1561Copy production's files for one downloaded source, verbatim, and check the minimum. Args: source: ProductioSTRING
HIGHutils/paths.py168Get the directory path for a chapter. Args: chapter: Chapter number (1-27) Returns: Absolute pSTRING
HIGHutils/paths.py204Get output directory for cross-chapter data flow. This is the primary function for case study data that flows betweSTRING
HIGHutils/paths.py303Get the case study directory for a strategy. Case studies are centralized under CASE_STUDIES_DIR (default: repo_rooSTRING
HIGHutils/data_quality.py622Run all data quality checks before modeling. This is the gate between data preparation (labels + features) and STRING
HIGHutils/storage_benchmarks.py331Block 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 Boilerplate50 hits · 48 pts
SeverityFileLineSnippetContext
LOW16_strategy_simulation/05_stateful_strategies.py689def _update_pair_position(self, zscore: float, price_a: float, price_b: float, broker) -> None:CODE
LOW16_strategy_simulation/05_stateful_strategies.py977def _update_circuit_state(self, equity: float) -> None:CODE
LOWtests/test_causal_adapter.py171def _set_holdout_start(setup_path, value: str) -> None:CODE
LOWtests/test_weekly_issues.py91 def set_state(self, number: int, state: str, reason: str | None = None) -> None:CODE
LOW⚡utils/style.py1053__all__ = [CODE
LOWutils/paths.py444__all__ = [CODE
LOWutils/reproducibility.py15def set_global_seeds(seed: int = 42) -> None:CODE
LOWutils/__init__.py78__all__ = [CODE
LOWutils/artifact_specs.py217__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.py283def _set_tree_writable(root: Path, *, writable: bool) -> None:CODE
LOW.github/scripts/weekly_issues.py279 def set_state(self, number: int, state: str, reason: str | None = None) -> None: ...CODE
LOW.github/scripts/weekly_issues.py356 def set_state(self, number: int, state: str, reason: str | None = None) -> None:CODE
LOW25_live_trading/10_safety_risk_demo.py86logger = logging.getLogger(__name__)CODE
LOW25_live_trading/13_runtime_safety_showcase.py86logger = logging.getLogger(__name__)CODE
LOW25_live_trading/04_alpaca_paper_trading_demo.py448 def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None:CODE
LOW25_live_trading/01_unified_framework_demo.py408 def update_price(self, asset: str, price: float, timestamp: datetime) -> None:CODE
LOW25_live_trading/03_ib_paper_trading_demo.py85logger = logging.getLogger(__name__)CODE
LOW25_live_trading/05_alpaca_crypto_live_demo.py413 def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None:CODE
LOWdata/__init__.py126__all__ = [CODE
LOWcase_studies/research/__init__.py91__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.py36__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.py50__all__ = [CODE
LOWcase_studies/utils/notebook_render.py829__all__ = [STRING
LOWcase_studies/utils/runtime.py34__all__ = [CODE
LOWcase_studies/utils/uncertainty.py1579__all__ = [CODE
LOWcase_studies/utils/artifact_quality.py31__all__ = [CODE
LOWcase_studies/utils/derived_params.py18__all__ = ["DERIVED_PARAM_SIGNIFICANT_DIGITS", "quantize_derived"]CODE
LOWcase_studies/utils/persistent_panel.py64__all__ = [CODE
LOWcase_studies/utils/latent_factors/macro_context.py78__all__ = ["MACRO_CONTEXT_ALIGNMENT", "load_configured_macro_context"]CODE
LOWcase_studies/utils/latent_factors/__init__.py41__all__ = [CODE
LOWcase_studies/utils/latent_factors/common.py167__all__ = [CODE
LOWcase_studies/utils/latent_factors/case_study.py24logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/latent_factors/panel.py301__all__ = [CODE
LOWcase_studies/utils/registry/registration.py44logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/specs.py16logger = logging.getLogger(__name__)CODE
LOW⚡case_studies/utils/registry/store.py25logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/metrics.py9logger = logging.getLogger(__name__)CODE
LOWcase_studies/utils/registry/__init__.py146__all__ = [CODE
LOWcase_studies/utils/registry/completeness.py653__all__ = [CODE
LOWcase_studies/utils/registry/backtest_rekey.py48__all__ = [CODE
LOWcase_studies/utils/registry/queries.py34logger = logging.getLogger(__name__)CODE
LOWcase_studies/sp500_options/_underlying_returns.py15__all__ = ["reconcile_underlying_log_returns", "validate_reconciled_returns"]CODE
Redundant / Tautological Comments39 hits · 48 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/04_gtgan_irregular.py1609 # Check if interpolated values are bounded by adjacent real values (soft check)COMMENT
LOW05_synthetic_data/04_gtgan_irregular.py187RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/timegan_metrics.py232 # Check if data appears to be normalized to [0, 1]COMMENT
LOW05_synthetic_data/05_diffusion_ts.py189RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/06_llm_tabular_great.py135RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/03_sigcwgan_signatures.py1341# Check if checkpoint exists and RETRAIN is FalseCOMMENT
LOW05_synthetic_data/03_sigcwgan_signatures.py189RETRAIN = False # Set True to force retraining even if checkpoint existsCODE
LOW05_synthetic_data/07_dp_gan.py146RETRAIN = False # Set True to retrain even if checkpoint existsCODE
LOW05_synthetic_data/02_tailgan_tail_risk.py88RETRAIN = False # Set True to force retraining even if checkpoint existsCODE
LOW05_synthetic_data/02_tailgan_tail_risk.py561 # Check if constraint violated: W*v >= eCOMMENT
LOW…nancial_data_universe/21_storage_benchmark_database.py1713 # Check if process started successfullySTRING
LOW…nancial_data_universe/08_options_greeks_computation.py250 # Check if solution exists within boundsCOMMENT
LOW19_risk_management/07_drift_detection.py1646# Check if retraining neededCOMMENT
LOW…ket_microstructure/04_itch_order_lifecycle_analysis.py128# Check if we have message data to analyzeCOMMENT
LOW03_market_microstructure/14_itch_bar_sampling.py601 # Check if we have actual buy/sell varianceCOMMENT
LOW03_market_microstructure/05_itch_trading_activity.py109# Check if we have message data to analyzeCOMMENT
LOW03_market_microstructure/05_itch_trading_activity.py648 # Print message type breakdownCOMMENT
LOWtests/test_model_registry.py587 # Check if this notebook is expected to register (match on suffix)COMMENT
LOW23_knowledge_graphs/02_supply_chain_kg_construction.py83RERUN_EXTRACTION = False # Set True to force LLM re-extraction; False loads cached triplesCODE
LOWutils/data_quality.py672 # Print resultsCOMMENT
LOW⚡utils/storage_benchmarks.py739 # Assign quotes to symbols (weighted: some symbols more active)COMMENT
LOW⚡utils/storage_benchmarks.py804 # Assign trades to symbols (same distribution as quotes)COMMENT
LOW08_financial_features/07_event_studies.py186 # Check if new highCOMMENT
LOW15_causal_estimation/05_momentum_causal_trading.py455# Set it to `False` while iterating on the strategy code below, where the causal estimatesCOMMENT
LOWdata/futures/market/download.py234 # Check if year is completeCOMMENT
LOWdata/equities/loader.py1370 # 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.py697# Display resultsCOMMENT
LOWcase_studies/nasdaq100_microstructure/14_backtest.py109FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/utils/model_analysis.py204 # Check if fold_metrics table existsSTRING
LOWcase_studies/utils/registry/store.py836 # Check if backtest_runs table exists at allCOMMENT
LOWcase_studies/utils/registry/store.py1160 # Check if this table still has tall formatCOMMENT
LOWcase_studies/utils/registry/queries.py1640 # Check if stage column exists (the CREATE TABLE IF NOT EXISTSSTRING
LOW…e_studies/sp500_equity_option_analytics/14_backtest.py102FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOWcase_studies/us_firm_characteristics/11_backtest.py98FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash existsCODE
LOW26_mlops_governance/01_drift_monitoring.py49# Set it to a label and that label is required: the notebook stops rather than monitoring aCOMMENT
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
Self-Referential Comments13 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUM21_rl_execution_hedging/07_backtest_with_impact.py335# ## Define the Momentum StrategyCOMMENT
MEDIUM05_synthetic_data/07_dp_gan.py399 # Create a clean discriminator copy for generator training (no DP hooks)COMMENT
MEDIUM22_rag_financial_research/05_10k_rag_assistant.py362# ### Create the Query InterfaceCOMMENT
MEDIUMtests/smoke.yaml8# This file is the DECLARATION. The machinery it drives already exists and is not duplicated here:COMMENT
MEDIUM23_knowledge_graphs/02_supply_chain_kg_construction.py214# Define the knowledge graph schema. Each extracted relationship is aCOMMENT
MEDIUM23_knowledge_graphs/02_supply_chain_kg_construction.py1619# Create the pyvis network with supplier risk tooltips and compact companyCOMMENT
MEDIUM23_knowledge_graphs/08_8k_event_extraction.py335# Define the event quadruple structure.COMMENT
MEDIUM17_portfolio_construction/08_library_comparison.py473# Create the portfolio object and pass the already-defined sample moments explicitly.COMMENT
MEDIUM…transaction_costs/12_commission_slippage_comparison.py638# ### Define the Equity-Compatible Commission VariantsCOMMENT
MEDIUM07_defining_the_learning_task/03_label_methods.py596# This method is from De Prado's *Advances in Financial Machine Learning*.COMMENT
MEDIUM15_causal_estimation/09_adia_causal_benchmark.py155# Define the 8 causal categoriesCOMMENT
MEDIUM15_causal_estimation/05_momentum_causal_trading.py191# ### Defining the Market Volatility RegimeCOMMENT
MEDIUMcase_studies/utils/model_analysis.py837 # 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.py81# OANDA_API_KEY=your-api-key-hereCOMMENT
HIGHdata/equities/market/microstructure/dataset_card.py86# DATABENTO_API_KEY=db-your-api-key-hereCOMMENT
HIGHdata/equities/market/us_equities/dataset_card.py80# QUANDL_API_KEY=your-api-key-hereCOMMENT
Synthetic Comment Markers2 hits · 12 pts
SeverityFileLineSnippetContext
HIGH09_model_based_features/07_arima_features.py263# returns as many values as you asked for rather than one per row. The helper passesCOMMENT
HIGH06_strategy_definition/exploration.md35├── figures/ # Book figures (AI-generated + notebook)CODE
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/generate_test_data.sh31# Usage:COMMENT
LOWdata/crypto/market/config.yaml11# Usage:COMMENT
LOWdata/prediction_markets/config.yaml8# Usage:COMMENT
LOWdata/fx/market/config.yaml10# Usage:COMMENT
LOWdata/macro/config.yaml10# Usage:COMMENT
LOWdata/etfs/market/config.yaml17# Usage:COMMENT
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippetContext
LOW05_synthetic_data/07_dp_gan.py441 fake_data = generator(z)CODE
LOW05_synthetic_data/07_dp_gan.py445 d_fake = discriminator_private(fake_data)CODE
LOW05_synthetic_data/07_dp_gan.py469 fake_data = generator(z)CODE
LOW05_synthetic_data/07_dp_gan.py472 d_fake = discriminator_for_g(fake_data)CODE
LOW⚡tests/test_pm_helpers.py147 monkeypatch.setenv("ML4T_FAKE_KEY", "Jane Doe jane@example.org")CODE
Overly Generic Function Names5 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_notebook_output_hygiene.py689 py_source = "# %% [markdown]\n# Some prose.\n\n\ndef helper():\n return 1\n"CODE
LOW⚡tests/test_notebook_output_hygiene.py694 "source": ["Some prose.\n", "\n", "def helper():\n", " return 1\n"],CODE
LOWtests/test_notebook_output_hygiene.py708 {"cell_type": "code", "source": ["def helper():\n", " return 1\n"], "metadata": {}},CODE
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
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