Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.
This report presents the forensic synthetic code analysis of stefan-jansen/machine-learning-for-trading, a Jupyter Notebook project with 20,709 GitHub stars. SynthScan v2.0 examined 581,012 lines of code across 1215 source files, recording 11169 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 26.0 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 11169 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .pre-commit-config.yaml | 41 | COMMENT | |
| LOW | pyproject.toml | 21 | "pyarrow>=15.0", | COMMENT |
| LOW | pyproject.toml | 101 | # See envs/py312/pyproject.toml; pycausalimpact (ARIMA, 2020-dead) removed. | COMMENT |
| LOW | sitecustomize.py | 141 | # it gets the tracked skeleton of data/ and none of the gitignored datasets, which live | COMMENT |
| LOW | docker-compose.yml | 1 | # ML4T 3rd Edition — Docker Compose Configuration | COMMENT |
| LOW | docker-compose.yml | 21 | # | COMMENT |
| LOW | docker-compose.yml | 221 | # ============================================ | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 21 | # | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 101 | COMMENT | |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 201 | COMMENT | |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 21 | # Market impact is not a fixed cost; it depends on how large an order is | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 81 | COMMENT | |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 261 | ) | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 21 | # | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 141 | ], | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 161 | # what the diagnostics in Section 6 measure. | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 21 | # | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 141 | # **MDP Formulation**: | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 161 | # ### GARCH Market Data Generator | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 381 | ] | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 441 | for name, (value, standard_error, _) in all_gaps.items() | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 21 | # | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 221 | COMMENT | |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 241 | # reference schedule between `pace_min_multiplier` (0.5x) and `pace_max_multiplier` | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 661 | "Forced Liq %": f"{results[name]['forced_liq_rate'] * 100:.1f}", | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 21 | # > `pfhedge` is a main dependency of the project (`pfhedge>=0.22.0` in | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 601 | # | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 881 | yaxis_title="Hedge Position (Δ)", | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 901 | # $$R(c) = -\mathbb{E}[C] - \lambda \operatorname{Var}[C] \approx -c - \lambda c^2$$ | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 941 | COMMENT | |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 1241 | for path_idx, value in enumerate(np.asarray(pnl).tolist()) | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 1261 | # underlier is configured as a Heston stochastic-volatility process | COMMENT |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 1 | # --- | COMMENT |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 21 | # IRL inverts the RL problem: instead of "given reward, find optimal policy," | COMMENT |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 221 | f" Mean shortfall (bps): {np.mean(shortfalls) / (100 * config['total_shares']) * 10_000:.1f}" | COMMENT |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 341 | # - Assume reward is a linear function of features: $R(s,a) = \mathbf{w}^\top \boldsymbol{\phi}(s,a)$ | COMMENT |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 1081 | ), | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 1 | # --- | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 21 | # | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 41 | # | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 61 | # ## Statistical Note | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 101 | # --- | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 121 | # differential equation: | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 221 | # ### GBM Limitations | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 241 | # - $dN$ = Poisson process with intensity $\lambda$ (jumps per year) | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 361 | COMMENT | |
| LOW | 05_synthetic_data/00_classical_simulation.py | 381 | # - **Stationary**: Prices fluctuate around equilibrium | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 521 | # %% [markdown] | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 541 | # - $\theta$ = long-term variance | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 681 | # %% | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 701 | # - $\omega$ = base variance (intercept) | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 981 | COMMENT | |
| LOW | 05_synthetic_data/00_classical_simulation.py | 1041 | xaxis_title="Daily Log-Return", | COMMENT |
| LOW | 05_synthetic_data/00_classical_simulation.py | 1061 | # model. They preserve the **empirical distribution** exactly, including fat tails. | COMMENT |
| 4890 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | pyproject.toml | 11 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 13 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 22 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 24 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 34 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 36 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 93 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 95 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 104 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 106 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 111 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 113 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 118 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 120 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 132 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 134 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 137 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 139 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 143 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 145 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 147 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 149 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 164 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 166 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 175 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 177 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 50 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 52 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 64 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 66 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 79 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 81 | # =================== | COMMENT |
| MEDIUM | docker-compose.yml | 62 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 65 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 77 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 80 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 100 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 105 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 156 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 160 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 196 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 201 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 221 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 235 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 269 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 272 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 291 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 294 | # ============================================ | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 196 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 198 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 202 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 379 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 381 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 385 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 423 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 425 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 428 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 999 | # ================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1001 | # ================================================================= | COMMENT |
| MEDIUM⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1004 | # ================================================================= | COMMENT |
| 1078 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 225 | def discrete_almgren_chriss_schedule( | CODE |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 355 | def _collect_execution_diagnostics(env: "ExecutionEnv", result: dict) -> dict: | CODE |
| LOW | 21_rl_execution_hedging/market_making_env.py | 24 | def generate_garch_market_data( | CODE |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 367 | def hedging_pnl_from_positions( | CODE |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 395 | def hedging_pnl_from_positions_torch( | CODE |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 440 | def expected_shortfall_loss_torch(pnl: torch.Tensor, quantile: float) -> torch.Tensor: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 162 | def collect_expert_trajectories( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 410 | def compute_feature_expectations(trajectories: list, extract_fn) -> np.ndarray: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 475 | def sample_candidate_trajectory(env: ExecutionEnv, rng) -> dict: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 497 | def trajectory_feature_counts(trajectories: list, extract_features_fn) -> np.ndarray: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 578 | def regularized_log_likelihood( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 680 | def sample_feature_matching_trajectory( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 896 | def inferred_boltzmann_action( | CODE |
| LOW | 05_synthetic_data/00_classical_simulation.py | 398 | def simulate_mean_reversion_euler( | CODE |
| LOW | 05_synthetic_data/00_classical_simulation.py | 456 | def simulate_mean_reversion_exact( | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 230 | def generate_synthetic_irregular_bars(n_bars: int = 1000, seed: int = 42) -> pl.DataFrame: | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 330 | def compute_inter_arrival_times(df: pl.DataFrame) -> np.ndarray: | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 361 | def create_irregular_sequences( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 186 | def compute_predictive_score_yoon( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 298 | def compute_discriminative_score_yoon( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 549 | def compute_discriminative_score( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 651 | def compute_signature_with_factorial_norm( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 700 | def augment_and_signature_paper( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 814 | def compute_signatures_batch_paper( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1204 | def compute_expected_signature_gpu( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1678 | def plot_path_comparison_unconditional( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1782 | def tstr_evaluation_unconditional( | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 282 | def deterministic_neural_sort(s: torch.Tensor, tau: float) -> torch.Tensor: | CODE |
| LOW | 09_model_based_features/12_wasserstein_regimes.py | 189 | def _wasserstein_distance_to_centroid( | CODE |
| LOW | 09_model_based_features/12_wasserstein_regimes.py | 588 | def simulate_merton_jump_log_returns( | CODE |
| LOW | 09_model_based_features/12_wasserstein_regimes.py | 620 | def simulate_two_regime_stream( | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 608 | def distribution_shift_features(series: np.ndarray, boundary: int, n_bins: int = 50) -> dict: | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 650 | def dependence_shift_features(series: np.ndarray, boundary: int) -> dict: | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 724 | def compute_all_break_features(series: np.ndarray, boundary: int) -> dict: | CODE |
| LOW | 09_model_based_features/09_har_rough_volatility.py | 1032 | def compute_features_for_symbol(symbol: str, etf_df: pl.DataFrame) -> dict | None: | CODE |
| LOW | 22_rag_financial_research/03_hybrid_retrieval.py | 475 | def semantic_similarity_scores(query: str, model, embeddings: np.ndarray) -> np.ndarray: | CODE |
| LOW | …_financial_research/02_domain_embeddings_comparison.py | 324 | def get_sentence_transformer_embeddings( | CODE |
| LOW | …_financial_research/07_institutional_holdings_graph.py | 309 | def compute_coownership_matrix(holdings: pl.DataFrame) -> tuple[np.ndarray, list[str]]: | CODE |
| LOW | …_financial_research/07_institutional_holdings_graph.py | 594 | def compute_institution_similarity(holdings: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 106 | def embargo_steps_from_buffer(label_buffer: str, dates: np.ndarray) -> int: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 131 | def chronological_calibration_masks( | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 156 | def conformal_order_statistic(scores: np.ndarray, alpha: float) -> float: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 213 | def deterministic_lgb_parameters(objective: str, alpha: float | None = None) -> dict: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 459 | def summarize_conformal_results(results: list[dict], alpha: float) -> dict | None: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 730 | def compute_adaptive_intervals( | CODE |
| LOW | 12_gradient_boosting/07_hpo_comparison.py | 283 | def optuna_continuous_objective(trial): | CODE |
| LOW | 12_gradient_boosting/12_case_study_insights.py | 1480 | def pairwise_rank_correlation(fold_arrays: list[np.ndarray]) -> tuple[float, float] | None: | CODE |
| LOW | 02_financial_data_universe/06_futures_continuous.py | 269 | def identify_front_month_calendar( | CODE |
| LOW | …financial_data_universe/14_point_in_time_validation.py | 187 | def leakage_corr_scale_invariant(df: pl.DataFrame, feature: str, price: str = "close") -> float: | CODE |
| LOW | …financial_data_universe/14_point_in_time_validation.py | 234 | def validate_signal_trade_lag(signals: pl.DataFrame, execution_lag: int = 1) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/09_options_continuous.py | 115 | def select_constant_maturity_straddle(raw_options: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/09_options_continuous.py | 567 | def build_continuous_straddle_series(cm_series: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 124 | def _combine_pipeline_sources( | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 473 | def _validate_crypto_coverage(df: pl.DataFrame, symbol: str) -> dict[str, Any]: | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 516 | def _add_crypto_session_features(df: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | …ancial_data_universe/15_survivorship_bias_detection.py | 1025 | def check_universe_completeness( | CODE |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 206 | def read_parquet_materialized() -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 243 | def read_feather_materialized() -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/02_corporate_actions.py | 394 | def demonstrate_split_adjustment( | CODE |
| LOW | 02_financial_data_universe/02_corporate_actions.py | 423 | def demonstrate_dividend_adjustment(price_before_ex: float = 100.0, dividend: float = 5.0) -> None: | CODE |
| 2766 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | 05_synthetic_data/00_classical_simulation.py | 112 | # | **Heston** | Stochastic volatility | Vol surfaces, leverage effect | | COMMENT |
| MEDIUM | 05_synthetic_data/00_classical_simulation.py | 543 | # - $\rho$ = correlation between price and variance shocks (leverage effect) | COMMENT |
| MEDIUM | 05_synthetic_data/00_classical_simulation.py | 660 | rho=-0.7, # Strong leverage effect | CODE |
| MEDIUM | 05_synthetic_data/07_dp_gan.py | 845 | # large, robust effect and a great deal of noise around it. The robust effect is the very tight | COMMENT |
| MEDIUM | 05_synthetic_data/07_dp_gan.py | 870 | # A single 10-epoch run per budget is too noisy to resolve a monotonic curve; the robust | COMMENT |
| MEDIUM | 09_model_based_features/01_visual_diagnostics.py | 150 | # Using two tests with opposite null hypotheses provides robust conclusions: | COMMENT |
| MEDIUM | 09_model_based_features/01_visual_diagnostics.py | 218 | # The three-test consensus (ADF + KPSS + Phillips-Perron) is more robust than | COMMENT |
| MEDIUM | 09_model_based_features/01_visual_diagnostics.py | 459 | # 2. **Use both ADF and KPSS**: opposite null hypotheses give robust | COMMENT |
| MEDIUM | 09_model_based_features/02_structural_breaks.py | 517 | # The core test is Welch's t-test on absolute values (robust to scale differences). | COMMENT |
| MEDIUM | 09_model_based_features/02_structural_breaks.py | 589 | # Fligner-Killeen test (robust to non-normality, Alphabot f05) | COMMENT |
| MEDIUM | 09_model_based_features/02_structural_breaks.py | 997 | # 5. **Fisher aggregation** combines p-values across window sizes for robust | COMMENT |
| MEDIUM | 09_model_based_features/14_panel_features.py | 961 | # scale-invariant, outlier-robust, and stationary, making heterogeneous | COMMENT |
| MEDIUM | 09_model_based_features/09_har_rough_volatility.py | 729 | # DFA is more robust than R/S for non-stationary series. It removes local trends | COMMENT |
| MEDIUM | 09_model_based_features/09_har_rough_volatility.py | 917 | # DFA is more robust than R/S for shorter windows | COMMENT |
| MEDIUM | 09_model_based_features/13_regime_as_feature.py | 633 | # Generate a comprehensive feature set in one pipeline | COMMENT |
| MEDIUM⚡ | 09_model_based_features/10_uncertainty_features.py | 455 | # robust for position sizing. | COMMENT |
| MEDIUM | 09_model_based_features/10_uncertainty_features.py | 517 | # Forecast std from the CI width on original scale (robust to negative log-CIs) | COMMENT |
| MEDIUM | 09_model_based_features/05_spectral_features.py | 23 | # production spectral features, and Welch's method for robust power | COMMENT |
| MEDIUM | 09_model_based_features/05_spectral_features.py | 443 | # variance at the cost of frequency resolution. It is more robust than a | COMMENT |
| MEDIUM | 09_model_based_features/05_spectral_features.py | 684 | # 3. **Welch's method is more robust**: Averaging over overlapping segments | COMMENT |
| MEDIUM | 09_model_based_features/08_garch_volatility.py | 22 | # conditional volatility, persistence parameters, and leverage effects. | COMMENT |
| MEDIUM | 09_model_based_features/08_garch_volatility.py | 266 | # EGARCH allows for asymmetric responses (leverage effect): | COMMENT |
| MEDIUM | 09_model_based_features/08_garch_volatility.py | 271 | # Fit EGARCH(1,1,1) — the o=1 asymmetry order adds the gamma leverage term so | COMMENT |
| MEDIUM | 09_model_based_features/08_garch_volatility.py | 328 | # negative shocks (the leverage effect). (b) Standardized residuals should look like | COMMENT |
| MEDIUM | 09_model_based_features/08_garch_volatility.py | 657 | # 3. **EGARCH captures leverage effect** — negative shocks increase volatility more | COMMENT |
| MEDIUM | 09_model_based_features/11_hmm_regimes.py | 1005 | # combine both approaches for robust regime features | COMMENT |
| MEDIUM | 09_model_based_features/03_fractional_differencing.py | 97 | # This is simpler, more robust, and avoids overfitting to in-sample data. | COMMENT |
| MEDIUM | 09_model_based_features/03_fractional_differencing.py | 567 | # `fdiff_diagnostics()` provides a comprehensive diagnostic summary. | COMMENT |
| MEDIUM | 09_model_based_features/06_path_signatures.py | 386 | # a simple GBM as a test harness. This is **feature evaluation, not model | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 823 | # 4. **Lightweight diagnostics complement full evaluation**: The harness | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 507 | # Section 22.7 uses a broader evaluation harness. Here we compute lightweight | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 781 | # | **Evaluation** | Lightweight harness diagnostics | | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 785 | # minimum operating bar before moving to the broader Chapter 22 harness. | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 43 | # - Fixed-k RRF is score-calibration-free and robust, but not always sufficient on its own | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 552 | # of top-ranked results, making the fusion more robust. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 22 | # This notebook implements a finance-oriented evaluation harness that separates: | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 29 | # RAGAs-style metrics are useful, but they are only one component of this broader harness. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 577 | # 3. **Lightweight harness, bounded evidence**: These metrics use only | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 579 | # the harness fast enough to run on every pipeline change. | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 42 | # The setup locks the sample budget so the harness can run quickly in tests | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 74 | # **Interpretation**: The sample-count print defines how broad the harness run | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 199 | # These cover the failure modes the harness is designed to catch: | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 277 | # cases so the harness can isolate where failures come from. All six fixtures | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 283 | # Each metric targets one of the four harness outputs. Together they | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 414 | # fixtures are intentional failures that stress-test the harness. | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 459 | # **Interpretation**: The four harness outputs provide a stable dashboard. | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 497 | # The chart packages the harness into a reviewer-friendly snapshot that makes | COMMENT |
| MEDIUM | 12_gradient_boosting/05_cross_library_hpo.py | 594 | # is the more robust of the two to outliers, which is the reason to expect it to | COMMENT |
| MEDIUM | 12_gradient_boosting/01_ensemble_foundations.py | 325 | # (§12.2); for robust attributions, see the SHAP analysis in §12.5. | COMMENT |
| MEDIUM | 12_gradient_boosting/01_ensemble_foundations.py | 377 | # four are robust signals; the disagreement is exactly why §12.5 turns to SHAP for | COMMENT |
| MEDIUM | 12_gradient_boosting/08_shap_analysis.py | 527 | # a robust relationship; declining importance is an early warning of | COMMENT |
| MEDIUM | 12_gradient_boosting/08_shap_analysis.py | 677 | # explanation is robust to method choice; where they diverge, the | COMMENT |
| MEDIUM | 02_financial_data_universe/13_data_quality_framework.py | 247 | # **MAD** (median absolute deviation, robust to extreme tails), **Z-score** | COMMENT |
| MEDIUM | …nancial_data_universe/08_options_greeks_computation.py | 207 | # We'll use Brent's method (a robust root-finding algorithm) to solve this. | COMMENT |
| MEDIUM | 02_financial_data_universe/16_provider_comparison.py | 341 | # For production systems, we need a robust strategy that handles: | COMMENT |
| MEDIUM | 16_strategy_simulation/18_vectorbt_engine_parity.py | 150 | # - the benchmark harness | COMMENT |
| MEDIUM | 16_strategy_simulation/18_vectorbt_engine_parity.py | 474 | # - The default path reads a recorded result. Reproducing it needs the validation harness and | COMMENT |
| MEDIUM | 16_strategy_simulation/15_lean_engine_parity.py | 51 | # `ml4t-backtest` validation harness, the LEAN CLI, Docker, and the daily equity panel. The | COMMENT |
| MEDIUM | 16_strategy_simulation/15_lean_engine_parity.py | 91 | # validation harness. This notebook does not run LEAN. It reads the recorded result, checks it, and | COMMENT |
| MEDIUM | 16_strategy_simulation/15_lean_engine_parity.py | 100 | # ### Find the harness, if it is here | COMMENT |
| 202 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 61 | CODE | |
| LOW | 21_rl_execution_hedging/market_making_env.py | 3 | CODE | |
| LOW | 21_rl_execution_hedging/rl_environments.py | 14 | CODE | |
| LOW | 21_rl_execution_hedging/rl_calibration.py | 25 | CODE | |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 69 | CODE | |
| LOW | 21_rl_execution_hedging/crypto_execution_env.py | 3 | CODE | |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 137 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 35 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 105 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 148 | CODE | |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 60 | CODE | |
| LOW | 05_synthetic_data/01_timegan.py | 70 | CODE | |
| LOW | 09_model_based_features/09_har_rough_volatility.py | 1145 | CODE | |
| LOW | 22_rag_financial_research/03_hybrid_retrieval.py | 72 | CODE | |
| LOW | 12_gradient_boosting/02_gbm_comparison.py | 49 | CODE | |
| LOW | 12_gradient_boosting/02_gbm_comparison.py | 59 | CODE | |
| LOW | 12_gradient_boosting/10_shap_nlp_sentiment.py | 45 | CODE | |
| LOW | 12_gradient_boosting/03_dl_vs_gbm.py | 55 | CODE | |
| LOW | 12_gradient_boosting/12_case_study_insights.py | 59 | CODE | |
| LOW | …_financial_data_universe/11_crypto_premium_analysis.py | 551 | CODE | |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 62 | CODE | |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 113 | CODE | |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 75 | CODE | |
| LOW | 16_strategy_simulation/_etf_baseline.py | 15 | CODE | |
| LOW | …_strategy_simulation/validation/_library_validation.py | 3 | CODE | |
| LOW | 16_strategy_simulation/validation/weights.py | 12 | CODE | |
| LOW | …trategy_simulation/validation/adapters/lean_adapter.py | 3 | CODE | |
| LOW | …trategy_simulation/validation/adapters/lean_adapter.py | 5 | CODE | |
| LOW | …trategy_simulation/validation/adapters/lean_adapter.py | 7 | CODE | |
| LOW | …trategy_simulation/validation/adapters/ml4t_adapter.py | 16 | CODE | |
| LOW | …trategy_simulation/validation/adapters/ml4t_adapter.py | 25 | CODE | |
| LOW | 13_dl_time_series/12_case_study_insights.py | 60 | CODE | |
| LOW | 03_market_microstructure/07_itch_stylized_facts.py | 74 | CODE | |
| LOW | 03_market_microstructure/13_algoseek_minute_bars_eda.py | 68 | CODE | |
| LOW | 03_market_microstructure/18_algoseek_jump_detection.py | 64 | CODE | |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 153 | CODE | |
| LOW | …rket_microstructure/08_databento_lob_reconstruction.py | 55 | CODE | |
| LOW | 03_market_microstructure/03_itch_lob_analysis.py | 84 | CODE | |
| LOW | 20_strategy_synthesis/02_feature_evaluation.py | 49 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 49 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 49 | CODE | |
| LOW | 20_strategy_synthesis/04_signal_to_strategy.py | 49 | CODE | |
| LOW | 20_strategy_synthesis/holdout.py | 15 | CODE | |
| LOW | 20_strategy_synthesis/holdout.py | 34 | CODE | |
| LOW | tests/test_download_coverage.py | 13 | CODE | |
| LOW | tests/test_fx_allocation_selection.py | 3 | CODE | |
| LOW | tests/test_sp500_options_straddle_moves.py | 3 | CODE | |
| LOW | tests/test_causal_supersedes.py | 19 | CODE | |
| LOW | tests/test_no_shadowed_tests.py | 15 | CODE | |
| LOW | tests/test_linear_degenerate_fold.py | 14 | CODE | |
| LOW | tests/test_research_contract_lifecycle.py | 1 | CODE | |
| LOW | tests/test_dl_device_contract.py | 12 | CODE | |
| LOW | tests/test_us_firm_research_workflow.py | 1 | CODE | |
| LOW | tests/add_missing_parameters_cells.py | 11 | CODE | |
| LOW | tests/generate_test_microstructure.py | 13 | CODE | |
| LOW | tests/test_sitecustomize_data_root.py | 11 | CODE | |
| LOW | tests/conftest.py | 18 | CODE | |
| LOW | tests/conftest.py | 489 | CODE | |
| LOW | tests/test_causal_adapter.py | 1 | CODE | |
| LOW | tests/test_canonical_coverage_days.py | 12 | CODE | |
| 741 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 200 | # chromadb<1.2, which conflicts with the Ch22 RAG stack. | COMMENT |
| MEDIUM | 05_synthetic_data/06_llm_tabular_great.py | 335 | # limitation of autoregressive generation: the model can "hallucinate" tokens that | COMMENT |
| MEDIUM | 05_synthetic_data/06_llm_tabular_great.py | 369 | # indicate parsing errors or LLM hallucination on certain feature combinations. | COMMENT |
| MEDIUM | 09_model_based_features/11_hmm_regimes.py | 799 | # during event-driven spikes. Neither is "correct" - they measure different | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 16 | # # 10-K Due Diligence Assistant: RAG with Verifiable Citations | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 20 | # **Chapter 22: RAG for Financial Research** | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 22 | # This notebook builds a 10-K due-diligence RAG (Retrieval-Augmented Generation) | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 827 | # **Next**: `06_esg_rag_vs_finetune` compares this RAG approach against | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/05_10k_rag_assistant.py | 831 | # flagship RAG application and Section 22.6 covers constraint prompting. | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 37 | # - Analyze RAG pipeline error sources and select/justify components. | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 50 | # dependencies that determine whether the notebook runs a full or fallback RAG path. | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 129 | # quick tests, but the notebook still exercises the same RAG pipeline that the | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 252 | # Sets the LLM, embedding model, and chunk strategy. ChromaDB provides | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 499 | # **Interpretation**: Multi-hop queries (query 2) are the hardest for RAG | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 627 | # Numeric questions are where RAG most often fails silently: a fluent model | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 767 | # what keeps numeric RAG answers auditable. | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 20 | # **Chapter 22: RAG for Financial Research** (Section 22.5) | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 1145 | # hypothesis and hallucination risk need a separate controlled evaluation. | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 1148 | # RAG pipelines using retrieval, grounding, abstention, and security metrics. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 16 | # # Security for Financial Document RAG | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 20 | # **Chapter 22: RAG for Financial Research** (Section 22.7) | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 23 | # finance assistants, a critical concern when RAG systems operate on untrusted | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 36 | # **Prerequisites**: Familiarity with RAG pipelines (Sections 22.1-22.6); | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 70 | # to financial RAG: indirect prompt injection (adversarial instructions hidden | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 248 | # vulnerable default that most naive RAG implementations use. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 457 | # A RAG system that scores well on RAGAs metrics (Section 22.7) can still fail | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 463 | # 1. Security failures in financial RAG systems are measurable with the same | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 468 | # 3. Abstention is preferable to hallucination in regulated financial contexts; | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 470 | # 4. Adversarial test fixtures should be a standard part of RAG evaluation | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 474 | # and Chapter 24 (Autonomous Agents) for multi-agent security considerations | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/08_rag_security.py | 475 | # when RAG systems gain tool-use capabilities. | COMMENT |
| MEDIUM | 22_rag_financial_research/README.md | 1 | # Chapter 22: RAG for Financial Research | COMMENT |
| MEDIUM | 22_rag_financial_research/README.md | 49 | ### 22.7 Diagnosing RAG Pipeline Bottlenecks | COMMENT |
| MEDIUM | …_financial_research/02_domain_embeddings_comparison.py | 16 | # # Domain-Specific Embeddings for Financial RAG | COMMENT |
| MEDIUM | …_financial_research/02_domain_embeddings_comparison.py | 20 | # **Chapter 22: RAG for Financial Research** (Section 22.4) | COMMENT |
| MEDIUM | …_financial_research/02_domain_embeddings_comparison.py | 180 | # **Interpretation**: The corpus-size print confirms that every embedding model | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/01_sec_filing_pipeline.py | 21 | # **Chapter 22: RAG for Financial Research - §22.3 Intelligent Document Ingestion** | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/01_sec_filing_pipeline.py | 25 | # the metadata fields a RAG system needs for point-in-time retrieval. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/01_sec_filing_pipeline.py | 35 | # this notebook's metadata-integrity scaffolding is designed to prevent. | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 46 | # for downstream RAG notebooks (Ch22 NB02-08). | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 170 | # zero filings is a coverage hole that downstream RAG cannot recover from | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 357 | # and accession number - the minimum metadata a financial RAG system | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 367 | # RAG pipeline. See also | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 17 | # # ESG Screening and RAG: Implemented Classifier vs Interface Contract | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 27 | # 2. **RAG interface contract**: evidence requirements for qualitative due diligence | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 35 | # (`data/alternative/news/bloomberg/`). No RAG answers are generated in this notebook. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 275 | # ## Approach B: RAG Interface Contract | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 277 | # A RAG implementation must answer open-ended questions with retrieved evidence, | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 282 | # Sample ESG questions for RAG | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 315 | # **Interpretation**: This is a specification, not a RAG result. Notebook 05 | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 320 | # Run RAG analysis | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 329 | # does not execute a RAG producer. That boundary prevents interface requirements | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 333 | # ## Comparison: Classification vs RAG | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 336 | # RAG producer must satisfy. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 472 | # ideological. The result suggests using classification for breadth and RAG for | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 482 | # 3. **RAG is not audit-ready by definition**: A candidate must prove that every | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 487 | # warrant attention; RAG enables *understanding* what they are doing. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 491 | # RAG latency and answer quality are deliberately left unreported. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 493 | # **Next**: `07_institutional_holdings_graph` extends the RAG approach | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 496 | # **Book reference**: Section 22.8 discusses when to use RAG vs. | COMMENT |
| 135 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 12_gradient_boosting/12_case_study_insights.py | 1690 | # stays null, and so does a family whose winner was scored over a different number | COMMENT |
| HIGH | 12_gradient_boosting/08_shap_analysis.py | 566 | # NaN is a float value, not a null, so filter it explicitly (a top-k of purely | COMMENT |
| HIGH | 02_financial_data_universe/13_data_quality_framework.py | 195 | # Fault 3: null close at row 30. Use a genuine null, not NumPy NaN: Polars stores | COMMENT |
| HIGH | 13_dl_time_series/01_core_architectures.py | 211 | # the correlation is undefined; `cross_sectional_ic_series` returns that as a float | COMMENT |
| HIGH | 19_risk_management/03_position_sizing_mae_mfe.py | 106 | assert close_prices.index.equals(high_prices.index) and close_prices.index.equals(low_prices.index) | CODE |
| HIGH | 19_risk_management/03_position_sizing_mae_mfe.py | 107 | assert close_prices.columns.equals(high_prices.columns) and close_prices.columns.equals( | CODE |
| HIGH | 19_risk_management/04_factor_exposure.py | 158 | assert returns.index.equals(ff3_aligned.index) and returns.index.equals(ff5_aligned.index) | CODE |
| HIGH⚡ | tests/test_data_quality.py | 52 | assert out.equals(df) | CODE |
| HIGH⚡ | tests/test_data_quality.py | 58 | assert out.equals(df) | CODE |
| HIGH⚡ | tests/test_data_quality.py | 64 | assert out.equals(df) | CODE |
| HIGH⚡ | tests/test_registry_metrics.py | 320 | undefined, and ``cross_sectional_ic`` returns NaN for that fold. | STRING |
| HIGH | tests/test_allocation.py | 260 | assert prefix.equals(full) | CODE |
| HIGH | tests/test_deep_learning_adapter.py | 376 | assert context.expected_keys.equals(expected) | CODE |
| HIGH | tests/test_research_contract_execution.py | 745 | assert stored_trades.equals(original_trades) | CODE |
| HIGH⚡ | tests/test_backtest_runner_helpers.py | 144 | assert out.equals(other) | CODE |
| HIGH | tests/test_backtest_runner_helpers.py | 232 | assert result.equals(base_weights) | CODE |
| HIGH⚡ | tests/test_artifact_sidecar_verification.py | 79 | null, so a caller carrying these into a training spec records what it verified and | STRING |
| HIGH | tests/test_feature_engineering_coverage.py | 5 | ``rolling_mean`` emits null, ``ml4t.engineer.features.momentum.rsi`` emits NaN. | STRING |
| HIGH | tests/test_cross_sectional_ic_mean.py | 4 | Spearman coefficient. ml4t-diagnostic 0.1.1 reports it as NaN and 0.1.2 as null, | STRING |
| HIGH⚡ | tests/test_seed_prediction_fixtures.py | 281 | assert leader_after.equals(leader_before), "the cohort leader's real artifact was overwritten" | CODE |
| HIGH⚡ | tests/test_seed_prediction_fixtures.py | 282 | assert not other_after.equals(other_before), ( | CODE |
| HIGH⚡ | tests/test_latent_factors_no_leak.py | 790 | assert fresh_predictions.equals(cached_predictions) | CODE |
| HIGH⚡ | tests/test_latent_factors_no_leak.py | 791 | assert fresh_metrics.equals(cached_metrics) | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1611 | .data(graphData.nodes.filter(d => d.group === 1 && d.degree >= 5)) | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1651 | d.fx = null; | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1652 | d.fy = null; | CODE |
| HIGH | 11_ml_pipeline/05_shap_analysis.py | 131 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/06_conformal_prediction.py | 144 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/03_logistic_classification.py | 151 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/01_ols_inference.py | 120 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/04_nested_cv_hpo.py | 133 | # A feature that could not be computed arrives as a null, and every row carrying | COMMENT |
| HIGH | 11_ml_pipeline/02_regularization_paths.py | 132 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | utils/modeling.py | 2108 | null; the `is_finite` filter is belt-and-braces against an environment | STRING |
| HIGH | 08_financial_features/05_feature_selection.py | 207 | # ``pl.corr`` returns a float NaN (not a null) on any date where a feature is | COMMENT |
| HIGH | 07_defining_the_learning_task/07_multiple_testing.py | 352 | # P-value histogram (should be uniform under null) | COMMENT |
| HIGH | 07_defining_the_learning_task/05_signal_evaluation.py | 1112 | # inherits also lives in the null; across blocks the relabelings are independent. | COMMENT |
| HIGH | …efining_the_learning_task/10_ml4t_library_ecosystem.py | 262 | # NaN is distinct from null, so guard against both before averaging. | COMMENT |
| HIGH | …_defining_the_learning_task/08_causal_sanity_checks.py | 289 | the observed assignment is itself one of the arrangements under the null, and | STRING |
| HIGH | case_studies/research/catalog.py | 222 | # scores its own label and leaves this null; a regression row has no classes, so | COMMENT |
| HIGH | …tudies/crypto_perps_funding/04_model_based_features.py | 1121 | assert reassembled_frame.equals(training_frame), ( | CODE |
| HIGH | …tudies/crypto_perps_funding/14_portfolio_management.py | 422 | if not persisted_widths.equals(expected_widths): | STRING |
| HIGH | case_studies/crypto_perps_funding/02_labels.py | 330 | # 1. An incomplete forward window is null, never a value. | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/08_dl_nlinear.py | 237 | # A score is unusable when it is absent, undefined, or infinite. Counting only | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/05_evaluation.py | 634 | # is undefined, so they are identified here and left out of the ranking rather than | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/10_dl_tcn.py | 241 | # A score is unusable when it is absent, undefined, or infinite. Counting only | COMMENT |
| HIGH | …es/nasdaq100_microstructure/04_model_based_features.py | 1257 | assert _truncated.equals(_full), ( | CODE |
| HIGH | …dies/nasdaq100_microstructure/03_financial_features.py | 556 | # undefined, because price impact per dollar traded means nothing when nothing traded; the | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/09_dl_lstm.py | 241 | # A score is unusable when it is absent, undefined, or infinite. Counting only | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/11_dl_patchtst.py | 240 | # A score is unusable when it is absent, undefined, or infinite. Counting only | COMMENT |
| HIGH | case_studies/nasdaq100_microstructure/02_labels.py | 379 | # 1. An incomplete forward window is null, never a value. | COMMENT |
| HIGH | case_studies/us_equities_panel/03_financial_features.py | 691 | # **A missing value is a null, and several of the library oscillators return a float NaN | COMMENT |
| HIGH | case_studies/us_equities_panel/03_financial_features.py | 1063 | # null, which is the warm-up at the start of a stock's series. `essential_cols` is the set | COMMENT |
| HIGH | case_studies/us_equities_panel/02_labels.py | 361 | # 1. A window reaching past the stock's last session is null, never a value. | COMMENT |
| HIGH | case_studies/cme_futures/17_strategy_analysis.py | 259 | # null + null is null, so reading the grid value from the wrong place yields a full-height frame | COMMENT |
| HIGH | case_studies/cme_futures/04_model_based_features.py | 824 | assert other.equals(reference), ( | CODE |
| HIGH | case_studies/cme_futures/03_financial_features.py | 468 | # that score and is null, not zero, wherever the score is: a flat reading and no reading are | COMMENT |
| HIGH | case_studies/cme_futures/02_labels.py | 335 | # 1. An incomplete forward window is null, never a value. | COMMENT |
| HIGH | case_studies/cme_futures/02_labels.py | 404 | # value instead of a null, which would lift the left end off the floor, and a short label | COMMENT |
| HIGH⚡ | case_studies/utils/feature_engineering.py | 397 | polars' own ``rolling_mean`` emits null, ``ml4t.engineer.features.momentum`` | STRING |
| HIGH | case_studies/utils/linear.py | 1688 | if not reconstructed.equals(published): | CODE |
| 26 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sitecustomize.py | 118 | except Exception: # noqa: BLE001 - startup hook: a missing or hung git is not an error here | CODE |
| LOW | sitecustomize.py | 163 | except Exception: # noqa: BLE001 - startup hook: never break the interpreter | CODE |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 386 | except Exception as exc: # noqa: BLE001 - collected and re-raised below | CODE |
| LOW | 21_rl_execution_hedging/rl_calibration.py | 214 | except Exception: | CODE |
| LOW | 09_model_based_features/01_visual_diagnostics.py | 369 | except Exception: | CODE |
| LOW | 09_model_based_features/09_har_rough_volatility.py | 1050 | except Exception: | CODE |
| LOW | 09_model_based_features/09_har_rough_volatility.py | 1061 | except Exception: | CODE |
| LOW | …_financial_research/02_domain_embeddings_comparison.py | 270 | except Exception as e: | CODE |
| LOW | …_financial_research/02_domain_embeddings_comparison.py | 309 | except Exception as e: | CODE |
| LOW | 12_gradient_boosting/06_optuna_multi_asset.py | 119 | except Exception as e: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 152 | except Exception: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 159 | except Exception: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 168 | except Exception: | CODE |
| LOW | 12_gradient_boosting/05_cross_library_hpo.py | 614 | except Exception as e: | CODE |
| MEDIUM | …nancial_data_universe/21_storage_benchmark_database.py | 916 | def questdb_row_count() -> int: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 240 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 252 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 272 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 292 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 312 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 919 | except Exception: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1357 | except Exception: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1548 | except Exception as e: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1579 | except Exception as e: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1623 | except Exception as e: | STRING |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 142 | except Exception: | CODE |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 155 | except Exception: | CODE |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 218 | except Exception: | CODE |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 875 | except Exception: | CODE |
| MEDIUM | …nancial_data_universe/08_options_greeks_computation.py | 259 | print(f"Error: {abs(test_vol - recovered_iv):.2e}") | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 293 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 318 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 412 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 473 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 483 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 561 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 290 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 326 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 367 | except Exception as e: | CODE |
| LOW | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 268 | except Exception as e: | CODE |
| MEDIUM | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 269 | print(f"Error loading {msg_type}: {e}") | CODE |
| LOW | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 288 | except Exception: | CODE |
| LOW | 03_market_microstructure/01_itch_parser.py | 500 | except Exception as e: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 250 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 253 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 258 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 273 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 282 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 285 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 290 | except Exception: | CODE |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 417 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/15_itch_lee_ready.py | 418 | print(f"Error processing {file.name}: {e}") | CODE |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 427 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/17_databento_bar_sampling.py | 428 | print(f"Error building {bar_type} bars: {e}") | CODE |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 612 | except Exception: | CODE |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 138 | except Exception: | CODE |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 309 | except Exception: | CODE |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 367 | except Exception as e: | CODE |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 711 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/05_itch_trading_activity.py | 144 | print(f"Error reading {sub.name}: {e}") | CODE |
| 270 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 14_latent_factors/04_ipca.py | 0 | forecast with an exponentially weighted mean of available factors. | STRING |
| HIGH | 14_latent_factors/06_conditional_autoencoder.py | 0 | forecast with an exponentially weighted mean of available factors. | STRING |
| HIGH | 14_latent_factors/05_rp_pca.py | 0 | forecast with an exponentially weighted mean of available factors. | STRING |
| HIGH | 17_portfolio_construction/13_deepm_regime_robust.py | 0 | return whether a cached state dict matches the current model layout. | STRING |
| HIGH | 17_portfolio_construction/12_vlstm_portfolio.py | 0 | return whether a cached state dict matches the current model layout. | STRING |
| HIGH | 17_portfolio_construction/11_dl_portfolio_allocation.py | 0 | return whether a cached state dict matches the current model layout. | STRING |
| HIGH | data/equities/market/sp500/build_options_eda.py | 0 | where the loaders read this dataset from. not ``path(__file__).parent``: the converter writes under ``$ml4t_data_path``, | STRING |
| HIGH | data/equities/market/sp500/materialize_options.py | 0 | where 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.py | 0 | where the loaders read this dataset from. not ``path(__file__).parent``: the converter writes under ``$ml4t_data_path``, | STRING |
| HIGH | case_studies/crypto_perps_funding/16_risk_management.py | 0 | index fills, settlements, prices, and engine equity by utc timestamp. | STRING |
| HIGH | case_studies/crypto_perps_funding/13_backtest.py | 0 | index fills, settlements, prices, and engine equity by utc timestamp. | STRING |
| HIGH | …tudies/crypto_perps_funding/14_portfolio_management.py | 0 | index fills, settlements, prices, and engine equity by utc timestamp. | STRING |
| HIGH | case_studies/crypto_perps_funding/15_costs.py | 0 | index fills, settlements, prices, and engine equity by utc timestamp. | STRING |
| HIGH | case_studies/crypto_perps_funding/13_backtest.py | 0 | select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where b | STRING |
| HIGH | …tudies/crypto_perps_funding/14_portfolio_management.py | 0 | select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where b | STRING |
| HIGH | case_studies/crypto_perps_funding/15_costs.py | 0 | select b.backtest_hash, b.spec_json, m.sharpe from backtest_runs b join backtest_metrics m using (backtest_hash) where b | STRING |
| HIGH | case_studies/crypto_perps_funding/06_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/cme_futures/06_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/sp500_equity_option_analytics/06_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/sp500_options/06_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/fx_pairs/06_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/us_firm_characteristics/05_linear.py | 0 | render declared parameters for a label: `alpha=1000000.0` reads as `alpha=1e+06`. | STRING |
| HIGH | case_studies/nasdaq100_microstructure/05_evaluation.py | 0 | asymmetric plotly error bars from a pair of interval bounds. | STRING |
| HIGH | …studies/sp500_equity_option_analytics/05_evaluation.py | 0 | asymmetric plotly error bars from a pair of interval bounds. | STRING |
| HIGH | case_studies/fx_pairs/05_evaluation.py | 0 | asymmetric plotly error bars from a pair of interval bounds. | STRING |
| HIGH | case_studies/nasdaq100_microstructure/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | case_studies/us_equities_panel/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | case_studies/cme_futures/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | case_studies/sp500_options/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | case_studies/fx_pairs/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | case_studies/etfs/07_gbm.py | 0 | read the loss function out of a declared configuration name. | STRING |
| HIGH | …udies/nasdaq100_microstructure/18_strategy_analysis.py | 0 | select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bac | STRING |
| HIGH | case_studies/etfs/18_strategy_analysis.py | 0 | select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bac | STRING |
| HIGH | …tudies/us_firm_characteristics/15_strategy_analysis.py | 0 | select t.family, bm.sharpe, bm.sharpe_ci95_lo, bm.sharpe_ci95_hi from backtest_metrics bm join backtest_runs b on bm.bac | STRING |
| HIGH | case_studies/nasdaq100_microstructure/12_causal_dml.py | 0 | causal dml — walk-forward estimation with refutation tests. | STRING |
| HIGH | case_studies/etfs/12_causal_dml.py | 0 | causal dml — walk-forward estimation with refutation tests. | STRING |
| HIGH | …studies/sp500_equity_option_analytics/12_causal_dml.py | 0 | causal dml — walk-forward estimation with refutation tests. | STRING |
| HIGH | case_studies/sp500_options/10_causal_dml.py | 0 | causal dml — walk-forward estimation with refutation tests. | STRING |
| HIGH | case_studies/nasdaq100_microstructure/14_backtest.py | 0 | protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_conf | STRING |
| HIGH | case_studies/sp500_options/12_backtest.py | 0 | protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_conf | STRING |
| HIGH | case_studies/us_firm_characteristics/11_backtest.py | 0 | protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_conf | STRING |
| HIGH | …e_studies/sp500_equity_option_analytics/14_backtest.py | 0 | protocol term sheet case study: {case_study_id} label: {backtest_label} calendar: {bt_config.calendar} cadence: {bt_conf | STRING |
| HIGH | case_studies/cme_futures/06_linear.py | 0 | rank correlation between two labels' orderings, over what both of them charted. | STRING |
| HIGH | case_studies/fx_pairs/06_linear.py | 0 | rank correlation between two labels' orderings, over what both of them charted. | STRING |
| HIGH | case_studies/etfs/06_linear.py | 0 | rank correlation between two labels' orderings, over what both of them charted. | STRING |
| HIGH | case_studies/cme_futures/research_workflow.py | 0 | resolve visible catalog rows through the shared family boundary. | STRING |
| HIGH | …ies/sp500_equity_option_analytics/research_workflow.py | 0 | resolve visible catalog rows through the shared family boundary. | STRING |
| HIGH | case_studies/sp500_options/research_workflow.py | 0 | resolve visible catalog rows through the shared family boundary. | STRING |
| HIGH | case_studies/sp500_equity_option_analytics/11a_pca.py | 0 | number of distinct labels the execution published, read from its catalog rows. | STRING |
| HIGH | …equity_option_analytics/11c_conditional_autoencoder.py | 0 | number of distinct labels the execution published, read from its catalog rows. | STRING |
| HIGH | case_studies/sp500_equity_option_analytics/11b_ipca.py | 0 | number of distinct labels the execution published, read from its catalog rows. | STRING |
| HIGH | …ity_option_analytics/11d_stochastic_discount_factor.py | 0 | number of distinct labels the execution published, read from its catalog rows. | STRING |
| HIGH | …_equity_option_analytics/11e_supervised_autoencoder.py | 0 | number of distinct labels the execution published, read from its catalog rows. | STRING |
| HIGH | case_studies/etfs/11c_conditional_autoencoder.py | 0 | mean daily rank correlation of prediction against realised return, within each fold. | STRING |
| HIGH | case_studies/etfs/11b_ipca.py | 0 | mean daily rank correlation of prediction against realised return, within each fold. | STRING |
| HIGH | case_studies/etfs/11d_stochastic_discount_factor.py | 0 | mean daily rank correlation of prediction against realised return, within each fold. | STRING |
| HIGH | 24_autonomous_agents/agent_research.py | 0 | \ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news sear | STRING |
| HIGH | 24_autonomous_agents/01_react_reasoning.py | 0 | \ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news sear | STRING |
| HIGH | 24_autonomous_agents/04_research_agent.py | 0 | \ you are a forecasting agent in a multi-agent forecasting system. your job: 1) gather evidence by issuing web/news sear | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 458 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 549 | CODE | |
| LOW | 05_synthetic_data/07_dp_gan.py | 353 | CODE | |
| LOW | 09_model_based_features/02_structural_breaks.py | 422 | CODE | |
| LOW | 09_model_based_features/13_regime_as_feature.py | 350 | CODE | |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 191 | CODE | |
| LOW | 16_strategy_simulation/validation/weights.py | 162 | CODE | |
| LOW | …trategy_simulation/validation/adapters/ml4t_adapter.py | 299 | CODE | |
| LOW | 19_risk_management/06_stress_testing.py | 1027 | CODE | |
| LOW | 03_market_microstructure/09_databento_mbo_analysis.py | 362 | CODE | |
| LOW | 03_market_microstructure/09_databento_mbo_analysis.py | 398 | CODE | |
| LOW | 03_market_microstructure/07_itch_stylized_facts.py | 229 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 183 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 229 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 275 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 394 | CODE | |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 379 | CODE | |
| LOW | 03_market_microstructure/limit_orderbook.py | 234 | CODE | |
| LOW | 03_market_microstructure/limit_orderbook.py | 484 | CODE | |
| LOW | 03_market_microstructure/limit_orderbook.py | 1000 | CODE | |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 202 | CODE | |
| LOW | …rket_microstructure/08_databento_lob_reconstruction.py | 476 | CODE | |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 527 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 276 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 427 | CODE | |
| LOW | 20_strategy_synthesis/01_aggregate_synthesis.py | 1088 | CODE | |
| LOW | 20_strategy_synthesis/holdout.py | 990 | CODE | |
| LOW | 20_strategy_synthesis/00_holdout_predictions.py | 188 | CODE | |
| LOW | tests/add_missing_parameters_cells.py | 45 | CODE | |
| LOW | tests/generate_test_microstructure.py | 462 | CODE | |
| LOW | tests/generate_test_microstructure.py | 667 | CODE | |
| LOW | tests/conftest.py | 132 | CODE | |
| LOW | tests/conftest.py | 476 | CODE | |
| LOW | tests/sample_registry_for_tests.py | 396 | CODE | |
| LOW | tests/sample_registry_for_tests.py | 520 | CODE | |
| LOW | tests/test_notebook_output_hygiene.py | 242 | CODE | |
| LOW | tests/test_notebook_output_hygiene.py | 329 | CODE | |
| LOW | tests/test_model_registry.py | 429 | CODE | |
| LOW | tests/test_causal_rows_are_resolvable.py | 49 | CODE | |
| LOW | tests/test_leakage_detectors.py | 187 | CODE | |
| LOW | tests/test_leakage_detectors.py | 331 | CODE | |
| LOW | tests/test_eoa_universe_roster.py | 142 | CODE | |
| LOW | tests/test_rung_pins_match_chapter_20.py | 93 | CODE | |
| LOW | tests/pm_helpers.py | 235 | CODE | |
| LOW | tests/pm_helpers.py | 386 | CODE | |
| LOW | tests/pm_helpers.py | 469 | CODE | |
| LOW | tests/pm_helpers.py | 497 | CODE | |
| LOW | tests/pm_helpers.py | 543 | CODE | |
| LOW | tests/pm_helpers.py | 587 | CODE | |
| LOW | tests/generate_intermediates.py | 132 | CODE | |
| LOW | tests/generate_skip_data.py | 75 | CODE | |
| LOW | tests/test_fold_resolution.py | 142 | CODE | |
| LOW | tests/test_fold_resolution.py | 218 | CODE | |
| LOW | tests/create_test_data.py | 746 | CODE | |
| LOW | tests/test_us_equities_panel_feature_ordering.py | 290 | CODE | |
| LOW | tests/test_us_equities_panel_feature_ordering.py | 387 | CODE | |
| LOW | tests/test_us_equities_panel_feature_ordering.py | 395 | CODE | |
| LOW | tests/test_sweep_config_seam.py | 186 | CODE | |
| LOW | utils/cv_splits.py | 127 | CODE | |
| LOW | utils/style.py | 878 | CODE | |
| 143 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 590 | # Step 1: Scale(2, dim=0) - scale first dimension by 2 | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 593 | # Step 2: AddTime - prepend time coordinate | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 596 | # Step 3: LeadLag - lead-lag transform | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 599 | # Step 4: VisiTrans("I") - I-visibility transform | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1181 | # Step 1: Scale(2, dim=0) | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1184 | # Step 2: AddTime | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1187 | # Step 3: LeadLag | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1190 | # Step 4: VisiTrans("I") | COMMENT |
| LOW | 09_model_based_features/14_panel_features.py | 898 | # WARNING: This ranks each asset's volatility over its FULL history — a look-ahead | COMMENT |
| LOW⚡ | 09_model_based_features/10_uncertainty_features.py | 462 | # Step 1: AutoARIMA order selection on first training window | COMMENT |
| LOW | 09_model_based_features/10_uncertainty_features.py | 478 | # Step 2: Rolling forecast with fixed order (fast) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 90 | # ### Step 1: Initial Load (Full History) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 107 | # ### Step 2: Incremental Update (Only New Data) | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 736 | # # Step 1: Standardize without demeaning, then compute native estimates | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 741 | # # Step 2: Apply RAS adjustment | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 750 | # # Step 3: Annualize only after applying the native-unit bound | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 199 | # Step 1: Raw binary from download | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 207 | # Step 2: Parsed messages (single uppercase letter = message type) | COMMENT |
| LOW | …mental_alternative_data/01_academic_characteristics.py | 316 | # Step 1: Compute IC (correlation with returns) for each characteristic, per month. | COMMENT |
| LOW | …mental_alternative_data/01_academic_characteristics.py | 328 | # Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across months | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 517 | # Step 1: Intra-sector PCA | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 546 | # Step 2: Cross-sector PCA | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 161 | # ### Step 1: Tree Clustering | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 167 | # ### Step 2: Quasi-Diagonalization | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 171 | # ### Step 3: Recursive Bisection | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 294 | # Step 1: Cluster | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 297 | # Step 2: Quasi-diagonalize | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 300 | # Step 3: Recursive bisection | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 183 | # #### Step 1: Hierarchical Clustering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 206 | # #### Step 2: Leaf Ordering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 235 | # #### Step 3: Recursive Bisection Allocation | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 570 | # Step 1: Apply volume limit | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 574 | # Step 2: Apply market impact | COMMENT |
| LOW⚡ | …efining_the_learning_task/02_preprocessing_pipeline.py | 558 | # ### Step 1: Remove penny stocks | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 573 | # ### Step 2: Domain filters | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 601 | # ### Step 3: Extreme returns | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 615 | # ### Step 4: Spike detection | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 208 | # Step 1: Base features (8h frequency -- 3 bars = 24h, 21 bars = 7 days) | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 214 | # Step 2: Rolling features (backward-looking only) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 225 | # Step 3: Treatment (measured at time t) and outcomes (forward-looking) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 241 | # Step 4: Binary treatment | COMMENT |
| LOW⚡ | case_studies/utils/backtest_loaders.py | 1354 | # Step 1: Calendar-aware schedule resolution | COMMENT |
| LOW⚡ | case_studies/utils/backtest_loaders.py | 1357 | # Step 2: Apply design-time non-overlapping step | COMMENT |
| LOW⚡ | 24_autonomous_agents/agent_fixtures.py | 534 | # Step 2: roll forward within the same event series | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 519 | # Step 1: try the pinned ticker | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 546 | # Step 3: static Fed-policy stand-in | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 590 | # Step 1: Scale(2, dim=0) - scale first dimension by 2 | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 593 | # Step 2: AddTime - prepend time coordinate | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 596 | # Step 3: LeadLag - lead-lag transform | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 599 | # Step 4: VisiTrans("I") - I-visibility transform | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1181 | # Step 1: Scale(2, dim=0) | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1184 | # Step 2: AddTime | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1187 | # Step 3: LeadLag | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1190 | # Step 4: VisiTrans("I") | COMMENT |
| LOW⚡ | 09_model_based_features/10_uncertainty_features.py | 462 | # Step 1: AutoARIMA order selection on first training window | COMMENT |
| LOW | 09_model_based_features/10_uncertainty_features.py | 478 | # Step 2: Rolling forecast with fixed order (fast) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 90 | # ### Step 1: Initial Load (Full History) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 107 | # ### Step 2: Incremental Update (Only New Data) | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 736 | # # Step 1: Standardize without demeaning, then compute native estimates | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 741 | # # Step 2: Apply RAS adjustment | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 750 | # # Step 3: Annualize only after applying the native-unit bound | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 199 | # Step 1: Raw binary from download | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 207 | # Step 2: Parsed messages (single uppercase letter = message type) | COMMENT |
| LOW | …mental_alternative_data/01_academic_characteristics.py | 316 | # Step 1: Compute IC (correlation with returns) for each characteristic, per month. | COMMENT |
| LOW | …mental_alternative_data/01_academic_characteristics.py | 328 | # Step 2: Compute mean IC, i.i.d. t-stat, and Newey-West HAC t-stat across months | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 517 | # Step 1: Intra-sector PCA | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 546 | # Step 2: Cross-sector PCA | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 161 | # ### Step 1: Tree Clustering | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 167 | # ### Step 2: Quasi-Diagonalization | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 171 | # ### Step 3: Recursive Bisection | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 294 | # Step 1: Cluster | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 297 | # Step 2: Quasi-diagonalize | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 300 | # Step 3: Recursive bisection | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 183 | # #### Step 1: Hierarchical Clustering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 206 | # #### Step 2: Leaf Ordering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 235 | # #### Step 3: Recursive Bisection Allocation | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 570 | # Step 1: Apply volume limit | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 574 | # Step 2: Apply market impact | COMMENT |
| LOW⚡ | …efining_the_learning_task/02_preprocessing_pipeline.py | 558 | # ### Step 1: Remove penny stocks | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 573 | # ### Step 2: Domain filters | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 601 | # ### Step 3: Extreme returns | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 615 | # ### Step 4: Spike detection | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 208 | # Step 1: Base features (8h frequency -- 3 bars = 24h, 21 bars = 7 days) | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 214 | # Step 2: Rolling features (backward-looking only) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 225 | # Step 3: Treatment (measured at time t) and outcomes (forward-looking) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 241 | # Step 4: Binary treatment | COMMENT |
| LOW⚡ | case_studies/utils/backtest_loaders.py | 1354 | # Step 1: Calendar-aware schedule resolution | COMMENT |
| LOW⚡ | case_studies/utils/backtest_loaders.py | 1357 | # Step 2: Apply design-time non-overlapping step | COMMENT |
| LOW⚡ | 24_autonomous_agents/agent_fixtures.py | 534 | # Step 2: roll forward within the same event series | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 519 | # Step 1: try the pinned ticker | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 546 | # Step 3: static Fed-policy stand-in | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 317 | # Set VecNormalize to eval mode (don't update running stats) | COMMENT |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 186 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 1483 | # Check if interpolated values are bounded by adjacent real values (soft check) | COMMENT |
| LOW | 05_synthetic_data/timegan_metrics.py | 226 | # Check if data appears to be normalized to [0, 1] | COMMENT |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 178 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/06_llm_tabular_great.py | 127 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 189 | RETRAIN = False # Set True to force retraining even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1365 | # Check if checkpoint exists and RETRAIN is False | COMMENT |
| LOW | 05_synthetic_data/07_dp_gan.py | 128 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 85 | RETRAIN = False # Set True to force retraining even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 557 | # Check if constraint violated: W*v >= e | COMMENT |
| LOW | 05_synthetic_data/01_timegan.py | 92 | RETRAIN = True # Set True to force re-training even if checkpoint exists | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1506 | # Check if process started successfully | STRING |
| LOW | …nancial_data_universe/08_options_greeks_computation.py | 232 | # Check if solution exists within bounds | COMMENT |
| LOW | 19_risk_management/07_drift_detection.py | 1644 | # Check if retraining needed | COMMENT |
| LOW | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 129 | # Check if we have message data to analyze | COMMENT |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 596 | # Check if we have actual buy/sell variance | COMMENT |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 107 | # Check if we have message data to analyze | COMMENT |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 458 | # Check if enrichment already done | COMMENT |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 582 | # Print message type breakdown | COMMENT |
| LOW | 03_market_microstructure/03_itch_lob_analysis.py | 926 | # Check if OFI column exists (generated by reconstruct_lob_with_ofi) | COMMENT |
| LOW | …undamental_alternative_data/14_text_data_extraction.py | 711 | # Check if paragraph is substantially new (low similarity to all old paragraphs) | COMMENT |
| LOW | tests/test_model_registry.py | 499 | # Check if this notebook is expected to register (match on suffix) | COMMENT |
| LOW | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 79 | RERUN_EXTRACTION = False # Set True to force LLM re-extraction; False loads cached triples | CODE |
| LOW | utils/data_quality.py | 607 | # Print results | COMMENT |
| LOW⚡ | utils/storage_benchmarks.py | 751 | # Assign quotes to symbols (weighted: some symbols more active) | COMMENT |
| LOW⚡ | utils/storage_benchmarks.py | 816 | # Assign trades to symbols (same distribution as quotes) | COMMENT |
| LOW | 08_financial_features/07_event_studies.py | 172 | # Check if new high | COMMENT |
| LOW⚡ | 07_defining_the_learning_task/_benchmark_utils.py | 680 | # Assign quotes to symbols (weighted: some symbols more active) | COMMENT |
| LOW⚡ | 07_defining_the_learning_task/_benchmark_utils.py | 745 | # Assign trades to symbols (same distribution as quotes) | COMMENT |
| LOW | 15_causal_estimation/05_momentum_causal_trading.py | 104 | RETRAIN = False # Set True to force retraining; False loads cached artifacts | CODE |
| LOW | data/futures/market/download.py | 234 | # Check if year is complete | COMMENT |
| LOW | data/equities/loader.py | 1325 | # Check if raw files exist but aren't parsed | COMMENT |
| LOW | data/equities/market/us_equities/download.py | 90 | # Check if already exists | COMMENT |
| LOW | 10_text_feature_engineering/02_asset_embeddings.py | 642 | # Display results | COMMENT |
| LOW | case_studies/nasdaq100_microstructure/08_dl_nlinear.py | 92 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/nasdaq100_microstructure/10_dl_tcn.py | 96 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/nasdaq100_microstructure/09_dl_lstm.py | 96 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/nasdaq100_microstructure/11_dl_patchtst.py | 95 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/nasdaq100_microstructure/14_backtest.py | 79 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/us_equities_panel/12_dl_weekly.py | 64 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/utils/model_analysis.py | 186 | # Check if fold_metrics table exists | STRING |
| LOW | case_studies/utils/registry/store.py | 663 | # Check if backtest_runs table exists at all | COMMENT |
| LOW | case_studies/utils/registry/store.py | 898 | # Check if this table still has tall format | COMMENT |
| LOW | case_studies/utils/registry/queries.py | 1529 | # Check if stage column exists (the CREATE TABLE IF NOT EXISTS | STRING |
| LOW | …e_studies/sp500_equity_option_analytics/14_backtest.py | 83 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/sp500_options/09b_patchtst.py | 64 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/sp500_options/08_tabular_dl.py | 66 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/sp500_options/09a_lstm.py | 61 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/sp500_options/12_backtest.py | 117 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/etfs/10_dl_tsmixer.py | 82 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/etfs/09_dl_lstm.py | 73 | FORCE_RETRAIN = False # Set True to retrain configs that already have complete hashes | CODE |
| LOW | case_studies/etfs/14_backtest.py | 83 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/us_firm_characteristics/11_backtest.py | 78 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/us_firm_characteristics/07_tabular_dl.py | 60 | FORCE_RETRAIN = False # Set True to renew content-addressed training results | CODE |
| LOW | …gents/operator_artifacts/run_etfs_20260504T223150.json | 5337 | "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.json | 5402 | "command": "cd ~/ml4t/code && uv run python -c \"\nimport polars as pl\nfrom pathlib import Path\n\nSANDBOX = Pa | CODE |
| LOW⚡ | …facts/run_us_firm_characteristics_20260504T225521.json | 2553 | "content": "# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/rl_environments.py | 66 | CODE | |
| LOW | 21_rl_execution_hedging/crypto_execution_env.py | 42 | CODE | |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 704 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 388 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 549 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 697 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 728 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 831 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 602 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1193 | CODE | |
| LOW | 16_strategy_simulation/13_ras_protocol.py | 178 | CODE | |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 319 | CODE | |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 1001 | CODE | |
| LOW | 16_strategy_simulation/12_dsr_validation.py | 147 | CODE | |
| LOW | 19_risk_management/10_ml4t_backtest_risk_demo.py | 88 | CODE | |
| LOW | …undamental_alternative_data/14_text_data_extraction.py | 645 | CODE | |
| LOW | tests/pm_helpers.py | 1102 | CODE | |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 214 | CODE | |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 337 | CODE | |
| LOW | …earning_task/04_maximum_favorable_adverse_excursion.py | 233 | CODE | |
| LOW | data/futures/loader.py | 12 | CODE | |
| LOW | data/equities/loader.py | 289 | CODE | |
| LOW | case_studies/research/execution.py | 427 | CODE | |
| LOW | case_studies/research/cv.py | 163 | CODE | |
| LOW | case_studies/crypto_perps_funding/research_workflow.py | 341 | CODE | |
| LOW | case_studies/config/patchtst/patchtst.py | 51 | CODE | |
| LOW | case_studies/config/patchtst/_reference/backbone.py | 28 | CODE | |
| LOW | case_studies/config/patchtst/_reference/backbone.py | 193 | CODE | |
| LOW | case_studies/config/patchtst/_reference/backbone.py | 281 | CODE | |
| LOW | case_studies/config/patchtst/_reference/backbone.py | 343 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 328 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 372 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 409 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 450 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 507 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 529 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 596 | CODE | |
| LOW | case_studies/utils/deep_learning.py | 1753 | CODE | |
| LOW | case_studies/utils/signals.py | 324 | CODE | |
| LOW | case_studies/utils/paired_metrics.py | 699 | CODE | |
| LOW | case_studies/utils/notebook_render.py | 295 | CODE | |
| LOW | case_studies/utils/tabular_dl.py | 2209 | CODE | |
| LOW | case_studies/utils/tabular_dl.py | 2348 | CODE | |
| LOW | case_studies/utils/slot_strategy.py | 228 | CODE | |
| LOW | case_studies/utils/causal.py | 402 | CODE | |
| LOW | case_studies/utils/causal.py | 793 | CODE | |
| LOW | case_studies/utils/causal.py | 1630 | CODE | |
| LOW | case_studies/utils/analytics.py | 535 | CODE | |
| LOW | case_studies/utils/model_viz.py | 609 | CODE | |
| LOW | case_studies/utils/model_viz.py | 740 | CODE | |
| LOW | case_studies/utils/darts_forecasting.py | 969 | CODE | |
| LOW | case_studies/utils/backtest_runner.py | 910 | CODE | |
| LOW | case_studies/utils/backtest_runner.py | 2359 | CODE | |
| LOW | case_studies/utils/gbm.py | 649 | CODE | |
| LOW | case_studies/utils/gbm.py | 1007 | CODE | |
| LOW | case_studies/utils/gbm.py | 1304 | CODE | |
| LOW | case_studies/utils/latent_factors/library_bridge.py | 188 | CODE | |
| LOW | case_studies/utils/latent_factors/library_bridge.py | 246 | CODE | |
| LOW | case_studies/utils/latent_factors/library_bridge.py | 308 | CODE | |
| LOW | case_studies/utils/latent_factors/sae.py | 14 | CODE | |
| 13 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/pm_helpers.py | 1115 | Execute a notebook via Papermill with parameter injection. This is the core test helper. It: 1. Syncs .py -> .i | STRING |
| HIGH | utils/paths.py | 149 | Get the directory path for a chapter. Args: chapter: Chapter number (1-27) Returns: Absolute p | STRING |
| HIGH | utils/paths.py | 185 | Get output directory for cross-chapter data flow. This is the primary function for case study data that flows betwe | STRING |
| HIGH | utils/paths.py | 253 | Get the case study directory for a strategy. Case studies are centralized under CASE_STUDIES_DIR (default: repo_roo | STRING |
| HIGH | utils/data_quality.py | 557 | Run all data quality checks before modeling. This is the gate between data preparation (labels + features) and | STRING |
| HIGH | utils/storage_benchmarks.py | 348 | Block until an asynchronously-ingesting engine reports `expected_rows`. QuestDB (ILP + WAL) and InfluxDB acknowledg | STRING |
| HIGH | data/futures/loader.py | 84 | List CME product codes available in the local data store. Args: frequency: ``"hourly"`` (default) lists pro | STRING |
| HIGH | data/futures/loader.py | 315 | Load CFTC Commitment of Traders (COT) data. Reads per-product parquets written by ``data/futures/positioning/cot_do | STRING |
| HIGH | data/fx/loader.py | 13 | List currency pairs available in the local data store. Args: frequency: Which parquet to probe (``"daily"`` | STRING |
| HIGH | data/etfs/loader.py | 93 | Load the traded close and share count, unadjusted for splits and distributions. :func:`load_etfs` returns an adjust | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 677 | def _update_pair_position(self, zscore: float, price_a: float, price_b: float, broker) -> None: | CODE |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 948 | def _update_circuit_state(self, equity: float) -> None: | CODE |
| LOW | tests/test_causal_adapter.py | 172 | def _set_holdout_start(setup_path, value: str) -> None: | CODE |
| LOW⚡ | utils/style.py | 1034 | __all__ = [ | CODE |
| LOW | utils/paths.py | 364 | __all__ = [ | CODE |
| LOW | utils/reproducibility.py | 15 | def set_global_seeds(seed: int = 42) -> None: | CODE |
| LOW | utils/__init__.py | 63 | __all__ = [ | CODE |
| LOW | utils/artifact_specs.py | 165 | __all__ = [ | CODE |
| LOW | 17_portfolio_construction/deepm/__init__.py | 22 | __all__ = [ | CODE |
| LOW | 17_portfolio_construction/deepm/utils.py | 13 | def set_seed(seed: int) -> None: | CODE |
| LOW | scripts/download_artifacts.py | 205 | def _set_tree_writable(root: Path, *, writable: bool) -> None: | CODE |
| LOW | 25_live_trading/10_safety_risk_demo.py | 87 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/13_runtime_safety_showcase.py | 87 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/04_alpaca_paper_trading_demo.py | 83 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/04_alpaca_paper_trading_demo.py | 437 | def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None: | CODE |
| LOW | 25_live_trading/01_unified_framework_demo.py | 414 | def update_price(self, asset: str, price: float, timestamp: datetime) -> None: | CODE |
| LOW | 25_live_trading/03_ib_paper_trading_demo.py | 86 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/05_alpaca_crypto_live_demo.py | 77 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/05_alpaca_crypto_live_demo.py | 392 | def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None: | CODE |
| LOW | 25_live_trading/08_pipeline_verification.py | 71 | logger = logging.getLogger(__name__) | CODE |
| LOW | data/__init__.py | 126 | __all__ = [ | CODE |
| LOW | case_studies/research/__init__.py | 63 | __all__ = [ | CODE |
| LOW | case_studies/config/patchtst/_reference/backbone.py | 6 | __all__ = ["PatchTST_backbone"] | CODE |
| LOW | case_studies/config/patchtst/_reference/__init__.py | 21 | __all__ = ["PatchTST_backbone"] | CODE |
| LOW | case_studies/config/patchtst/_reference/layers.py | 3 | __all__ = [ | CODE |
| LOW | case_studies/utils/feature_engineering.py | 36 | __all__ = [ | CODE |
| LOW | case_studies/utils/temporal.py | 25 | __all__ = [ | CODE |
| LOW | case_studies/utils/folds.py | 47 | __all__ = [ | CODE |
| LOW | case_studies/utils/feasibility.py | 14 | __all__ = ["cross_sectional_persistence", "exceedance_curve", "fold_timeline", "panel_acf"] | CODE |
| LOW | case_studies/utils/coverage.py | 47 | __all__ = [ | CODE |
| LOW | case_studies/utils/notebook_render.py | 736 | __all__ = [ | STRING |
| LOW | case_studies/utils/runtime.py | 25 | __all__ = [ | CODE |
| LOW | case_studies/utils/uncertainty.py | 1282 | __all__ = [ | CODE |
| LOW | case_studies/utils/derived_params.py | 18 | __all__ = ["DERIVED_PARAM_SIGNIFICANT_DIGITS", "quantize_derived"] | CODE |
| LOW | case_studies/utils/latent_factors/macro_context.py | 78 | __all__ = ["MACRO_CONTEXT_ALIGNMENT", "load_configured_macro_context"] | CODE |
| LOW | case_studies/utils/latent_factors/__init__.py | 37 | __all__ = [ | CODE |
| LOW | case_studies/utils/latent_factors/common.py | 167 | __all__ = [ | CODE |
| LOW | case_studies/utils/latent_factors/case_study.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/utils/latent_factors/panel.py | 296 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/registration.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/utils/registry/specs.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | case_studies/utils/registry/store.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/utils/registry/metrics.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/utils/registry/__init__.py | 145 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/completeness.py | 506 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/queries.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/sp500_options/_underlying_returns.py | 15 | __all__ = ["reconcile_underlying_log_returns", "validate_reconciled_returns"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | 21_rl_execution_hedging/07_backtest_with_impact.py | 284 | # ## Define the Momentum Strategy | COMMENT |
| MEDIUM | 05_synthetic_data/07_dp_gan.py | 374 | # Create a clean discriminator copy for generator training (no DP hooks) | COMMENT |
| MEDIUM | 09_model_based_features/10_uncertainty_features.py | 164 | # Define the model as a function for reuse across walk-forward folds. | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 353 | # ### Create the Query Interface | COMMENT |
| MEDIUM | …_financial_data_universe/22_pandas_polars_benchmark.py | 917 | # Create a smaller lookup table for join benchmark | COMMENT |
| MEDIUM | 03_market_microstructure/01_itch_parser.py | 150 | # Create a sample Add Order message to demonstrate parsing | COMMENT |
| MEDIUM | 04_fundamental_alternative_data/05_entity_resolution.py | 124 | # Create a reference database with standard identifiers | COMMENT |
| MEDIUM | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 204 | # Define the knowledge graph schema. Each extracted relationship is a | COMMENT |
| MEDIUM | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1248 | # Create the pyvis network with supplier risk tooltips and compact company | COMMENT |
| MEDIUM | 23_knowledge_graphs/08_8k_event_extraction.py | 286 | # Define the event quadruple structure. | COMMENT |
| MEDIUM | 17_portfolio_construction/08_library_comparison.py | 411 | # Define the shared estimator once in daily units. PyPortfolioOpt consumes annual | COMMENT |
| MEDIUM | 17_portfolio_construction/08_library_comparison.py | 536 | # Create the portfolio object and pass the already-defined sample moments explicitly. | COMMENT |
| MEDIUM | …transaction_costs/12_commission_slippage_comparison.py | 614 | # ### Define the Equity-Compatible Commission Variants | COMMENT |
| MEDIUM | 07_defining_the_learning_task/03_label_methods.py | 504 | # This method is from De Prado's *Advances in Financial Machine Learning*. | COMMENT |
| MEDIUM | 15_causal_estimation/09_adia_causal_benchmark.py | 156 | # Define the 8 causal categories | COMMENT |
| MEDIUM | case_studies/utils/model_analysis.py | 819 | # Create a key for merge | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | data/futures/market/dataset_card.py | 93 | # DATABENTO_API_KEY=db-your-api-key-here | COMMENT |
| HIGH | data/fx/market/dataset_card.py | 82 | # OANDA_API_KEY=your-api-key-here | COMMENT |
| HIGH | data/equities/market/microstructure/dataset_card.py | 87 | # DATABENTO_API_KEY=db-your-api-key-here | COMMENT |
| HIGH | data/equities/market/us_equities/dataset_card.py | 81 | # QUANDL_API_KEY=your-api-key-here | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 05_synthetic_data/07_dp_gan.py | 416 | fake_data = generator(z) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 420 | d_fake = discriminator_private(fake_data) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 448 | fake_data = generator(z) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 451 | d_fake = discriminator_for_g(fake_data) | CODE |
| LOW | 22_rag_financial_research/01_sec_filing_pipeline.py | 109 | 'for example: EDGAR_IDENTITY="Jane Doe jane@example.org".' | CODE |
| LOW | …undamental_alternative_data/14_text_data_extraction.py | 807 | # export EDGAR_IDENTITY="Jane Doe jane@example.org" | STRING |
| LOW | …undamental_alternative_data/14_text_data_extraction.py | 820 | '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.' | STRING |
| LOW | …fundamental_alternative_data/02_sec_filing_explorer.py | 83 | # `export EDGAR_IDENTITY="Jane Doe jane@example.org"`. | COMMENT |
| LOW | …fundamental_alternative_data/02_sec_filing_explorer.py | 90 | '`export EDGAR_IDENTITY="Jane Doe jane@example.org"`.' | CODE |
| LOW⚡ | tests/test_pm_helpers.py | 142 | monkeypatch.setenv("ML4T_FAKE_KEY", "Jane Doe jane@example.org") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/generate_test_data.sh | 26 | # Usage: | COMMENT |
| LOW | data/crypto/market/config.yaml | 11 | # Usage: | COMMENT |
| LOW | data/prediction_markets/config.yaml | 8 | # Usage: | COMMENT |
| LOW | data/fx/market/config.yaml | 10 | # Usage: | COMMENT |
| LOW | data/macro/config.yaml | 10 | # Usage: | COMMENT |
| LOW | data/etfs/market/config.yaml | 17 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 06_strategy_definition/exploration.md | 35 | ├── figures/ # Book figures (AI-generated + notebook) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …/01_react_reasoning_20260615T191047Z_04eb6e7c603d.json | 217 | "snippet": "# US - FedWatch Probability of Rate Hike/Cut | US Fed | Collection | MacroMicro. #### Notifica | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_import_resolution.py | 246 | (pkg / "__init__.py").write_text("CONSTANT = 3\n\n\ndef helper():\n pass\n") | CODE |
| LOW | tests/test_import_resolution.py | 471 | "def helper():\n from pathlib import Path\n", # binds inside the function only | CODE |