Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github.com/microsoft/RD-Agent to automate R&D process.
623 matches across 14 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 1 | |
| LOW | qlib/config.py | 14 | |
| LOW | qlib/typehint.py | 13 | |
| LOW | qlib/typehint.py | 13 | |
| LOW | qlib/typehint.py | 15 | |
| LOW | qlib/typehint.py | 15 | |
| LOW | qlib/utils/__init__.py | 6 | |
| LOW | qlib/utils/__init__.py | 7 | |
| LOW | qlib/utils/__init__.py | 28 | |
| LOW | qlib/utils/__init__.py | 28 | |
| LOW | qlib/utils/__init__.py | 28 | |
| LOW | qlib/utils/__init__.py | 28 | |
| LOW | qlib/utils/__init__.py | 35 | |
| LOW | qlib/utils/__init__.py | 939 | |
| LOW | qlib/utils/__init__.py | 939 | |
| LOW | qlib/utils/__init__.py | 939 | |
| LOW | qlib/utils/__init__.py | 939 | |
| LOW | qlib/utils/__init__.py | 939 | |
| LOW | qlib/utils/index_data.py | 12 | |
| LOW | qlib/contrib/evaluate_portfolio.py | 5 | |
| LOW | qlib/contrib/evaluate_portfolio.py | 6 | |
| LOW | qlib/contrib/evaluate.py | 4 | |
| LOW | qlib/contrib/evaluate.py | 5 | |
| LOW | qlib/contrib/tuner/pipeline.py | 10 | |
| LOW | qlib/contrib/tuner/pipeline.py | 11 | |
| LOW | qlib/contrib/tuner/launcher.py | 11 | |
| LOW | qlib/contrib/tuner/launcher.py | 12 | |
| LOW | qlib/contrib/tuner/tuner.py | 14 | |
| LOW | qlib/contrib/meta/__init__.py | 4 | |
| LOW | qlib/contrib/meta/__init__.py | 4 | |
| LOW | qlib/contrib/meta/__init__.py | 4 | |
| LOW | qlib/contrib/meta/data_selection/__init__.py | 4 | |
| LOW | qlib/contrib/meta/data_selection/__init__.py | 4 | |
| LOW | qlib/contrib/meta/data_selection/__init__.py | 5 | |
| LOW | qlib/contrib/workflow/__init__.py | 3 | |
| LOW | qlib/contrib/workflow/__init__.py | 4 | |
| LOW | qlib/contrib/model/pytorch_gru.py | 4 | |
| LOW | qlib/contrib/model/pytorch_gru.py | 5 | |
| LOW | qlib/contrib/model/pytorch_localformer_ts.py | 5 | |
| LOW | qlib/contrib/model/pytorch_localformer_ts.py | 6 | |
| LOW | qlib/contrib/model/pytorch_lstm.py | 5 | |
| LOW | qlib/contrib/model/pytorch_lstm.py | 6 | |
| LOW | qlib/contrib/model/pytorch_tabnet.py | 3 | |
| LOW | qlib/contrib/model/pytorch_tabnet.py | 4 | |
| LOW | qlib/contrib/model/pytorch_nn.py | 5 | |
| LOW | qlib/contrib/model/pytorch_nn.py | 6 | |
| LOW | qlib/contrib/model/pytorch_localformer.py | 5 | |
| LOW | qlib/contrib/model/pytorch_localformer.py | 6 | |
| LOW | qlib/contrib/model/pytorch_lstm_ts.py | 5 | |
| LOW | qlib/contrib/model/pytorch_lstm_ts.py | 6 | |
| LOW | qlib/contrib/model/pytorch_tcts.py | 5 | |
| LOW | qlib/contrib/model/pytorch_tcts.py | 6 | |
| LOW | qlib/contrib/model/pytorch_gru_ts.py | 5 | |
| LOW | qlib/contrib/model/pytorch_gru_ts.py | 6 | |
| LOW | qlib/contrib/model/pytorch_gats.py | 5 | |
| LOW | qlib/contrib/model/pytorch_gats.py | 6 | |
| LOW | qlib/contrib/model/pytorch_transformer.py | 5 | |
| LOW | qlib/contrib/model/pytorch_transformer.py | 6 | |
| LOW | qlib/contrib/model/pytorch_sfm.py | 4 | |
| LOW | qlib/contrib/model/pytorch_sfm.py | 5 | |
| 236 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/log.py | 227 | def set_global_logger_level_cm(level: int): |
| LOW | qlib/tests/config.py | 112 | def get_record_xgboost_config(dataset_kwargs={}, handler_kwargs={"instruments": CSI300_MARKET}): |
| LOW | qlib/tests/data.py | 203 | def _get_file_name_with_version(qlib_version, dataset_version): |
| LOW | qlib/utils/resam.py | 72 | def get_higher_eq_freq_feature(instruments, fields, start_time=None, end_time=None, freq="day", disk_cache=1): |
| LOW | qlib/utils/__init__.py | 359 | def normalize_cache_instruments(instruments): |
| LOW | qlib/utils/file.py | 96 | def unpack_archive_with_buffer(buffer, format="gztar"): |
| LOW | qlib/utils/mod.py | 25 | def get_module_by_module_path(module_path: Union[str, ModuleType]): |
| LOW | qlib/contrib/evaluate_portfolio.py | 17 | def _get_position_value_from_df(evaluate_date, position, close_data_df): |
| LOW | qlib/contrib/evaluate_portfolio.py | 105 | def get_daily_return_series_from_positions(positions, init_asset_value): |
| LOW | qlib/contrib/evaluate_portfolio.py | 122 | def get_annual_return_from_positions(positions, init_asset_value): |
| LOW | qlib/contrib/evaluate_portfolio.py | 143 | def get_annaul_return_from_return_series(r, method="ci"): |
| LOW | qlib/contrib/evaluate_portfolio.py | 159 | def get_sharpe_ratio_from_return_series(r, risk_free_rate=0.00, method="ci"): |
| LOW | qlib/contrib/evaluate_portfolio.py | 178 | def get_max_drawdown_from_series(r): |
| LOW | qlib/contrib/evaluate_portfolio.py | 225 | def get_volatility_from_series(r): |
| LOW | qlib/contrib/rolling/ddgda.py | 179 | def _dump_data_for_proxy_model(self): |
| LOW | qlib/contrib/rolling/base.py | 123 | def _replace_handler_with_cache(self, task: dict): |
| LOW | qlib/contrib/meta/data_selection/utils.py | 67 | def preds_to_weight_with_clamp(preds, clip_weight=None, clip_method="tanh"): |
| LOW | qlib/contrib/report/graph.py | 70 | def get_instance_with_graph_parameters(graph_type: str = None, **kwargs): |
| LOW | qlib/contrib/report/analysis_position/rank_label.py | 14 | def _get_figure_with_position( |
| LOW | …/contrib/report/analysis_position/cumulative_return.py | 15 | def _get_cum_return_data_with_position( |
| LOW | …/contrib/report/analysis_position/cumulative_return.py | 89 | def _get_figure_with_position( |
| LOW | qlib/contrib/report/analysis_position/risk_analysis.py | 15 | def _get_risk_analysis_data_with_report( |
| LOW | qlib/contrib/report/analysis_position/risk_analysis.py | 57 | def _get_monthly_risk_analysis_with_report(report_normal_df: pd.DataFrame) -> pd.DataFrame: |
| LOW | qlib/contrib/report/analysis_position/risk_analysis.py | 95 | def _get_monthly_analysis_with_feature(monthly_df: pd.DataFrame, feature: str = "annualized_return") -> pd.DataFrame: |
| LOW | qlib/contrib/report/analysis_position/risk_analysis.py | 112 | def _get_risk_analysis_figure(analysis_df: pd.DataFrame) -> Iterable[py.Figure]: |
| LOW | qlib/contrib/report/analysis_position/risk_analysis.py | 129 | def _get_monthly_risk_analysis_figure(report_normal_df: pd.DataFrame) -> Iterable[py.Figure]: |
| LOW | qlib/contrib/data/highfreq_handler.py | 48 | def get_normalized_price_feature(price_field, shift=0): |
| LOW | qlib/contrib/data/highfreq_handler.py | 151 | def get_normalized_price_feature(price_field, shift=0): |
| LOW | qlib/contrib/data/highfreq_handler.py | 350 | def get_normalized_price_feature(price_field, shift=0): |
| LOW | qlib/contrib/data/highfreq_handler.py | 366 | def get_normalized_vwap_price_feature(price_field, shift=0): |
| LOW | qlib/contrib/strategy/order_generator.py | 16 | def generate_order_list_from_target_weight_position( |
| LOW | qlib/contrib/strategy/order_generator.py | 54 | def generate_order_list_from_target_weight_position( |
| LOW | qlib/contrib/strategy/order_generator.py | 146 | def generate_order_list_from_target_weight_position( |
| LOW | qlib/contrib/strategy/cost_control.py | 47 | def generate_target_weight_position(self, score, current, trade_start_time, trade_end_time, **kwargs): |
| LOW | qlib/contrib/strategy/signal_strategy.py | 330 | def generate_target_weight_position(self, score, current, trade_start_time, trade_end_time): |
| LOW | qlib/contrib/strategy/signal_strategy.py | 462 | def generate_target_weight_position(self, score, current, trade_start_time, trade_end_time): |
| LOW | qlib/backtest/profit_attribution.py | 72 | def decompose_portofolio_weight(stock_weight_df, stock_group_df): |
| LOW | qlib/backtest/exchange.py | 534 | def generate_amount_position_from_weight_position( |
| LOW | qlib/backtest/exchange.py | 611 | def generate_order_for_target_amount_position( |
| LOW | qlib/backtest/exchange.py | 679 | def calculate_amount_position_value( |
| LOW | qlib/backtest/exchange.py | 712 | def _get_factor_or_raise_error( |
| LOW | qlib/backtest/exchange.py | 761 | def round_amount_by_trade_unit( |
| LOW | qlib/backtest/exchange.py | 834 | def _get_buy_amount_by_cash_limit(self, trade_price: float, cash: float, cost_ratio: float) -> float: |
| LOW | qlib/backtest/exchange.py | 859 | def _calc_trade_info_by_order( |
| LOW | qlib/backtest/report.py | 150 | def get_latest_total_turnover(self) -> Any: |
| LOW | qlib/backtest/report.py | 153 | def update_portfolio_metrics_record( |
| LOW | qlib/backtest/report.py | 203 | def generate_portfolio_metrics_dataframe(self) -> pd.DataFrame: |
| LOW | qlib/backtest/report.py | 330 | def _update_order_fulfill_rate(self) -> None: |
| LOW | qlib/backtest/report.py | 524 | def _agg_order_price_advantage(self) -> None: |
| LOW | qlib/backtest/report.py | 570 | def _cal_trade_price_advantage(self, method: str = "mean") -> Optional[BaseSingleMetric]: |
| LOW | qlib/backtest/report.py | 650 | def generate_trade_indicators_dataframe(self) -> pd.DataFrame: |
| LOW | qlib/backtest/executor.py | 501 | def _retrieve_orders_from_decision(trade_decision: BaseTradeDecision) -> List[Order]: |
| LOW | qlib/workflow/utils.py | 31 | def experiment_exception_hook(exc_type, value, tb): |
| LOW | qlib/workflow/task/utils.py | 283 | def replace_task_handler_with_cache(task: dict, cache_dir: Union[str, Path] = ".") -> dict: |
| LOW | qlib/model/riskmodel/shrink.py | 115 | def _get_shrink_target_const_var(self, X: np.ndarray, S: np.ndarray) -> np.ndarray: |
| LOW | qlib/model/riskmodel/shrink.py | 126 | def _get_shrink_target_const_corr(self, X: np.ndarray, S: np.ndarray) -> np.ndarray: |
| LOW | qlib/model/riskmodel/shrink.py | 141 | def _get_shrink_target_single_factor(self, X: np.ndarray, S: np.ndarray) -> np.ndarray: |
| LOW | qlib/model/riskmodel/shrink.py | 188 | def _get_shrink_param_lw_const_var(self, X: np.ndarray, S: np.ndarray, F: np.ndarray) -> float: |
| LOW | qlib/model/riskmodel/shrink.py | 205 | def _get_shrink_param_lw_const_corr(self, X: np.ndarray, S: np.ndarray, F: np.ndarray) -> float: |
| LOW | qlib/model/riskmodel/shrink.py | 231 | def _get_shrink_param_lw_single_factor(self, X: np.ndarray, S: np.ndarray, F: np.ndarray) -> float: |
| 63 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | qlib/contrib/strategy/rule_strategy.py | 0 | parameters ---------- outer_trade_decision : basetradedecision, optional |
| HIGH | qlib/contrib/strategy/rule_strategy.py | 0 | parameters ---------- outer_trade_decision : basetradedecision, optional |
| HIGH | qlib/contrib/strategy/rule_strategy.py | 0 | parameters ---------- outer_trade_decision : basetradedecision, optional |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | qlib/data/storage/storage.py | 0 | raises ------ valueerror if the data(storage) does not exist, raise valueerror |
| HIGH | scripts/data_collector/index.py | 0 | get history trading date returns ------- calendar list |
| HIGH | scripts/data_collector/cn_index/collector.py | 0 | get history trading date returns ------- calendar list |
| HIGH | scripts/data_collector/us_index/collector.py | 0 | get history trading date returns ------- calendar list |
| HIGH | scripts/data_collector/index.py | 0 | returns ------- pd.dataframe: symbol start_date end_date sh600000 2000-01-01 2099-12-31 dtypes: symbol: str start_date: |
| HIGH | scripts/data_collector/cn_index/collector.py | 0 | returns ------- pd.dataframe: symbol start_date end_date sh600000 2000-01-01 2099-12-31 dtypes: symbol: str start_date: |
| HIGH | scripts/data_collector/cn_index/collector.py | 0 | returns ------- pd.dataframe: symbol start_date end_date sh600000 2000-01-01 2099-12-31 dtypes: symbol: str start_date: |
| HIGH | scripts/data_collector/index.py | 0 | get companies changes returns ------- pd.dataframe: symbol date type sh600000 2019-11-11 add sh600000 2020-11-10 remove |
| HIGH | scripts/data_collector/cn_index/collector.py | 0 | get companies changes returns ------- pd.dataframe: symbol date type sh600000 2019-11-11 add sh600000 2020-11-10 remove |
| HIGH | scripts/data_collector/us_index/collector.py | 0 | get companies changes returns ------- pd.dataframe: symbol date type sh600000 2019-11-11 add sh600000 2020-11-10 remove |
| HIGH | scripts/data_collector/index.py | 0 | formatting the datetime in an instrument parameters ---------- inst_df: pd.dataframe inst_df.columns = [self.symbol_fiel |
| HIGH | scripts/data_collector/cn_index/collector.py | 0 | formatting the datetime in an instrument parameters ---------- inst_df: pd.dataframe inst_df.columns = [self.symbol_fiel |
| HIGH | scripts/data_collector/us_index/collector.py | 0 | formatting the datetime in an instrument parameters ---------- inst_df: pd.dataframe inst_df.columns = [self.symbol_fiel |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/__init__.py | 25 | |
| LOW | qlib/__init__.py | 87 | |
| LOW | qlib/__init__.py | 243 | |
| LOW | qlib/utils/time.py | 32 | |
| LOW | qlib/utils/time.py | 73 | |
| LOW | qlib/utils/time.py | 258 | |
| LOW | qlib/utils/resam.py | 12 | |
| LOW | qlib/utils/paral.py | 211 | |
| LOW | qlib/utils/__init__.py | 71 | |
| LOW | qlib/utils/__init__.py | 758 | |
| LOW | qlib/utils/index_data.py | 253 | |
| LOW | qlib/utils/file.py | 16 | |
| LOW | qlib/utils/mod.py | 122 | |
| LOW | qlib/utils/data.py | 70 | |
| LOW | qlib/contrib/torch.py | 14 | |
| LOW | qlib/contrib/rolling/ddgda.py | 128 | |
| LOW | qlib/contrib/meta/data_selection/model.py | 74 | |
| LOW | qlib/contrib/meta/data_selection/dataset.py | 386 | |
| LOW | qlib/contrib/meta/data_selection/utils.py | 67 | |
| LOW | qlib/contrib/model/pytorch_gru.py | 209 | |
| LOW | qlib/contrib/model/pytorch_adarnn.py | 563 | |
| LOW | qlib/contrib/model/pytorch_nn.py | 190 | |
| LOW | qlib/contrib/model/pytorch_utils.py | 7 | |
| LOW | qlib/contrib/model/pytorch_tra.py | 738 | |
| LOW | qlib/contrib/model/pytorch_tra.py | 176 | |
| LOW | qlib/contrib/model/gbdt.py | 28 | |
| LOW | qlib/contrib/report/data/ana.py | 45 | |
| LOW | qlib/contrib/data/dataset.py | 280 | |
| LOW | qlib/contrib/data/utils/sepdf.py | 193 | |
| LOW | qlib/contrib/data/utils/sepdf.py | 94 | |
| LOW | qlib/contrib/data/utils/sepdf.py | 160 | |
| LOW | qlib/contrib/strategy/rule_strategy.py | 157 | |
| LOW | qlib/contrib/strategy/signal_strategy.py | 138 | |
| LOW | qlib/backtest/signal.py | 88 | |
| LOW | qlib/backtest/exchange.py | 859 | |
| LOW | qlib/backtest/decision.py | 117 | |
| LOW | qlib/backtest/high_performance_ds.py | 184 | |
| LOW | qlib/backtest/report.py | 455 | |
| LOW | qlib/workflow/expm.py | 365 | |
| LOW | qlib/workflow/exp.py | 287 | |
| LOW | qlib/workflow/record_temp.py | 81 | |
| LOW | qlib/workflow/task/collect.py | 184 | |
| LOW | qlib/workflow/task/gen.py | 187 | |
| LOW | qlib/workflow/task/manage.py | 485 | |
| LOW | qlib/data/cache.py | 507 | |
| LOW | qlib/data/cache.py | 952 | |
| LOW | qlib/data/dataset/handler.py | 633 | |
| LOW | qlib/data/dataset/loader.py | 156 | |
| LOW | qlib/data/dataset/loader.py | 271 | |
| LOW | qlib/data/dataset/storage.py | 113 | |
| LOW | qlib/data/storage/file_storage.py | 261 | |
| LOW | qlib/data/storage/file_storage.py | 346 | |
| LOW | qlib/rl/interpreter.py | 101 | |
| LOW | qlib/rl/utils/data_queue.py | 167 | |
| LOW | qlib/rl/utils/finite_env.py | 39 | |
| LOW | qlib/rl/contrib/naive_config_parser.py | 31 | |
| LOW | qlib/rl/order_execution/simulator_simple.py | 147 | |
| LOW | examples/run_all_model.py | 134 | |
| LOW | examples/benchmarks/TRA/src/model.py | 566 | |
| LOW | examples/benchmarks/TRA/src/dataset.py | 219 | |
| 12 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/log.py | 172 | except Exception: |
| LOW | qlib/__init__.py | 163 | except Exception as e: |
| LOW | qlib/utils/__init__.py | 235 | except Exception as e: |
| LOW | qlib/utils/file.py | 140 | except Exception as e: |
| LOW | qlib/contrib/model/pytorch_alstm_ts.py | 321 | except Exception as e: |
| MEDIUM | qlib/contrib/model/pytorch_alstm_ts.py | 318 | def _build_model(self): |
| LOW | qlib/contrib/model/pytorch_alstm.py | 307 | except Exception as e: |
| MEDIUM | qlib/contrib/model/pytorch_alstm.py | 304 | def _build_model(self): |
| LOW | qlib/contrib/data/dataset.py | 174 | except Exception: |
| LOW | qlib/contrib/strategy/optimizer/enhanced_indexing.py | 173 | except Exception as e: |
| LOW | qlib/contrib/strategy/optimizer/enhanced_indexing.py | 185 | except Exception as e: |
| LOW | qlib/workflow/recorder.py | 436 | except Exception as e: |
| LOW | qlib/workflow/__init__.py | 92 | except Exception as e: |
| LOW | qlib/data/client.py | 46 | except Exception as e: |
| LOW | qlib/data/client.py | 85 | except Exception as e: |
| LOW | qlib/data/cache.py | 237 | except Exception as e: |
| LOW | qlib/data/cache.py | 534 | except Exception: |
| LOW | qlib/data/base.py | 194 | except Exception as e: |
| LOW | qlib/data/data.py | 860 | except Exception as e: |
| MEDIUM | qlib/data/data.py | 392 | def get_expression_instance(self, field): |
| LOW | qlib/rl/contrib/backtest.py | 74 | except Exception: |
| LOW | examples/orderbook_data/create_dataset.py | 94 | except Exception: |
| LOW | examples/orderbook_data/create_dataset.py | 150 | except Exception as e: |
| LOW | examples/orderbook_data/create_dataset.py | 238 | except Exception as e: |
| LOW | scripts/dump_bin.py | 526 | except Exception: |
| LOW | scripts/check_dump_bin.py | 106 | except Exception as e: |
| LOW | scripts/data_collector/utils.py | 251 | except Exception as e: |
| LOW | scripts/data_collector/utils.py | 343 | except Exception as e: |
| LOW | scripts/data_collector/utils.py | 483 | except Exception as e: |
| LOW | scripts/data_collector/utils.py | 547 | except Exception as e: |
| LOW | scripts/data_collector/utils.py | 755 | except Exception: |
| LOW | scripts/data_collector/base.py | 85 | except Exception as e: |
| LOW | scripts/data_collector/base.py | 293 | except Exception: |
| LOW | scripts/data_collector/crypto/collector.py | 39 | except Exception as e: |
| LOW | scripts/data_collector/crypto/collector.py | 43 | except Exception as e: |
| LOW | scripts/data_collector/crypto/collector.py | 148 | except Exception as e: |
| MEDIUM | scripts/data_collector/crypto/collector.py | 35 | def _get_coingecko(): |
| LOW | scripts/data_collector/br_index/collector.py | 228 | except Exception as E: |
| LOW | scripts/data_collector/br_index/collector.py | 276 | except Exception as E: |
| LOW | scripts/data_collector/yahoo/collector.py | 146 | except Exception as e: |
| LOW | scripts/data_collector/yahoo/collector.py | 239 | except Exception as e: |
| LOW | scripts/data_collector/fund/collector.py | 127 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | qlib/contrib/strategy/signal_strategy.py | 448 | if not factor_exp.index.equals(specific_risk.index): |
| HIGH | qlib/contrib/strategy/optimizer/optimizer.py | 90 | assert r.index.equals(index), "`r` has mismatched index" |
| HIGH | qlib/contrib/strategy/optimizer/optimizer.py | 97 | assert w0.index.equals(index), "`w0` has mismatched index" |
| HIGH | tests/data_mid_layer_tests/test_handler.py | 18 | self.assertTrue(dh._data.equals(df)) |
| HIGH | tests/data_mid_layer_tests/test_handler.py | 28 | self.assertTrue(dh_d._data.equals(df)) |
| HIGH | examples/run_all_model.py | 342 | f"conda install -y --prefix {env_path} anaconda cudatoolkit=10.0 && conda install -y --prefix {env_p |
| HIGH | scripts/collect_info.py | 14 | `cd scripts && python collect_info.py all` |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | qlib/utils/serial.py | 137 | Load the serializable class from a filepath. Args: filepath (str): the path of file |
| HIGH | qlib/utils/pickle_utils.py | 73 | Override find_class to restrict allowed classes. Args: module: Module name of the class |
| HIGH | qlib/utils/pickle_utils.py | 100 | Safely load a pickle file with restricted classes. This is a drop-in replacement for pickle.load() that prevents |
| HIGH | qlib/utils/pickle_utils.py | 122 | Safely load a pickle from bytes with restricted classes. This is a drop-in replacement for pickle.loads() that prev |
| HIGH | qlib/workflow/recorder.py | 414 | Load object such as prediction file or model checkpoint in mlflow. Args: name (str): the o |
| HIGH | examples/benchmarks/TFT/libs/hyperparam_opt.py | 189 | Updates the results from last optimisation run. Args: parameters: Hyperparameters used in optimisatio |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | qlib/contrib/meta/data_selection/net.py | 74 | self.twm.linear.bias.data.fill_(0.0) |
| CRITICAL | examples/benchmarks_dynamic/DDG-DA/vis_data.py | 48 | pd.DataFrame(meta_m.tn.twm.linear.weight.detach().numpy()).T[0].plot() |
| CRITICAL | examples/benchmarks_dynamic/DDG-DA/vis_data.py | 50 | pd.DataFrame(meta_m.tn.twm.linear.weight.detach().numpy()).T[0].rolling(5).mean().plot() |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | qlib/contrib/rolling/ddgda.py | 259 | # 1) leverage the simplified proxy forecasting model to train meta model. |
| MEDIUM | qlib/contrib/strategy/rule_strategy.py | 135 | # 1. Supporting leverage the get_range_limit result from the decision |
| MEDIUM | qlib/contrib/strategy/rule_strategy.py | 303 | # 1. Supporting leverage the get_range_limit result from the decision |
| MEDIUM | qlib/contrib/strategy/rule_strategy.py | 385 | # 1. Supporting leverage the get_range_limit result from the decision |
| MEDIUM | qlib/contrib/strategy/signal_strategy.py | 77 | # 1. Supporting leverage the get_range_limit result from the decision |
| MEDIUM | qlib/contrib/strategy/signal_strategy.py | 145 | # So it only leverage the first col of signal |
| MEDIUM | qlib/contrib/strategy/signal_strategy.py | 300 | # 1. Supporting leverage the get_range_limit result from the decision |
| MEDIUM | qlib/contrib/strategy/optimizer/optimizer.py | 229 | # no shorting and leverage |
| MEDIUM | qlib/backtest/signal.py | 63 | # the latest signal leverage more recent data and therefore is used in trading. |
| MEDIUM | qlib/model/base.py | 18 | """leverage Python syntactic sugar to make the models' behaviors like functions""" |
| MEDIUM | examples/benchmarks/TFT/libs/tft_model.py | 275 | # Use same value layer to facilitate interp |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/config.py | 141 | "expression_provider": "LocalExpressionProvider", |
| LOW | qlib/contrib/tuner/__init__.py | 1 | # pylint: skip-file |
| LOW | qlib/contrib/rolling/ddgda.py | 381 | # 3) meta model will be stored in `DDG-DA` |
| LOW | qlib/contrib/meta/data_selection/dataset.py | 201 | # 2009-01-05 2009-02-06 0.145809 |
| LOW | qlib/backtest/decision.py | 61 | start_time: pd.Timestamp |
| LOW | qlib/backtest/executor.py | 441 | # - Normally, user will create a strategy and embed it into Qlib's executor and simulator interaction |
| LOW | qlib/data/data.py | 761 | ] |
| LOW | qlib/data/_libs/__init__.py | 1 | # Copyright (c) Microsoft Corporation. |
| LOW | qlib/rl/reward.py | 61 | # weight: float |
| LOW | qlib/rl/reward.py | 81 | # rewards[name] = (rew.reward.build(), rew.weight) |
| LOW | qlib/rl/utils/env_wrapper.py | 101 | seed_iterator: Optional[Iterable[InitialStateType]], |
| LOW | qlib/strategy/__init__.py | 1 | # Copyright (c) Microsoft Corporation. |
| LOW | docs/conf.py | 1 | # Copyright (c) Microsoft Corporation. |
| LOW | docs/conf.py | 61 | # |version| and |release|, also used in various other places throughout the |
| LOW | docs/conf.py | 101 | # a list of builtin themes. |
| LOW | docs/conf.py | 161 | # |
| LOW | examples/benchmarks/TFT/expt_settings/configs.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/expt_settings/__init__.py | 1 | # coding=utf-8 |
| LOW | …amples/benchmarks/TFT/data_formatters/qlib_Alpha158.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/data_formatters/__init__.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/data_formatters/base.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/libs/hyperparam_opt.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/libs/__init__.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/libs/tft_model.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/TFT/libs/utils.py | 1 | # coding=utf-8 |
| LOW | examples/benchmarks/LightGBM/multi_freq_handler.py | 61 | # close0 open0 low0 ... vwap1 vwap16 LABEL0 |
| LOW | examples/benchmarks/LightGBM/multi_freq_handler.py | 81 | |
| LOW | examples/benchmarks/LightGBM/multi_freq_handler.py | 101 | # fields: Ref(Mean($close, 15), 225), ..., Mean($close, 15) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | qlib/utils/file.py | 60 | >>> # The following code will create an archive file('~/tmp/test_file') containing 'test_doc_i'(i is 0-10) files |
| MEDIUM | qlib/utils/file.py | 113 | >>> # The following code is to print all the file names in 'test_unpack.tar.gz' |
| MEDIUM | qlib/workflow/online/manager.py | 358 | # This method is not implemented in the proper way!!! |
| MEDIUM | qlib/data/dataset/handler.py | 287 | # This method is extracted for sharing in subclasses |
| MEDIUM | tests/test_workflow.py | 12 | # Creating the directory manually doesn't work with mlflow, |
| MEDIUM | docs/conf.py | 8 | # This file is execfile()d with the current directory set to its |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/utils/index_data.py | 111 | # Check if all elements in idx_list are of the same type |
| LOW | qlib/utils/index_data.py | 114 | # Check if all elements in idx_list are of the same datetime64 precision |
| LOW | …amples/benchmarks/TFT/data_formatters/qlib_Alpha158.py | 138 | # Set all to str so that we don't have mixed integer/string columns |
| LOW | scripts/data_collector/utils.py | 223 | # Check if response contains valid data |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/data_mid_layer_tests/test_dataloader.py | 32 | # Of course you can use StaticDataLoader |
| MEDIUM | tests/data_mid_layer_tests/test_dataloader.py | 56 | # Then you can use it wth DataHandler; |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | qlib/workflow/task/manage.py | 485 | def run_task( |
| LOW | qlib/data/dataset/handler.py | 552 | def process_data(self, with_fit: bool = False): |