Code for Machine Learning for Trading, 3rd edition — from data sourcing to live execution.
This report summarizes scanner evidence for stefan-jansen/machine-learning-for-trading, a Jupyter Notebook project with 21,291 GitHub stars. SynthScan examined 724,059 lines of code across 1515 source files, recording 15558 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 27.4 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 12752 finding(s).
Are imports declared and package/API names verified? 1134 finding(s).
Are wrappers, guards, and repeated structures necessary? 6881 finding(s).
Which changes need focused human review? 15558 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 15558 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .pre-commit-config.yaml | 41 | COMMENT | |
| LOW | .pre-commit-config.yaml | 61 | - id: strip-plotly-json | COMMENT |
| LOW | pyproject.toml | 21 | "pyarrow>=15.0", | COMMENT |
| LOW | pyproject.toml | 101 | # =================== | COMMENT |
| LOW | pyproject.toml | 261 | # ruff versions format the same code differently, so a notebook formatted by | COMMENT |
| LOW | sitecustomize.py | 161 | configured = _data_root_from_dotenv(repo_root) | COMMENT |
| LOW | docker-compose.yml | 1 | # ML4T 3rd Edition — Docker Compose Configuration | COMMENT |
| LOW | docker-compose.yml | 21 | # | COMMENT |
| LOW | docker-compose.yml | 41 | # local_files_only=True, so a container run has to see the host's cache or the | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 41 | # - Train a value-based agent (DQN) and two actor-critic agents (PPO, A2C) with | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 101 | COMMENT | |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 141 | # GARCH(1,1) models the variance of a return series as a function of its own | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 301 | COMMENT | |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 321 | # sees the return $r_t$ that has just happened. The reward it collects is | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 401 | obs = build_observation(self.returns, self.step_idx, self.position) | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 421 | # means and why it needs fewer fresh environment steps per unit of progress. | COMMENT |
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 701 | } | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 41 | # - Compute a name's participation rate - the size of an order against the | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 101 | LIQUID_MAX_PARTICIPATION = 0.10 # order below this share of daily volume is the liquid cohort | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 321 | # ## The Square-Root Impact Model | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 481 | summary | COMMENT |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 561 | after selection and does not feed back into it. | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 41 | # basis points of the arrival notional, and say which part of that cost comes | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 141 | # %% [markdown] | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 221 | ) | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 241 | # depth falls. The simulator therefore makes a stressed regime a wider, deeper | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 261 | stressed state and the rest to the normal state. | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 281 | # walks down the available bids, and the size of that effect grows with the | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 301 | # The action is a pace multiplier rather than a quantity so that no policy can | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 401 | ) | COMMENT |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 461 | # | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 41 | # After working through this notebook you will be able to: | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 141 | a half-spread that already widens with volatility. | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 201 | # ### What the maker sees and does | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 221 | # notebook quote symmetrically around exactly this price, at three different | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 241 | # $$r_t = \Delta W_t - \lambda_q \left(\frac{q_t}{q_{\max}}\right)^2 p_{t+1}$$ | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 321 | # | COMMENT |
| LOW | 21_rl_execution_hedging/03_market_making_ppo.py | 741 | # ## 7. Which part of the inventory response is the policy's | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 41 | # drawn from bars that had closed when the decision was made, and say which | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 141 | ) | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 181 | # %% | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 321 | ) | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 341 | # | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 721 | # The flag fires when a policy reaches the final hour still holding more than it | COMMENT |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 761 | # %% [markdown] | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 1 | # --- | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 21 | # ## Purpose | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 41 | # After working through this notebook you will be able to: | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 61 | # | COMMENT |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 141 | # expressed the same way and P&L is scaled back to currency at the end. | COMMENT |
| 6667 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 476 | def discrete_almgren_chriss_schedule( | CODE |
| LOW | 21_rl_execution_hedging/market_making_env.py | 24 | def generate_garch_market_data( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 205 | def collect_expert_trajectories( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 565 | def compute_feature_expectations(trajectories: list, extract_fn) -> np.ndarray: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 630 | def sample_candidate_trajectory(env: ExecutionEnv, rng) -> dict: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 652 | def trajectory_feature_counts(trajectories: list, extract_features_fn) -> np.ndarray: | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 733 | def regularized_log_likelihood( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 835 | def sample_feature_matching_trajectory( | CODE |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 1030 | def inferred_boltzmann_action( | CODE |
| LOW | 05_synthetic_data/00_classical_simulation.py | 460 | def simulate_mean_reversion_euler( | CODE |
| LOW | 05_synthetic_data/00_classical_simulation.py | 518 | def simulate_mean_reversion_exact( | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 252 | def generate_synthetic_irregular_bars(n_bars: int = 1000, seed: int = 42) -> pl.DataFrame: | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 352 | def compute_inter_arrival_times(df: pl.DataFrame) -> np.ndarray: | CODE |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 383 | def create_irregular_sequences( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 192 | def compute_predictive_score_yoon( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 304 | def compute_discriminative_score_yoon( | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 555 | 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 | 810 | def compute_signatures_batch_paper( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1186 | def compute_expected_signature_gpu( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1666 | def plot_path_comparison_unconditional( | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1802 | def tstr_evaluation_unconditional( | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 286 | def deterministic_neural_sort(s: torch.Tensor, tau: float) -> torch.Tensor: | CODE |
| LOW | 09_model_based_features/12_wasserstein_regimes.py | 501 | def simulate_two_regime_stream( | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 743 | def distribution_shift_features(series: np.ndarray, boundary: int, n_bins: int = 50) -> dict: | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 778 | def dependence_shift_features(series: np.ndarray, boundary: int) -> dict: | CODE |
| LOW | 09_model_based_features/02_structural_breaks.py | 849 | def compute_all_break_features(series: np.ndarray, boundary: int) -> dict: | CODE |
| LOW | 09_model_based_features/13_regime_as_feature.py | 289 | def evaluate_mixture_of_experts(estimator, features: list[str]) -> pd.DataFrame: | CODE |
| LOW | 09_model_based_features/10_uncertainty_features.py | 195 | def fit_stochastic_volatility(observations: np.ndarray): | CODE |
| LOW | 09_model_based_features/07_arima_features.py | 348 | def fit_recording_convergence(series: pd.Series, order: tuple[int, int, int]): | CODE |
| LOW | 22_rag_financial_research/03_hybrid_retrieval.py | 507 | def semantic_similarity_scores(query: str, model, embeddings: np.ndarray) -> np.ndarray: | CODE |
| LOW | …_financial_research/02_domain_embeddings_comparison.py | 351 | def get_sentence_transformer_embeddings( | CODE |
| LOW | …_financial_research/07_institutional_holdings_graph.py | 329 | def compute_coownership_matrix(holdings: pl.DataFrame) -> tuple[np.ndarray, list[str]]: | CODE |
| LOW | …_financial_research/07_institutional_holdings_graph.py | 729 | def compute_institution_similarity(holdings: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 110 | def embargo_steps_from_buffer(label_buffer: str, dates: np.ndarray) -> int: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 136 | def chronological_calibration_masks( | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 161 | def conformal_order_statistic(scores: np.ndarray, alpha: float) -> float: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 218 | def deterministic_lgb_parameters(objective: str, alpha: float | None = None) -> dict: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 503 | def summarize_conformal_results(results: list[dict], alpha: float) -> dict | None: | CODE |
| LOW | 12_gradient_boosting/11_conformal_gbm.py | 779 | def compute_adaptive_intervals( | CODE |
| LOW | 12_gradient_boosting/07_hpo_comparison.py | 291 | def optuna_continuous_objective(trial): | CODE |
| LOW | 12_gradient_boosting/12_case_study_insights.py | 1624 | def pairwise_rank_correlation(fold_arrays: list[np.ndarray]) -> tuple[float, float] | None: | CODE |
| LOW | 02_financial_data_universe/06_futures_continuous.py | 479 | def identify_front_month_calendar( | CODE |
| LOW | …financial_data_universe/14_point_in_time_validation.py | 274 | 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 | 327 | def validate_signal_trade_lag(signals: pl.DataFrame, execution_lag: int = 1) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/09_options_continuous.py | 117 | def select_constant_maturity_straddle(raw_options: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/09_options_continuous.py | 737 | def build_continuous_straddle_series(cm_series: pl.DataFrame, held: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 192 | def _combine_pipeline_sources( | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 561 | def _validate_crypto_coverage(df: pl.DataFrame, symbol: str) -> dict[str, Any]: | CODE |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 604 | def _add_crypto_session_features(df: pl.DataFrame) -> pl.DataFrame: | CODE |
| LOW | …ancial_data_universe/15_survivorship_bias_detection.py | 1073 | def check_universe_completeness( | CODE |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 213 | def read_parquet_materialized() -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 250 | def read_feather_materialized() -> pl.DataFrame: | CODE |
| LOW | 02_financial_data_universe/02_corporate_actions.py | 446 | def demonstrate_split_adjustment( | CODE |
| LOW | 02_financial_data_universe/02_corporate_actions.py | 475 | def demonstrate_dividend_adjustment(price_before_ex: float = 100.0, dividend: float = 5.0) -> None: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 560 | def compare_providers_detailed( | CODE |
| LOW | 16_strategy_simulation/08_signal_method_comparison.py | 164 | def select_registered_prediction(db_path: Path, family: str, label: str) -> dict[str, object]: | STRING |
| LOW | 16_strategy_simulation/08_signal_method_comparison.py | 239 | def load_registered_predictions( | CODE |
| LOW | 16_strategy_simulation/02_futures_backtesting.py | 114 | def load_contract_specs_from_yaml(yaml_path: Path) -> dict[str, ContractSpec]: | CODE |
| 5064 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 | 99 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 101 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 110 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 112 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 117 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 119 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 124 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 126 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 138 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 140 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 143 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 145 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 149 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 151 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 153 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 155 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 170 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 172 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 181 | # =================== | COMMENT |
| MEDIUM⚡ | pyproject.toml | 183 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 37 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 39 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 53 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 55 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 70 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 72 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 85 | # =================== | COMMENT |
| MEDIUM | pyproject.toml | 87 | # =================== | COMMENT |
| MEDIUM | docker-compose.yml | 77 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 80 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 92 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 95 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 115 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 120 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 171 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 175 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 211 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 216 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 236 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 250 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 284 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 287 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 306 | # ============================================ | COMMENT |
| MEDIUM | docker-compose.yml | 309 | # ============================================ | COMMENT |
| MEDIUM | 05_synthetic_data/03_sigcwgan_signatures.py | 852 | # ============================================================================= | COMMENT |
| MEDIUM | 05_synthetic_data/03_sigcwgan_signatures.py | 854 | # ============================================================================= | COMMENT |
| MEDIUM | 05_synthetic_data/02_tailgan_tail_risk.py | 717 | # --------------------- | COMMENT |
| MEDIUM | 05_synthetic_data/02_tailgan_tail_risk.py | 719 | # --------------------- | COMMENT |
| MEDIUM | 05_synthetic_data/02_tailgan_tail_risk.py | 739 | # --------------------- | COMMENT |
| MEDIUM | 05_synthetic_data/02_tailgan_tail_risk.py | 741 | # --------------------- | COMMENT |
| MEDIUM | 13_dl_time_series/dl_sequences.py | 42 | # ============================================================================= | COMMENT |
| MEDIUM | 13_dl_time_series/dl_sequences.py | 44 | # ============================================================================= | COMMENT |
| MEDIUM | 13_dl_time_series/dl_sequences.py | 113 | # ============================================================================= | COMMENT |
| MEDIUM | 13_dl_time_series/dl_sequences.py | 115 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/dl_sequences.py | 153 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/dl_sequences.py | 155 | # ============================================================================= | COMMENT |
| 1111 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 21_rl_execution_hedging/01_algorithms_comparison.py | 88 | CODE | |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 80 | CODE | |
| LOW | 21_rl_execution_hedging/02_optimal_execution_ppo.py | 95 | 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/03_market_making_ppo.py | 95 | CODE | |
| LOW | 21_rl_execution_hedging/04_crypto_execution_rl.py | 91 | CODE | |
| LOW | 21_rl_execution_hedging/rl_calibration.py | 25 | CODE | |
| LOW | 21_rl_execution_hedging/05_deep_hedging_pfhedge.py | 103 | CODE | |
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 89 | CODE | |
| LOW | 21_rl_execution_hedging/crypto_execution_env.py | 3 | CODE | |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 138 | CODE | |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 140 | CODE | |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 142 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 35 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 105 | CODE | |
| LOW | 05_synthetic_data/06_llm_tabular_great.py | 84 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 148 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 150 | CODE | |
| LOW | 05_synthetic_data/07_dp_gan.py | 93 | CODE | |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 60 | CODE | |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 67 | CODE | |
| LOW | 05_synthetic_data/01_timegan.py | 83 | CODE | |
| LOW | 09_model_based_features/09_har_rough_volatility.py | 62 | CODE | |
| LOW | 09_model_based_features/13_regime_as_feature.py | 64 | CODE | |
| LOW | 09_model_based_features/10_uncertainty_features.py | 56 | CODE | |
| LOW | 22_rag_financial_research/03_hybrid_retrieval.py | 84 | CODE | |
| LOW | 22_rag_financial_research/01_sec_filing_pipeline.py | 87 | CODE | |
| LOW | 12_gradient_boosting/02_gbm_comparison.py | 48 | CODE | |
| LOW | 12_gradient_boosting/02_gbm_comparison.py | 58 | 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 | 64 | CODE | |
| LOW | …financial_data_universe/14_point_in_time_validation.py | 56 | CODE | |
| LOW | 02_financial_data_universe/17_complete_pipeline.py | 63 | CODE | |
| LOW | 02_financial_data_universe/20_storage_benchmark_file.py | 82 | 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 | 72 | CODE | |
| LOW | 03_market_microstructure/07_itch_stylized_facts.py | 70 | 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 | 151 | CODE | |
| LOW | …rket_microstructure/08_databento_lob_reconstruction.py | 55 | CODE | |
| LOW | 20_strategy_synthesis/02_feature_evaluation.py | 47 | 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 | tests/test_download_coverage.py | 13 | CODE | |
| LOW | tests/test_backtest_coverage_exclusion.py | 19 | CODE | |
| LOW | tests/test_allocation_width_asks_for_all.py | 29 | CODE | |
| LOW | tests/test_artifact_audit_names_its_scope.py | 11 | CODE | |
| LOW | tests/test_contiguous_run.py | 10 | CODE | |
| LOW | tests/test_fx_allocation_selection.py | 3 | CODE | |
| 935 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 05_synthetic_data/00_classical_simulation.py | 1898 | # only one.** Measured against GBM as the null, jump-diffusion has the | COMMENT |
| HIGH | 12_gradient_boosting/12_case_study_insights.py | 1853 | # stays null, and so does a family whose selection was scored over a different number | COMMENT |
| HIGH | 12_gradient_boosting/08_shap_analysis.py | 588 | # 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 | 241 | # A genuine null, not NumPy NaN: polars stores np.nan as a float NaN that the null check | COMMENT |
| HIGH | 02_financial_data_universe/07_sp500_options_eda.py | 841 | # side. A quantile of an empty frame is null, and formatting a null against a percentage | COMMENT |
| HIGH | 13_dl_time_series/12_case_study_insights.py | 1095 | # grid could not be derived, both comparisons return null on a null, and `filter` drops | 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_contiguous_run.py | 45 | assert got.equals(expected) | CODE |
| HIGH | tests/test_prediction_timestamp_zone.py | 204 | assert as_read.equals(as_written) | 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_data_quality.py | 70 | assert out.equals(df) | CODE |
| HIGH⚡ | tests/test_ranking_a_bankrupt_member.py | 75 | """That is the other reason a Sharpe is null, and it is still a broken run.""" | STRING |
| HIGH⚡ | tests/test_registry_metrics.py | 320 | undefined, and ``cross_sectional_ic`` returns NaN for that fold. | STRING |
| HIGH | tests/test_benchmark_grid.py | 150 | of 100 with factors [8, null, 8] would read as -87.5% then +700%, and the residual | STRING |
| HIGH | tests/test_backtest_rekey.py | 648 | is null, `null > tolerance` is null, and polars' `.any()` skips nulls. | STRING |
| HIGH | tests/test_allocation.py | 260 | assert prefix.equals(full) | CODE |
| HIGH | tests/test_deep_learning_adapter.py | 390 | assert context.expected_keys.equals(expected) | CODE |
| HIGH⚡ | tests/test_candidate_index_retirement.py | 118 | assert rejoined.equals(index.sort("prediction_hash")) | CODE |
| HIGH | tests/test_insight_chapter.py | 131 | assert defaulted.equals(explicit) | CODE |
| HIGH⚡ | …sts/test_candidate_set_ranks_a_bankrupt_member_last.py | 89 | """That is the other reason a Sharpe is null, and it is still an ineligible member.""" | STRING |
| HIGH | tests/test_research_contract_execution.py | 743 | assert stored_trades.equals(original_trades) | CODE |
| HIGH⚡ | tests/test_sp500_options_research.py | 1175 | assert unchanged.equals(cohorts) | 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_full_coverage_selection.py | 580 | assert restricted.equals(unrestricted) | 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_sp500_options_garch_pit.py | 580 | """A block the optimizer never converged on is left null, not filled and not hidden. | 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_us_equities_lazy_projection.py | 86 | assert pushed.equals(materialized) | CODE |
| HIGH⚡ | tests/test_us_equities_lazy_projection.py | 98 | assert deferred.equals(eager) | CODE |
| HIGH | tests/test_us_equities_lazy_projection.py | 115 | assert reduced.equals(projected.filter(pl.col("symbol").is_in(["AAA", "BBB"]))) | CODE |
| HIGH⚡ | tests/test_seed_prediction_fixtures.py | 294 | assert leader_after.equals(leader_before), "the cohort leader's real artifact was overwritten" | CODE |
| HIGH⚡ | tests/test_seed_prediction_fixtures.py | 295 | assert other_after.equals(other_before), "an ordinary shipped artifact was overwritten" | CODE |
| HIGH | tests/test_notebook_render.py | 171 | assert defaulted.equals(explicit) | CODE |
| HIGH | tests/test_notebook_render.py | 172 | assert not defaulted.equals( | CODE |
| HIGH | tests/test_algoseek_convert.py | 559 | assert df.equals(df.sort("symbol", "timestamp")), "not ordered by (symbol, timestamp)" | CODE |
| HIGH⚡ | tests/test_latent_factors_no_leak.py | 805 | assert fresh_predictions.equals(cached_predictions) | CODE |
| HIGH⚡ | tests/test_latent_factors_no_leak.py | 806 | assert fresh_metrics.equals(cached_metrics) | CODE |
| HIGH | tests/test_common_sample_daily_ic.py | 81 | """The second intersection: constant scores make a date undefined, for every model. | STRING |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1988 | .data(graphData.nodes.filter(d => d.group === 1 && d.degree >= 5)) | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 2028 | d.fx = null; | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 2029 | d.fy = null; | CODE |
| HIGH | 11_ml_pipeline/05_shap_analysis.py | 126 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/06_conformal_prediction.py | 141 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/03_logistic_classification.py | 148 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/01_ols_inference.py | 116 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | 11_ml_pipeline/04_nested_cv_hpo.py | 130 | # A feature that could not be computed arrives as a null, and every row carrying | COMMENT |
| HIGH | 11_ml_pipeline/02_regularization_paths.py | 128 | # Replace inf/NaN with null, then drop all nulls | COMMENT |
| HIGH | utils/downloading.py | 524 | if merged.equals(stored.sort("timestamp")): | CODE |
| HIGH | utils/modeling.py | 2414 | null; the `is_finite` filter is belt-and-braces against an environment | STRING |
| HIGH | 08_financial_features/02_microstructure_features.py | 376 | polars returns a null, not an error, when a correlation or a median has nothing to | STRING |
| HIGH | 07_defining_the_learning_task/06_ic_inference.py | 577 | "dotted line at the null, which falls on the mode. " | CODE |
| HIGH | 07_defining_the_learning_task/07_multiple_testing.py | 392 | # P-value histogram (should be uniform under null) | COMMENT |
| HIGH | 07_defining_the_learning_task/05_signal_evaluation.py | 1300 | # inherits also lives in the null; across blocks the relabelings are independent. | COMMENT |
| HIGH | …efining_the_learning_task/10_ml4t_library_ecosystem.py | 261 | # NaN is distinct from null, so guard against both before averaging. | COMMENT |
| HIGH | …_defining_the_learning_task/08_causal_sanity_checks.py | 300 | the observed assignment is itself one of the arrangements under the null, and | STRING |
| 70 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | 21_rl_execution_hedging/01_algorithms_comparison.py | 151 | # it is the single most robust statistical regularity in speculative price | STRING |
| MEDIUM | 05_synthetic_data/00_classical_simulation.py | 139 | # | **Heston** | Stochastic volatility | Vol surfaces, leverage effect | | COMMENT |
| MEDIUM | 05_synthetic_data/00_classical_simulation.py | 624 | # - $\rho$ = correlation between price and variance shocks (leverage effect) | COMMENT |
| MEDIUM | 09_model_based_features/14_panel_features.py | 671 | # were nearly identical. That is the trade: a rank is robust because it discards the distances, | COMMENT |
| MEDIUM | 09_model_based_features/14_panel_features.py | 917 | # the distances between assets, which is what makes them robust and what makes them invent | COMMENT |
| MEDIUM | 09_model_based_features/09_har_rough_volatility.py | 620 | # residuals. `HC3` relaxes the first assumption with a leverage adjustment. The last two | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 965 | # | **Evaluation** | Lightweight harness diagnostics | | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 585 | # of top-ranked results, making the fusion more robust. | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 221 | # These cover the failure modes the harness is designed to catch: | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 306 | # Each metric targets one of the four harness outputs. Together they | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 494 | # ## 5. The four harness outputs | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 609 | # ## 7. The harness as a chart | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 684 | # the harness doing its job: every gold term was retrieved for every answerable | COMMENT |
| MEDIUM | 12_gradient_boosting/05_cross_library_hpo.py | 610 | # 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 | 382 | # (§12.2); for robust attributions, see the SHAP analysis in §12.5. | COMMENT |
| MEDIUM | 12_gradient_boosting/08_shap_analysis.py | 548 | # a robust relationship; declining importance is an early warning of | COMMENT |
| MEDIUM | 12_gradient_boosting/08_shap_analysis.py | 710 | # explanation is robust to method choice; where they diverge, the | COMMENT |
| MEDIUM | 02_financial_data_universe/13_data_quality_framework.py | 370 | # has it backwards. MAD is a robust scale estimate, meaning the extreme returns barely move it: | COMMENT |
| MEDIUM | …nancial_data_universe/08_options_greeks_computation.py | 225 | # We'll use Brent's method (a robust root-finding algorithm) to solve this. | COMMENT |
| MEDIUM | 02_financial_data_universe/16_provider_comparison.py | 359 | # For production systems, we need a robust strategy that handles: | COMMENT |
| MEDIUM | 16_strategy_simulation/18_vectorbt_engine_parity.py | 99 | # comparisons. VectorBT Pro also supplies contract multipliers and futures-style leverage for the | COMMENT |
| MEDIUM | 16_strategy_simulation/02_futures_backtesting.py | 531 | # Futures require short selling and leverage | COMMENT |
| MEDIUM | 16_strategy_simulation/12_dsr_validation.py | 23 | # This notebook demonstrates comprehensive **backtest validation using the Deflated Sharpe Ratio (DSR)** from `ml4t-diag | COMMENT |
| MEDIUM | 16_strategy_simulation/12_dsr_validation.py | 1207 | # 5. **Combine methods**: DSR, PBO, and RAS for comprehensive overfitting detection | COMMENT |
| MEDIUM | 13_dl_time_series/04_transformers.py | 298 | # making the model robust to distribution shift. | COMMENT |
| MEDIUM | 19_risk_management/06_stress_testing.py | 470 | # The heatmap is the compact committee view: it shows immediately which portfolios are robust | COMMENT |
| MEDIUM | 19_risk_management/07_drift_detection.py | 1027 | # The `analyze_drift()` function provides a comprehensive analysis combining all methods. | COMMENT |
| MEDIUM | 19_risk_management/04_factor_exposure.py | 86 | # are made robust to. Daily return residuals carry some, and ignoring it makes every t-statistic | COMMENT |
| MEDIUM | 03_market_microstructure/13_algoseek_minute_bars_eda.py | 25 | # This notebook provides a comprehensive exploration of the AlgoSeek TAQ minute bar dataset. | COMMENT |
| MEDIUM | 03_market_microstructure/15_itch_lee_ready.py | 385 | # Run validation across multiple days to get robust statistics. | COMMENT |
| MEDIUM | 03_market_microstructure/17_databento_bar_sampling.py | 28 | # robust are imbalance-bar parameters across market conditions? | COMMENT |
| MEDIUM | 03_market_microstructure/17_databento_bar_sampling.py | 1728 | # DataBento's multi-day MBO data enables robust threshold selection that | COMMENT |
| MEDIUM | 03_market_microstructure/18_algoseek_jump_detection.py | 167 | # is jump-robust: a single large $|r_i|$ is multiplied by its small | COMMENT |
| MEDIUM | 03_market_microstructure/18_algoseek_jump_detection.py | 244 | # intraday volatility regimes and is robust to the jumps it is trying to | COMMENT |
| MEDIUM | 03_market_microstructure/18_algoseek_jump_detection.py | 563 | # jumps; bipower variation gives a jump-robust continuous-variance | COMMENT |
| MEDIUM | …ntal_alternative_data/10_institutional_holdings_13f.py | 176 | # median across a filing's positions is what makes the test robust to one bad row in an otherwise | COMMENT |
| MEDIUM | 20_strategy_synthesis/01_aggregate_synthesis.py | 66 | # (a missing selection fails loudly); the test harness sets it True so cost/risk | COMMENT |
| MEDIUM | 20_strategy_synthesis/01_aggregate_synthesis.py | 71 | # backtests, so a partial aggregation cannot be published as a complete one. The test harness | COMMENT |
| MEDIUM | tests/preset_patches.py | 83 | # Max configs per family in training menu YAMLs (keep tests fast but comprehensive). | COMMENT |
| MEDIUM | tests/test_model_registry.py | 559 | # Resolved through the harness rather than named here: `research_preview=True` below | COMMENT |
| MEDIUM | tests/test_fixture_registry_identity.py | 141 | # incomplete. The harness must not be able to reach that path at all. | COMMENT |
| MEDIUM | tests/overrides.yaml | 387 | # timeout plus harness overhead, not a runtime. The fine-tuning cell had never completed on | COMMENT |
| MEDIUM | tests/overrides.yaml | 402 | # Measured at 20 steps and 100 sentences, all three checkpoints, through this harness with | COMMENT |
| MEDIUM | tests/overrides.yaml | 582 | # `n_jobs=-1`, which wins over the harness's OMP_NUM_THREADS cap (tests/pm_helpers.py:113), so | COMMENT |
| MEDIUM | tests/overrides.yaml | 1433 | # Nothing asserts the verdict, in this notebook or in the harness, so a fixture rebuild | COMMENT |
| MEDIUM | tests/overrides.yaml | 1630 | # The budget is stated rather than left to the harness default so the number has somewhere to | COMMENT |
| MEDIUM | tests/overrides.yaml | 1711 | # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for | COMMENT |
| MEDIUM | tests/overrides.yaml | 1827 | # harness fallback would fit five names here too. Without it this would register a | COMMENT |
| MEDIUM | tests/overrides.yaml | 1844 | # harness fallback would fit five names here too. Without it this would register a | COMMENT |
| MEDIUM | tests/overrides.yaml | 1858 | # harness fallback would fit five names here too. Without it this would register a | COMMENT |
| MEDIUM | tests/overrides.yaml | 2411 | # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for | COMMENT |
| MEDIUM | tests/overrides.yaml | 2692 | # Declared here rather than left to the harness default of max_symbols alone. | COMMENT |
| MEDIUM | tests/overrides.yaml | 2902 | # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for any | COMMENT |
| MEDIUM | tests/overrides.yaml | 2995 | # the name it declares. The tier comes from the harness: research_preview_parameters sees | COMMENT |
| MEDIUM | tests/overrides.yaml | 2999 | # The reduction is stated rather than left to the max_symbols: 5 the harness would | COMMENT |
| MEDIUM | tests/overrides.yaml | 3031 | # stated rather than left to the max_symbols the harness would substitute, so the preview | COMMENT |
| MEDIUM | tests/overrides.yaml | 3055 | # The harness forces EXECUTION_TIER=preview and WORKSPACE for any notebook declaring both, and | COMMENT |
| MEDIUM | tests/overrides.yaml | 3165 | # so the parameter carries the resolver's name rather than the notebook's own. The harness sets | COMMENT |
| MEDIUM | tests/overrides.yaml | 3247 | # 07_gbm take the harness default), and the sweep ranks the predictions those stages | COMMENT |
| MEDIUM | tests/overrides.yaml | 3683 | # execution_tier is not canonical, and the harness injects EXECUTION_TIER="preview" for any | COMMENT |
| 183 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 206 | # chromadb<1.2, which conflicts with the Ch22 RAG stack. | COMMENT |
| MEDIUM | 05_synthetic_data/06_llm_tabular_great.py | 374 | # This is a known limitation of autoregressive generation: the model can "hallucinate" | COMMENT |
| MEDIUM | 09_model_based_features/case_study_temporal_summary.py | 321 | # object is an embedding model and the binding constraint is when it was trained. | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 17 | # # 10-K Due Diligence Assistant: RAG with Verifiable Citations | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 21 | # **Chapter 22: RAG for Financial Research** | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 56 | # - A CUDA GPU for the embeddings. No API key: the embedding model is local and | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 227 | # substituting synthetic text. A RAG demo that invents a corpus when the real | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 260 | # Sets the LLM, embedding model, and chunk strategy. The Chroma collection is | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 691 | # of this corpus, this embedding model and this distance metric together, | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 797 | # Numeric questions are where RAG most often fails silently: a fluent model | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 21 | # **Chapter 22: RAG for Financial Research** (Section 22.5) | COMMENT |
| MEDIUM | 22_rag_financial_research/03_hybrid_retrieval.py | 1288 | # RAG pipelines on retrieval, grounding and abstention. | STRING |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 17 | # # Security for Financial Document RAG | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 21 | # **Chapter 22: RAG for Financial Research** (Section 22.7) | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 52 | # **Prerequisites**: the RAG pipeline of sections 22.1 to 22.6, and | COMMENT |
| MEDIUM | 22_rag_financial_research/08_rag_security.py | 91 | # to financial RAG: indirect prompt injection (adversarial instructions hidden | 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 | 17 | # # Domain-Specific Embeddings for Financial RAG | COMMENT |
| MEDIUM | …_financial_research/02_domain_embeddings_comparison.py | 21 | # **Chapter 22: RAG for Financial Research** (Section 22.4) | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 19 | # **Chapter 22: RAG for Financial Research** | COMMENT |
| MEDIUM | 22_rag_financial_research/01_sec_filing_pipeline.py | 349 | # does well here has done well on one topic, so a domain embedding model's | STRING |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 385 | # ## Approach B: RAG Interface Contract | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 387 | # A RAG implementation must answer open-ended questions with retrieved evidence, | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 392 | # Sample ESG questions for RAG | 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 | 29 | # 2. **A RAG assistant.** Not built here. What is recorded instead is the | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 50 | # - State the evidence contract a RAG producer has to meet before its output | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 54 | # (`data/alternative/news/bloomberg/`). No RAG answers are generated here. | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 430 | # Run RAG analysis | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 442 | # ## Comparison: Classification vs RAG | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 445 | # RAG producer must satisfy. | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 495 | # | Question | Choose Classification | Choose RAG | | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 517 | # RAG contract status | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 635 | # 5. **The RAG side of this notebook is a contract, not a result.** No answers | COMMENT |
| MEDIUM | 22_rag_financial_research/06_esg_rag_vs_finetune.py | 643 | # **Book reference**: Section 22.8, on choosing between RAG and fine-tuning. | COMMENT |
| MEDIUM | …_financial_research/07_institutional_holdings_graph.py | 21 | # **Chapter 22: RAG for Financial Research** (Section 22.8) | COMMENT |
| MEDIUM | …_financial_research/07_institutional_holdings_graph.py | 1181 | # representations, while Chapter 24 uses the same entities in agentic workflows. | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 17 | # # Financial RAG Evaluation Harness | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 21 | # **Chapter 22: RAG for Financial Research** (Section 22.7) | COMMENT |
| MEDIUM⚡ | 22_rag_financial_research/04_ragas_evaluation.py | 23 | # A RAG pipeline can fail in four unrelated ways - it can retrieve the wrong | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 53 | # **Book reference**: Section 22.7, on the three RAG failure modes - retrieval, | COMMENT |
| MEDIUM | 22_rag_financial_research/04_ragas_evaluation.py | 722 | # **Next**: [`05_10k_rag_assistant`](05_10k_rag_assistant.ipynb) builds a RAG | COMMENT |
| MEDIUM | 12_gradient_boosting/03_dl_vs_gbm.py | 363 | # * **TabPFN**: zero-shot: no training, no validation needed. | COMMENT |
| MEDIUM | 12_gradient_boosting/03_dl_vs_gbm.py | 551 | # TabPFN, zero-shot, no training, no validation | COMMENT |
| MEDIUM | 02_financial_data_universe/13_data_quality_framework.py | 518 | # `AnomalyManager` orchestrates the three detectors and reports per symbol. It concatenates | COMMENT |
| MEDIUM | 16_strategy_simulation/04_single_asset_ml4t_backtest.py | 21 | # This notebook introduces the **ml4t-backtest** event-driven backtesting engine. | COMMENT |
| MEDIUM | 16_strategy_simulation/04_single_asset_ml4t_backtest.py | 39 | # 2. Run an event-driven backtest with next-open execution and explicit costs. | COMMENT |
| MEDIUM | 16_strategy_simulation/05_stateful_strategies.py | 68 | # **Book Reference:** Chapter 16, Section 16.3 - when event-driven simulation is | COMMENT |
| MEDIUM | 16_strategy_simulation/05_stateful_strategies.py | 1308 | # 2. **The important question is not "vectorized or event-driven?" in the | COMMENT |
| MEDIUM | 16_strategy_simulation/05_stateful_strategies.py | 1324 | # stateful strategies are most naturally expressed as event-driven simulation. | COMMENT |
| MEDIUM | 16_strategy_simulation/README.md | 56 | ### 16.3 Vectorized and event-driven backtesting | COMMENT |
| MEDIUM | 16_strategy_simulation/03_single_asset_vectorbt.py | 33 | # **Book Reference:** Chapter 16, Section 16.3 - vectorized and event-driven engines. | COMMENT |
| MEDIUM | 16_strategy_simulation/03_single_asset_vectorbt.py | 694 | # strategy implemented with ml4t-backtest's event-driven engine. The main difference | COMMENT |
| MEDIUM | 16_strategy_simulation/03_single_asset_vectorbt.py | 715 | # - **06_framework_parity**: Compare vectorized and event-driven implementations | COMMENT |
| MEDIUM | 16_strategy_simulation/02_futures_backtesting.py | 42 | # event-driven validation. | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/09_foundation_models.py | 26 | # Two are run here in that zero-shot mode: **Chronos** (Amazon), which quantises a | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/09_foundation_models.py | 34 | # **What the comparison actually asks.** The zero-shot models forecast the context | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/09_foundation_models.py | 37 | # the two horizons are not tied together. So this is a probe of whether a zero-shot | COMMENT |
| MEDIUM⚡ | 13_dl_time_series/09_foundation_models.py | 159 | # **Design note on horizon and target alignment.** The zero-shot baseline | COMMENT |
| 105 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 13_dl_time_series/09_foundation_models.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/07_mamba_ssm.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/10_uncertainty.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/06_tsmixer.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/05_tcn.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/08_cnn_image_encoding.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | 13_dl_time_series/04_transformers.py | 0 | mean cross-sectional spearman ic over the dates where it is defined. returns the mean and the defined/total date counts. | STRING |
| HIGH | tests/test_allocation_width_asks_for_all.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_full_coverage_selection.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_compare_families_solvency.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_best_reports_concentration.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_best_reports_the_checkpoint.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_compare_allocators_ruin.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_universe_scoped_selection.py | 0 | create table training_runs ( training_hash text primary key, family text, config_name text, label text ); create table p | STRING |
| HIGH | tests/test_allocation_width_asks_for_all.py | 0 | insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' ) | STRING |
| HIGH | tests/test_compare_families_solvency.py | 0 | insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' ) | STRING |
| HIGH | tests/test_full_coverage_selection.py | 0 | insert into backtest_runs values ( ?, ?, '{"allocation":{"method":"score_weighted"}}', 'signal' ) | STRING |
| HIGH | tests/test_latent_factors_identity.py | 0 | a 64-character hex string here means the source-hashing scheme came back. | STRING |
| HIGH | tests/test_tabular_dl_identity.py | 0 | a 64-character hex string here means the source-hashing scheme came back. | STRING |
| HIGH | tests/test_linear_identity.py | 0 | a 64-character hex string here means the source-hashing scheme came back. | STRING |
| 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 | 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 | …studies/crypto_perps_funding/17_holdout_predictions.py | 0 | select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predic | STRING |
| HIGH | case_studies/cme_futures/17_holdout_predictions.py | 0 | select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predic | STRING |
| HIGH | case_studies/utils/strategy_analysis.py | 0 | select p.prediction_hash, p.training_hash, p.checkpoint_kind, p.checkpoint_value, t.config_name, t.spec_json from predic | 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 | …se_studies/crypto_perps_funding/18_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | …tudies/nasdaq100_microstructure/19_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | case_studies/us_equities_panel/21_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | case_studies/cme_futures/18_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | case_studies/etfs/19_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | …studies/us_firm_characteristics/16_holdout_backtest.py | 0 | the backtest hashes already registered against one holdout prediction set. | STRING |
| HIGH | …se_studies/crypto_perps_funding/18_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | …tudies/nasdaq100_microstructure/19_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/us_equities_panel/21_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/cme_futures/18_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/sp500_options/17_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/etfs/19_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | …studies/us_firm_characteristics/16_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/fx_pairs/19_strategy_analysis.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | STRING |
| HIGH | case_studies/fx_pairs/18_holdout_backtest.py | 0 | select prediction_hash from prediction_sets where split = 'holdout' and training_hash = ? and checkpoint_kind is ? and c | 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 | case_studies/cme_futures/06_linear.py | 0 | rank correlation between two labels' orderings, over what both of them charted. | STRING |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sitecustomize.py | 82 | except Exception: # noqa: BLE001 - startup hook: never break the interpreter | CODE |
| LOW | sitecustomize.py | 147 | except Exception: # noqa: BLE001 - startup hook: a missing or hung git is not an error here | CODE |
| LOW | sitecustomize.py | 192 | except Exception: # noqa: BLE001 - startup hook: never break the interpreter | CODE |
| LOW | 21_rl_execution_hedging/07_backtest_with_impact.py | 437 | 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 | …_financial_research/02_domain_embeddings_comparison.py | 297 | except Exception as e: | CODE |
| LOW | …_financial_research/02_domain_embeddings_comparison.py | 336 | except Exception as e: | CODE |
| LOW | 12_gradient_boosting/06_optuna_multi_asset.py | 127 | except Exception as e: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 169 | except Exception: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 176 | except Exception: | CODE |
| LOW⚡ | 12_gradient_boosting/02_gbm_comparison.py | 185 | except Exception: | CODE |
| LOW | 12_gradient_boosting/05_cross_library_hpo.py | 630 | except Exception as e: | CODE |
| MEDIUM | …nancial_data_universe/21_storage_benchmark_database.py | 1074 | def questdb_row_count() -> int: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 281 | except Exception as exc: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 299 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 311 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 331 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 352 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 372 | except Exception: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 426 | except Exception as exc: | CODE |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1077 | except Exception: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1547 | except Exception: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1745 | except Exception as e: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1776 | except Exception as e: | STRING |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1820 | except Exception as e: | STRING |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 161 | except Exception: | CODE |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 172 | except Exception: | CODE |
| MEDIUM | …nancial_data_universe/08_options_greeks_computation.py | 277 | print(f"Error: {abs(test_vol - recovered_iv):.2e}") | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 311 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 336 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 430 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 492 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 502 | except Exception as e: | CODE |
| LOW | 02_financial_data_universe/16_provider_comparison.py | 580 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 363 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 402 | except Exception as e: | CODE |
| LOW | 13_dl_time_series/09_foundation_models.py | 447 | except Exception as e: | CODE |
| LOW | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 269 | except Exception as e: | CODE |
| MEDIUM | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 270 | print(f"Error loading {msg_type}: {e}") | CODE |
| LOW | 03_market_microstructure/01_itch_parser.py | 551 | except Exception as e: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 242 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 245 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 250 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 265 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 274 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 277 | except Exception: | CODE |
| LOW⚡ | 03_market_microstructure/07_itch_stylized_facts.py | 282 | except Exception: | CODE |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 412 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/15_itch_lee_ready.py | 413 | print(f"Error processing {file.name}: {e}") | CODE |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 457 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/17_databento_bar_sampling.py | 458 | print(f"Error building {bar_type} bars: {e}") | CODE |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 646 | except Exception: | CODE |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 136 | except Exception: | CODE |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 307 | except Exception: | CODE |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 366 | except Exception as e: | CODE |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 721 | except Exception as e: | CODE |
| MEDIUM | 03_market_microstructure/05_itch_trading_activity.py | 620 | print(f"Error loading {msg_type}: {e}") | CODE |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 621 | except Exception as e: | CODE |
| LOW | 04_fundamental_alternative_data/05_entity_resolution.py | 561 | except Exception as exc: # noqa: BLE001 - offline and uncached, or the optional dep is absent | CODE |
| LOW | …fundamental_alternative_data/02_sec_filing_explorer.py | 325 | except Exception as exc: # noqa: BLE001 - a source-malformed filing must not stop the scan | CODE |
| 259 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | sitecustomize.py | 82 | except Exception: # noqa: BLE001 - startup hook: never break the interpreter | CODE |
| HIGH | sitecustomize.py | 192 | except Exception: # noqa: BLE001 - startup hook: never break the interpreter | CODE |
| HIGH | 12_gradient_boosting/02_gbm_comparison.py | 153 | except (FileNotFoundError, subprocess.TimeoutExpired): | CODE |
| HIGH | 12_gradient_boosting/02_gbm_comparison.py | 169 | except Exception: | CODE |
| HIGH | 12_gradient_boosting/02_gbm_comparison.py | 176 | except Exception: | CODE |
| HIGH | 12_gradient_boosting/02_gbm_comparison.py | 185 | except Exception: | CODE |
| HIGH | 03_market_microstructure/07_itch_stylized_facts.py | 250 | except Exception: | CODE |
| HIGH | 03_market_microstructure/07_itch_stylized_facts.py | 265 | except Exception: | CODE |
| HIGH | 03_market_microstructure/07_itch_stylized_facts.py | 282 | except Exception: | CODE |
| HIGH | tests/test_killed_sequence_run_keeps_its_checkpoints.py | 43 | except RuntimeError: | CODE |
| HIGH | tests/pm_helpers.py | 1688 | except Exception: | CODE |
| HIGH | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 385 | except (json.JSONDecodeError, KeyError): | CODE |
| HIGH | utils/reproducibility.py | 42 | except ImportError: | CODE |
| HIGH | utils/__init__.py | 75 | except ImportError: | CODE |
| HIGH | utils/__init__.py | 63 | except Exception: # noqa: BLE001 | CODE |
| HIGH | utils/downloading.py | 49 | except (ImportError, FileNotFoundError): | CODE |
| HIGH | utils/modeling.py | 186 | except ImportError: | CODE |
| HIGH | 07_defining_the_learning_task/05_signal_evaluation.py | 1782 | except ValueError: | CODE |
| HIGH | scripts/verify_installation.py | 43 | except ImportError: | CODE |
| HIGH | scripts/verify_installation.py | 550 | except Exception: | CODE |
| HIGH | .github/scripts/notebook_provenance.py | 385 | except (ValueError, TypeError): | CODE |
| HIGH | .github/scripts/check_constant_subscripts.py | 873 | except ValueError: | CODE |
| HIGH | 25_live_trading/13_runtime_safety_showcase.py | 619 | except asyncio.CancelledError: | CODE |
| HIGH | 25_live_trading/13_runtime_safety_showcase.py | 516 | except TypeError: | CODE |
| HIGH | 25_live_trading/04_alpaca_paper_trading_demo.py | 77 | except ImportError: | CODE |
| HIGH | 25_live_trading/09_crypto_funding_deployment_loop.py | 501 | except ImportError: | CODE |
| HIGH | 25_live_trading/03_ib_paper_trading_demo.py | 448 | except asyncio.CancelledError: | CODE |
| HIGH | 25_live_trading/05_alpaca_crypto_live_demo.py | 74 | except ImportError: | CODE |
| HIGH | data/equities/fundamentals/filings_download.py | 259 | except Exception: | CODE |
| HIGH | data/equities/fundamentals/filings_download.py | 270 | except Exception: | CODE |
| HIGH | data/equities/market/microstructure/mbo_download.py | 213 | except Exception: | CODE |
| HIGH | …ext_feature_engineering/05_financial_ner_finetuning.py | 467 | except Exception: | CODE |
| HIGH | case_studies/utils/folds.py | 750 | except OSError: | CODE |
| HIGH | case_studies/utils/uncertainty.py | 906 | except Exception: | CODE |
| HIGH | case_studies/utils/uncertainty.py | 917 | except Exception: | CODE |
| HIGH | case_studies/utils/strategy_analysis.py | 2564 | except Exception: | CODE |
| HIGH | case_studies/utils/registry/store.py | 544 | except sqlite3.DatabaseError: | CODE |
| HIGH | case_studies/utils/registry/store.py | 1376 | except ImportError: # pragma: no cover | CODE |
| HIGH | 24_autonomous_agents/agent_research.py | 96 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/agent_research.py | 109 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/agent_research.py | 122 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/agent_research.py | 138 | except (TypeError, ValueError): | CODE |
| HIGH | 24_autonomous_agents/agent_providers.py | 554 | except Exception: | CODE |
| HIGH | 24_autonomous_agents/04_research_agent.py | 179 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/04_research_agent.py | 192 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/04_research_agent.py | 205 | except json.JSONDecodeError: | CODE |
| HIGH | 24_autonomous_agents/04_research_agent.py | 232 | except (TypeError, ValueError): | CODE |
| HIGH | 24_autonomous_agents/agent_tools.py | 477 | except ValueError: | CODE |
| HIGH | 24_autonomous_agents/agent_tools.py | 483 | except (ValueError, TypeError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …execution_hedging/06_inverse_reinforcement_learning.py | 613 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 555 | CODE | |
| LOW | 05_synthetic_data/07_dp_gan.py | 378 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 242 | 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 | 360 | CODE | |
| LOW | 03_market_microstructure/09_databento_mbo_analysis.py | 394 | CODE | |
| LOW | 03_market_microstructure/07_itch_stylized_facts.py | 220 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 178 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 224 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 270 | CODE | |
| LOW | 03_market_microstructure/15_itch_lee_ready.py | 389 | CODE | |
| LOW | 03_market_microstructure/17_databento_bar_sampling.py | 409 | 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 | 1016 | CODE | |
| LOW | 03_market_microstructure/10_iex_lob_reconstruction.py | 200 | CODE | |
| LOW | …rket_microstructure/08_databento_lob_reconstruction.py | 478 | CODE | |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 593 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 294 | CODE | |
| LOW | 20_strategy_synthesis/08_recommendations.py | 444 | CODE | |
| LOW | 20_strategy_synthesis/05_portfolio_allocation.py | 755 | CODE | |
| LOW | 20_strategy_synthesis/01_aggregate_synthesis.py | 1168 | CODE | |
| LOW | tests/test_sequence_lookup_reaches_registration.py | 66 | CODE | |
| LOW | tests/add_missing_parameters_cells.py | 44 | CODE | |
| LOW | tests/test_fixture_registry_self_consistency.py | 127 | CODE | |
| LOW | tests/generate_test_microstructure.py | 522 | CODE | |
| LOW | tests/generate_test_microstructure.py | 718 | CODE | |
| LOW | tests/generate_test_microstructure.py | 942 | CODE | |
| LOW | tests/conftest.py | 156 | CODE | |
| LOW | tests/conftest.py | 573 | CODE | |
| LOW | tests/sample_registry_for_tests.py | 518 | CODE | |
| LOW | tests/sample_registry_for_tests.py | 714 | CODE | |
| LOW | tests/test_notebook_output_hygiene.py | 297 | CODE | |
| LOW | tests/test_notebook_output_hygiene.py | 384 | CODE | |
| LOW | tests/test_notebook_output_hygiene.py | 478 | CODE | |
| LOW | tests/test_model_registry.py | 515 | CODE | |
| LOW | tests/test_fixture_prediction_panels.py | 48 | CODE | |
| LOW | tests/test_fixture_prediction_panels.py | 67 | CODE | |
| LOW | tests/test_ch24_agent_contracts.py | 286 | CODE | |
| LOW | tests/test_causal_rows_are_resolvable.py | 59 | CODE | |
| LOW | tests/test_pm_helpers.py | 723 | CODE | |
| LOW | tests/test_pm_helpers.py | 747 | CODE | |
| LOW | tests/test_holdout_boundary.py | 1030 | CODE | |
| LOW | tests/test_leakage_detectors.py | 182 | CODE | |
| LOW | tests/test_leakage_detectors.py | 326 | CODE | |
| LOW | tests/test_eoa_universe_roster.py | 142 | CODE | |
| LOW | tests/pm_helpers.py | 236 | CODE | |
| LOW | tests/pm_helpers.py | 390 | CODE | |
| LOW | tests/pm_helpers.py | 541 | CODE | |
| LOW | tests/pm_helpers.py | 624 | CODE | |
| LOW | tests/pm_helpers.py | 652 | CODE | |
| LOW | tests/pm_helpers.py | 698 | CODE | |
| LOW | tests/pm_helpers.py | 802 | CODE | |
| LOW | tests/generate_intermediates.py | 220 | CODE | |
| LOW | tests/test_fold_resolution.py | 208 | CODE | |
| LOW | tests/test_fold_resolution.py | 290 | CODE | |
| 193 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 | 1163 | # Step 1: Scale(2, dim=0) | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1166 | # Step 2: AddTime | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1169 | # Step 3: LeadLag | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1172 | # Step 4: VisiTrans("I") | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 108 | # ### Step 1: Initial Load (Full History) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 124 | # ### Step 2: Incremental Update (Only New Data) | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 755 | # # Step 1: Standardize without demeaning, then compute native estimates | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 760 | # # Step 2: Apply RAS adjustment | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 769 | # # Step 3: Annualize only after applying the native-unit bound | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 243 | # Step 1: Raw binary from download | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 251 | # Step 2: Parsed messages (single uppercase letter = message type) | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 563 | # Step 1: Intra-sector PCA | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 592 | # Step 2: Cross-sector PCA | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 167 | # ### Step 1: Tree Clustering | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 173 | # ### Step 2: Quasi-Diagonalization | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 177 | # ### Step 3: Recursive Bisection | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 301 | # Step 1: Cluster | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 304 | # Step 2: Quasi-diagonalize | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 307 | # Step 3: Recursive bisection | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 189 | # #### Step 1: Hierarchical Clustering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 212 | # #### Step 2: Leaf Ordering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 242 | # #### Step 3: Recursive Bisection Allocation | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 583 | # Step 1: Apply volume limit | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 587 | # Step 2: Apply market impact | COMMENT |
| LOW⚡ | …efining_the_learning_task/02_preprocessing_pipeline.py | 556 | # ### Step 1: Remove penny stocks | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 571 | # ### Step 2: Domain filters | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 599 | # ### Step 3: Implausibly large one-day moves | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 637 | # ### Step 4: Spike detection | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 250 | # Step 1: Base features | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 256 | # Step 2: Rolling features (backward-looking only) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 267 | # Step 3: Treatment (measured at time t) and outcomes (forward-looking) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 280 | # Step 4: Binary treatment | COMMENT |
| LOW⚡ | 24_autonomous_agents/agent_fixtures.py | 541 | # Step 2: roll forward within the same event series | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 526 | # Step 1: try the pinned ticker | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 553 | # 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 | 1163 | # Step 1: Scale(2, dim=0) | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1166 | # Step 2: AddTime | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1169 | # Step 3: LeadLag | COMMENT |
| LOW⚡ | 05_synthetic_data/03_sigcwgan_signatures.py | 1172 | # Step 4: VisiTrans("I") | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 108 | # ### Step 1: Initial Load (Full History) | COMMENT |
| LOW | 02_financial_data_universe/19_incremental_updates.py | 124 | # ### Step 2: Incremental Update (Only New Data) | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 755 | # # Step 1: Standardize without demeaning, then compute native estimates | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 760 | # # Step 2: Apply RAS adjustment | COMMENT |
| LOW⚡ | 16_strategy_simulation/13_ras_protocol.py | 769 | # # Step 3: Annualize only after applying the native-unit bound | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 243 | # Step 1: Raw binary from download | COMMENT |
| LOW⚡ | 03_market_microstructure/01_itch_parser.py | 251 | # Step 2: Parsed messages (single uppercase letter = message type) | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 563 | # Step 1: Intra-sector PCA | COMMENT |
| LOW | 14_latent_factors/02_eigenportfolios.py | 592 | # Step 2: Cross-sector PCA | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 167 | # ### Step 1: Tree Clustering | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 173 | # ### Step 2: Quasi-Diagonalization | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 177 | # ### Step 3: Recursive Bisection | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 301 | # Step 1: Cluster | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 304 | # Step 2: Quasi-diagonalize | COMMENT |
| LOW⚡ | …_portfolio_construction/06_hierarchical_risk_parity.py | 307 | # Step 3: Recursive bisection | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 189 | # #### Step 1: Hierarchical Clustering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 212 | # #### Step 2: Leaf Ordering | COMMENT |
| LOW | …_portfolio_construction/06_hierarchical_risk_parity.py | 242 | # #### Step 3: Recursive Bisection Allocation | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 583 | # Step 1: Apply volume limit | COMMENT |
| LOW⚡ | 18_transaction_costs/07_ml4t_volume_participation.py | 587 | # Step 2: Apply market impact | COMMENT |
| LOW⚡ | …efining_the_learning_task/02_preprocessing_pipeline.py | 556 | # ### Step 1: Remove penny stocks | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 571 | # ### Step 2: Domain filters | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 599 | # ### Step 3: Implausibly large one-day moves | COMMENT |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 637 | # ### Step 4: Spike detection | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 250 | # Step 1: Base features | COMMENT |
| LOW⚡ | 15_causal_estimation/02_dowhy_causal_graph.py | 256 | # Step 2: Rolling features (backward-looking only) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 267 | # Step 3: Treatment (measured at time t) and outcomes (forward-looking) | COMMENT |
| LOW | 15_causal_estimation/02_dowhy_causal_graph.py | 280 | # Step 4: Binary treatment | COMMENT |
| LOW⚡ | 24_autonomous_agents/agent_fixtures.py | 541 | # Step 2: roll forward within the same event series | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 526 | # Step 1: try the pinned ticker | COMMENT |
| LOW | 24_autonomous_agents/agent_fixtures.py | 553 | # Step 3: static Fed-policy stand-in | COMMENT |
| 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/timegan_metrics.py | 394 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 555 | CODE | |
| LOW | 05_synthetic_data/timegan_metrics.py | 703 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 739 | CODE | |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 843 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 602 | CODE | |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1175 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 767 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 774 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 797 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 808 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 830 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 841 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 889 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 901 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 984 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 991 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 1028 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 1036 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 1079 | CODE | |
| LOW | …_financial_data_universe/22_pandas_polars_benchmark.py | 1097 | CODE | |
| LOW | 16_strategy_simulation/13_ras_protocol.py | 180 | CODE | |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 319 | CODE | |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 1030 | CODE | |
| LOW | 16_strategy_simulation/12_dsr_validation.py | 149 | CODE | |
| LOW | 19_risk_management/10_ml4t_backtest_risk_demo.py | 88 | CODE | |
| LOW | tests/pm_helpers.py | 1521 | CODE | |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 212 | CODE | |
| LOW | …efining_the_learning_task/02_preprocessing_pipeline.py | 335 | CODE | |
| LOW | …earning_task/04_maximum_favorable_adverse_excursion.py | 237 | CODE | |
| LOW | data/futures/loader.py | 12 | CODE | |
| LOW | data/equities/loader.py | 314 | CODE | |
| LOW | case_studies/research/execution.py | 364 | CODE | |
| LOW | case_studies/research/cv.py | 272 | CODE | |
| LOW | case_studies/crypto_perps_funding/research_workflow.py | 538 | 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 | 369 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 413 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 446 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 487 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 544 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 566 | CODE | |
| LOW | case_studies/us_equities_panel/03_financial_features.py | 633 | CODE | |
| LOW | case_studies/utils/deep_learning.py | 2297 | CODE | |
| LOW | case_studies/utils/signals.py | 324 | CODE | |
| LOW | case_studies/utils/sequence_dataset.py | 912 | CODE | |
| LOW | case_studies/utils/coverage.py | 997 | CODE | |
| LOW | case_studies/utils/notebook_render.py | 370 | CODE | |
| LOW | case_studies/utils/tabular_dl.py | 2345 | CODE | |
| LOW | case_studies/utils/tabular_dl.py | 2484 | CODE | |
| LOW | case_studies/utils/backtest_presets.py | 524 | CODE | |
| LOW | case_studies/utils/slot_strategy.py | 228 | CODE | |
| LOW | case_studies/utils/causal.py | 444 | CODE | |
| LOW | case_studies/utils/causal.py | 951 | CODE | |
| 25 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/pm_helpers.py | 1534 | Execute a notebook via Papermill with parameter injection. This is the core test helper. It: 1. Syncs .py -> .i | STRING |
| HIGH | tests/create_test_data.py | 1561 | Copy production's files for one downloaded source, verbatim, and check the minimum. Args: source: Productio | STRING |
| HIGH | utils/paths.py | 168 | Get the directory path for a chapter. Args: chapter: Chapter number (1-27) Returns: Absolute p | STRING |
| HIGH | utils/paths.py | 204 | 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 | 303 | 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 | 622 | Run all data quality checks before modeling. This is the gate between data preparation (labels + features) and | STRING |
| HIGH | utils/storage_benchmarks.py | 331 | 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 | 689 | def _update_pair_position(self, zscore: float, price_a: float, price_b: float, broker) -> None: | CODE |
| LOW | 16_strategy_simulation/05_stateful_strategies.py | 977 | def _update_circuit_state(self, equity: float) -> None: | CODE |
| LOW | tests/test_causal_adapter.py | 171 | def _set_holdout_start(setup_path, value: str) -> None: | CODE |
| LOW | tests/test_weekly_issues.py | 91 | def set_state(self, number: int, state: str, reason: str | None = None) -> None: | CODE |
| LOW⚡ | utils/style.py | 1053 | __all__ = [ | CODE |
| LOW | utils/paths.py | 444 | __all__ = [ | CODE |
| LOW | utils/reproducibility.py | 15 | def set_global_seeds(seed: int = 42) -> None: | CODE |
| LOW | utils/__init__.py | 78 | __all__ = [ | CODE |
| LOW | utils/artifact_specs.py | 217 | __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 | 283 | def _set_tree_writable(root: Path, *, writable: bool) -> None: | CODE |
| LOW | .github/scripts/weekly_issues.py | 279 | def set_state(self, number: int, state: str, reason: str | None = None) -> None: ... | CODE |
| LOW | .github/scripts/weekly_issues.py | 356 | def set_state(self, number: int, state: str, reason: str | None = None) -> None: | CODE |
| LOW | 25_live_trading/10_safety_risk_demo.py | 86 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/13_runtime_safety_showcase.py | 86 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/04_alpaca_paper_trading_demo.py | 448 | def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None: | CODE |
| LOW | 25_live_trading/01_unified_framework_demo.py | 408 | def update_price(self, asset: str, price: float, timestamp: datetime) -> None: | CODE |
| LOW | 25_live_trading/03_ib_paper_trading_demo.py | 85 | logger = logging.getLogger(__name__) | CODE |
| LOW | 25_live_trading/05_alpaca_crypto_live_demo.py | 413 | def update_market(self, timestamp: datetime, prices: dict[str, float]) -> None: | CODE |
| LOW | data/__init__.py | 126 | __all__ = [ | CODE |
| LOW | case_studies/research/__init__.py | 91 | __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 | 36 | __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 | 50 | __all__ = [ | CODE |
| LOW | case_studies/utils/notebook_render.py | 829 | __all__ = [ | STRING |
| LOW | case_studies/utils/runtime.py | 34 | __all__ = [ | CODE |
| LOW | case_studies/utils/uncertainty.py | 1579 | __all__ = [ | CODE |
| LOW | case_studies/utils/artifact_quality.py | 31 | __all__ = [ | CODE |
| LOW | case_studies/utils/derived_params.py | 18 | __all__ = ["DERIVED_PARAM_SIGNIFICANT_DIGITS", "quantize_derived"] | CODE |
| LOW | case_studies/utils/persistent_panel.py | 64 | __all__ = [ | 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 | 41 | __all__ = [ | CODE |
| LOW | case_studies/utils/latent_factors/common.py | 167 | __all__ = [ | CODE |
| LOW | case_studies/utils/latent_factors/case_study.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | case_studies/utils/latent_factors/panel.py | 301 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/registration.py | 44 | 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 | 25 | 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 | 146 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/completeness.py | 653 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/backtest_rekey.py | 48 | __all__ = [ | CODE |
| LOW | case_studies/utils/registry/queries.py | 34 | 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 |
|---|---|---|---|---|
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 1609 | # Check if interpolated values are bounded by adjacent real values (soft check) | COMMENT |
| LOW | 05_synthetic_data/04_gtgan_irregular.py | 187 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/timegan_metrics.py | 232 | # Check if data appears to be normalized to [0, 1] | COMMENT |
| LOW | 05_synthetic_data/05_diffusion_ts.py | 189 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/06_llm_tabular_great.py | 135 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/03_sigcwgan_signatures.py | 1341 | # Check if checkpoint exists and RETRAIN is False | COMMENT |
| 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/07_dp_gan.py | 146 | RETRAIN = False # Set True to retrain even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 88 | RETRAIN = False # Set True to force retraining even if checkpoint exists | CODE |
| LOW | 05_synthetic_data/02_tailgan_tail_risk.py | 561 | # Check if constraint violated: W*v >= e | COMMENT |
| LOW | …nancial_data_universe/21_storage_benchmark_database.py | 1713 | # Check if process started successfully | STRING |
| LOW | …nancial_data_universe/08_options_greeks_computation.py | 250 | # Check if solution exists within bounds | COMMENT |
| LOW | 19_risk_management/07_drift_detection.py | 1646 | # Check if retraining needed | COMMENT |
| LOW | …ket_microstructure/04_itch_order_lifecycle_analysis.py | 128 | # Check if we have message data to analyze | COMMENT |
| LOW | 03_market_microstructure/14_itch_bar_sampling.py | 601 | # Check if we have actual buy/sell variance | COMMENT |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 109 | # Check if we have message data to analyze | COMMENT |
| LOW | 03_market_microstructure/05_itch_trading_activity.py | 648 | # Print message type breakdown | COMMENT |
| LOW | tests/test_model_registry.py | 587 | # Check if this notebook is expected to register (match on suffix) | COMMENT |
| LOW | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 83 | RERUN_EXTRACTION = False # Set True to force LLM re-extraction; False loads cached triples | CODE |
| LOW | utils/data_quality.py | 672 | # Print results | COMMENT |
| LOW⚡ | utils/storage_benchmarks.py | 739 | # Assign quotes to symbols (weighted: some symbols more active) | COMMENT |
| LOW⚡ | utils/storage_benchmarks.py | 804 | # Assign trades to symbols (same distribution as quotes) | COMMENT |
| LOW | 08_financial_features/07_event_studies.py | 186 | # Check if new high | COMMENT |
| LOW | 15_causal_estimation/05_momentum_causal_trading.py | 455 | # Set it to `False` while iterating on the strategy code below, where the causal estimates | COMMENT |
| LOW | data/futures/market/download.py | 234 | # Check if year is complete | COMMENT |
| LOW | data/equities/loader.py | 1370 | # 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 | 697 | # Display results | COMMENT |
| LOW | case_studies/nasdaq100_microstructure/14_backtest.py | 109 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | case_studies/utils/model_analysis.py | 204 | # Check if fold_metrics table exists | STRING |
| LOW | case_studies/utils/registry/store.py | 836 | # Check if backtest_runs table exists at all | COMMENT |
| LOW | case_studies/utils/registry/store.py | 1160 | # Check if this table still has tall format | COMMENT |
| LOW | case_studies/utils/registry/queries.py | 1640 | # Check if stage column exists (the CREATE TABLE IF NOT EXISTS | STRING |
| LOW | …e_studies/sp500_equity_option_analytics/14_backtest.py | 102 | 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 | 98 | FORCE_REBACKTEST = False # Set True to re-backtest even if a complete backtest_hash exists | CODE |
| LOW | 26_mlops_governance/01_drift_monitoring.py | 49 | # Set it to a label and that label is required: the notebook stops rather than monitoring a | COMMENT |
| 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 |
|---|---|---|---|---|
| MEDIUM | 21_rl_execution_hedging/07_backtest_with_impact.py | 335 | # ## Define the Momentum Strategy | COMMENT |
| MEDIUM | 05_synthetic_data/07_dp_gan.py | 399 | # Create a clean discriminator copy for generator training (no DP hooks) | COMMENT |
| MEDIUM | 22_rag_financial_research/05_10k_rag_assistant.py | 362 | # ### Create the Query Interface | COMMENT |
| MEDIUM | tests/smoke.yaml | 8 | # This file is the DECLARATION. The machinery it drives already exists and is not duplicated here: | COMMENT |
| MEDIUM | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 214 | # Define the knowledge graph schema. Each extracted relationship is a | COMMENT |
| MEDIUM | 23_knowledge_graphs/02_supply_chain_kg_construction.py | 1619 | # Create the pyvis network with supplier risk tooltips and compact company | COMMENT |
| MEDIUM | 23_knowledge_graphs/08_8k_event_extraction.py | 335 | # Define the event quadruple structure. | COMMENT |
| MEDIUM | 17_portfolio_construction/08_library_comparison.py | 473 | # Create the portfolio object and pass the already-defined sample moments explicitly. | COMMENT |
| MEDIUM | …transaction_costs/12_commission_slippage_comparison.py | 638 | # ### Define the Equity-Compatible Commission Variants | COMMENT |
| MEDIUM | 07_defining_the_learning_task/03_label_methods.py | 596 | # This method is from De Prado's *Advances in Financial Machine Learning*. | COMMENT |
| MEDIUM | 15_causal_estimation/09_adia_causal_benchmark.py | 155 | # Define the 8 causal categories | COMMENT |
| MEDIUM | 15_causal_estimation/05_momentum_causal_trading.py | 191 | # ### Defining the Market Volatility Regime | COMMENT |
| MEDIUM | case_studies/utils/model_analysis.py | 837 | # 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 | 81 | # OANDA_API_KEY=your-api-key-here | COMMENT |
| HIGH | data/equities/market/microstructure/dataset_card.py | 86 | # DATABENTO_API_KEY=db-your-api-key-here | COMMENT |
| HIGH | data/equities/market/us_equities/dataset_card.py | 80 | # QUANDL_API_KEY=your-api-key-here | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | 09_model_based_features/07_arima_features.py | 263 | # returns as many values as you asked for rather than one per row. The helper passes | COMMENT |
| HIGH | 06_strategy_definition/exploration.md | 35 | ├── figures/ # Book figures (AI-generated + notebook) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/generate_test_data.sh | 31 | # 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 |
|---|---|---|---|---|
| LOW | 05_synthetic_data/07_dp_gan.py | 441 | fake_data = generator(z) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 445 | d_fake = discriminator_private(fake_data) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 469 | fake_data = generator(z) | CODE |
| LOW | 05_synthetic_data/07_dp_gan.py | 472 | d_fake = discriminator_for_g(fake_data) | CODE |
| LOW⚡ | tests/test_pm_helpers.py | 147 | monkeypatch.setenv("ML4T_FAKE_KEY", "Jane Doe jane@example.org") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_notebook_output_hygiene.py | 689 | py_source = "# %% [markdown]\n# Some prose.\n\n\ndef helper():\n return 1\n" | CODE |
| LOW⚡ | tests/test_notebook_output_hygiene.py | 694 | "source": ["Some prose.\n", "\n", "def helper():\n", " return 1\n"], | CODE |
| LOW | tests/test_notebook_output_hygiene.py | 708 | {"cell_type": "code", "source": ["def helper():\n", " return 1\n"], "metadata": {}}, | CODE |
| 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 |
| 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 |