SYMBOL INDEX (4030 symbols across 277 files) FILE: examples/benchmarks/LightGBM/features_resample_N.py class ResampleNProcessor (line 10) | class ResampleNProcessor(InstProcessor): method __init__ (line 11) | def __init__(self, target_frq: str, **kwargs): method __call__ (line 14) | def __call__(self, df: pd.DataFrame, *args, **kwargs): FILE: examples/benchmarks/LightGBM/features_sample.py class Resample1minProcessor (line 7) | class Resample1minProcessor(InstProcessor): method __init__ (line 10) | def __init__(self, hour: int, minute: int, **kwargs): method __call__ (line 14) | def __call__(self, df: pd.DataFrame, *args, **kwargs): FILE: examples/benchmarks/LightGBM/multi_freq_handler.py class Avg15minLoader (line 10) | class Avg15minLoader(QlibDataLoader): method load (line 11) | def load(self, instruments=None, start_time=None, end_time=None) -> pd... class Avg15minHandler (line 19) | class Avg15minHandler(DataHandlerLP): method __init__ (line 20) | def __init__( method loader_config (line 50) | def loader_config(self): FILE: examples/benchmarks/TFT/data_formatters/base.py class DataTypes (line 36) | class DataTypes(enum.IntEnum): class InputTypes (line 44) | class InputTypes(enum.IntEnum): class GenericDataFormatter (line 55) | class GenericDataFormatter(abc.ABC): method set_scalers (line 64) | def set_scalers(self, df): method transform_inputs (line 69) | def transform_inputs(self, df): method format_predictions (line 74) | def format_predictions(self, df): method split_data (line 79) | def split_data(self, df): method _column_definition (line 85) | def _column_definition(self): method get_fixed_params (line 90) | def get_fixed_params(self): method num_classes_per_cat_input (line 116) | def num_classes_per_cat_input(self): method get_num_samples_for_calibration (line 123) | def get_num_samples_for_calibration(self): method get_column_definition (line 134) | def get_column_definition(self): method _get_input_columns (line 165) | def _get_input_columns(self): method _get_tft_input_indices (line 169) | def _get_tft_input_indices(self): method get_experiment_params (line 201) | def get_experiment_params(self): FILE: examples/benchmarks/TFT/data_formatters/qlib_Alpha158.py class Alpha158Formatter (line 31) | class Alpha158Formatter(GenericDataFormatter): method __init__ (line 70) | def __init__(self): method split_data (line 79) | def split_data(self, df, valid_boundary=2016, test_boundary=2018): method set_scalers (line 104) | def set_scalers(self, df): method transform_inputs (line 147) | def transform_inputs(self, df): method format_predictions (line 183) | def format_predictions(self, predictions): method get_fixed_params (line 204) | def get_fixed_params(self): method get_default_model_params (line 217) | def get_default_model_params(self): FILE: examples/benchmarks/TFT/expt_settings/configs.py class ExperimentConfig (line 28) | class ExperimentConfig: method __init__ (line 44) | def __init__(self, experiment="volatility", root_folder=None): method data_csv_path (line 72) | def data_csv_path(self): method hyperparam_iterations (line 80) | def hyperparam_iterations(self): method make_data_formatter (line 83) | def make_data_formatter(self): FILE: examples/benchmarks/TFT/libs/hyperparam_opt.py class HyperparamOptManager (line 38) | class HyperparamOptManager: method __init__ (line 51) | def __init__(self, param_ranges, fixed_params, model_folder, override_... method load_results (line 79) | def load_results(self): method _get_params_from_name (line 105) | def _get_params_from_name(self, name): method get_best_params (line 117) | def get_best_params(self): method clear (line 124) | def clear(self): method _check_params (line 131) | def _check_params(self, params): method _get_name (line 143) | def _get_name(self, params): method get_next_parameters (line 153) | def get_next_parameters(self, ranges_to_skip=None): method update_score (line 188) | def update_score(self, parameters, loss, model, info=""): class DistributedHyperparamOptManager (line 229) | class DistributedHyperparamOptManager(HyperparamOptManager): method __init__ (line 232) | def __init__( method optimisation_completed (line 299) | def optimisation_completed(self): method get_next_parameters (line 302) | def get_next_parameters(self): method load_serialised_hyperparam_df (line 316) | def load_serialised_hyperparam_df(self): method update_serialised_hyperparam_df (line 336) | def update_serialised_hyperparam_df(self): method _generate_full_hyperparam_df (line 354) | def _generate_full_hyperparam_df(self): method clear (line 377) | def clear(self): # reset when cleared method load_results (line 382) | def load_results(self): method _get_worker_search_queue (line 395) | def _get_worker_search_queue(self): method assign_worker_numbers (line 408) | def assign_worker_numbers(self, df): FILE: examples/benchmarks/TFT/libs/tft_model.py function linear_layer (line 55) | def linear_layer(size, activation=None, use_time_distributed=False, use_... function apply_mlp (line 70) | def apply_mlp( function apply_gating_layer (line 96) | def apply_gating_layer(x, hidden_layer_size, dropout_rate=None, use_time... function add_and_norm (line 126) | def add_and_norm(x_list): function gated_residual_network (line 140) | def gated_residual_network( function get_decoder_mask (line 194) | def get_decoder_mask(self_attn_inputs): class ScaledDotProductAttention (line 206) | class ScaledDotProductAttention: method __init__ (line 215) | def __init__(self, attn_dropout=0.0): method __call__ (line 219) | def __call__(self, q, k, v, mask): class InterpretableMultiHeadAttention (line 242) | class InterpretableMultiHeadAttention: method __init__ (line 258) | def __init__(self, n_head, d_model, dropout): method __call__ (line 286) | def __call__(self, q, k, v, mask=None): class TFTDataCache (line 323) | class TFTDataCache: method update (line 329) | def update(cls, data, key): method get (line 339) | def get(cls, key): method contains (line 344) | def contains(cls, key): class TemporalFusionTransformer (line 351) | class TemporalFusionTransformer: method __init__ (line 383) | def __init__(self, raw_params, use_cudnn=False): method get_tft_embeddings (line 441) | def get_tft_embeddings(self, all_inputs): method _get_single_col_by_type (line 554) | def _get_single_col_by_type(self, input_type): method training_data_cached (line 559) | def training_data_cached(self): method cache_batched_data (line 564) | def cache_batched_data(self, data, cache_key, num_samples=-1): method _batch_sampled_data (line 580) | def _batch_sampled_data(self, data, max_samples): method _batch_data (line 651) | def _batch_data(self, data): method _get_active_locations (line 709) | def _get_active_locations(self, x): method _build_base_graph (line 713) | def _build_base_graph(self): method build_model (line 947) | def build_model(self): method fit (line 1014) | def fit(self, train_df=None, valid_df=None): method evaluate (line 1081) | def evaluate(self, data=None, eval_metric="loss"): method predict (line 1114) | def predict(self, df, return_targets=False): method get_attention (line 1164) | def get_attention(self, df): method reset_temp_folder (line 1224) | def reset_temp_folder(self): method get_keras_saved_path (line 1231) | def get_keras_saved_path(self, model_folder): method save (line 1235) | def save(self, model_folder): method load (line 1247) | def load(self, model_folder, use_keras_loadings=False): method get_hyperparm_choices (line 1267) | def get_hyperparm_choices(cls): FILE: examples/benchmarks/TFT/libs/utils.py function get_single_col_by_input_type (line 28) | def get_single_col_by_input_type(input_type, column_definition): function extract_cols_from_data_type (line 44) | def extract_cols_from_data_type(data_type, column_definition, excluded_i... function tensorflow_quantile_loss (line 59) | def tensorflow_quantile_loss(y, y_pred, quantile): function numpy_normalised_quantile_loss (line 86) | def numpy_normalised_quantile_loss(y, y_pred, quantile): function create_folder_if_not_exist (line 112) | def create_folder_if_not_exist(directory): function get_default_tensorflow_config (line 123) | def get_default_tensorflow_config(tf_device="gpu", gpu_id=0): function save (line 153) | def save(tf_session, model_folder, cp_name, scope=None): function load (line 175) | def load(tf_session, model_folder, cp_name, scope=None, verbose=False): function print_weights_in_checkpoint (line 212) | def print_weights_in_checkpoint(model_folder, cp_name): FILE: examples/benchmarks/TFT/tft.py function get_shifted_label (line 79) | def get_shifted_label(data_df, shifts=5, col_shift="LABEL0"): function fill_test_na (line 83) | def fill_test_na(test_df): function process_qlib_data (line 93) | def process_qlib_data(df, dataset, fillna=False): function process_predicted (line 122) | def process_predicted(df, col_name): function format_score (line 140) | def format_score(forecast_df, col_name="pred", label_shift=5): function transform_df (line 147) | def transform_df(df, col_name="LABEL0"): class TFTModel (line 153) | class TFTModel(ModelFT): method __init__ (line 156) | def __init__(self, **kwargs): method _prepare_data (line 161) | def _prepare_data(self, dataset: DatasetH): method fit (line 167) | def fit(self, dataset: DatasetH, MODEL_FOLDER="qlib_tft_model", USE_GP... method predict (line 251) | def predict(self, dataset): method finetune (line 285) | def finetune(self, dataset: DatasetH): method to_pickle (line 295) | def to_pickle(self, path: Union[Path, str]): FILE: examples/benchmarks/TRA/example.py function main (line 8) | def main(seed, config_file="configs/config_alstm.yaml"): FILE: examples/benchmarks/TRA/src/dataset.py function _to_tensor (line 14) | def _to_tensor(x): function _create_ts_slices (line 20) | def _create_ts_slices(index, seq_len): function _get_date_parse_fn (line 50) | def _get_date_parse_fn(target): class MTSDatasetH (line 70) | class MTSDatasetH(DatasetH): method __init__ (line 85) | def __init__( method setup_data (line 111) | def setup_data(self, handler_kwargs: dict = None, **kwargs): method _prepare_seg (line 147) | def _prepare_seg(self, slc, **kwargs): method restore_index (line 177) | def restore_index(self, index): method assign_data (line 182) | def assign_data(self, index, vals): method clear_memory (line 190) | def clear_memory(self): method train (line 194) | def train(self): method eval (line 198) | def eval(self): method _get_slices (line 204) | def _get_slices(self): method __len__ (line 213) | def __len__(self): method __iter__ (line 219) | def __iter__(self): FILE: examples/benchmarks/TRA/src/model.py class TRAModel (line 26) | class TRAModel(Model): method __init__ (line 27) | def __init__( method train_epoch (line 94) | def train_epoch(self, data_set): method test_epoch (line 146) | def test_epoch(self, data_set, return_pred=False): method fit (line 203) | def fit(self, dataset, evals_result=dict()): method predict (line 314) | def predict(self, dataset, segment="test"): class LSTM (line 326) | class LSTM(nn.Module): method __init__ (line 340) | def __init__( method forward (line 377) | def forward(self, x): class PositionalEncoding (line 396) | class PositionalEncoding(nn.Module): method __init__ (line 398) | def __init__(self, d_model, dropout=0.1, max_len=5000): method forward (line 410) | def forward(self, x): class Transformer (line 415) | class Transformer(nn.Module): method __init__ (line 428) | def __init__( method forward (line 459) | def forward(self, x): class TRA (line 475) | class TRA(nn.Module): method __init__ (line 489) | def __init__(self, input_size, num_states=1, hidden_size=8, tau=1.0, s... method forward (line 507) | def forward(self, hidden, hist_loss): function evaluate (line 535) | def evaluate(pred): function average_params (line 546) | def average_params(params_list): function shoot_infs (line 566) | def shoot_infs(inp_tensor): function sinkhorn (line 585) | def sinkhorn(Q, n_iters=3, epsilon=0.01): FILE: examples/benchmarks_dynamic/DDG-DA/vis_data.py function show_linear_weight (line 86) | def show_linear_weight(exp): FILE: examples/benchmarks_dynamic/DDG-DA/workflow.py class DDGDABench (line 17) | class DDGDABench(DDGDA): method __init__ (line 26) | def __init__(self, conf_path: Union[str, Path] = DEFAULT_CONF, horizon... FILE: examples/benchmarks_dynamic/baseline/rolling_benchmark.py class RollingBenchmark (line 16) | class RollingBenchmark(Rolling): method __init__ (line 22) | def __init__(self, conf_path: Union[str, Path] = DEFAULT_CONF, horizon... FILE: examples/highfreq/highfreq_handler.py class HighFreqHandler (line 5) | class HighFreqHandler(DataHandlerLP): method __init__ (line 6) | def __init__( method get_feature_config (line 38) | def get_feature_config(self): class HighFreqBacktestHandler (line 104) | class HighFreqBacktestHandler(DataHandler): method __init__ (line 105) | def __init__( method get_feature_config (line 126) | def get_feature_config(self): FILE: examples/highfreq/highfreq_ops.py class DayLast (line 11) | class DayLast(ElemOperator): method _load_internal (line 25) | def _load_internal(self, instrument, start_index, end_index, freq): class FFillNan (line 31) | class FFillNan(ElemOperator): method _load_internal (line 45) | def _load_internal(self, instrument, start_index, end_index, freq): class BFillNan (line 50) | class BFillNan(ElemOperator): method _load_internal (line 64) | def _load_internal(self, instrument, start_index, end_index, freq): class Date (line 69) | class Date(ElemOperator): method _load_internal (line 83) | def _load_internal(self, instrument, start_index, end_index, freq): class Select (line 89) | class Select(PairOperator): method _load_internal (line 106) | def _load_internal(self, instrument, start_index, end_index, freq): class IsNull (line 112) | class IsNull(ElemOperator): method _load_internal (line 126) | def _load_internal(self, instrument, start_index, end_index, freq): class Cut (line 131) | class Cut(ElemOperator): method __init__ (line 149) | def __init__(self, feature, l=None, r=None): method _load_internal (line 157) | def _load_internal(self, instrument, start_index, end_index, freq): method get_extended_window_size (line 161) | def get_extended_window_size(self): FILE: examples/highfreq/highfreq_processor.py class HighFreqNorm (line 8) | class HighFreqNorm(Processor): method __init__ (line 9) | def __init__(self, fit_start_time, fit_end_time): method fit (line 13) | def fit(self, df_features): method __call__ (line 36) | def __call__(self, df_features): FILE: examples/highfreq/workflow.py class HighfreqWorkflow (line 20) | class HighfreqWorkflow: method _init_qlib (line 83) | def _init_qlib(self): method _prepare_calender_cache (line 91) | def _prepare_calender_cache(self): method get_data (line 99) | def get_data(self): method dump_and_load_dataset (line 114) | def dump_and_load_dataset(self): FILE: examples/hyperparameter/LightGBM/hyperparameter_158.py function objective (line 9) | def objective(trial): FILE: examples/hyperparameter/LightGBM/hyperparameter_360.py function objective (line 11) | def objective(trial): FILE: examples/model_rolling/task_manager_rolling.py class RollingTaskExample (line 24) | class RollingTaskExample: method __init__ (line 25) | def __init__( method reset (line 55) | def reset(self): method task_generating (line 63) | def task_generating(self): method task_training (line 72) | def task_training(self, tasks): method worker (line 76) | def worker(self): method task_collecting (line 82) | def task_collecting(self): method main (line 106) | def main(self): FILE: examples/nested_decision_execution/workflow.py class NestedDecisionExecutionWorkflow (line 112) | class NestedDecisionExecutionWorkflow: method _init_qlib (line 222) | def _init_qlib(self): method _train_model (line 233) | def _train_model(self, model, dataset): method backtest (line 244) | def backtest(self): method collect_data (line 275) | def collect_data(self): method check_diff_freq (line 305) | def check_diff_freq(self): method backtest_only_daily (line 319) | def backtest_only_daily(self): FILE: examples/online_srv/online_management_simulate.py class OnlineSimulationExample (line 24) | class OnlineSimulationExample: method __init__ (line 25) | def __init__( method reset (line 83) | def reset(self): method main (line 91) | def main(self): method worker (line 124) | def worker(self): FILE: examples/online_srv/rolling_online_management.py class RollingOnlineExample (line 25) | class RollingOnlineExample: method __init__ (line 26) | def __init__( method worker (line 66) | def worker(self): method reset (line 77) | def reset(self): method first_run (line 88) | def first_run(self): method routine (line 98) | def routine(self): method add_strategy (line 110) | def add_strategy(self): method main (line 128) | def main(self): FILE: examples/online_srv/update_online_pred.py class UpdatePredExample (line 27) | class UpdatePredExample: method __init__ (line 28) | def __init__( method first_train (line 36) | def first_train(self): method update_online_pred (line 40) | def update_online_pred(self): method main (line 43) | def main(self): FILE: examples/orderbook_data/create_dataset.py function get_library_name (line 45) | def get_library_name(doc_type): function is_stock (line 52) | def is_stock(exchange_place, code): function add_one_stock_daily_data (line 60) | def add_one_stock_daily_data(filepath, type, exchange_place, arc, date): function add_one_stock_daily_data_wrapper (line 137) | def add_one_stock_daily_data_wrapper(filepath, type, exchange_place, ind... function add_data (line 161) | def add_data(tick_date, doc_type, stock_name_dict): class DSCreator (line 246) | class DSCreator: method clear (line 249) | def clear(self): method initialize_library (line 253) | def initialize_library(self): method _get_empty_folder (line 258) | def _get_empty_folder(self, fp: Path): method import_data (line 264) | def import_data(self, doc_type_l=["Tick", "Transaction", "Order"]): FILE: examples/orderbook_data/example.py class TestClass (line 10) | class TestClass(unittest.TestCase): method setUp (line 17) | def setUp(self): method test_basic (line 43) | def test_basic(self): method test_basic_without_time (line 54) | def test_basic_without_time(self): method test_basic01 (line 58) | def test_basic01(self): method test_basic02 (line 68) | def test_basic02(self): method test_basic03 (line 78) | def test_basic03(self): method total_func (line 98) | def total_func(name, method): method test_exp_01 (line 101) | def test_exp_01(self): method test_exp_02 (line 113) | def test_exp_02(self): method test_exp_03 (line 130) | def test_exp_03(self): method test_exp_04 (line 144) | def test_exp_04(self): method test_exp_05 (line 155) | def test_exp_05(self): method test_exp_06 (line 167) | def test_exp_06(self): method expr7_init (line 199) | def expr7_init(funccode, ordercode, time_interval): method test_exp_07_1 (line 204) | def test_exp_07_1(self): method test_exp_07_2 (line 219) | def test_exp_07_2(self): method expr7_3_init (line 236) | def expr7_3_init(funccode, code, time_interval): method test_exp_08_1 (line 241) | def test_exp_08_1(self): method test_exp_08_2 (line 257) | def test_exp_08_2(self): method test_exp_09_trans (line 275) | def test_exp_09_trans(self): method test_exp_09_order (line 285) | def test_exp_09_order(self): method test_exp_10 (line 298) | def test_exp_10(self): FILE: examples/portfolio/prepare_riskdata.py function prepare_data (line 11) | def prepare_data(riskdata_root="./riskdata", T=240, start_time="2016-01-... FILE: examples/rl_order_execution/scripts/gen_training_orders.py function generate_order (line 14) | def generate_order(stock: str, start_idx: int, end_idx: int) -> bool: FILE: examples/rolling_process_data/rolling_handler.py class RollingDataHandler (line 6) | class RollingDataHandler(DataHandlerLP): method __init__ (line 7) | def __init__( FILE: examples/rolling_process_data/workflow.py class RollingDataWorkflow (line 15) | class RollingDataWorkflow: method _init_qlib (line 21) | def _init_qlib(self): method _dump_pre_handler (line 27) | def _dump_pre_handler(self, path): method _load_pre_handler (line 43) | def _load_pre_handler(self, path): method rolling_process (line 48) | def rolling_process(self): FILE: examples/run_all_model.py function only_allow_defined_args (line 28) | def only_allow_defined_args(function_to_decorate): function handler (line 45) | def handler(signum, frame): function cal_mean_std (line 53) | def cal_mean_std(results) -> dict: function create_env (line 65) | def create_env(): function execute (line 79) | def execute(cmd, wait_when_err=False, raise_err=True): function get_all_folders (line 100) | def get_all_folders(models, exclude) -> dict: function get_all_files (line 120) | def get_all_files(folder_path, dataset, universe="") -> (str, str): function get_all_results (line 134) | def get_all_results(folders) -> dict: function gen_and_save_md_table (line 170) | def gen_and_save_md_table(metrics, dataset): function gen_yaml_file_without_seed_kwargs (line 189) | def gen_yaml_file_without_seed_kwargs(yaml_path, temp_dir): class ModelRunner (line 208) | class ModelRunner: method _init_qlib (line 209) | def _init_qlib(self, exp_folder_name): method run (line 225) | def run( method _collect_results (line 383) | def _collect_results(self, exp_folder_name, dataset): FILE: qlib/__init__.py function init (line 25) | def init(default_conf="client", **kwargs): function _mount_nfs_uri (line 87) | def _mount_nfs_uri(provider_uri, mount_path, auto_mount: bool = False): function init_from_yaml_conf (line 188) | def init_from_yaml_conf(conf_path, **kwargs): function get_project_path (line 205) | def get_project_path(config_name="config.yaml", cur_path: Union[Path, st... function auto_init (line 243) | def auto_init(**kwargs): FILE: qlib/backtest/__init__.py function get_exchange (line 33) | def get_exchange( function create_account_instance (line 113) | def create_account_instance( function get_strategy_executor (line 177) | def get_strategy_executor( function backtest (line 217) | def backtest( function collect_data (line 279) | def collect_data( function format_decisions (line 312) | def format_decisions( FILE: qlib/backtest/account.py class AccumulatedInfo (line 35) | class AccumulatedInfo: method __init__ (line 41) | def __init__(self) -> None: method reset (line 44) | def reset(self) -> None: method add_return_value (line 49) | def add_return_value(self, value: float) -> None: method add_cost (line 52) | def add_cost(self, value: float) -> None: method add_turnover (line 55) | def add_turnover(self, value: float) -> None: method get_return (line 59) | def get_return(self) -> float: method get_cost (line 63) | def get_cost(self) -> float: method get_turnover (line 67) | def get_turnover(self) -> float: class Account (line 71) | class Account: method __init__ (line 79) | def __init__( method init_vars (line 111) | def init_vars(self, init_cash: float, position_dict: dict, freq: str, ... method is_port_metr_enabled (line 132) | def is_port_metr_enabled(self) -> bool: method reset_report (line 138) | def reset_report(self, freq: str, benchmark_config: dict) -> None: method reset (line 155) | def reset( method get_hist_positions (line 177) | def get_hist_positions(self) -> Dict[pd.Timestamp, BasePosition]: method get_cash (line 180) | def get_cash(self) -> float: method _update_state_from_order (line 183) | def _update_state_from_order(self, order: Order, trade_val: float, cos... method update_order (line 203) | def update_order(self, order: Order, trade_val: float, cost: float, tr... method update_current_position (line 225) | def update_current_position( method update_portfolio_metrics (line 250) | def update_portfolio_metrics(self, trade_start_time: pd.Timestamp, tra... method update_hist_positions (line 293) | def update_hist_positions(self, trade_start_time: pd.Timestamp) -> None: method update_indicator (line 303) | def update_indicator( method update_bar_end (line 338) | def update_bar_end( method get_portfolio_metrics (line 405) | def get_portfolio_metrics(self) -> Tuple[pd.DataFrame, dict]: method get_trade_indicator (line 415) | def get_trade_indicator(self) -> Indicator: FILE: qlib/backtest/backtest.py function backtest_loop (line 25) | def backtest_loop( function collect_data_loop (line 52) | def collect_data_loop( FILE: qlib/backtest/decision.py class OrderDir (line 30) | class OrderDir(IntEnum): class Order (line 37) | class Order: method __post_init__ (line 83) | def __post_init__(self) -> None: method amount_delta (line 90) | def amount_delta(self) -> float: method deal_amount_delta (line 99) | def deal_amount_delta(self) -> float: method sign (line 108) | def sign(self) -> int: method parse_dir (line 117) | def parse_dir(direction: Union[str, int, np.integer, OrderDir, np.ndar... method key_by_day (line 139) | def key_by_day(self) -> tuple: method key (line 144) | def key(self) -> tuple: method date (line 149) | def date(self) -> pd.Timestamp: class OrderHelper (line 154) | class OrderHelper: method __init__ (line 162) | def __init__(self, exchange: Exchange) -> None: method create (line 166) | def create( class TradeRange (line 206) | class TradeRange: method __call__ (line 208) | def __call__(self, trade_calendar: TradeCalendarManager) -> Tuple[int,... method clip_time_range (line 235) | def clip_time_range(self, start_time: pd.Timestamp, end_time: pd.Times... class IdxTradeRange (line 252) | class IdxTradeRange(TradeRange): method __init__ (line 253) | def __init__(self, start_idx: int, end_idx: int) -> None: method __call__ (line 257) | def __call__(self, trade_calendar: TradeCalendarManager | None = None)... method clip_time_range (line 260) | def clip_time_range(self, start_time: pd.Timestamp, end_time: pd.Times... class TradeRangeByTime (line 264) | class TradeRangeByTime(TradeRange): method __init__ (line 267) | def __init__(self, start_time: str | time, end_time: str | time) -> None: method __call__ (line 286) | def __call__(self, trade_calendar: TradeCalendarManager) -> Tuple[int,... method clip_time_range (line 294) | def clip_time_range(self, start_time: pd.Timestamp, end_time: pd.Times... class BaseTradeDecision (line 302) | class BaseTradeDecision(Generic[DecisionType]): method __init__ (line 318) | def __init__(self, strategy: BaseStrategy, trade_range: Union[Tuple[in... method get_decision (line 344) | def get_decision(self) -> List[DecisionType]: method update (line 361) | def update(self, trade_calendar: TradeCalendarManager) -> Optional[Bas... method _get_range_limit (line 385) | def _get_range_limit(self, **kwargs: Any) -> Tuple[int, int]: method get_range_limit (line 391) | def get_range_limit(self, **kwargs: Any) -> Tuple[int, int]: method get_data_cal_range_limit (line 452) | def get_data_cal_range_limit(self, rtype: str = "full", raise_error: b... method empty (line 508) | def empty(self) -> bool: method mod_inner_decision (line 518) | def mod_inner_decision(self, inner_trade_decision: BaseTradeDecision) ... class EmptyTradeDecision (line 539) | class EmptyTradeDecision(BaseTradeDecision[object]): method get_decision (line 540) | def get_decision(self) -> List[object]: method empty (line 543) | def empty(self) -> bool: class TradeDecisionWO (line 547) | class TradeDecisionWO(BaseTradeDecision[Order]): method __init__ (line 553) | def __init__( method get_decision (line 569) | def get_decision(self) -> List[Order]: method __repr__ (line 572) | def __repr__(self) -> str: class TradeDecisionWithDetails (line 581) | class TradeDecisionWithDetails(TradeDecisionWO): method __init__ (line 587) | def __init__( FILE: qlib/backtest/exchange.py class Exchange (line 28) | class Exchange: method __init__ (line 38) | def __init__( method get_quote_from_qlib (line 201) | def get_quote_from_qlib(self) -> None: method _get_limit_type (line 262) | def _get_limit_type(self, limit_threshold: Union[tuple, float, None]) ... method _update_limit (line 273) | def _update_limit(self, limit_threshold: Union[Tuple, float, None]) ->... method _get_vol_limit (line 295) | def _get_vol_limit(volume_threshold: Union[tuple, dict, None]) -> Tupl... method check_stock_limit (line 338) | def check_stock_limit( method check_stock_suspended (line 378) | def check_stock_suspended( method is_stock_tradable (line 404) | def is_stock_tradable( method check_order (line 417) | def check_order(self, order: Order) -> bool: method deal_order (line 421) | def deal_order( method get_quote_info (line 465) | def get_quote_info( method get_close (line 475) | def get_close( method get_volume (line 484) | def get_volume( method get_deal_price (line 494) | def get_deal_price( method get_factor (line 516) | def get_factor( method generate_amount_position_from_weight_position (line 534) | def generate_amount_position_from_weight_position( method get_real_deal_amount (line 589) | def get_real_deal_amount(self, current_amount: float, target_amount: f... method generate_order_for_target_amount_position (line 611) | def generate_order_for_target_amount_position( method calculate_amount_position_value (line 679) | def calculate_amount_position_value( method _get_factor_or_raise_error (line 712) | def _get_factor_or_raise_error( method get_amount_of_trade_unit (line 728) | def get_amount_of_trade_unit( method round_amount_by_trade_unit (line 761) | def round_amount_by_trade_unit( method _clip_amount_by_volume (line 786) | def _clip_amount_by_volume(self, order: Order, dealt_order_amount: dic... method _get_buy_amount_by_cash_limit (line 834) | def _get_buy_amount_by_cash_limit(self, trade_price: float, cash: floa... method _calc_trade_info_by_order (line 859) | def _calc_trade_info_by_order( method get_order_helper (line 954) | def get_order_helper(self) -> OrderHelper: FILE: qlib/backtest/executor.py class BaseExecutor (line 22) | class BaseExecutor: method __init__ (line 25) | def __init__( method reset_common_infra (line 127) | def reset_common_infra(self, common_infra: CommonInfrastructure, copy_... method trade_exchange (line 152) | def trade_exchange(self) -> Exchange: method trade_calendar (line 157) | def trade_calendar(self) -> TradeCalendarManager: method reset (line 164) | def reset(self, common_infra: CommonInfrastructure | None = None, **kw... method get_level_infra (line 177) | def get_level_infra(self) -> LevelInfrastructure: method finished (line 180) | def finished(self) -> bool: method execute (line 183) | def execute(self, trade_decision: BaseTradeDecision, level: int = 0) -... method _collect_data (line 206) | def _collect_data( method collect_data (line 227) | def collect_data( method get_all_executors (line 305) | def get_all_executors(self) -> List[BaseExecutor]: class NestedExecutor (line 310) | class NestedExecutor(BaseExecutor): method __init__ (line 317) | def __init__( method reset_common_infra (line 375) | def reset_common_infra(self, common_infra: CommonInfrastructure, copy_... method _init_sub_trading (line 389) | def _init_sub_trading(self, trade_decision: BaseTradeDecision) -> None: method _update_trade_decision (line 396) | def _update_trade_decision(self, trade_decision: BaseTradeDecision) ->... method _collect_data (line 406) | def _collect_data( method post_inner_exe_step (line 485) | def post_inner_exe_step(self, inner_exe_res: List[object]) -> None: method get_all_executors (line 496) | def get_all_executors(self) -> List[BaseExecutor]: function _retrieve_orders_from_decision (line 501) | def _retrieve_orders_from_decision(trade_decision: BaseTradeDecision) ->... class SimulatorExecutor (line 513) | class SimulatorExecutor(BaseExecutor): method __init__ (line 528) | def __init__( method _get_order_iterator (line 561) | def _get_order_iterator(self, trade_decision: BaseTradeDecision) -> Li... method _collect_data (line 590) | def _collect_data(self, trade_decision: BaseTradeDecision, level: int ... FILE: qlib/backtest/high_performance_ds.py class BaseQuote (line 23) | class BaseQuote: method __init__ (line 24) | def __init__(self, quote_df: pd.DataFrame, freq: str) -> None: method get_all_stock (line 27) | def get_all_stock(self) -> Iterable: method get_data (line 38) | def get_data( class PandasQuote (line 103) | class PandasQuote(BaseQuote): method __init__ (line 104) | def __init__(self, quote_df: pd.DataFrame, freq: str) -> None: method get_all_stock (line 111) | def get_all_stock(self): method get_data (line 114) | def get_data(self, stock_id, start_time, end_time, field, method=None): class NumpyQuote (line 128) | class NumpyQuote(BaseQuote): method __init__ (line 129) | def __init__(self, quote_df: pd.DataFrame, freq: str, region: str = "c... method get_all_stock (line 152) | def get_all_stock(self): method get_data (line 156) | def get_data(self, stock_id, start_time, end_time, field, method=None): method _agg_data (line 184) | def _agg_data(data: IndexData, method: str) -> Union[IndexData, np.nda... class BaseSingleMetric (line 207) | class BaseSingleMetric: method __init__ (line 213) | def __init__(self, metric: Union[dict, pd.Series]): method __add__ (line 230) | def __add__(self, other: Union[BaseSingleMetric, int, float]) -> BaseS... method __radd__ (line 233) | def __radd__(self, other: Union[BaseSingleMetric, int, float]) -> Base... method __sub__ (line 236) | def __sub__(self, other: Union[BaseSingleMetric, int, float]) -> BaseS... method __rsub__ (line 239) | def __rsub__(self, other: Union[BaseSingleMetric, int, float]) -> Base... method __mul__ (line 242) | def __mul__(self, other: Union[BaseSingleMetric, int, float]) -> BaseS... method __truediv__ (line 245) | def __truediv__(self, other: Union[BaseSingleMetric, int, float]) -> B... method __eq__ (line 248) | def __eq__(self, other: object) -> BaseSingleMetric: method __gt__ (line 251) | def __gt__(self, other: Union[BaseSingleMetric, int, float]) -> BaseSi... method __lt__ (line 254) | def __lt__(self, other: Union[BaseSingleMetric, int, float]) -> BaseSi... method __len__ (line 257) | def __len__(self) -> int: method sum (line 260) | def sum(self) -> float: method mean (line 263) | def mean(self) -> float: method count (line 266) | def count(self) -> int: method abs (line 271) | def abs(self) -> BaseSingleMetric: method empty (line 275) | def empty(self) -> bool: method add (line 280) | def add(self, other: BaseSingleMetric, fill_value: float = None) -> Ba... method replace (line 285) | def replace(self, replace_dict: dict) -> BaseSingleMetric: method apply (line 290) | def apply(self, func: Callable) -> BaseSingleMetric: class BaseOrderIndicator (line 298) | class BaseOrderIndicator: method __init__ (line 310) | def __init__(self): method assign (line 314) | def assign(self, col: str, metric: Union[dict, pd.Series]) -> None: method transfer (line 334) | def transfer(self, func: Callable, new_col: str = None) -> Optional[Ba... method get_metric_series (line 362) | def get_metric_series(self, metric: str) -> pd.Series: method get_index_data (line 379) | def get_index_data(self, metric: str) -> SingleData: method sum_all_indicators (line 396) | def sum_all_indicators( method to_series (line 420) | def to_series(self) -> Dict[Text, pd.Series]: class SingleMetric (line 436) | class SingleMetric(BaseSingleMetric): method __init__ (line 437) | def __init__(self, metric): method __add__ (line 440) | def __add__(self, other): method __sub__ (line 448) | def __sub__(self, other): method __rsub__ (line 456) | def __rsub__(self, other): method __mul__ (line 464) | def __mul__(self, other): method __truediv__ (line 472) | def __truediv__(self, other): method __eq__ (line 480) | def __eq__(self, other): method __gt__ (line 488) | def __gt__(self, other): method __lt__ (line 496) | def __lt__(self, other): method __len__ (line 504) | def __len__(self): class PandasSingleMetric (line 508) | class PandasSingleMetric(SingleMetric): method __init__ (line 511) | def __init__(self, metric: Union[dict, pd.Series] = {}): method sum (line 519) | def sum(self): method mean (line 522) | def mean(self): method count (line 525) | def count(self): method abs (line 528) | def abs(self): method empty (line 532) | def empty(self): method index (line 536) | def index(self): method add (line 539) | def add(self, other: BaseSingleMetric, fill_value: float = None) -> Pa... method replace (line 543) | def replace(self, replace_dict: dict) -> PandasSingleMetric: method apply (line 546) | def apply(self, func: Callable) -> PandasSingleMetric: method reindex (line 549) | def reindex(self, index: Any, fill_value: float) -> PandasSingleMetric: method __repr__ (line 552) | def __repr__(self): class PandasOrderIndicator (line 556) | class PandasOrderIndicator(BaseOrderIndicator): method __init__ (line 563) | def __init__(self) -> None: method assign (line 567) | def assign(self, col: str, metric: Union[dict, pd.Series]) -> None: method get_index_data (line 570) | def get_index_data(self, metric: str) -> SingleData: method get_metric_series (line 576) | def get_metric_series(self, metric: str) -> Union[pd.Series]: method to_series (line 582) | def to_series(self): method sum_all_indicators (line 586) | def sum_all_indicators( method __repr__ (line 600) | def __repr__(self): class NumpyOrderIndicator (line 604) | class NumpyOrderIndicator(BaseOrderIndicator): method __init__ (line 611) | def __init__(self) -> None: method assign (line 615) | def assign(self, col: str, metric: dict) -> None: method get_index_data (line 618) | def get_index_data(self, metric: str) -> SingleData: method get_metric_series (line 624) | def get_metric_series(self, metric: str) -> Union[pd.Series]: method to_series (line 627) | def to_series(self) -> Dict[str, pd.Series]: method sum_all_indicators (line 634) | def sum_all_indicators( method __repr__ (line 657) | def __repr__(self): FILE: qlib/backtest/position.py class BasePosition (line 16) | class BasePosition: method __init__ (line 22) | def __init__(self, *args: Any, cash: float = 0.0, **kwargs: Any) -> None: method fill_stock_value (line 26) | def fill_stock_value(self, start_time: Union[str, pd.Timestamp], freq:... method skip_update (line 29) | def skip_update(self) -> bool: method check_stock (line 41) | def check_stock(self, stock_id: str) -> bool: method update_order (line 57) | def update_order(self, order: Order, trade_val: float, cost: float, tr... method update_stock_price (line 72) | def update_stock_price(self, stock_id: str, price: float) -> None: method calculate_stock_value (line 86) | def calculate_stock_value(self) -> float: method calculate_value (line 97) | def calculate_value(self) -> float: method get_stock_list (line 100) | def get_stock_list(self) -> List[str]: method get_stock_price (line 106) | def get_stock_price(self, code: str) -> float: method get_stock_amount (line 117) | def get_stock_amount(self, code: str) -> float: method get_cash (line 133) | def get_cash(self, include_settle: bool = False) -> float: method get_stock_amount_dict (line 148) | def get_stock_amount_dict(self) -> dict: method get_stock_weight_dict (line 159) | def get_stock_weight_dict(self, only_stock: bool = False) -> dict: method add_count_all (line 178) | def add_count_all(self, bar: str) -> None: method update_weight_all (line 189) | def update_weight_all(self) -> None: method settle_start (line 201) | def settle_start(self, settle_type: str) -> None: method settle_commit (line 218) | def settle_commit(self) -> None: method __str__ (line 224) | def __str__(self) -> str: method __repr__ (line 227) | def __repr__(self) -> str: class Position (line 231) | class Position(BasePosition): method __init__ (line 245) | def __init__(self, cash: float = 0, position_dict: Dict[str, Union[Dic... method fill_stock_value (line 280) | def fill_stock_value(self, start_time: Union[str, pd.Timestamp], freq:... method _init_stock (line 324) | def _init_stock(self, stock_id: str, amount: float, price: float | Non... method _buy_stock (line 342) | def _buy_stock(self, stock_id: str, trade_val: float, cost: float, tra... method _sell_stock (line 352) | def _sell_stock(self, stock_id: str, trade_val: float, cost: float, tr... method _del_stock (line 384) | def _del_stock(self, stock_id: str) -> None: method check_stock (line 387) | def check_stock(self, stock_id: str) -> bool: method update_order (line 390) | def update_order(self, order: Order, trade_val: float, cost: float, tr... method update_stock_price (line 401) | def update_stock_price(self, stock_id: str, price: float) -> None: method update_stock_count (line 404) | def update_stock_count(self, stock_id: str, bar: str, count: float) ->... method update_stock_weight (line 407) | def update_stock_weight(self, stock_id: str, weight: float) -> None: method calculate_stock_value (line 410) | def calculate_stock_value(self) -> float: method calculate_value (line 417) | def calculate_value(self) -> float: method get_stock_list (line 422) | def get_stock_list(self) -> List[str]: method get_stock_price (line 426) | def get_stock_price(self, code: str) -> float: method get_stock_amount (line 429) | def get_stock_amount(self, code: str) -> float: method get_stock_count (line 432) | def get_stock_count(self, code: str, bar: str) -> float: method get_stock_weight (line 439) | def get_stock_weight(self, code: str) -> float: method get_cash (line 442) | def get_cash(self, include_settle: bool = False) -> float: method get_stock_amount_dict (line 448) | def get_stock_amount_dict(self) -> dict: method get_stock_weight_dict (line 456) | def get_stock_weight_dict(self, only_stock: bool = False) -> dict: method add_count_all (line 474) | def add_count_all(self, bar: str) -> None: method update_weight_all (line 482) | def update_weight_all(self) -> None: method settle_start (line 487) | def settle_start(self, settle_type: str) -> None: method settle_commit (line 493) | def settle_commit(self) -> None: class InfPosition (line 503) | class InfPosition(BasePosition): method skip_update (line 510) | def skip_update(self) -> bool: method check_stock (line 514) | def check_stock(self, stock_id: str) -> bool: method update_order (line 518) | def update_order(self, order: Order, trade_val: float, cost: float, tr... method update_stock_price (line 521) | def update_stock_price(self, stock_id: str, price: float) -> None: method calculate_stock_value (line 524) | def calculate_stock_value(self) -> float: method calculate_value (line 533) | def calculate_value(self) -> float: method get_stock_list (line 536) | def get_stock_list(self) -> List[str]: method get_stock_price (line 539) | def get_stock_price(self, code: str) -> float: method get_stock_amount (line 543) | def get_stock_amount(self, code: str) -> float: method get_cash (line 546) | def get_cash(self, include_settle: bool = False) -> float: method get_stock_amount_dict (line 549) | def get_stock_amount_dict(self) -> dict: method get_stock_weight_dict (line 552) | def get_stock_weight_dict(self, only_stock: bool = False) -> dict: method add_count_all (line 555) | def add_count_all(self, bar: str) -> None: method update_weight_all (line 558) | def update_weight_all(self) -> None: method settle_start (line 561) | def settle_start(self, settle_type: str) -> None: method settle_commit (line 564) | def settle_commit(self) -> None: FILE: qlib/backtest/profit_attribution.py function get_benchmark_weight (line 18) | def get_benchmark_weight( function get_stock_weight_df (line 56) | def get_stock_weight_df(positions): function decompose_portofolio_weight (line 72) | def decompose_portofolio_weight(stock_weight_df, stock_group_df): function decompose_portofolio (line 110) | def decompose_portofolio(stock_weight_df, stock_group_df, stock_ret_df): function get_daily_bin_group (line 179) | def get_daily_bin_group(bench_values, stock_values, group_n): function get_stock_group (line 205) | def get_stock_group(stock_group_field_df, bench_stock_weight_df, group_m... function brinson_pa (line 226) | def brinson_pa( FILE: qlib/backtest/report.py class PortfolioMetrics (line 22) | class PortfolioMetrics: method __init__ (line 42) | def __init__(self, freq: str = "day", benchmark_config: dict = {}) -> ... method init_vars (line 78) | def init_vars(self) -> None: method init_bench (line 90) | def init_bench(self, freq: str | None = None, benchmark_config: dict |... method _cal_benchmark (line 97) | def _cal_benchmark(benchmark_config: Optional[dict], freq: str) -> Opt... method _sample_benchmark (line 123) | def _sample_benchmark( method is_empty (line 138) | def is_empty(self) -> bool: method get_latest_date (line 141) | def get_latest_date(self) -> pd.Timestamp: method get_latest_account_value (line 144) | def get_latest_account_value(self) -> float: method get_latest_total_cost (line 147) | def get_latest_total_cost(self) -> Any: method get_latest_total_turnover (line 150) | def get_latest_total_turnover(self) -> Any: method update_portfolio_metrics_record (line 153) | def update_portfolio_metrics_record( method generate_portfolio_metrics_dataframe (line 203) | def generate_portfolio_metrics_dataframe(self) -> pd.DataFrame: method save_portfolio_metrics (line 217) | def save_portfolio_metrics(self, path: str) -> None: method load_portfolio_metrics (line 221) | def load_portfolio_metrics(self, path: str) -> None: class Indicator (line 249) | class Indicator: method __init__ (line 278) | def __init__(self, order_indicator_cls: Type[BaseOrderIndicator] = Num... method reset (line 292) | def reset(self) -> None: method record (line 297) | def record(self, trade_start_time: Union[str, pd.Timestamp]) -> None: method _update_order_trade_info (line 301) | def _update_order_trade_info(self, trade_info: List[Tuple[Order, float... method _update_order_fulfill_rate (line 330) | def _update_order_fulfill_rate(self) -> None: method update_order_indicators (line 339) | def update_order_indicators(self, trade_info: List[Tuple[Order, float,... method _agg_order_trade_info (line 343) | def _agg_order_trade_info(self, inner_order_indicators: List[BaseOrder... method _update_trade_amount (line 372) | def _update_trade_amount(self, outer_trade_decision: BaseTradeDecision... method _get_base_vol_pri (line 380) | def _get_base_vol_pri( method _agg_base_price (line 455) | def _agg_base_price( method _agg_order_price_advantage (line 524) | def _agg_order_price_advantage(self) -> None: method agg_order_indicators (line 539) | def agg_order_indicators( method _cal_trade_fulfill_rate (line 554) | def _cal_trade_fulfill_rate(self, method: str = "mean") -> Optional[Ba... method _cal_trade_price_advantage (line 570) | def _cal_trade_price_advantage(self, method: str = "mean") -> Optional... method _cal_trade_positive_rate (line 584) | def _cal_trade_positive_rate(self) -> Optional[BaseSingleMetric]: method _cal_deal_amount (line 590) | def _cal_deal_amount(self) -> Optional[BaseSingleMetric]: method _cal_trade_value (line 596) | def _cal_trade_value(self) -> Optional[BaseSingleMetric]: method _cal_trade_order_count (line 602) | def _cal_trade_order_count(self) -> Optional[BaseSingleMetric]: method cal_trade_indicators (line 608) | def cal_trade_indicators( method get_order_indicator (line 644) | def get_order_indicator(self, raw: bool = True) -> Union[BaseOrderIndi... method get_trade_indicator (line 647) | def get_trade_indicator(self) -> Dict[str, Optional[BaseSingleMetric]]: method generate_trade_indicators_dataframe (line 650) | def generate_trade_indicators_dataframe(self) -> pd.DataFrame: FILE: qlib/backtest/signal.py class Signal (line 16) | class Signal(metaclass=abc.ABCMeta): method get_signal (line 25) | def get_signal(self, start_time: pd.Timestamp, end_time: pd.Timestamp)... class SignalWCache (line 36) | class SignalWCache(Signal): method __init__ (line 42) | def __init__(self, signal: Union[pd.Series, pd.DataFrame]) -> None: method get_signal (line 60) | def get_signal(self, start_time: pd.Timestamp, end_time: pd.Timestamp)... class ModelSignal (line 68) | class ModelSignal(SignalWCache): method __init__ (line 69) | def __init__(self, model: BaseModel, dataset: Dataset) -> None: method _update_model (line 77) | def _update_model(self) -> None: function create_signal_from (line 88) | def create_signal_from( FILE: qlib/backtest/utils.py class TradeCalendarManager (line 23) | class TradeCalendarManager: method __init__ (line 29) | def __init__( method reset (line 51) | def reset( method finished (line 78) | def finished(self) -> bool: method step (line 87) | def step(self) -> None: method get_freq (line 92) | def get_freq(self) -> str: method get_trade_len (line 95) | def get_trade_len(self) -> int: method get_trade_step (line 99) | def get_trade_step(self) -> int: method get_step_time (line 102) | def get_step_time(self, trade_step: int | None = None, shift: int = 0)... method get_data_cal_range (line 133) | def get_data_cal_range(self, rtype: str = "full") -> Tuple[int, int]: method get_all_time (line 167) | def get_all_time(self) -> Tuple[pd.Timestamp, pd.Timestamp]: method get_range_idx (line 172) | def get_range_idx(self, start_time: pd.Timestamp, end_time: pd.Timesta... method __repr__ (line 196) | def __repr__(self) -> str: class BaseInfrastructure (line 204) | class BaseInfrastructure: method __init__ (line 205) | def __init__(self, **kwargs: Any) -> None: method get_support_infra (line 209) | def get_support_infra(self) -> Set[str]: method reset_infra (line 212) | def reset_infra(self, **kwargs: Any) -> None: method get (line 220) | def get(self, infra_name: str) -> Any: method has (line 226) | def has(self, infra_name: str) -> bool: method update (line 229) | def update(self, other: BaseInfrastructure) -> None: class CommonInfrastructure (line 235) | class CommonInfrastructure(BaseInfrastructure): method get_support_infra (line 236) | def get_support_infra(self) -> Set[str]: class LevelInfrastructure (line 240) | class LevelInfrastructure(BaseInfrastructure): method get_support_infra (line 243) | def get_support_infra(self) -> Set[str]: method reset_cal (line 252) | def reset_cal( method set_sub_level_infra (line 266) | def set_sub_level_infra(self, sub_level_infra: LevelInfrastructure) ->... function get_start_end_idx (line 271) | def get_start_end_idx(trade_calendar: TradeCalendarManager, outer_trade_... FILE: qlib/cli/run.py function get_path_list (line 23) | def get_path_list(path): function sys_config (line 30) | def sys_config(config, config_path): function render_template (line 52) | def render_template(config_path: str) -> str: function workflow (line 86) | def workflow(config_path, experiment_name="workflow", uri_folder="mlruns"): function run (line 152) | def run(): FILE: qlib/config.py class MLflowSettings (line 34) | class MLflowSettings(BaseSettings): class QSettings (line 39) | class QSettings(BaseSettings): class Config (line 64) | class Config: method __init__ (line 65) | def __init__(self, default_conf): method __getitem__ (line 69) | def __getitem__(self, key): method __getattr__ (line 72) | def __getattr__(self, attr): method get (line 78) | def get(self, key, default=None): method __setitem__ (line 81) | def __setitem__(self, key, value): method __setattr__ (line 84) | def __setattr__(self, attr, value): method __contains__ (line 87) | def __contains__(self, item): method __getstate__ (line 90) | def __getstate__(self): method __setstate__ (line 93) | def __setstate__(self, state): method __str__ (line 96) | def __str__(self): method __repr__ (line 99) | def __repr__(self): method reset (line 102) | def reset(self): method update (line 105) | def update(self, *args, **kwargs): method set_conf_from_C (line 108) | def set_conf_from_C(self, config_c): method register_from_C (line 112) | def register_from_C(config, skip_register=True): class QlibConfig (line 315) | class QlibConfig(Config): method __init__ (line 321) | def __init__(self, default_conf): class DataPathManager (line 325) | class DataPathManager: method __init__ (line 332) | def __init__(self, provider_uri: Union[str, Path, dict], mount_path:... method format_provider_uri (line 342) | def format_provider_uri(provider_uri: Union[str, dict, Path]) -> dict: method get_uri_type (line 356) | def get_uri_type(uri: Union[str, Path]): method get_data_uri (line 367) | def get_data_uri(self, freq: Optional[Union[str, Freq]] = None) -> P... method set_mode (line 387) | def set_mode(self, mode): method set_region (line 392) | def set_region(self, region): method is_depend_redis (line 397) | def is_depend_redis(cache_name: str): method dpm (line 401) | def dpm(self): method resolve_path (line 404) | def resolve_path(self): method set (line 424) | def set(self, default_conf: str = "client", **kwargs): method register (line 483) | def register(self): method reset_qlib_version (line 504) | def reset_qlib_version(self): method get_kernels (line 515) | def get_kernels(self, freq: str): method registered (line 522) | def registered(self): FILE: qlib/contrib/data/data.py class ArcticFeatureProvider (line 19) | class ArcticFeatureProvider(FeatureProvider): method __init__ (line 20) | def __init__( method feature (line 32) | def feature(self, instrument, field, start_index, end_index, freq): FILE: qlib/contrib/data/dataset.py function _to_tensor (line 17) | def _to_tensor(x): function _create_ts_slices (line 23) | def _create_ts_slices(index, seq_len): function _get_date_parse_fn (line 57) | def _get_date_parse_fn(target): function _maybe_padding (line 84) | def _maybe_padding(x, seq_len, zeros=None): class MTSDatasetH (line 102) | class MTSDatasetH(DatasetH): method __init__ (line 119) | def __init__( method setup_data (line 163) | def setup_data(self, handler_kwargs: dict = None, **kwargs): method _prepare_seg (line 211) | def _prepare_seg(self, slc, **kwargs): method restore_index (line 236) | def restore_index(self, index): method restore_daily_index (line 239) | def restore_daily_index(self, daily_index): method assign_data (line 242) | def assign_data(self, index, vals): method clear_memory (line 249) | def clear_memory(self): method train (line 254) | def train(self): method eval (line 258) | def eval(self): method _get_slices (line 265) | def _get_slices(self): method __len__ (line 274) | def __len__(self): method __iter__ (line 280) | def __iter__(self): FILE: qlib/contrib/data/handler.py function check_transform_proc (line 12) | def check_transform_proc(proc_l, fit_start_time, fit_end_time): class Alpha360 (line 48) | class Alpha360(DataHandlerLP): method __init__ (line 49) | def __init__( method get_label_config (line 89) | def get_label_config(self): class Alpha360vwap (line 93) | class Alpha360vwap(Alpha360): method get_label_config (line 94) | def get_label_config(self): class Alpha158 (line 98) | class Alpha158(DataHandlerLP): method __init__ (line 99) | def __init__( method get_feature_config (line 140) | def get_feature_config(self): method get_label_config (line 151) | def get_label_config(self): class Alpha158vwap (line 155) | class Alpha158vwap(Alpha158): method get_label_config (line 156) | def get_label_config(self): FILE: qlib/contrib/data/highfreq_handler.py class HighFreqHandler (line 8) | class HighFreqHandler(DataHandlerLP): method __init__ (line 9) | def __init__( method get_feature_config (line 41) | def get_feature_config(self): class HighFreqGeneralHandler (line 103) | class HighFreqGeneralHandler(DataHandlerLP): method __init__ (line 104) | def __init__( method get_feature_config (line 144) | def get_feature_config(self): class HighFreqBacktestHandler (line 199) | class HighFreqBacktestHandler(DataHandler): method __init__ (line 200) | def __init__( method get_feature_config (line 221) | def get_feature_config(self): class HighFreqGeneralBacktestHandler (line 252) | class HighFreqGeneralBacktestHandler(DataHandler): method __init__ (line 253) | def __init__( method get_feature_config (line 281) | def get_feature_config(self): class HighFreqOrderHandler (line 307) | class HighFreqOrderHandler(DataHandlerLP): method __init__ (line 308) | def __init__( method get_feature_config (line 342) | def get_feature_config(self): class HighFreqBacktestOrderHandler (line 462) | class HighFreqBacktestOrderHandler(DataHandler): method __init__ (line 463) | def __init__( method get_feature_config (line 484) | def get_feature_config(self): FILE: qlib/contrib/data/highfreq_processor.py class HighFreqTrans (line 10) | class HighFreqTrans(Processor): method __init__ (line 11) | def __init__(self, dtype: str = "bool"): method fit (line 14) | def fit(self, df_features): method __call__ (line 17) | def __call__(self, df_features): class HighFreqNorm (line 24) | class HighFreqNorm(Processor): method __init__ (line 25) | def __init__( method fit (line 37) | def fit(self, df_features) -> None: method __call__ (line 62) | def __call__(self, df_features): FILE: qlib/contrib/data/highfreq_provider.py class HighFreqProvider (line 18) | class HighFreqProvider: method __init__ (line 19) | def __init__( method get_pre_datasets (line 48) | def get_pre_datasets(self): method get_backtest (line 101) | def get_backtest(self, **kwargs) -> None: method _init_qlib (line 104) | def _init_qlib(self, qlib_conf): method _prepare_calender_cache (line 115) | def _prepare_calender_cache(self): method _gen_dataframe (line 124) | def _gen_dataframe(self, config, datasets=["train", "valid", "test"]): method _gen_data (line 166) | def _gen_data(self, config, datasets=["train", "valid", "test"]): method _gen_dataset (line 196) | def _gen_dataset(self, config): method _gen_day_dataset (line 222) | def _gen_day_dataset(self, config, conf_type): method _gen_stock_dataset (line 263) | def _gen_stock_dataset(self, config, conf_type): FILE: qlib/contrib/data/loader.py class Alpha360DL (line 4) | class Alpha360DL(QlibDataLoader): method __init__ (line 7) | def __init__(self, config=None, **kwargs): method get_feature_config (line 16) | def get_feature_config(): class Alpha158DL (line 61) | class Alpha158DL(QlibDataLoader): method __init__ (line 64) | def __init__(self, config=None, **kwargs): method get_feature_config (line 73) | def get_feature_config( FILE: qlib/contrib/data/processor.py class ConfigSectionProcessor (line 7) | class ConfigSectionProcessor(Processor): method __init__ (line 12) | def __init__(self, fields_group=None, **kwargs): method __call__ (line 23) | def __call__(self, df): method _transform (line 26) | def _transform(self, df): FILE: qlib/contrib/data/utils/sepdf.py function align_index (line 7) | def align_index(df_dict, join): class SepDataFrame (line 17) | class SepDataFrame: method __init__ (line 31) | def __init__(self, df_dict: Dict[str, pd.DataFrame], join: str, skip_a... method loc (line 55) | def loc(self): method index (line 59) | def index(self): method apply_each (line 62) | def apply_each(self, method: str, skip_align=True, *args, **kwargs): method sort_index (line 76) | def sort_index(self, *args, **kwargs): method copy (line 79) | def copy(self, *args, **kwargs): method _update_join (line 82) | def _update_join(self): method __getitem__ (line 90) | def __getitem__(self, item): method __setitem__ (line 94) | def __setitem__(self, item: str, df: Union[pd.DataFrame, pd.Series]): method __delitem__ (line 116) | def __delitem__(self, item: str): method __contains__ (line 120) | def __contains__(self, item): method __len__ (line 123) | def __len__(self): method droplevel (line 126) | def droplevel(self, *args, **kwargs): method columns (line 130) | def columns(self): method merge (line 140) | def merge(df_dict: Dict[str, pd.DataFrame], join: str): class SDFLoc (line 148) | class SDFLoc: method __init__ (line 151) | def __init__(self, sdf: SepDataFrame, join): method __call__ (line 156) | def __call__(self, axis): method __getitem__ (line 160) | def __getitem__(self, args): function _isinstance (line 193) | def _isinstance(instance, cls): FILE: qlib/contrib/eva/alpha.py function calc_long_short_prec (line 14) | def calc_long_short_prec( function calc_long_short_return (line 71) | def calc_long_short_return( function pred_autocorr (line 116) | def pred_autocorr(pred: pd.Series, lag=1, inst_col="instrument", date_co... function pred_autocorr_all (line 143) | def pred_autocorr_all(pred_dict, n_jobs=-1, **kwargs): function calc_ic (line 160) | def calc_ic(pred: pd.Series, label: pd.Series, date_col="datetime", drop... function calc_all_ic (line 186) | def calc_all_ic(pred_dict_all, label, date_col="datetime", dropna=False,... FILE: qlib/contrib/evaluate.py function risk_analysis (line 26) | def risk_analysis(r, N: int = None, freq: str = "day", mode: Literal["su... function indicator_analysis (line 96) | def indicator_analysis(df, method="mean"): function backtest_daily (line 147) | def backtest_daily( function long_short_backtest (line 276) | def long_short_backtest( function t_run (line 400) | def t_run(): FILE: qlib/contrib/evaluate_portfolio.py function _get_position_value_from_df (line 17) | def _get_position_value_from_df(evaluate_date, position, close_data_df): function get_position_value (line 36) | def get_position_value(evaluate_date, position): function get_position_list_value (line 76) | def get_position_list_value(positions): function get_daily_return_series_from_positions (line 105) | def get_daily_return_series_from_positions(positions, init_asset_value): function get_annual_return_from_positions (line 122) | def get_annual_return_from_positions(positions, init_asset_value): function get_annaul_return_from_return_series (line 143) | def get_annaul_return_from_return_series(r, method="ci"): function get_sharpe_ratio_from_return_series (line 159) | def get_sharpe_ratio_from_return_series(r, risk_free_rate=0.00, method="... function get_max_drawdown_from_series (line 178) | def get_max_drawdown_from_series(r): function get_turnover_rate (line 195) | def get_turnover_rate(): function get_beta (line 200) | def get_beta(r, b): function get_alpha (line 215) | def get_alpha(r, b, risk_free_rate=0.03): function get_volatility_from_series (line 225) | def get_volatility_from_series(r): function get_rank_ic (line 229) | def get_rank_ic(a, b): function get_normal_ic (line 243) | def get_normal_ic(a, b): FILE: qlib/contrib/meta/data_selection/dataset.py class InternalData (line 23) | class InternalData: method __init__ (line 24) | def __init__(self, task_tpl: dict, step: int, exp_name: str): method setup (line 29) | def setup(self, trainer=TrainerR, trainer_kwargs={}): method _calc_perf (line 107) | def _calc_perf(self, pred, label): method update (line 113) | def update(self): class MetaTaskDS (line 121) | class MetaTaskDS(MetaTask): method __init__ (line 124) | def __init__(self, task: dict, meta_info: pd.DataFrame, mode: str = Me... method _get_processed_meta_info (line 191) | def _get_processed_meta_info(self): method get_meta_input (line 233) | def get_meta_input(self): class MetaDatasetDS (line 237) | class MetaDatasetDS(MetaTaskDataset): method __init__ (line 238) | def __init__( method _prepare_meta_ipt (line 331) | def _prepare_meta_ipt(self, task) -> pd.DataFrame: method _prepare_seg (line 386) | def _prepare_seg(self, segment: Text) -> List[MetaTask]: FILE: qlib/contrib/meta/data_selection/model.py class TimeReweighter (line 27) | class TimeReweighter(Reweighter): method __init__ (line 28) | def __init__(self, time_weight: pd.Series): method reweight (line 31) | def reweight(self, data: Union[pd.DataFrame, pd.Series]): class MetaModelDS (line 40) | class MetaModelDS(MetaTaskModel): method __init__ (line 45) | def __init__( method run_epoch (line 74) | def run_epoch(self, phase, task_list, epoch, opt, loss_l, ignore_weigh... method fit (line 137) | def fit(self, meta_dataset: MetaDatasetDS): method _prepare_task (line 183) | def _prepare_task(self, task: MetaTask) -> dict: method inference (line 192) | def inference(self, meta_dataset: MetaTaskDataset) -> List[dict]: FILE: qlib/contrib/meta/data_selection/net.py class TimeWeightMeta (line 11) | class TimeWeightMeta(SingleMetaBase): method __init__ (line 12) | def __init__(self, hist_step_n, clip_weight=None, clip_method="clamp"): method forward (line 18) | def forward(self, time_perf, time_belong=None, return_preds=False): class PredNet (line 43) | class PredNet(nn.Module): method __init__ (line 44) | def __init__(self, step, hist_step_n, clip_weight=None, clip_method="t... method get_sample_weights (line 57) | def get_sample_weights(self, X, time_perf, time_belong, ignore_weight=... method forward (line 65) | def forward(self, X, y, time_perf, time_belong, X_test, ignore_weight=... method init_paramters (line 72) | def init_paramters(self, hist_step_n): FILE: qlib/contrib/meta/data_selection/utils.py class ICLoss (line 12) | class ICLoss(nn.Module): method __init__ (line 13) | def __init__(self, skip_size=50): method forward (line 17) | def forward(self, pred, y, idx): function preds_to_weight_with_clamp (line 67) | def preds_to_weight_with_clamp(preds, clip_weight=None, clip_method="tan... class SingleMetaBase (line 99) | class SingleMetaBase(nn.Module): method __init__ (line 100) | def __init__(self, hist_n, clip_weight=None, clip_method="clamp"): method is_enabled (line 109) | def is_enabled(self): FILE: qlib/contrib/model/catboost_model.py class CatBoostModel (line 17) | class CatBoostModel(Model, FeatureInt): method __init__ (line 20) | def __init__(self, loss="RMSE", **kwargs): method fit (line 28) | def fit( method predict (line 80) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method get_feature_importance (line 86) | def get_feature_importance(self, *args, **kwargs) -> pd.Series: FILE: qlib/contrib/model/double_ensemble.py class DEnsembleModel (line 15) | class DEnsembleModel(Model, FeatureInt): method __init__ (line 18) | def __init__( method fit (line 65) | def fit(self, dataset: DatasetH): method train_submodel (line 105) | def train_submodel(self, df_train, df_valid, weights, features): method _prepare_data_gbm (line 126) | def _prepare_data_gbm(self, df_train, df_valid, weights, features): method sample_reweight (line 140) | def sample_reweight(self, loss_curve, loss_values, k_th): method feature_selection (line 175) | def feature_selection(self, df_train, loss_values): method get_loss (line 221) | def get_loss(self, label, pred): method retrieve_loss_curve (line 227) | def retrieve_loss_curve(self, model, df_train, features): method predict (line 247) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method predict_sub (line 261) | def predict_sub(self, submodel, df_data, features): method get_feature_importance (line 266) | def get_feature_importance(self, *args, **kwargs) -> pd.Series: FILE: qlib/contrib/model/gbdt.py class LGBModel (line 16) | class LGBModel(ModelFT, LightGBMFInt): method __init__ (line 19) | def __init__(self, loss="mse", early_stopping_rounds=50, num_boost_rou... method _prepare_data (line 28) | def _prepare_data(self, dataset: DatasetH, reweighter=None) -> List[Tu... method fit (line 57) | def fit( method predict (line 92) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method finetune (line 98) | def finetune(self, dataset: DatasetH, num_boost_round=10, verbose_eval... FILE: qlib/contrib/model/highfreq_gdbt_model.py class HFLGBModel (line 15) | class HFLGBModel(ModelFT, LightGBMFInt): method __init__ (line 18) | def __init__(self, loss="mse", **kwargs): method _cal_signal_metrics (line 25) | def _cal_signal_metrics(self, y_test, l_cut, r_cut): method hf_signal_test (line 57) | def hf_signal_test(self, dataset: DatasetH, threhold=0.2): method _prepare_data (line 81) | def _prepare_data(self, dataset: DatasetH): method fit (line 116) | def fit( method predict (line 141) | def predict(self, dataset): method finetune (line 147) | def finetune(self, dataset: DatasetH, num_boost_round=10, verbose_eval... FILE: qlib/contrib/model/linear.py class LinearModel (line 17) | class LinearModel(Model): method __init__ (line 33) | def __init__(self, estimator="ols", alpha=0.0, fit_intercept=False, in... method fit (line 58) | def fit(self, dataset: DatasetH, reweighter: Reweighter = None): method _fit (line 85) | def _fit(self, X, y, w): method _fit_nnls (line 96) | def _fit_nnls(self, X, y, w=None): method predict (line 109) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... FILE: qlib/contrib/model/pytorch_adarnn.py class ADARNN (line 23) | class ADARNN(Model): method __init__ (line 38) | def __init__( method use_gpu (line 150) | def use_gpu(self): method train_AdaRNN (line 153) | def train_AdaRNN(self, train_loader_list, epoch, dist_old=None, weight... method calc_all_metrics (line 214) | def calc_all_metrics(pred): method test_epoch (line 229) | def test_epoch(self, df): method log_metrics (line 237) | def log_metrics(self, mode, metrics): method fit (line 242) | def fit( method predict (line 304) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method infer (line 310) | def infer(self, x_test): method transform_type (line 333) | def transform_type(self, init_weight): class data_loader (line 341) | class data_loader(Dataset): method __init__ (line 342) | def __init__(self, df): method __getitem__ (line 351) | def __getitem__(self, index): method __len__ (line 355) | def __len__(self): function get_stock_loader (line 359) | def get_stock_loader(df, batch_size, shuffle=True): function get_index (line 364) | def get_index(num_domain=2): class AdaRNN (line 372) | class AdaRNN(nn.Module): method __init__ (line 377) | def __init__( method init_layers (line 440) | def init_layers(self): method forward_pre_train (line 445) | def forward_pre_train(self, x, len_win=0): method gru_features (line 474) | def gru_features(self, x, predict=False): method process_gate_weight (line 488) | def process_gate_weight(self, out, index): method get_features (line 499) | def get_features(output_list): method forward_Boosting (line 507) | def forward_Boosting(self, x, weight_mat=None): method update_weight_Boosting (line 533) | def update_weight_Boosting(self, weight_mat, dist_old, dist_new): method predict (line 543) | def predict(self, x): class TransferLoss (line 554) | class TransferLoss: method __init__ (line 555) | def __init__(self, loss_type="cosine", input_dim=512, GPU=0): method compute (line 563) | def compute(self, X, Y): function cosine (line 600) | def cosine(source, target): class ReverseLayerF (line 607) | class ReverseLayerF(Function): method forward (line 609) | def forward(ctx, x, alpha): method backward (line 614) | def backward(ctx, grad_output): class Discriminator (line 619) | class Discriminator(nn.Module): method __init__ (line 620) | def __init__(self, input_dim=256, hidden_dim=256): method forward (line 627) | def forward(self, x): function adv (line 634) | def adv(source, target, device, input_dim=256, hidden_dim=512): function CORAL (line 650) | def CORAL(source, target, device): class MMD_loss (line 669) | class MMD_loss(nn.Module): method __init__ (line 670) | def __init__(self, kernel_type="linear", kernel_mul=2.0, kernel_num=5): method guassian_kernel (line 678) | def guassian_kernel(source, target, kernel_mul=2.0, kernel_num=5, fix_... method linear_mmd (line 694) | def linear_mmd(X, Y): method forward (line 699) | def forward(self, source, target): class Mine_estimator (line 716) | class Mine_estimator(nn.Module): method __init__ (line 717) | def __init__(self, input_dim=2048, hidden_dim=512): method forward (line 721) | def forward(self, X, Y): class Mine (line 730) | class Mine(nn.Module): method __init__ (line 731) | def __init__(self, input_dim=2048, hidden_dim=512): method forward (line 737) | def forward(self, x, y): function pairwise_dist (line 743) | def pairwise_dist(X, Y): function pairwise_dist_np (line 752) | def pairwise_dist_np(X, Y): function pa (line 763) | def pa(X, Y): function kl_div (line 773) | def kl_div(source, target): function js (line 783) | def js(source, target): FILE: qlib/contrib/model/pytorch_add.py class ADD (line 29) | class ADD(Model): method __init__ (line 46) | def __init__( method use_gpu (line 164) | def use_gpu(self): method loss_pre_excess (line 167) | def loss_pre_excess(self, pred_excess, label_excess, record=None): method loss_pre_market (line 174) | def loss_pre_market(self, pred_market, label_market, record=None): method loss_pre (line 180) | def loss_pre(self, pred_excess, label_excess, pred_market, label_marke... method loss_adv_excess (line 188) | def loss_adv_excess(self, adv_excess, label_excess, record=None): method loss_adv_market (line 195) | def loss_adv_market(self, adv_market, label_market, record=None): method loss_adv (line 201) | def loss_adv(self, adv_excess, label_excess, adv_market, label_market,... method loss_fn (line 209) | def loss_fn(self, x, preds, label_excess, label_market, record=None): method loss_rec (line 219) | def loss_rec(self, x, rec_x, record=None): method get_daily_inter (line 227) | def get_daily_inter(self, df, shuffle=False): method cal_ic_metrics (line 239) | def cal_ic_metrics(self, pred, label): method test_epoch (line 249) | def test_epoch(self, data_x, data_y, data_m): method train_epoch (line 278) | def train_epoch(self, x_train_values, y_train_values, m_train_values): method log_metrics (line 304) | def log_metrics(self, mode, metrics): method bootstrap_fit (line 309) | def bootstrap_fit(self, x_train, y_train, m_train, x_valid, y_valid, m... method gen_market_label (line 351) | def gen_market_label(self, df, raw_label): method fit_thresh (line 359) | def fit_thresh(self, train_label): method fit (line 363) | def fit( method predict (line 419) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class ADDModel (line 442) | class ADDModel(nn.Module): method __init__ (line 443) | def __init__( method forward (line 494) | def forward(self, x): class Decoder (line 527) | class Decoder(nn.Module): method __init__ (line 528) | def __init__(self, d_feat=6, hidden_size=128, num_layers=1, dropout=0.... method forward (line 552) | def forward(self, x, hidden): class RevGradFunc (line 560) | class RevGradFunc(Function): method forward (line 562) | def forward(ctx, input_, alpha_): method backward (line 568) | def backward(ctx, grad_output): # pragma: no cover class RevGrad (line 576) | class RevGrad(nn.Module): method __init__ (line 577) | def __init__(self, gamma=0.1, gamma_clip=0.4, *args, **kwargs): method step_alpha (line 590) | def step_alpha(self): method forward (line 596) | def forward(self, input_): FILE: qlib/contrib/model/pytorch_alstm.py class ALSTM (line 25) | class ALSTM(Model): method __init__ (line 40) | def __init__( method use_gpu (line 133) | def use_gpu(self): method mse (line 136) | def mse(self, pred, label): method loss_fn (line 140) | def loss_fn(self, pred, label): method metric_fn (line 148) | def metric_fn(self, pred, label): method train_epoch (line 156) | def train_epoch(self, x_train, y_train): method test_epoch (line 180) | def test_epoch(self, data_x, data_y): method fit (line 209) | def fit( method predict (line 267) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class ALSTMModel (line 294) | class ALSTMModel(nn.Module): method __init__ (line 295) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method _build_model (line 304) | def _build_model(self): method forward (line 333) | def forward(self, inputs): FILE: qlib/contrib/model/pytorch_alstm_ts.py class ALSTM (line 28) | class ALSTM(Model): method __init__ (line 43) | def __init__( method use_gpu (line 140) | def use_gpu(self): method mse (line 143) | def mse(self, pred, label, weight): method loss_fn (line 147) | def loss_fn(self, pred, label, weight=None): method metric_fn (line 158) | def metric_fn(self, pred, label): method train_epoch (line 170) | def train_epoch(self, data_loader): method test_epoch (line 185) | def test_epoch(self, data_loader): method fit (line 206) | def fit( method predict (line 287) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class ALSTMModel (line 308) | class ALSTMModel(nn.Module): method __init__ (line 309) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method _build_model (line 318) | def _build_model(self): method forward (line 347) | def forward(self, inputs): FILE: qlib/contrib/model/pytorch_gats.py class GATs (line 26) | class GATs(Model): method __init__ (line 43) | def __init__( method use_gpu (line 141) | def use_gpu(self): method mse (line 144) | def mse(self, pred, label): method loss_fn (line 148) | def loss_fn(self, pred, label): method metric_fn (line 156) | def metric_fn(self, pred, label): method get_daily_inter (line 164) | def get_daily_inter(self, df, shuffle=False): method train_epoch (line 176) | def train_epoch(self, x_train, y_train): method test_epoch (line 197) | def test_epoch(self, data_x, data_y): method fit (line 224) | def fit( method predict (line 301) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class GATModel (line 326) | class GATModel(nn.Module): method __init__ (line 327) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method cal_attention (line 359) | def cal_attention(self, x, y): method forward (line 374) | def forward(self, x): FILE: qlib/contrib/model/pytorch_gats_ts.py class DailyBatchSampler (line 26) | class DailyBatchSampler(Sampler): method __init__ (line 27) | def __init__(self, data_source): method __iter__ (line 36) | def __iter__(self): method __len__ (line 40) | def __len__(self): class GATs (line 44) | class GATs(Model): method __init__ (line 61) | def __init__( method use_gpu (line 161) | def use_gpu(self): method mse (line 164) | def mse(self, pred, label): method loss_fn (line 168) | def loss_fn(self, pred, label): method metric_fn (line 176) | def metric_fn(self, pred, label): method get_daily_inter (line 184) | def get_daily_inter(self, df, shuffle=False): method train_epoch (line 196) | def train_epoch(self, data_loader): method test_epoch (line 212) | def test_epoch(self, data_loader): method fit (line 233) | def fit( method predict (line 315) | def predict(self, dataset): class GATModel (line 338) | class GATModel(nn.Module): method __init__ (line 339) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method cal_attention (line 371) | def cal_attention(self, x, y): method forward (line 386) | def forward(self, x): FILE: qlib/contrib/model/pytorch_general_nn.py class GeneralPTNN (line 33) | class GeneralPTNN(Model): method __init__ (line 52) | def __init__( method use_gpu (line 148) | def use_gpu(self): method mse (line 151) | def mse(self, pred, label, weight): method loss_fn (line 155) | def loss_fn(self, pred, label, weight=None): method metric_fn (line 166) | def metric_fn(self, pred, label): method _get_fl (line 174) | def _get_fl(self, data: torch.Tensor): method train_epoch (line 202) | def train_epoch(self, data_loader): method test_epoch (line 216) | def test_epoch(self, data_loader): method fit (line 235) | def fit( method predict (line 334) | def predict( FILE: qlib/contrib/model/pytorch_gru.py class GRU (line 25) | class GRU(Model): method __init__ (line 40) | def __init__( method use_gpu (line 133) | def use_gpu(self): method mse (line 136) | def mse(self, pred, label): method loss_fn (line 140) | def loss_fn(self, pred, label): method metric_fn (line 148) | def metric_fn(self, pred, label): method train_epoch (line 156) | def train_epoch(self, x_train, y_train): method test_epoch (line 180) | def test_epoch(self, data_x, data_y): method fit (line 209) | def fit( method predict (line 292) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class GRUModel (line 319) | class GRUModel(nn.Module): method __init__ (line 320) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0): method forward (line 334) | def forward(self, x): FILE: qlib/contrib/model/pytorch_gru_ts.py class GRU (line 26) | class GRU(Model): method __init__ (line 41) | def __init__( method use_gpu (line 138) | def use_gpu(self): method mse (line 141) | def mse(self, pred, label, weight): method loss_fn (line 145) | def loss_fn(self, pred, label, weight=None): method metric_fn (line 156) | def metric_fn(self, pred, label): method train_epoch (line 164) | def train_epoch(self, data_loader): method test_epoch (line 179) | def test_epoch(self, data_loader): method fit (line 200) | def fit( method predict (line 281) | def predict(self, dataset): class GRUModel (line 302) | class GRUModel(nn.Module): method __init__ (line 303) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0): method forward (line 317) | def forward(self, x): FILE: qlib/contrib/model/pytorch_hist.py class HIST (line 27) | class HIST(Model): method __init__ (line 44) | def __init__( method use_gpu (line 147) | def use_gpu(self): method mse (line 150) | def mse(self, pred, label): method loss_fn (line 154) | def loss_fn(self, pred, label): method metric_fn (line 162) | def metric_fn(self, pred, label): method get_daily_inter (line 178) | def get_daily_inter(self, df, shuffle=False): method train_epoch (line 190) | def train_epoch(self, x_train, y_train, stock_index): method test_epoch (line 214) | def test_epoch(self, data_x, data_y, stock_index): method fit (line 244) | def fit( method predict (line 330) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class HISTModel (line 365) | class HISTModel(nn.Module): method __init__ (line 366) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method cal_cos_similarity (line 424) | def cal_cos_similarity(self, x, y): # the 2nd dimension of x and y ar... method forward (line 431) | def forward(self, x, concept_matrix): FILE: qlib/contrib/model/pytorch_igmtf.py class IGMTF (line 27) | class IGMTF(Model): method __init__ (line 42) | def __init__( method use_gpu (line 140) | def use_gpu(self): method mse (line 143) | def mse(self, pred, label): method loss_fn (line 147) | def loss_fn(self, pred, label): method metric_fn (line 155) | def metric_fn(self, pred, label): method get_daily_inter (line 171) | def get_daily_inter(self, df, shuffle=False): method get_train_hidden (line 183) | def get_train_hidden(self, x_train): method train_epoch (line 202) | def train_epoch(self, x_train, y_train, train_hidden, train_hidden_day): method test_epoch (line 222) | def test_epoch(self, data_x, data_y, train_hidden, train_hidden_day): method fit (line 248) | def fit( method predict (line 327) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class IGMTFModel (line 357) | class IGMTFModel(nn.Module): method __init__ (line 358) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0... method cal_cos_similarity (line 391) | def cal_cos_similarity(self, x, y): # the 2nd dimension of x and y ar... method sparse_dense_mul (line 398) | def sparse_dense_mul(self, s, d): method forward (line 404) | def forward(self, x, get_hidden=False, train_hidden=None, train_hidden... FILE: qlib/contrib/model/pytorch_krnn.py class CNNEncoderBase (line 28) | class CNNEncoderBase(nn.Module): method __init__ (line 29) | def __init__(self, input_dim, output_dim, kernel_size, device): method forward (line 52) | def forward(self, x): class KRNNEncoderBase (line 74) | class KRNNEncoderBase(nn.Module): method __init__ (line 75) | def __init__(self, input_dim, output_dim, dup_num, rnn_layers, dropout... method forward (line 102) | def forward(self, x): class CNNKRNNEncoder (line 136) | class CNNKRNNEncoder(nn.Module): method __init__ (line 137) | def __init__( method forward (line 162) | def forward(self, x): class KRNNModel (line 182) | class KRNNModel(nn.Module): method __init__ (line 183) | def __init__(self, fea_dim, cnn_dim, cnn_kernel_size, rnn_dim, rnn_dup... method forward (line 217) | def forward(self, x): class KRNN (line 225) | class KRNN(Model): method __init__ (line 240) | def __init__( method use_gpu (line 346) | def use_gpu(self): method mse (line 349) | def mse(self, pred, label): method loss_fn (line 353) | def loss_fn(self, pred, label): method metric_fn (line 361) | def metric_fn(self, pred, label): method get_daily_inter (line 369) | def get_daily_inter(self, df, shuffle=False): method train_epoch (line 381) | def train_epoch(self, x_train, y_train): method test_epoch (line 404) | def test_epoch(self, data_x, data_y): method fit (line 432) | def fit( method predict (line 490) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... FILE: qlib/contrib/model/pytorch_localformer.py class LocalformerModel (line 28) | class LocalformerModel(Model): method __init__ (line 29) | def __init__( method use_gpu (line 82) | def use_gpu(self): method mse (line 85) | def mse(self, pred, label): method loss_fn (line 89) | def loss_fn(self, pred, label): method metric_fn (line 97) | def metric_fn(self, pred, label): method train_epoch (line 105) | def train_epoch(self, x_train, y_train): method test_epoch (line 129) | def test_epoch(self, data_x, data_y): method fit (line 158) | def fit( method predict (line 216) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class PositionalEncoding (line 243) | class PositionalEncoding(nn.Module): method __init__ (line 244) | def __init__(self, d_model, max_len=1000): method forward (line 254) | def forward(self, x): function _get_clones (line 259) | def _get_clones(module, N): class LocalformerEncoder (line 263) | class LocalformerEncoder(nn.Module): method __init__ (line 266) | def __init__(self, encoder_layer, num_layers, d_model): method forward (line 272) | def forward(self, src, mask): class Transformer (line 286) | class Transformer(nn.Module): method __init__ (line 287) | def __init__(self, d_feat=6, d_model=8, nhead=4, num_layers=2, dropout... method forward (line 304) | def forward(self, src): FILE: qlib/contrib/model/pytorch_localformer_ts.py class LocalformerModel (line 26) | class LocalformerModel(Model): method __init__ (line 27) | def __init__( method use_gpu (line 82) | def use_gpu(self): method mse (line 85) | def mse(self, pred, label): method loss_fn (line 89) | def loss_fn(self, pred, label): method metric_fn (line 97) | def metric_fn(self, pred, label): method train_epoch (line 105) | def train_epoch(self, data_loader): method test_epoch (line 120) | def test_epoch(self, data_loader): method fit (line 140) | def fit( method predict (line 203) | def predict(self, dataset): class PositionalEncoding (line 224) | class PositionalEncoding(nn.Module): method __init__ (line 225) | def __init__(self, d_model, max_len=1000): method forward (line 235) | def forward(self, x): function _get_clones (line 240) | def _get_clones(module, N): class LocalformerEncoder (line 244) | class LocalformerEncoder(nn.Module): method __init__ (line 247) | def __init__(self, encoder_layer, num_layers, d_model): method forward (line 253) | def forward(self, src, mask): class Transformer (line 267) | class Transformer(nn.Module): method __init__ (line 268) | def __init__(self, d_feat=6, d_model=8, nhead=4, num_layers=2, dropout... method forward (line 285) | def forward(self, src): FILE: qlib/contrib/model/pytorch_lstm.py class LSTM (line 24) | class LSTM(Model): method __init__ (line 39) | def __init__( method use_gpu (line 129) | def use_gpu(self): method mse (line 132) | def mse(self, pred, label): method loss_fn (line 136) | def loss_fn(self, pred, label): method metric_fn (line 144) | def metric_fn(self, pred, label): method train_epoch (line 152) | def train_epoch(self, x_train, y_train): method test_epoch (line 176) | def test_epoch(self, data_x, data_y): method fit (line 204) | def fit( method predict (line 262) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class LSTMModel (line 286) | class LSTMModel(nn.Module): method __init__ (line 287) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0): method forward (line 301) | def forward(self, x): FILE: qlib/contrib/model/pytorch_lstm_ts.py class LSTM (line 25) | class LSTM(Model): method __init__ (line 40) | def __init__( method use_gpu (line 134) | def use_gpu(self): method mse (line 137) | def mse(self, pred, label, weight): method loss_fn (line 141) | def loss_fn(self, pred, label, weight): method metric_fn (line 152) | def metric_fn(self, pred, label): method train_epoch (line 160) | def train_epoch(self, data_loader): method test_epoch (line 175) | def test_epoch(self, data_loader): method fit (line 195) | def fit( method predict (line 276) | def predict(self, dataset): class LSTMModel (line 297) | class LSTMModel(nn.Module): method __init__ (line 298) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0): method forward (line 312) | def forward(self, x): FILE: qlib/contrib/model/pytorch_nn.py class DNNModelPytorch (line 39) | class DNNModelPytorch(Model): method __init__ (line 57) | def __init__( method use_gpu (line 187) | def use_gpu(self): method fit (line 190) | def fit( method get_lr (line 338) | def get_lr(self): method get_loss (line 342) | def get_loss(self, pred, w, target, loss_type): method get_metric (line 354) | def get_metric(self, pred, target, index): method _nn_predict (line 358) | def _nn_predict(self, data, return_cpu=True): method predict (line 382) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method save (line 389) | def save(self, filename, **kwargs): method load (line 395) | def load(self, buffer, **kwargs): class AverageMeter (line 407) | class AverageMeter: method __init__ (line 410) | def __init__(self): method reset (line 413) | def reset(self): method update (line 419) | def update(self, val, n=1): class Net (line 426) | class Net(nn.Module): method __init__ (line 427) | def __init__(self, input_dim, output_dim=1, layers=(256,), act="LeakyR... method _weight_init (line 454) | def _weight_init(self): method forward (line 459) | def forward(self, x): FILE: qlib/contrib/model/pytorch_sandwich.py class SandwichModel (line 25) | class SandwichModel(nn.Module): method __init__ (line 26) | def __init__( method forward (line 88) | def forward(self, x): class Sandwich (line 97) | class Sandwich(Model): method __init__ (line 112) | def __init__( method use_gpu (line 228) | def use_gpu(self): method mse (line 231) | def mse(self, pred, label): method loss_fn (line 235) | def loss_fn(self, pred, label): method metric_fn (line 243) | def metric_fn(self, pred, label): method train_epoch (line 251) | def train_epoch(self, x_train, y_train): method test_epoch (line 274) | def test_epoch(self, data_x, data_y): method fit (line 302) | def fit( method predict (line 360) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... FILE: qlib/contrib/model/pytorch_sfm.py class SFM_Model (line 25) | class SFM_Model(nn.Module): method __init__ (line 26) | def __init__( method forward (line 77) | def forward(self, input): method init_states (line 141) | def init_states(self, x): method get_constants (line 170) | def get_constants(self, x): class SFM (line 180) | class SFM(Model): method __init__ (line 197) | def __init__( method use_gpu (line 305) | def use_gpu(self): method test_epoch (line 308) | def test_epoch(self, data_x, data_y): method train_epoch (line 336) | def train_epoch(self, x_train, y_train): method fit (line 360) | def fit( method mse (line 416) | def mse(self, pred, label): method loss_fn (line 420) | def loss_fn(self, pred, label): method metric_fn (line 428) | def metric_fn(self, pred, label): method predict (line 436) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class AverageMeter (line 463) | class AverageMeter: method __init__ (line 466) | def __init__(self): method reset (line 469) | def reset(self): method update (line 475) | def update(self, val, n=1): FILE: qlib/contrib/model/pytorch_tabnet.py class TabnetModel (line 25) | class TabnetModel(Model): method __init__ (line 26) | def __init__( method use_gpu (line 109) | def use_gpu(self): method pretrain_fn (line 112) | def pretrain_fn(self, dataset=DatasetH, pretrain_file="./pretrain/best... method fit (line 151) | def fit( method predict (line 217) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method test_epoch (line 245) | def test_epoch(self, data_x, data_y): method train_epoch (line 274) | def train_epoch(self, x_train, y_train): method pretrain_epoch (line 299) | def pretrain_epoch(self, x_train): method pretrain_test_epoch (line 328) | def pretrain_test_epoch(self, x_train): method pretrain_loss_fn (line 359) | def pretrain_loss_fn(self, f_hat, f, S): method loss_fn (line 368) | def loss_fn(self, pred, label): method metric_fn (line 374) | def metric_fn(self, pred, label): method mse (line 380) | def mse(self, pred, label): class FinetuneModel (line 385) | class FinetuneModel(nn.Module): method __init__ (line 390) | def __init__(self, input_dim, output_dim, trained_model): method forward (line 395) | def forward(self, x, priors): class DecoderStep (line 399) | class DecoderStep(nn.Module): method __init__ (line 400) | def __init__(self, inp_dim, out_dim, shared, n_ind, vbs): method forward (line 405) | def forward(self, x): class TabNet_Decoder (line 410) | class TabNet_Decoder(nn.Module): method __init__ (line 411) | def __init__(self, inp_dim, out_dim, n_shared, n_ind, vbs, n_steps): method forward (line 429) | def forward(self, x): class TabNet (line 436) | class TabNet(nn.Module): method __init__ (line 437) | def __init__(self, inp_dim=6, out_dim=6, n_d=64, n_a=64, n_shared=2, n... method forward (line 469) | def forward(self, x, priors): class GBN (line 483) | class GBN(nn.Module): method __init__ (line 492) | def __init__(self, inp, vbs=1024, momentum=0.01): method forward (line 497) | def forward(self, x): class GLU (line 506) | class GLU(nn.Module): method __init__ (line 514) | def __init__(self, inp_dim, out_dim, fc=None, vbs=1024): method forward (line 523) | def forward(self, x): class AttentionTransformer (line 528) | class AttentionTransformer(nn.Module): method __init__ (line 536) | def __init__(self, d_a, inp_dim, relax, vbs=1024): method forward (line 543) | def forward(self, a, priors): class FeatureTransformer (line 550) | class FeatureTransformer(nn.Module): method __init__ (line 551) | def __init__(self, inp_dim, out_dim, shared, n_ind, vbs): method forward (line 569) | def forward(self, x): class DecisionStep (line 581) | class DecisionStep(nn.Module): method __init__ (line 586) | def __init__(self, inp_dim, n_d, n_a, shared, n_ind, relax, vbs): method forward (line 591) | def forward(self, x, a, priors): function make_ix_like (line 598) | def make_ix_like(input, dim=0): class SparsemaxFunction (line 606) | class SparsemaxFunction(Function): method forward (line 612) | def forward(ctx, input, dim=-1): method backward (line 622) | def backward(ctx, grad_output): method threshold_and_support (line 634) | def threshold_and_support(input, dim=-1): FILE: qlib/contrib/model/pytorch_tcn.py class TCN (line 26) | class TCN(Model): method __init__ (line 43) | def __init__( method use_gpu (line 141) | def use_gpu(self): method mse (line 144) | def mse(self, pred, label): method loss_fn (line 148) | def loss_fn(self, pred, label): method metric_fn (line 156) | def metric_fn(self, pred, label): method train_epoch (line 164) | def train_epoch(self, x_train, y_train): method test_epoch (line 188) | def test_epoch(self, data_x, data_y): method fit (line 216) | def fit( method predict (line 272) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class TCNModel (line 299) | class TCNModel(nn.Module): method __init__ (line 300) | def __init__(self, num_input, output_size, num_channels, kernel_size, ... method forward (line 306) | def forward(self, x): FILE: qlib/contrib/model/pytorch_tcn_ts.py class TCN (line 25) | class TCN(Model): method __init__ (line 40) | def __init__( method use_gpu (line 142) | def use_gpu(self): method mse (line 145) | def mse(self, pred, label): method loss_fn (line 149) | def loss_fn(self, pred, label): method metric_fn (line 157) | def metric_fn(self, pred, label): method train_epoch (line 165) | def train_epoch(self, data_loader): method test_epoch (line 181) | def test_epoch(self, data_loader): method fit (line 203) | def fit( method predict (line 266) | def predict(self, dataset): class TCNModel (line 287) | class TCNModel(nn.Module): method __init__ (line 288) | def __init__(self, num_input, output_size, num_channels, kernel_size, ... method forward (line 294) | def forward(self, x): FILE: qlib/contrib/model/pytorch_tcts.py class TCTS (line 24) | class TCTS(Model): method __init__ (line 39) | def __init__( method loss_fn (line 121) | def loss_fn(self, pred, label, weight): method train_epoch (line 134) | def train_epoch(self, x_train, y_train, x_valid, y_valid): method test_epoch (line 211) | def test_epoch(self, data_x, data_y): method fit (line 235) | def fit( method training (line 269) | def training( method predict (line 351) | def predict(self, dataset): class MLPModel (line 381) | class MLPModel(nn.Module): method __init__ (line 382) | def __init__(self, d_feat, hidden_size=256, num_layers=3, dropout=0.0,... method forward (line 396) | def forward(self, x): class GRUModel (line 404) | class GRUModel(nn.Module): method __init__ (line 405) | def __init__(self, d_feat=6, hidden_size=64, num_layers=2, dropout=0.0): method forward (line 419) | def forward(self, x): FILE: qlib/contrib/model/pytorch_tra.py class TRAModel (line 33) | class TRAModel(Model): method __init__ (line 62) | def __init__( method _init_model (line 137) | def _init_model(self): method train_epoch (line 176) | def train_epoch(self, epoch, data_set, is_pretrain=False): method test_epoch (line 273) | def test_epoch(self, epoch, data_set, return_pred=False, prefix="test"... method _fit (line 358) | def _fit(self, train_set, valid_set, test_set, evals_result, is_pretra... method fit (line 416) | def fit(self, dataset, evals_result=dict()): method predict (line 499) | def predict(self, dataset, segment="test"): class RNN (line 513) | class RNN(nn.Module): method __init__ (line 526) | def __init__( method forward (line 565) | def forward(self, x): class PositionalEncoding (line 583) | class PositionalEncoding(nn.Module): method __init__ (line 585) | def __init__(self, d_model, dropout=0.1, max_len=5000): method forward (line 597) | def forward(self, x): class Transformer (line 602) | class Transformer(nn.Module): method __init__ (line 613) | def __init__( method forward (line 639) | def forward(self, x): class TRA (line 649) | class TRA(nn.Module): method __init__ (line 664) | def __init__( method reset_parameters (line 699) | def reset_parameters(self): method forward (line 703) | def forward(self, hidden, hist_loss): function evaluate (line 727) | def evaluate(pred): function shoot_infs (line 738) | def shoot_infs(inp_tensor): function sinkhorn (line 757) | def sinkhorn(Q, n_iters=3, epsilon=0.1): function loss_fn (line 768) | def loss_fn(pred, label): function minmax_norm (line 775) | def minmax_norm(x): function transport_sample (line 784) | def transport_sample(all_preds, label, choice, prob, hist_loss, count, t... function transport_daily (line 829) | def transport_daily(all_preds, label, choice, prob, hist_loss, count, tr... function load_state_dict_unsafe (line 886) | def load_state_dict_unsafe(model, state_dict): function plot (line 916) | def plot(P): FILE: qlib/contrib/model/pytorch_transformer.py class TransformerModel (line 27) | class TransformerModel(Model): method __init__ (line 28) | def __init__( method use_gpu (line 81) | def use_gpu(self): method mse (line 84) | def mse(self, pred, label): method loss_fn (line 88) | def loss_fn(self, pred, label): method metric_fn (line 96) | def metric_fn(self, pred, label): method train_epoch (line 104) | def train_epoch(self, x_train, y_train): method test_epoch (line 128) | def test_epoch(self, data_x, data_y): method fit (line 157) | def fit( method predict (line 215) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... class PositionalEncoding (line 242) | class PositionalEncoding(nn.Module): method __init__ (line 243) | def __init__(self, d_model, max_len=1000): method forward (line 253) | def forward(self, x): class Transformer (line 258) | class Transformer(nn.Module): method __init__ (line 259) | def __init__(self, d_feat=6, d_model=8, nhead=4, num_layers=2, dropout... method forward (line 269) | def forward(self, src): FILE: qlib/contrib/model/pytorch_transformer_ts.py class TransformerModel (line 25) | class TransformerModel(Model): method __init__ (line 26) | def __init__( method use_gpu (line 79) | def use_gpu(self): method mse (line 82) | def mse(self, pred, label): method loss_fn (line 86) | def loss_fn(self, pred, label): method metric_fn (line 94) | def metric_fn(self, pred, label): method train_epoch (line 102) | def train_epoch(self, data_loader): method test_epoch (line 117) | def test_epoch(self, data_loader): method fit (line 137) | def fit( method predict (line 201) | def predict(self, dataset): class PositionalEncoding (line 222) | class PositionalEncoding(nn.Module): method __init__ (line 223) | def __init__(self, d_model, max_len=1000): method forward (line 233) | def forward(self, x): class Transformer (line 238) | class Transformer(nn.Module): method __init__ (line 239) | def __init__(self, d_feat=6, d_model=8, nhead=4, num_layers=2, dropout... method forward (line 249) | def forward(self, src): FILE: qlib/contrib/model/pytorch_utils.py function count_parameters (line 7) | def count_parameters(models_or_parameters, unit="m"): FILE: qlib/contrib/model/tcn.py class Chomp1d (line 7) | class Chomp1d(nn.Module): method __init__ (line 8) | def __init__(self, chomp_size): method forward (line 12) | def forward(self, x): class TemporalBlock (line 16) | class TemporalBlock(nn.Module): method __init__ (line 17) | def __init__(self, n_inputs, n_outputs, kernel_size, stride, dilation,... method init_weights (line 40) | def init_weights(self): method forward (line 46) | def forward(self, x): class TemporalConvNet (line 52) | class TemporalConvNet(nn.Module): method __init__ (line 53) | def __init__(self, num_inputs, num_channels, kernel_size=2, dropout=0.2): method forward (line 75) | def forward(self, x): FILE: qlib/contrib/model/xgboost.py class XGBModel (line 15) | class XGBModel(Model, FeatureInt): method __init__ (line 18) | def __init__(self, **kwargs): method fit (line 23) | def fit( method predict (line 71) | def predict(self, dataset: DatasetH, segment: Union[Text, slice] = "te... method get_feature_importance (line 77) | def get_feature_importance(self, *args, **kwargs) -> pd.Series: FILE: qlib/contrib/online/manager.py class UserManager (line 17) | class UserManager: method __init__ (line 18) | def __init__(self, user_data_path, save_report=True): method load_users (line 46) | def load_users(self): method load_user (line 55) | def load_user(self, user_id): method save_user_data (line 77) | def save_user_data(self, user_id): method add_user (line 95) | def add_user(self, user_id, config_file, add_date): method remove_user (line 135) | def remove_user(self, user_id): FILE: qlib/contrib/online/online_model.py class ScoreFileModel (line 13) | class ScoreFileModel(Model): method __init__ (line 18) | def __init__(self, score_path): method get_data_with_date (line 22) | def get_data_with_date(self, date, **kwargs): method predict (line 29) | def predict(self, x_test, **kwargs): method score (line 32) | def score(self, x_test, **kwargs): method fit (line 35) | def fit(self, x_train, y_train, x_valid, y_valid, w_train=None, w_vali... method save (line 38) | def save(self, fname, **kwargs): FILE: qlib/contrib/online/operator.py class Operator (line 27) | class Operator: method __init__ (line 28) | def __init__(self, client: str): method init (line 39) | def init(client, path, date=None): method add_user (line 67) | def add_user(self, id, config, path, date): method remove_user (line 89) | def remove_user(self, id, path): method generate (line 102) | def generate(self, date, path): method execute (line 138) | def execute(self, date, exchange_config, path): method update (line 172) | def update(self, date, path, type="SIM"): method simulate (line 213) | def simulate(self, id, config, exchange_config, start, end, path, benc... method show (line 284) | def show(self, id, path, bench="SH000905"): function run (line 315) | def run(): FILE: qlib/contrib/online/user.py class User (line 14) | class User: method __init__ (line 15) | def __init__(self, account, strategy, model, verbose=False): method init_state (line 35) | def init_state(self, date): method get_latest_trading_date (line 45) | def get_latest_trading_date(self): method showReport (line 57) | def showReport(self, benchmark="SH000905"): FILE: qlib/contrib/online/utils.py function load_instance (line 21) | def load_instance(file_path): function save_instance (line 38) | def save_instance(instance, file_path): function create_user_folder (line 52) | def create_user_folder(path): function prepare (line 61) | def prepare(um, today, user_id, exchange_config=None): FILE: qlib/contrib/ops/high_freq.py function get_calendar_day (line 13) | def get_calendar_day(freq="1min", future=False): function get_calendar_minute (line 39) | def get_calendar_minute(freq="day", future=False): class DayCumsum (line 50) | class DayCumsum(ElemOperator): method __init__ (line 73) | def __init__(self, feature, start: str = "9:30", end: str = "14:59", d... method period_cusum (line 88) | def period_cusum(self, df): method _load_internal (line 96) | def _load_internal(self, instrument, start_index, end_index, freq): class DayLast (line 102) | class DayLast(ElemOperator): method _load_internal (line 116) | def _load_internal(self, instrument, start_index, end_index, freq): class FFillNan (line 122) | class FFillNan(ElemOperator): method _load_internal (line 136) | def _load_internal(self, instrument, start_index, end_index, freq): class BFillNan (line 141) | class BFillNan(ElemOperator): method _load_internal (line 155) | def _load_internal(self, instrument, start_index, end_index, freq): class Date (line 160) | class Date(ElemOperator): method _load_internal (line 174) | def _load_internal(self, instrument, start_index, end_index, freq): class Select (line 180) | class Select(PairOperator): method _load_internal (line 197) | def _load_internal(self, instrument, start_index, end_index, freq): class IsNull (line 203) | class IsNull(ElemOperator): method _load_internal (line 217) | def _load_internal(self, instrument, start_index, end_index, freq): class IsInf (line 222) | class IsInf(ElemOperator): method _load_internal (line 236) | def _load_internal(self, instrument, start_index, end_index, freq): class Cut (line 241) | class Cut(ElemOperator): method __init__ (line 259) | def __init__(self, feature, left=None, right=None): method _load_internal (line 267) | def _load_internal(self, instrument, start_index, end_index, freq): method get_extended_window_size (line 271) | def get_extended_window_size(self): FILE: qlib/contrib/report/analysis_model/analysis_model_performance.py function _group_return (line 21) | def _group_return(pred_label: pd.DataFrame = None, reverse: bool = False... function _plot_qq (line 81) | def _plot_qq(data: pd.Series = None, dist=stats.norm) -> go.Figure: function _pred_ic (line 119) | def _pred_ic( function _pred_autocorr (line 223) | def _pred_autocorr(pred_label: pd.DataFrame, lag=1, **kwargs) -> tuple: function _pred_turnover (line 240) | def _pred_turnover(pred_label: pd.DataFrame, N=5, lag=1, **kwargs) -> tu... function ic_figure (line 271) | def ic_figure(ic_df: pd.DataFrame, show_nature_day=True, **kwargs) -> go... function model_performance_graph (line 293) | def model_performance_graph( FILE: qlib/contrib/report/analysis_position/cumulative_return.py function _get_cum_return_data_with_position (line 15) | def _get_cum_return_data_with_position( function _get_figure_with_position (line 89) | def _get_figure_with_position( function cumulative_return_graph (line 182) | def cumulative_return_graph( FILE: qlib/contrib/report/analysis_position/parse_position.py function parse_position (line 10) | def parse_position(position: dict = None) -> pd.DataFrame: function _add_label_to_position (line 86) | def _add_label_to_position(position_df: pd.DataFrame, label_data: pd.Dat... function _add_bench_to_position (line 102) | def _add_bench_to_position(position_df: pd.DataFrame = None, bench: pd.S... function _calculate_label_rank (line 116) | def _calculate_label_rank(df: pd.DataFrame) -> pd.DataFrame: function get_position_data (line 138) | def get_position_data( FILE: qlib/contrib/report/analysis_position/rank_label.py function _get_figure_with_position (line 14) | def _get_figure_with_position( function rank_label_graph (line 62) | def rank_label_graph( FILE: qlib/contrib/report/analysis_position/report.py function _calculate_maximum (line 9) | def _calculate_maximum(df: pd.DataFrame, is_ex: bool = False): function _calculate_mdd (line 25) | def _calculate_mdd(series): function _calculate_report_data (line 35) | def _calculate_report_data(df: pd.DataFrame) -> pd.DataFrame: function _report_figure (line 66) | def _report_figure(df: pd.DataFrame) -> [list, tuple]: function report_graph (line 166) | def report_graph(report_df: pd.DataFrame, show_notebook: bool = True) ->... FILE: qlib/contrib/report/analysis_position/risk_analysis.py function _get_risk_analysis_data_with_report (line 15) | def _get_risk_analysis_data_with_report( function _get_all_risk_analysis (line 44) | def _get_all_risk_analysis(risk_df: pd.DataFrame) -> pd.DataFrame: function _get_monthly_risk_analysis_with_report (line 57) | def _get_monthly_risk_analysis_with_report(report_normal_df: pd.DataFram... function _get_monthly_analysis_with_feature (line 95) | def _get_monthly_analysis_with_feature(monthly_df: pd.DataFrame, feature... function _get_risk_analysis_figure (line 112) | def _get_risk_analysis_figure(analysis_df: pd.DataFrame) -> Iterable[py.... function _get_monthly_risk_analysis_figure (line 129) | def _get_monthly_risk_analysis_figure(report_normal_df: pd.DataFrame) ->... function risk_analysis_graph (line 162) | def risk_analysis_graph( FILE: qlib/contrib/report/analysis_position/score_ic.py function _get_score_ic (line 10) | def _get_score_ic(pred_label: pd.DataFrame): function score_ic_graph (line 25) | def score_ic_graph(pred_label: pd.DataFrame, show_notebook: bool = True,... FILE: qlib/contrib/report/data/ana.py class CombFeaAna (line 28) | class CombFeaAna(FeaAnalyser): method __init__ (line 33) | def __init__(self, dataset: pd.DataFrame, *fea_ana_cls): method skip (line 39) | def skip(self, col): method calc_stat_values (line 42) | def calc_stat_values(self): method plot_all (line 45) | def plot_all(self, *args, **kwargs): class NumFeaAnalyser (line 59) | class NumFeaAnalyser(FeaAnalyser): method skip (line 60) | def skip(self, col): class ValueCNT (line 67) | class ValueCNT(FeaAnalyser): method __init__ (line 68) | def __init__(self, dataset: pd.DataFrame, ratio=False): method calc_stat_values (line 72) | def calc_stat_values(self): method plot_single (line 85) | def plot_single(self, col, ax): class FeaDistAna (line 90) | class FeaDistAna(NumFeaAnalyser): method plot_single (line 91) | def plot_single(self, col, ax): class FeaInfAna (line 97) | class FeaInfAna(NumFeaAnalyser): method calc_stat_values (line 98) | def calc_stat_values(self): method skip (line 105) | def skip(self, col): method plot_single (line 108) | def plot_single(self, col, ax): class FeaNanAna (line 113) | class FeaNanAna(FeaAnalyser): method calc_stat_values (line 114) | def calc_stat_values(self): method skip (line 117) | def skip(self, col): method plot_single (line 120) | def plot_single(self, col, ax): class FeaNanAnaRatio (line 125) | class FeaNanAnaRatio(FeaAnalyser): method calc_stat_values (line 126) | def calc_stat_values(self): method skip (line 130) | def skip(self, col): method plot_single (line 133) | def plot_single(self, col, ax): class FeaACAna (line 138) | class FeaACAna(FeaAnalyser): method calc_stat_values (line 141) | def calc_stat_values(self): method plot_single (line 147) | def plot_single(self, col, ax): class FeaSkewTurt (line 152) | class FeaSkewTurt(NumFeaAnalyser): method calc_stat_values (line 153) | def calc_stat_values(self): method plot_single (line 157) | def plot_single(self, col, ax): class FeaMeanStd (line 178) | class FeaMeanStd(NumFeaAnalyser): method calc_stat_values (line 179) | def calc_stat_values(self): method plot_single (line 183) | def plot_single(self, col, ax): class RawFeaAna (line 206) | class RawFeaAna(FeaAnalyser): method calc_stat_values (line 212) | def calc_stat_values(self): method plot_single (line 216) | def plot_single(self, col, ax): FILE: qlib/contrib/report/data/base.py class FeaAnalyser (line 16) | class FeaAnalyser: method __init__ (line 17) | def __init__(self, dataset: pd.DataFrame): method calc_stat_values (line 40) | def calc_stat_values(self): method plot_single (line 43) | def plot_single(self, col, ax): method skip (line 46) | def skip(self, col): method plot_all (line 49) | def plot_all(self, *args, **kwargs): FILE: qlib/contrib/report/graph.py class BaseGraph (line 17) | class BaseGraph: method __init__ (line 20) | def __init__( method _init_data (line 46) | def _init_data(self): method _init_parameters (line 56) | def _init_parameters(self, **kwargs): method get_instance_with_graph_parameters (line 70) | def get_instance_with_graph_parameters(graph_type: str = None, **kwargs): method show_graph_in_notebook (line 86) | def show_graph_in_notebook(figure_list: Iterable[go.Figure] = None): method _get_layout (line 108) | def _get_layout(self) -> go.Layout: method _get_data (line 115) | def _get_data(self) -> list: method figure (line 130) | def figure(self) -> go.Figure: class ScatterGraph (line 141) | class ScatterGraph(BaseGraph): class BarGraph (line 145) | class BarGraph(BaseGraph): class DistplotGraph (line 149) | class DistplotGraph(BaseGraph): method _get_data (line 152) | def _get_data(self): class HeatmapGraph (line 165) | class HeatmapGraph(BaseGraph): method _get_data (line 168) | def _get_data(self): class HistogramGraph (line 185) | class HistogramGraph(BaseGraph): method _get_data (line 188) | def _get_data(self): class SubplotsGraph (line 202) | class SubplotsGraph: method __init__ (line 208) | def __init__( method _init_sub_graph_data (line 295) | def _init_sub_graph_data(self): method _init_subplots_kwargs (line 321) | def _init_subplots_kwargs(self): method _init_figure (line 338) | def _init_figure(self): method figure (line 383) | def figure(self): FILE: qlib/contrib/report/utils.py function sub_fig_generator (line 7) | def sub_fig_generator(sub_figsize=(3, 3), col_n=10, row_n=1, wspace=None... function guess_plotly_rangebreaks (line 49) | def guess_plotly_rangebreaks(dt_index: pd.DatetimeIndex): FILE: qlib/contrib/rolling/base.py class Rolling (line 24) | class Rolling: method __init__ (line 53) | def __init__( method _raw_conf (line 118) | def _raw_conf(self) -> dict: method _replace_handler_with_cache (line 123) | def _replace_handler_with_cache(self, task: dict): method _update_start_end_time (line 135) | def _update_start_end_time(self, task: dict): method basic_task (line 145) | def basic_task(self, enable_handler_cache: Optional[bool] = True): method run_basic_task (line 184) | def run_basic_task(self): method get_task_list (line 194) | def get_task_list(self) -> List[dict]: method _train_rolling_tasks (line 206) | def _train_rolling_tasks(self): method _ens_rolling (line 218) | def _ens_rolling(self): method _update_rolling_rec (line 232) | def _update_rolling_rec(self): method run (line 253) | def run(self): FILE: qlib/contrib/rolling/ddgda.py class DDGDA (line 70) | class DDGDA(Rolling): method __init__ (line 79) | def __init__( method _adjust_task (line 128) | def _adjust_task(self, task: dict, astype: UTIL_MODEL_TYPE): method _get_feature_importance (line 159) | def _get_feature_importance(self): method _dump_data_for_proxy_model (line 179) | def _dump_data_for_proxy_model(self): method _internal_data_path (line 231) | def _internal_data_path(self): method _dump_meta_ipt (line 234) | def _dump_meta_ipt(self): method _train_meta_model (line 254) | def _train_meta_model(self, fill_method="max"): method _task_path (line 322) | def _task_path(self): method get_task_list (line 325) | def get_task_list(self): method run (line 373) | def run(self): FILE: qlib/contrib/strategy/cost_control.py class SoftTopkStrategy (line 8) | class SoftTopkStrategy(WeightStrategyBase): method __init__ (line 9) | def __init__( method get_risk_degree (line 44) | def get_risk_degree(self, trade_step=None): method generate_target_weight_position (line 47) | def generate_target_weight_position(self, score, current, trade_start_... FILE: qlib/contrib/strategy/optimizer/base.py class BaseOptimizer (line 7) | class BaseOptimizer(abc.ABC): method __call__ (line 11) | def __call__(self, *args, **kwargs) -> object: FILE: qlib/contrib/strategy/optimizer/enhanced_indexing.py class EnhancedIndexingOptimizer (line 15) | class EnhancedIndexingOptimizer(BaseOptimizer): method __init__ (line 46) | def __init__( method __call__ (line 87) | def __call__( FILE: qlib/contrib/strategy/optimizer/optimizer.py class PortfolioOptimizer (line 14) | class PortfolioOptimizer(BaseOptimizer): method __init__ (line 32) | def __init__( method __call__ (line 65) | def __call__( method _optimize (line 114) | def _optimize(self, S: np.ndarray, r: Optional[np.ndarray] = None, w0:... method _optimize_inv (line 139) | def _optimize_inv(self, S: np.ndarray) -> np.ndarray: method _optimize_gmv (line 146) | def _optimize_gmv(self, S: np.ndarray, w0: Optional[np.ndarray] = None... method _optimize_mvo (line 156) | def _optimize_mvo( method _optimize_rp (line 169) | def _optimize_rp(self, S: np.ndarray, w0: Optional[np.ndarray] = None)... method _get_objective_gmv (line 179) | def _get_objective_gmv(self, S: np.ndarray) -> Callable: method _get_objective_mvo (line 191) | def _get_objective_mvo(self, S: np.ndarray, r: np.ndarray = None) -> C... method _get_objective_rp (line 205) | def _get_objective_rp(self, S: np.ndarray) -> Callable: method _get_constrains (line 220) | def _get_constrains(self, w0: Optional[np.ndarray] = None): method _solve (line 241) | def _solve(self, n: int, obj: Callable, bounds: so.Bounds, cons: List)... FILE: qlib/contrib/strategy/order_generator.py class OrderGenerator (line 15) | class OrderGenerator: method generate_order_list_from_target_weight_position (line 16) | def generate_order_list_from_target_weight_position( class OrderGenWInteract (line 51) | class OrderGenWInteract(OrderGenerator): method generate_order_list_from_target_weight_position (line 54) | def generate_order_list_from_target_weight_position( class OrderGenWOInteract (line 143) | class OrderGenWOInteract(OrderGenerator): method generate_order_list_from_target_weight_position (line 146) | def generate_order_list_from_target_weight_position( FILE: qlib/contrib/strategy/rule_strategy.py class TWAPStrategy (line 22) | class TWAPStrategy(BaseStrategy): method reset (line 30) | def reset(self, outer_trade_decision: BaseTradeDecision = None, **kwar... method generate_trade_decision (line 43) | def generate_trade_decision(self, execute_result=None): class SBBStrategyBase (line 125) | class SBBStrategyBase(BaseStrategy): method reset (line 139) | def reset(self, outer_trade_decision: BaseTradeDecision = None, **kwar... method _pred_price_trend (line 154) | def _pred_price_trend(self, stock_id, pred_start_time=None, pred_end_t... method generate_trade_decision (line 157) | def generate_trade_decision(self, execute_result=None): class SBBStrategyEMA (line 297) | class SBBStrategyEMA(SBBStrategyBase): method __init__ (line 307) | def __init__( method _reset_signal (line 338) | def _reset_signal(self): method reset_level_infra (line 353) | def reset_level_infra(self, level_infra): method _pred_price_trend (line 361) | def _pred_price_trend(self, stock_id, pred_start_time=None, pred_end_t... class ACStrategy (line 383) | class ACStrategy(BaseStrategy): method __init__ (line 388) | def __init__( method _reset_signal (line 423) | def _reset_signal(self): method reset_level_infra (line 440) | def reset_level_infra(self, level_infra): method reset (line 448) | def reset(self, outer_trade_decision: BaseTradeDecision = None, **kwar... method generate_trade_decision (line 461) | def generate_trade_decision(self, execute_result=None): class RandomOrderStrategy (line 539) | class RandomOrderStrategy(BaseStrategy): method __init__ (line 540) | def __init__( method generate_trade_decision (line 577) | def generate_trade_decision(self, execute_result=None): class FileOrderStrategy (line 596) | class FileOrderStrategy(BaseStrategy): method __init__ (line 602) | def __init__( method generate_trade_decision (line 648) | def generate_trade_decision(self, execute_result=None) -> TradeDecisio... FILE: qlib/contrib/strategy/signal_strategy.py class BaseSignalStrategy (line 25) | class BaseSignalStrategy(BaseStrategy, ABC): method __init__ (line 26) | def __init__( method get_risk_degree (line 66) | def get_risk_degree(self, trade_step=None): class TopkDropoutStrategy (line 75) | class TopkDropoutStrategy(BaseSignalStrategy): method __init__ (line 81) | def __init__( method generate_trade_decision (line 138) | def generate_trade_decision(self, execute_result=None): class WeightStrategyBase (line 298) | class WeightStrategyBase(BaseSignalStrategy): method __init__ (line 303) | def __init__( method generate_target_weight_position (line 330) | def generate_target_weight_position(self, score, current, trade_start_... method generate_trade_decision (line 345) | def generate_trade_decision(self, execute_result=None): class EnhancedIndexingStrategy (line 375) | class EnhancedIndexingStrategy(WeightStrategyBase): method __init__ (line 406) | def __init__( method get_risk_data (line 436) | def get_risk_data(self, date): method generate_target_weight_position (line 462) | def generate_target_weight_position(self, score, current, trade_start_... FILE: qlib/contrib/torch.py function data_to_tensor (line 14) | def data_to_tensor(data, device="cpu", raise_error=False): FILE: qlib/contrib/tuner/config.py class TunerConfigManager (line 12) | class TunerConfigManager: method __init__ (line 13) | def __init__(self, config_path): class PipelineExperimentConfig (line 33) | class PipelineExperimentConfig: method __init__ (line 34) | def __init__(self, config, TUNER_CONFIG_MANAGER): class OptimizationConfig (line 59) | class OptimizationConfig: method __init__ (line 60) | def __init__(self, config, TUNER_CONFIG_MANAGER): FILE: qlib/contrib/tuner/launcher.py function run (line 30) | def run(): FILE: qlib/contrib/tuner/pipeline.py class Pipeline (line 17) | class Pipeline: method __init__ (line 20) | def __init__(self, tuner_config_manager): method run (line 37) | def run(self): method init_tuner (line 50) | def init_tuner(self, tuner_index, tuner_config): method save_tuner_exp_info (line 76) | def save_tuner_exp_info(self): FILE: qlib/contrib/tuner/tuner.py class Tuner (line 25) | class Tuner: method __init__ (line 26) | def __init__(self, tuner_config, optim_config): method tune (line 43) | def tune(self): method objective (line 60) | def objective(self, params): method setup_space (line 69) | def setup_space(self): method save_local_best_params (line 77) | def save_local_best_params(self): class QLibTuner (line 84) | class QLibTuner(Tuner): method objective (line 91) | def objective(self, params): method fetch_result (line 118) | def fetch_result(self): method setup_estimator_config (line 152) | def setup_estimator_config(self, params): method setup_space (line 169) | def setup_space(self): method save_local_best_params (line 208) | def save_local_best_params(self): FILE: qlib/contrib/workflow/record_temp.py class MultiSegRecord (line 19) | class MultiSegRecord(RecordTemp): method __init__ (line 25) | def __init__(self, model, dataset, recorder=None): method generate (line 32) | def generate(self, segments: Dict[Text, Any], save: bool = False): class SignalMseRecord (line 60) | class SignalMseRecord(RecordTemp): method __init__ (line 69) | def __init__(self, recorder, **kwargs): method generate (line 72) | def generate(self): method list (line 85) | def list(self): FILE: qlib/data/base.py class Expression (line 13) | class Expression(abc.ABC): method __str__ (line 26) | def __str__(self): method __repr__ (line 29) | def __repr__(self): method __gt__ (line 32) | def __gt__(self, other): method __ge__ (line 37) | def __ge__(self, other): method __lt__ (line 42) | def __lt__(self, other): method __le__ (line 47) | def __le__(self, other): method __eq__ (line 52) | def __eq__(self, other): method __ne__ (line 57) | def __ne__(self, other): method __add__ (line 62) | def __add__(self, other): method __radd__ (line 67) | def __radd__(self, other): method __sub__ (line 72) | def __sub__(self, other): method __rsub__ (line 77) | def __rsub__(self, other): method __mul__ (line 82) | def __mul__(self, other): method __rmul__ (line 87) | def __rmul__(self, other): method __div__ (line 92) | def __div__(self, other): method __rdiv__ (line 97) | def __rdiv__(self, other): method __truediv__ (line 102) | def __truediv__(self, other): method __rtruediv__ (line 107) | def __rtruediv__(self, other): method __pow__ (line 112) | def __pow__(self, other): method __rpow__ (line 117) | def __rpow__(self, other): method __and__ (line 122) | def __and__(self, other): method __rand__ (line 127) | def __rand__(self, other): method __or__ (line 132) | def __or__(self, other): method __ror__ (line 137) | def __ror__(self, other): method load (line 142) | def load(self, instrument, start_index, end_index, *args): method _load_internal (line 206) | def _load_internal(self, instrument, start_index, end_index, *args) ->... method get_longest_back_rolling (line 210) | def get_longest_back_rolling(self): method get_extended_window_size (line 223) | def get_extended_window_size(self): class Feature (line 238) | class Feature(Expression): method __init__ (line 244) | def __init__(self, name=None): method __str__ (line 250) | def __str__(self): method _load_internal (line 253) | def _load_internal(self, instrument, start_index, end_index, freq): method get_longest_back_rolling (line 259) | def get_longest_back_rolling(self): method get_extended_window_size (line 262) | def get_extended_window_size(self): class PFeature (line 266) | class PFeature(Feature): method __str__ (line 267) | def __str__(self): method _load_internal (line 270) | def _load_internal(self, instrument, start_index, end_index, cur_time,... class ExpressionOps (line 276) | class ExpressionOps(Expression): FILE: qlib/data/cache.py class QlibCacheException (line 40) | class QlibCacheException(RuntimeError): class MemCacheUnit (line 44) | class MemCacheUnit(abc.ABC): method __init__ (line 47) | def __init__(self, *args, **kwargs): method __setitem__ (line 52) | def __setitem__(self, key, value): method __getitem__ (line 68) | def __getitem__(self, key): method __contains__ (line 73) | def __contains__(self, key): method __len__ (line 76) | def __len__(self): method __repr__ (line 79) | def __repr__(self): method set_limit_size (line 82) | def set_limit_size(self, limit): method limited (line 86) | def limited(self): method total_size (line 91) | def total_size(self): method clear (line 94) | def clear(self): method popitem (line 98) | def popitem(self, last=True): method pop (line 104) | def pop(self, key): method _adjust_size (line 110) | def _adjust_size(self, key, value): method _get_value_size (line 117) | def _get_value_size(self, value): class MemCacheLengthUnit (line 121) | class MemCacheLengthUnit(MemCacheUnit): method __init__ (line 122) | def __init__(self, size_limit=0): method _get_value_size (line 125) | def _get_value_size(self, value): class MemCacheSizeofUnit (line 129) | class MemCacheSizeofUnit(MemCacheUnit): method __init__ (line 130) | def __init__(self, size_limit=0): method _get_value_size (line 133) | def _get_value_size(self, value): class MemCache (line 137) | class MemCache: method __init__ (line 140) | def __init__(self, mem_cache_size_limit=None, limit_type="length"): method __getitem__ (line 165) | def __getitem__(self, key): method clear (line 175) | def clear(self): class MemCacheExpire (line 181) | class MemCacheExpire: method set_cache (line 185) | def set_cache(mem_cache, key, value): method get_cache (line 195) | def get_cache(mem_cache, key): class CacheUtils (line 210) | class CacheUtils: method organize_meta_file (line 214) | def organize_meta_file(): method reset_lock (line 218) | def reset_lock(): method visit (line 223) | def visit(cache_path: Union[str, Path]): method acquire (line 241) | def acquire(lock, lock_name): method reader_lock (line 258) | def reader_lock(redis_t, lock_name: str): method writer_lock (line 286) | def writer_lock(redis_t, lock_name): class BaseProviderCache (line 295) | class BaseProviderCache: method __init__ (line 298) | def __init__(self, provider): method __getattr__ (line 302) | def __getattr__(self, attr): method check_cache_exists (line 306) | def check_cache_exists(cache_path: Union[str, Path], suffix_list: Iter... method clear_cache (line 314) | def clear_cache(cache_path: Union[str, Path]): method get_cache_dir (line 324) | def get_cache_dir(dir_name: str, freq: str = None) -> Path: class ExpressionCache (line 330) | class ExpressionCache(BaseProviderCache): method expression (line 338) | def expression(self, instrument, field, start_time, end_time, freq): method _uri (line 348) | def _uri(self, instrument, field, start_time, end_time, freq): method _expression (line 355) | def _expression(self, instrument, field, start_time, end_time, freq): method update (line 362) | def update(self, cache_uri: Union[str, Path], freq: str = "day"): class DatasetCache (line 381) | class DatasetCache(BaseProviderCache): method dataset (line 391) | def dataset( method _uri (line 418) | def _uri(self, instruments, fields, start_time, end_time, freq, **kwar... method _dataset (line 425) | def _dataset( method _dataset_uri (line 434) | def _dataset_uri( method update (line 448) | def update(self, cache_uri: Union[str, Path], freq: str = "day"): method cache_to_origin_data (line 467) | def cache_to_origin_data(data, fields): method normalize_uri_args (line 481) | def normalize_uri_args(instruments, fields, freq): class DiskExpressionCache (line 490) | class DiskExpressionCache(ExpressionCache): method __init__ (line 493) | def __init__(self, provider, **kwargs): method get_cache_dir (line 499) | def get_cache_dir(self, freq: str = None) -> Path: method _uri (line 502) | def _uri(self, instrument, field, start_time, end_time, freq): method _expression (line 507) | def _expression(self, instrument, field, start_time=None, end_time=Non... method gen_expression_cache (line 566) | def gen_expression_cache(self, expression_data, cache_path, instrument... method update (line 586) | def update(self, sid, cache_uri, freq: str = "day"): class DiskDatasetCache (line 647) | class DiskDatasetCache(DatasetCache): method __init__ (line 650) | def __init__(self, provider, **kwargs): method _uri (line 656) | def _uri(instruments, fields, start_time, end_time, freq, disk_cache=1... method get_cache_dir (line 659) | def get_cache_dir(self, freq: str = None) -> Path: method read_data_from_cache (line 663) | def read_data_from_cache(cls, cache_path: Union[str, Path], start_time... method _dataset (line 696) | def _dataset( method _dataset_uri (line 750) | def _dataset_uri( class IndexManager (line 794) | class IndexManager: method __init__ (line 802) | def __init__(self, cache_path: Union[str, Path]): method get_index (line 807) | def get_index(self, start_time=None, end_time=None): method sync_to_disk (line 813) | def sync_to_disk(self): method sync_from_disk (line 821) | def sync_from_disk(self): method update (line 829) | def update(self, data, sync=True): method append_index (line 834) | def append_index(self, data, to_disk=True): method build_index_from_data (line 843) | def build_index_from_data(data, start_index=0): method gen_dataset_cache (line 857) | def gen_dataset_cache(self, cache_path: Union[str, Path], instruments,... method update (line 952) | def update(self, cache_uri, freq: str = "day"): class SimpleDatasetCache (line 1064) | class SimpleDatasetCache(DatasetCache): method __init__ (line 1067) | def __init__(self, provider): method _uri (line 1079) | def _uri(self, instruments, fields, start_time, end_time, freq, disk_c... method _dataset (line 1085) | def _dataset( class DatasetURICache (line 1118) | class DatasetURICache(DatasetCache): method _uri (line 1121) | def _uri(self, instruments, fields, start_time, end_time, freq, disk_c... method dataset (line 1124) | def dataset( class CalendarCache (line 1180) | class CalendarCache(BaseProviderCache): class MemoryCalendarCache (line 1184) | class MemoryCalendarCache(CalendarCache): method calendar (line 1185) | def calendar(self, start_time=None, end_time=None, freq="day", future=... FILE: qlib/data/client.py class Client (line 16) | class Client: method __init__ (line 22) | def __init__(self, host, port): method connect_server (line 35) | def connect_server(self): method disconnect (line 42) | def disconnect(self): method send_request (line 49) | def send_request(self, request_type, request_content, msg_queue, msg_p... FILE: qlib/data/data.py class ProviderBackendMixin (line 43) | class ProviderBackendMixin: method get_default_backend (line 49) | def get_default_backend(self): method backend_obj (line 58) | def backend_obj(self, **kwargs): class CalendarProvider (line 65) | class CalendarProvider(abc.ABC): method calendar (line 71) | def calendar(self, start_time=None, end_time=None, freq="day", future=... method locate_index (line 111) | def locate_index( method _get_calendar (line 154) | def _get_calendar(self, freq, future): method _uri (line 178) | def _uri(self, start_time, end_time, freq, future=False): method load_calendar (line 182) | def load_calendar(self, freq, future): class InstrumentProvider (line 199) | class InstrumentProvider(abc.ABC): method instruments (line 206) | def instruments(market: Union[List, str] = "all", filter_pipe: Union[L... method list_instruments (line 267) | def list_instruments(self, instruments, start_time=None, end_time=None... method _uri (line 288) | def _uri(self, instruments, start_time=None, end_time=None, freq="day"... method get_inst_type (line 297) | def get_inst_type(cls, inst): class FeatureProvider (line 307) | class FeatureProvider(abc.ABC): method feature (line 314) | def feature(self, instrument, field, start_time, end_time, freq): class PITProvider (line 338) | class PITProvider(abc.ABC): method period_feature (line 340) | def period_feature( class ExpressionProvider (line 383) | class ExpressionProvider(abc.ABC): method __init__ (line 389) | def __init__(self): method get_expression_instance (line 392) | def get_expression_instance(self, field): method expression (line 410) | def expression(self, instrument, field, start_time=None, end_time=None... class DatasetProvider (line 446) | class DatasetProvider(abc.ABC): method dataset (line 453) | def dataset(self, instruments, fields, start_time=None, end_time=None,... method _uri (line 478) | def _uri( method get_instruments_d (line 511) | def get_instruments_d(instruments, freq): method get_column_names (line 532) | def get_column_names(fields): method parse_fields (line 543) | def parse_fields(fields): method dataset_processor (line 548) | def dataset_processor(instruments_d, column_names, start_time, end_tim... method inst_calculator (line 600) | def inst_calculator(inst, start_time, end_time, freq, column_names, sp... class LocalCalendarProvider (line 637) | class LocalCalendarProvider(CalendarProvider, ProviderBackendMixin): method __init__ (line 643) | def __init__(self, remote=False, backend={}): method load_calendar (line 648) | def load_calendar(self, freq, future): class LocalInstrumentProvider (line 678) | class LocalInstrumentProvider(InstrumentProvider, ProviderBackendMixin): method __init__ (line 684) | def __init__(self, backend={}) -> None: method _load_instruments (line 688) | def _load_instruments(self, market, freq): method list_instruments (line 691) | def list_instruments(self, instruments, start_time=None, end_time=None... class LocalFeatureProvider (line 726) | class LocalFeatureProvider(FeatureProvider, ProviderBackendMixin): method __init__ (line 732) | def __init__(self, remote=False, backend={}): method feature (line 737) | def feature(self, instrument, field, start_index, end_index, freq): class LocalPITProvider (line 744) | class LocalPITProvider(PITProvider): method period_feature (line 748) | def period_feature(self, instrument, field, start_index, end_index, cu... class LocalExpressionProvider (line 833) | class LocalExpressionProvider(ExpressionProvider): method __init__ (line 839) | def __init__(self, time2idx=True): method expression (line 843) | def expression(self, instrument, field, start_time=None, end_time=None... class LocalDatasetProvider (line 882) | class LocalDatasetProvider(DatasetProvider): method __init__ (line 888) | def __init__(self, align_time: bool = True): method dataset (line 902) | def dataset( method multi_cache_walker (line 930) | def multi_cache_walker(instruments, fields, start_time=None, end_time=... method cache_walker (line 951) | def cache_walker(inst, start_time, end_time, freq, column_names): class ClientCalendarProvider (line 961) | class ClientCalendarProvider(CalendarProvider): method __init__ (line 967) | def __init__(self): method set_conn (line 971) | def set_conn(self, conn): method calendar (line 974) | def calendar(self, start_time=None, end_time=None, freq="day", future=... class ClientInstrumentProvider (line 985) | class ClientInstrumentProvider(InstrumentProvider): method __init__ (line 991) | def __init__(self): method set_conn (line 995) | def set_conn(self, conn): method list_instruments (line 998) | def list_instruments(self, instruments, start_time=None, end_time=None... class ClientDatasetProvider (line 1027) | class ClientDatasetProvider(DatasetProvider): method __init__ (line 1033) | def __init__(self): method set_conn (line 1036) | def set_conn(self, conn): method dataset (line 1040) | def dataset( class BaseProvider (line 1140) | class BaseProvider: method calendar (line 1148) | def calendar(self, start_time=None, end_time=None, freq="day", future=... method instruments (line 1151) | def instruments(self, market="all", filter_pipe=None, start_time=None,... method list_instruments (line 1159) | def list_instruments(self, instruments, start_time=None, end_time=None... method features (line 1162) | def features( class LocalProvider (line 1193) | class LocalProvider(BaseProvider): method _uri (line 1194) | def _uri(self, type, **kwargs): method features_uri (line 1209) | def features_uri(self, instruments, fields, start_time, end_time, freq... class ClientProvider (line 1224) | class ClientProvider(BaseProvider): method __init__ (line 1239) | def __init__(self): function register_all_wrappers (line 1292) | def register_all_wrappers(C): FILE: qlib/data/dataset/__init__.py class Dataset (line 15) | class Dataset(Serializable): method __init__ (line 20) | def __init__(self, **kwargs): method config (line 35) | def config(self, **kwargs): method setup_data (line 41) | def setup_data(self, **kwargs): method prepare (line 56) | def prepare(self, **kwargs) -> object: class DatasetH (line 72) | class DatasetH(Dataset): method __init__ (line 84) | def __init__( method config (line 124) | def config(self, handler_kwargs: dict = None, **kwargs): method setup_data (line 148) | def setup_data(self, handler_kwargs: dict = None, **kwargs): method __repr__ (line 166) | def __repr__(self): method _prepare_seg (line 171) | def _prepare_seg(self, slc, **kwargs): method prepare (line 185) | def prepare( method get_min_time (line 251) | def get_min_time(segments): method get_max_time (line 255) | def get_max_time(segments): method _get_extrema (line 259) | def _get_extrema(segments, idx: int, cmp: Callable, key_func=pd.Timest... class TSDataSampler (line 272) | class TSDataSampler: method __init__ (line 343) | def __init__( method slice_idx_map_and_data_index (line 432) | def slice_idx_map_and_data_index( method idx_map2arr (line 449) | def idx_map2arr(idx_map): method flt_idx_map (line 468) | def flt_idx_map(flt_data, idx_map): method get_index (line 477) | def get_index(self): method config (line 484) | def config(self, **kwargs): method build_index (line 490) | def build_index(data: pd.DataFrame) -> Tuple[pd.DataFrame, dict]: method empty (line 533) | def empty(self): method _get_indices (line 536) | def _get_indices(self, row: int, col: int) -> np.array: method _get_row_col (line 565) | def _get_row_col(self, idx) -> Tuple[int]: method __getitem__ (line 597) | def __getitem__(self, idx: Union[int, Tuple[object, str], List[int]]): method __len__ (line 638) | def __len__(self): class TSDatasetH (line 642) | class TSDatasetH(DatasetH): method __init__ (line 663) | def __init__(self, step_len=DEFAULT_STEP_LEN, flt_col: Optional[str] =... method config (line 668) | def config(self, **kwargs): method setup_data (line 673) | def setup_data(self, **kwargs): method _extend_slice (line 680) | def _extend_slice(slc: slice, cal: list, step_len: int) -> slice: method _prepare_seg (line 688) | def _prepare_seg(self, slc: slice, **kwargs) -> TSDataSampler: FILE: qlib/data/dataset/handler.py class DataHandlerABC (line 25) | class DataHandlerABC(Serializable): method __init__ (line 42) | def __init__(self, *args, **kwargs): # pylint: disable=W0246 method fetch (line 57) | def fetch( class DataHandler (line 67) | class DataHandler(DataHandlerABC): method __init__ (line 105) | def __init__( method config (line 153) | def config(self, **kwargs): method setup_data (line 173) | def setup_data(self, enable_cache: bool = False): method fetch (line 197) | def fetch( method _fetch_data (line 278) | def _fetch_data( method get_cols (line 328) | def get_cols(self, col_set=DataHandlerABC.CS_ALL) -> list: method get_range_selector (line 346) | def get_range_selector(self, cur_date: Union[pd.Timestamp, str], perio... method get_range_iterator (line 363) | def get_range_iterator( class DataHandlerLP (line 382) | class DataHandlerLP(DataHandler): method __init__ (line 436) | def __init__( method get_all_processors (line 510) | def get_all_processors(self): method fit (line 513) | def fit(self): method fit_process_data (line 521) | def fit_process_data(self): method _run_proc_l (line 530) | def _run_proc_l( method _is_proc_readonly (line 543) | def _is_proc_readonly(proc_l: List[processor_module.Processor]): method process_data (line 552) | def process_data(self, with_fit: bool = False): method config (line 614) | def config(self, processor_kwargs: dict = None, **kwargs): method setup_data (line 633) | def setup_data(self, init_type: str = IT_FIT_SEQ, **kwargs): method _get_df_by_key (line 665) | def _get_df_by_key(self, data_key: DATA_KEY_TYPE = DataHandlerABC.DK_I... method fetch (line 673) | def fetch( method get_cols (line 712) | def get_cols(self, col_set=DataHandler.CS_ALL, data_key: DATA_KEY_TYPE... method cast (line 733) | def cast(cls, handler: "DataHandlerLP") -> "DataHandlerLP": method from_df (line 765) | def from_df(cls, df: pd.DataFrame) -> "DataHandlerLP": FILE: qlib/data/dataset/loader.py class DataLoader (line 18) | class DataLoader(abc.ABC): method load (line 24) | def load(self, instruments, start_time=None, end_time=None) -> pd.Data... class DLWParser (line 62) | class DLWParser(DataLoader): method __init__ (line 69) | def __init__(self, config: Union[list, tuple, dict]): method _parse_fields_info (line 95) | def _parse_fields_info(self, fields_info: Union[list, tuple]) -> Tuple... method load_group_df (line 111) | def load_group_df( method load (line 138) | def load(self, instruments=None, start_time=None, end_time=None) -> pd... class QlibDataLoader (line 153) | class QlibDataLoader(DLWParser): method __init__ (line 156) | def __init__( method load_group_df (line 202) | def load_group_df( class StaticDataLoader (line 230) | class StaticDataLoader(DataLoader, Serializable): method __init__ (line 237) | def __init__(self, config: Union[dict, str, pd.DataFrame], join="outer"): method __getstate__ (line 250) | def __getstate__(self) -> dict: method load (line 254) | def load(self, instruments=None, start_time=None, end_time=None) -> pd... method _maybe_load_raw_data (line 271) | def _maybe_load_raw_data(self): class NestedDataLoader (line 291) | class NestedDataLoader(DataLoader): method __init__ (line 296) | def __init__(self, dataloader_l: List[Dict], join="left") -> None: method load (line 329) | def load(self, instruments=None, start_time=None, end_time=None) -> pd... class DataLoaderDH (line 350) | class DataLoaderDH(DataLoader): method __init__ (line 363) | def __init__(self, handler_config: dict, fetch_kwargs: dict = {}, is_g... method load (line 400) | def load(self, instruments=None, start_time=None, end_time=None) -> pd... FILE: qlib/data/dataset/processor.py function get_group_columns (line 18) | def get_group_columns(df: pd.DataFrame, group: Union[Text, None]): class Processor (line 35) | class Processor(Serializable): method fit (line 36) | def fit(self, df: pd.DataFrame = None): method __call__ (line 49) | def __call__(self, df: pd.DataFrame): method is_for_infer (line 62) | def is_for_infer(self) -> bool: method readonly (line 74) | def readonly(self) -> bool: method config (line 82) | def config(self, **kwargs): class DropnaProcessor (line 94) | class DropnaProcessor(Processor): method __init__ (line 95) | def __init__(self, fields_group=None): method __call__ (line 98) | def __call__(self, df): method readonly (line 101) | def readonly(self): class DropnaLabel (line 105) | class DropnaLabel(DropnaProcessor): method __init__ (line 106) | def __init__(self, fields_group="label"): method is_for_infer (line 109) | def is_for_infer(self) -> bool: class DropCol (line 114) | class DropCol(Processor): method __init__ (line 115) | def __init__(self, col_list=[]): method __call__ (line 118) | def __call__(self, df): method readonly (line 125) | def readonly(self): class FilterCol (line 129) | class FilterCol(Processor): method __init__ (line 130) | def __init__(self, fields_group="feature", col_list=[]): method __call__ (line 134) | def __call__(self, df): method readonly (line 142) | def readonly(self): class TanhProcess (line 146) | class TanhProcess(Processor): method __call__ (line 149) | def __call__(self, df): class ProcessInf (line 161) | class ProcessInf(Processor): method __call__ (line 164) | def __call__(self, df): class Fillna (line 179) | class Fillna(Processor): method __init__ (line 182) | def __init__(self, fields_group=None, fill_value=0): method __call__ (line 186) | def __call__(self, df): class MinMaxNorm (line 196) | class MinMaxNorm(Processor): method __init__ (line 197) | def __init__(self, fit_start_time, fit_end_time, fields_group=None): method fit (line 204) | def fit(self, df: pd.DataFrame = None): method __call__ (line 220) | def __call__(self, df): class ZScoreNorm (line 228) | class ZScoreNorm(Processor): method __init__ (line 231) | def __init__(self, fit_start_time, fit_end_time, fields_group=None): method fit (line 238) | def fit(self, df: pd.DataFrame = None): method __call__ (line 254) | def __call__(self, df): class RobustZScoreNorm (line 262) | class RobustZScoreNorm(Processor): method __init__ (line 273) | def __init__(self, fit_start_time, fit_end_time, fields_group=None, cl... method fit (line 281) | def fit(self, df: pd.DataFrame = None): method __call__ (line 290) | def __call__(self, df): class CSZScoreNorm (line 300) | class CSZScoreNorm(Processor): method __init__ (line 303) | def __init__(self, fields_group=None, method="zscore"): method __call__ (line 312) | def __call__(self, df): class CSRankNorm (line 326) | class CSRankNorm(Processor): method __init__ (line 349) | def __init__(self, fields_group=None): method __call__ (line 352) | def __call__(self, df): class CSZFillna (line 362) | class CSZFillna(Processor): method __init__ (line 365) | def __init__(self, fields_group=None): method __call__ (line 368) | def __call__(self, df): class HashStockFormat (line 374) | class HashStockFormat(Processor): method __call__ (line 377) | def __call__(self, df: pd.DataFrame): class TimeRangeFlt (line 383) | class TimeRangeFlt(InstProcessor): method __init__ (line 390) | def __init__( method __call__ (line 412) | def __call__(self, df: pd.DataFrame, instrument, *args, **kwargs): FILE: qlib/data/dataset/storage.py class BaseHandlerStorage (line 12) | class BaseHandlerStorage: method fetch (line 20) | def fetch( class NaiveDFStorage (line 54) | class NaiveDFStorage(BaseHandlerStorage): method __init__ (line 60) | def __init__(self, df: pd.DataFrame): method fetch (line 63) | def fetch( class HashingStockStorage (line 88) | class HashingStockStorage(BaseHandlerStorage): method __init__ (line 102) | def __init__(self, df): method from_df (line 110) | def from_df(df): method _fetch_hash_df_by_stock (line 113) | def _fetch_hash_df_by_stock(self, selector, level): method fetch (line 168) | def fetch( FILE: qlib/data/dataset/utils.py function get_level_index (line 12) | def get_level_index(df: pd.DataFrame, level: Union[str, int]) -> int: function fetch_df_by_index (line 41) | def fetch_df_by_index( function fetch_df_by_col (line 81) | def fetch_df_by_col(df: pd.DataFrame, col_set: Union[str, List[str]]) ->... function convert_index_format (line 92) | def convert_index_format(df: Union[pd.DataFrame, pd.Series], level: str ... function init_task_handler (line 119) | def init_task_handler(task: dict) -> DataHandler: FILE: qlib/data/dataset/weight.py class Reweighter (line 5) | class Reweighter: method __init__ (line 6) | def __init__(self, *args, **kwargs): method reweight (line 12) | def reweight(self, data: object) -> object: FILE: qlib/data/filter.py class BaseDFilter (line 15) | class BaseDFilter(abc.ABC): method __init__ (line 25) | def __init__(self): method from_config (line 29) | def from_config(config): method to_config (line 40) | def to_config(self): class SeriesDFilter (line 51) | class SeriesDFilter(BaseDFilter): method __init__ (line 65) | def __init__(self, fstart_time=None, fend_time=None, keep=False): method _getTimeBound (line 83) | def _getTimeBound(self, instruments): method _toSeries (line 104) | def _toSeries(self, time_range, target_timestamp): method _filterSeries (line 129) | def _filterSeries(self, timestamp_series, filter_series): method _toTimestamp (line 149) | def _toTimestamp(self, timestamp_series): method __call__ (line 189) | def __call__(self, instruments, start_time=None, end_time=None, freq="... method _getFilterSeries (line 195) | def _getFilterSeries(self, instruments, fstart, fend): method filter_main (line 216) | def filter_main(self, instruments, start_time=None, end_time=None): class NameDFilter (line 265) | class NameDFilter(SeriesDFilter): method __init__ (line 273) | def __init__(self, name_rule_re, fstart_time=None, fend_time=None): method _getFilterSeries (line 284) | def _getFilterSeries(self, instruments, fstart, fend): method from_config (line 296) | def from_config(config): method to_config (line 303) | def to_config(self): class ExpressionDFilter (line 312) | class ExpressionDFilter(SeriesDFilter): method __init__ (line 326) | def __init__(self, rule_expression, fstart_time=None, fend_time=None, ... method _getFilterSeries (line 341) | def _getFilterSeries(self, instruments, fstart, fend): method from_config (line 360) | def from_config(config): method to_config (line 368) | def to_config(self): FILE: qlib/data/inst_processor.py class InstProcessor (line 6) | class InstProcessor: method __call__ (line 8) | def __call__(self, df: pd.DataFrame, instrument, *args, **kwargs): method __str__ (line 21) | def __str__(self): FILE: qlib/data/ops.py class ElemOperator (line 37) | class ElemOperator(ExpressionOps): method __init__ (line 51) | def __init__(self, feature): method __str__ (line 54) | def __str__(self): method get_longest_back_rolling (line 57) | def get_longest_back_rolling(self): method get_extended_window_size (line 60) | def get_extended_window_size(self): class ChangeInstrument (line 64) | class ChangeInstrument(ElemOperator): method __init__ (line 82) | def __init__(self, instrument, feature): method __str__ (line 86) | def __str__(self): method load (line 89) | def load(self, instrument, start_index, end_index, *args): method _load_internal (line 93) | def _load_internal(self, instrument, start_index, end_index, *args): class NpElemOperator (line 97) | class NpElemOperator(ElemOperator): method __init__ (line 113) | def __init__(self, feature, func): method _load_internal (line 117) | def _load_internal(self, instrument, start_index, end_index, *args): class Abs (line 122) | class Abs(NpElemOperator): method __init__ (line 136) | def __init__(self, feature): class Sign (line 140) | class Sign(NpElemOperator): method __init__ (line 154) | def __init__(self, feature): method _load_internal (line 157) | def _load_internal(self, instrument, start_index, end_index, *args): class Log (line 167) | class Log(NpElemOperator): method __init__ (line 181) | def __init__(self, feature): class Mask (line 185) | class Mask(NpElemOperator): method __init__ (line 201) | def __init__(self, feature, instrument): method __str__ (line 205) | def __str__(self): method _load_internal (line 208) | def _load_internal(self, instrument, start_index, end_index, *args): class Not (line 212) | class Not(NpElemOperator): method __init__ (line 226) | def __init__(self, feature): class PairOperator (line 231) | class PairOperator(ExpressionOps): method __init__ (line 247) | def __init__(self, feature_left, feature_right): method __str__ (line 251) | def __str__(self): method get_longest_back_rolling (line 254) | def get_longest_back_rolling(self): method get_extended_window_size (line 266) | def get_extended_window_size(self): class NpPairOperator (line 279) | class NpPairOperator(PairOperator): method __init__ (line 297) | def __init__(self, feature_left, feature_right, func): method _load_internal (line 301) | def _load_internal(self, instrument, start_index, end_index, *args): class Power (line 338) | class Power(NpPairOperator): method __init__ (line 354) | def __init__(self, feature_left, feature_right): class Add (line 358) | class Add(NpPairOperator): method __init__ (line 374) | def __init__(self, feature_left, feature_right): class Sub (line 378) | class Sub(NpPairOperator): method __init__ (line 394) | def __init__(self, feature_left, feature_right): class Mul (line 398) | class Mul(NpPairOperator): method __init__ (line 414) | def __init__(self, feature_left, feature_right): class Div (line 418) | class Div(NpPairOperator): method __init__ (line 434) | def __init__(self, feature_left, feature_right): class Greater (line 438) | class Greater(NpPairOperator): method __init__ (line 454) | def __init__(self, feature_left, feature_right): class Less (line 458) | class Less(NpPairOperator): method __init__ (line 474) | def __init__(self, feature_left, feature_right): class Gt (line 478) | class Gt(NpPairOperator): method __init__ (line 494) | def __init__(self, feature_left, feature_right): class Ge (line 498) | class Ge(NpPairOperator): method __init__ (line 514) | def __init__(self, feature_left, feature_right): class Lt (line 518) | class Lt(NpPairOperator): method __init__ (line 534) | def __init__(self, feature_left, feature_right): class Le (line 538) | class Le(NpPairOperator): method __init__ (line 554) | def __init__(self, feature_left, feature_right): class Eq (line 558) | class Eq(NpPairOperator): method __init__ (line 574) | def __init__(self, feature_left, feature_right): class Ne (line 578) | class Ne(NpPairOperator): method __init__ (line 594) | def __init__(self, feature_left, feature_right): class And (line 598) | class And(NpPairOperator): method __init__ (line 614) | def __init__(self, feature_left, feature_right): class Or (line 618) | class Or(NpPairOperator): method __init__ (line 634) | def __init__(self, feature_left, feature_right): class If (line 639) | class If(ExpressionOps): method __init__ (line 652) | def __init__(self, condition, feature_left, feature_right): method __str__ (line 657) | def __str__(self): method _load_internal (line 660) | def _load_internal(self, instrument, start_index, end_index, *args): method get_longest_back_rolling (line 673) | def get_longest_back_rolling(self): method get_extended_window_size (line 690) | def get_extended_window_size(self): class Rolling (line 713) | class Rolling(ExpressionOps): method __init__ (line 734) | def __init__(self, feature, N, func): method __str__ (line 739) | def __str__(self): method _load_internal (line 742) | def _load_internal(self, instrument, start_index, end_index, *args): method get_longest_back_rolling (line 757) | def get_longest_back_rolling(self): method get_extended_window_size (line 764) | def get_extended_window_size(self): class Ref (line 781) | class Ref(Rolling): method __init__ (line 797) | def __init__(self, feature, N): method _load_internal (line 800) | def _load_internal(self, instrument, start_index, end_index, *args): method get_longest_back_rolling (line 811) | def get_longest_back_rolling(self): method get_extended_window_size (line 816) | def get_extended_window_size(self): class Mean (line 827) | class Mean(Rolling): method __init__ (line 843) | def __init__(self, feature, N): class Sum (line 847) | class Sum(Rolling): method __init__ (line 863) | def __init__(self, feature, N): class Std (line 867) | class Std(Rolling): method __init__ (line 883) | def __init__(self, feature, N): class Var (line 887) | class Var(Rolling): method __init__ (line 903) | def __init__(self, feature, N): class Skew (line 907) | class Skew(Rolling): method __init__ (line 923) | def __init__(self, feature, N): class Kurt (line 929) | class Kurt(Rolling): method __init__ (line 945) | def __init__(self, feature, N): class Max (line 951) | class Max(Rolling): method __init__ (line 967) | def __init__(self, feature, N): class IdxMax (line 971) | class IdxMax(Rolling): method __init__ (line 987) | def __init__(self, feature, N): method _load_internal (line 990) | def _load_internal(self, instrument, start_index, end_index, *args): class Min (line 999) | class Min(Rolling): method __init__ (line 1015) | def __init__(self, feature, N): class IdxMin (line 1019) | class IdxMin(Rolling): method __init__ (line 1035) | def __init__(self, feature, N): method _load_internal (line 1038) | def _load_internal(self, instrument, start_index, end_index, *args): class Quantile (line 1047) | class Quantile(Rolling): method __init__ (line 1063) | def __init__(self, feature, N, qscore): method __str__ (line 1067) | def __str__(self): method _load_internal (line 1070) | def _load_internal(self, instrument, start_index, end_index, *args): class Med (line 1079) | class Med(Rolling): method __init__ (line 1095) | def __init__(self, feature, N): class Mad (line 1099) | class Mad(Rolling): method __init__ (line 1115) | def __init__(self, feature, N): method _load_internal (line 1118) | def _load_internal(self, instrument, start_index, end_index, *args): class Rank (line 1133) | class Rank(Rolling): method __init__ (line 1149) | def __init__(self, feature, N): method _load_internal (line 1153) | def _load_internal(self, instrument, start_index, end_index, *args): class Count (line 1171) | class Count(Rolling): method __init__ (line 1187) | def __init__(self, feature, N): class Delta (line 1191) | class Delta(Rolling): method __init__ (line 1207) | def __init__(self, feature, N): method _load_internal (line 1210) | def _load_internal(self, instrument, start_index, end_index, *args): class Slope (line 1221) | class Slope(Rolling): method __init__ (line 1245) | def __init__(self, feature, N): method _load_internal (line 1248) | def _load_internal(self, instrument, start_index, end_index, *args): class Rsquare (line 1257) | class Rsquare(Rolling): method __init__ (line 1273) | def __init__(self, feature, N): method _load_internal (line 1276) | def _load_internal(self, instrument, start_index, end_index, *args): class Resi (line 1286) | class Resi(Rolling): method __init__ (line 1302) | def __init__(self, feature, N): method _load_internal (line 1305) | def _load_internal(self, instrument, start_index, end_index, *args): class WMA (line 1314) | class WMA(Rolling): method __init__ (line 1330) | def __init__(self, feature, N): method _load_internal (line 1333) | def _load_internal(self, instrument, start_index, end_index, *args): class EMA (line 1349) | class EMA(Rolling): method __init__ (line 1365) | def __init__(self, feature, N): method _load_internal (line 1368) | def _load_internal(self, instrument, start_index, end_index, *args): class PairRolling (line 1387) | class PairRolling(ExpressionOps): method __init__ (line 1405) | def __init__(self, feature_left, feature_right, N, func): method __str__ (line 1412) | def __str__(self): method _load_internal (line 1415) | def _load_internal(self, instrument, start_index, end_index, *args): method get_longest_back_rolling (line 1435) | def get_longest_back_rolling(self): method get_extended_window_size (line 1449) | def get_extended_window_size(self): class Corr (line 1467) | class Corr(PairRolling): method __init__ (line 1485) | def __init__(self, feature_left, feature_right, N): method _load_internal (line 1488) | def _load_internal(self, instrument, start_index, end_index, *args): class Cov (line 1501) | class Cov(PairRolling): method __init__ (line 1519) | def __init__(self, feature_left, feature_right, N): class TResample (line 1528) | class TResample(ElemOperator): method __init__ (line 1529) | def __init__(self, feature, freq, func): method __str__ (line 1550) | def __str__(self): method _load_internal (line 1553) | def _load_internal(self, instrument, start_index, end_index, *args): class OpsWrapper (line 1619) | class OpsWrapper: method __init__ (line 1622) | def __init__(self): method reset (line 1625) | def reset(self): method register (line 1628) | def register(self, ops_list: List[Union[Type[ExpressionOps], dict]]): method __getattr__ (line 1661) | def __getattr__(self, key): function register_all_ops (line 1670) | def register_all_ops(C): FILE: qlib/data/pit.py class P (line 24) | class P(ElemOperator): method _load_internal (line 25) | def _load_internal(self, instrument, start_index, end_index, freq): method _load_feature (line 51) | def _load_feature(self, instrument, start_index, end_index, cur_time): method get_longest_back_rolling (line 54) | def get_longest_back_rolling(self): method get_extended_window_size (line 58) | def get_extended_window_size(self): class PRef (line 63) | class PRef(P): method __init__ (line 64) | def __init__(self, feature, period): method __str__ (line 68) | def __str__(self): method _load_feature (line 71) | def _load_feature(self, instrument, start_index, end_index, cur_time): FILE: qlib/data/storage/file_storage.py class FileStorageMixin (line 21) | class FileStorageMixin: method provider_uri (line 32) | def provider_uri(self): method dpm (line 36) | def dpm(self): method support_freq (line 44) | def support_freq(self) -> List[str]: method uri (line 60) | def uri(self) -> Path: method check (line 65) | def check(self): class FileCalendarStorage (line 76) | class FileCalendarStorage(FileStorageMixin, CalendarStorage): method __init__ (line 77) | def __init__(self, freq: str, future: bool, provider_uri: dict = None,... method file_name (line 85) | def file_name(self) -> str: method _freq_file (line 89) | def _freq_file(self) -> str: method _read_calendar (line 105) | def _read_calendar(self) -> List[CalVT]: method _write_calendar (line 122) | def _write_calendar(self, values: Iterable[CalVT], mode: str = "wb"): method uri (line 127) | def uri(self) -> Path: method data (line 131) | def data(self) -> List[CalVT]: method _get_storage_freq (line 147) | def _get_storage_freq(self) -> List[str]: method extend (line 150) | def extend(self, values: Iterable[CalVT]) -> None: method clear (line 153) | def clear(self) -> None: method index (line 156) | def index(self, value: CalVT) -> int: method insert (line 161) | def insert(self, index: int, value: CalVT): method remove (line 166) | def remove(self, value: CalVT) -> None: method __setitem__ (line 173) | def __setitem__(self, i: Union[int, slice], values: Union[CalVT, Itera... method __delitem__ (line 178) | def __delitem__(self, i: Union[int, slice]) -> None: method __getitem__ (line 184) | def __getitem__(self, i: Union[int, slice]) -> Union[CalVT, List[CalVT]]: method __len__ (line 188) | def __len__(self) -> int: class FileInstrumentStorage (line 192) | class FileInstrumentStorage(FileStorageMixin, InstrumentStorage): method __init__ (line 198) | def __init__(self, market: str, freq: str, provider_uri: dict = None, ... method _read_instrument (line 203) | def _read_instrument(self) -> Dict[InstKT, InstVT]: method _write_instrument (line 220) | def _write_instrument(self, data: Dict[InstKT, InstVT] = None) -> None: method clear (line 238) | def clear(self) -> None: method data (line 242) | def data(self) -> Dict[InstKT, InstVT]: method __setitem__ (line 246) | def __setitem__(self, k: InstKT, v: InstVT) -> None: method __delitem__ (line 251) | def __delitem__(self, k: InstKT) -> None: method __getitem__ (line 257) | def __getitem__(self, k: InstKT) -> InstVT: method update (line 261) | def update(self, *args, **kwargs) -> None: method __len__ (line 281) | def __len__(self) -> int: class FileFeatureStorage (line 285) | class FileFeatureStorage(FileStorageMixin, FeatureStorage): method __init__ (line 286) | def __init__(self, instrument: str, field: str, freq: str, provider_ur... method clear (line 291) | def clear(self): method data (line 296) | def data(self) -> pd.Series: method write (line 299) | def write(self, data_array: Union[List, np.ndarray], index: int = None... method start_index (line 332) | def start_index(self) -> Union[int, None]: method end_index (line 340) | def end_index(self) -> Union[int, None]: method __getitem__ (line 346) | def __getitem__(self, i: Union[int, slice]) -> Union[Tuple[int, float]... method __len__ (line 377) | def __len__(self) -> int: FILE: qlib/data/storage/storage.py class BaseStorage (line 78) | class BaseStorage: method storage_name (line 80) | def storage_name(self) -> str: class CalendarStorage (line 84) | class CalendarStorage(BaseStorage): method __init__ (line 89) | def __init__(self, freq: str, future: bool, **kwargs): method data (line 95) | def data(self) -> Iterable[CalVT]: method clear (line 105) | def clear(self) -> None: method extend (line 108) | def extend(self, iterable: Iterable[CalVT]) -> None: method index (line 111) | def index(self, value: CalVT) -> int: method insert (line 120) | def insert(self, index: int, value: CalVT) -> None: method remove (line 123) | def remove(self, value: CalVT) -> None: method __setitem__ (line 127) | def __setitem__(self, i: int, value: CalVT) -> None: method __setitem__ (line 131) | def __setitem__(self, s: slice, value: Iterable[CalVT]) -> None: method __setitem__ (line 134) | def __setitem__(self, i, value) -> None: method __delitem__ (line 140) | def __delitem__(self, i: int) -> None: method __delitem__ (line 144) | def __delitem__(self, i: slice) -> None: method __delitem__ (line 147) | def __delitem__(self, i) -> None: method __getitem__ (line 159) | def __getitem__(self, s: slice) -> Iterable[CalVT]: method __getitem__ (line 163) | def __getitem__(self, i: int) -> CalVT: method __getitem__ (line 166) | def __getitem__(self, i) -> CalVT: method __len__ (line 179) | def __len__(self) -> int: class InstrumentStorage (line 191) | class InstrumentStorage(BaseStorage): method __init__ (line 192) | def __init__(self, market: str, freq: str, **kwargs): method data (line 198) | def data(self) -> Dict[InstKT, InstVT]: method clear (line 208) | def clear(self) -> None: method update (line 211) | def update(self, *args, **kwargs) -> None: method __setitem__ (line 225) | def __setitem__(self, k: InstKT, v: InstVT) -> None: method __delitem__ (line 229) | def __delitem__(self, k: InstKT) -> None: method __getitem__ (line 239) | def __getitem__(self, k: InstKT) -> InstVT: method __len__ (line 243) | def __len__(self) -> int: class FeatureStorage (line 255) | class FeatureStorage(BaseStorage): method __init__ (line 256) | def __init__(self, instrument: str, field: str, freq: str, **kwargs): method data (line 263) | def data(self) -> pd.Series: method start_index (line 273) | def start_index(self) -> Union[int, None]: method end_index (line 283) | def end_index(self) -> Union[int, None]: method clear (line 296) | def clear(self) -> None: method write (line 299) | def write(self, data_array: Union[List, np.ndarray, Tuple], index: int... method rebase (line 354) | def rebase(self, start_index: int = None, end_index: int = None): method rewrite (line 443) | def rewrite(self, data: Union[List, np.ndarray, Tuple], index: int): method __getitem__ (line 457) | def __getitem__(self, s: slice) -> pd.Series: method __getitem__ (line 466) | def __getitem__(self, i: int) -> Tuple[int, float]: method __getitem__ (line 469) | def __getitem__(self, i) -> Union[Tuple[int, float], pd.Series]: method __len__ (line 485) | def __len__(self) -> int: FILE: qlib/log.py class MetaLogger (line 15) | class MetaLogger(type): method __new__ (line 16) | def __new__(mcs, name, bases, attrs): # pylint: disable=C0204 class QlibLogger (line 24) | class QlibLogger(metaclass=MetaLogger): method __init__ (line 29) | def __init__(self, module_name): method logger (line 36) | def logger(self): method setLevel (line 41) | def setLevel(self, level): method __getattr__ (line 44) | def __getattr__(self, name): class _QLibLoggerManager (line 51) | class _QLibLoggerManager: method __init__ (line 52) | def __init__(self): method setLevel (line 55) | def setLevel(self, level): method __call__ (line 59) | def __call__(self, module_name, level: Optional[int] = None) -> QlibLo... class TimeInspector (line 86) | class TimeInspector: method set_time_mark (line 92) | def set_time_mark(cls): method pop_time_mark (line 103) | def pop_time_mark(cls): method get_cost_time (line 110) | def get_cost_time(cls): method log_cost_time (line 120) | def log_cost_time(cls, info="Done"): method logt (line 131) | def logt(cls, name="", show_start=False): function set_log_with_config (line 152) | def set_log_with_config(log_config: Dict[Text, Any]): class LogFilter (line 161) | class LogFilter(logging.Filter): method __init__ (line 162) | def __init__(self, param=None): method match_msg (line 167) | def match_msg(filter_str, msg): method filter (line 176) | def filter(self, record): function set_global_logger_level (line 185) | def set_global_logger_level(level: int, return_orig_handler_level: bool ... function set_global_logger_level_cm (line 227) | def set_global_logger_level_cm(level: int): FILE: qlib/model/base.py class BaseModel (line 10) | class BaseModel(Serializable, metaclass=abc.ABCMeta): method predict (line 14) | def predict(self, *args, **kwargs) -> object: method __call__ (line 17) | def __call__(self, *args, **kwargs) -> object: class Model (line 22) | class Model(BaseModel): method fit (line 25) | def fit(self, dataset: Dataset, reweighter: Reweighter): method predict (line 63) | def predict(self, dataset: Dataset, segment: Union[Text, slice] = "tes... class ModelFT (line 81) | class ModelFT(Model): method finetune (line 85) | def finetune(self, dataset: Dataset): FILE: qlib/model/ens/ensemble.py class Ensemble (line 14) | class Ensemble: method __call__ (line 28) | def __call__(self, ensemble_dict: dict, *args, **kwargs): class SingleKeyEnsemble (line 32) | class SingleKeyEnsemble(Ensemble): method __call__ (line 51) | def __call__(self, ensemble_dict: Union[dict, object], recursion: bool... class RollingEnsemble (line 65) | class RollingEnsemble(Ensemble): method __call__ (line 80) | def __call__(self, ensemble_dict: dict) -> pd.DataFrame: class AverageEnsemble (line 91) | class AverageEnsemble(Ensemble): method __call__ (line 107) | def __call__(self, ensemble_dict: dict) -> pd.DataFrame: FILE: qlib/model/ens/group.py class Group (line 20) | class Group: method __init__ (line 23) | def __init__(self, group_func=None, ens: Ensemble = None): method group (line 39) | def group(self, *args, **kwargs) -> dict: method reduce (line 53) | def reduce(self, *args, **kwargs) -> dict: method __call__ (line 67) | def __call__(self, ungrouped_dict: dict, n_jobs: int = 1, verbose: int... class RollingGroup (line 92) | class RollingGroup(Group): method group (line 95) | def group(self, rolling_dict: dict) -> dict: method __init__ (line 114) | def __init__(self, ens=RollingEnsemble()): FILE: qlib/model/interpret/base.py class FeatureInt (line 12) | class FeatureInt: method get_feature_importance (line 16) | def get_feature_importance(self) -> pd.Series: class LightGBMFInt (line 27) | class LightGBMFInt(FeatureInt): method __init__ (line 30) | def __init__(self): method get_feature_importance (line 33) | def get_feature_importance(self, *args, **kwargs) -> pd.Series: FILE: qlib/model/meta/dataset.py class MetaTaskDataset (line 10) | class MetaTaskDataset(Serializable, metaclass=abc.ABCMeta): method __init__ (line 27) | def __init__(self, segments: Union[Dict[Text, Tuple], float], *args, *... method prepare_tasks (line 39) | def prepare_tasks(self, segments: Union[List[Text], Text], *args, **kw... method _prepare_seg (line 69) | def _prepare_seg(self, segment: Text): FILE: qlib/model/meta/model.py class MetaModel (line 10) | class MetaModel(metaclass=abc.ABCMeta): method fit (line 20) | def fit(self, *args, **kwargs): method inference (line 26) | def inference(self, *args, **kwargs) -> object: class MetaTaskModel (line 37) | class MetaTaskModel(MetaModel): method fit (line 42) | def fit(self, meta_dataset: MetaTaskDataset): method inference (line 49) | def inference(self, meta_dataset: MetaTaskDataset) -> List[dict]: class MetaGuideModel (line 64) | class MetaGuideModel(MetaModel): method fit (line 70) | def fit(self, *args, **kwargs): method inference (line 74) | def inference(self, *args, **kwargs): FILE: qlib/model/meta/task.py class MetaTask (line 8) | class MetaTask: method __init__ (line 26) | def __init__(self, task: dict, meta_info: object, mode: str = PROC_MOD... method get_dataset (line 46) | def get_dataset(self) -> Dataset: method get_meta_input (line 49) | def get_meta_input(self) -> object: method __repr__ (line 55) | def __repr__(self): FILE: qlib/model/riskmodel/base.py class RiskModel (line 12) | class RiskModel(BaseModel): method __init__ (line 22) | def __init__(self, nan_option: str = "ignore", assume_centered: bool =... method predict (line 40) | def predict( method _predict (line 113) | def _predict(self, X: np.ndarray) -> np.ndarray: method _preprocess (line 133) | def _preprocess(self, X: np.ndarray) -> Union[np.ndarray, np.ma.Masked... FILE: qlib/model/riskmodel/poet.py class POETCovEstimator (line 6) | class POETCovEstimator(RiskModel): method __init__ (line 19) | def __init__(self, num_factors: int = 0, thresh: float = 1.0, thresh_m... method _predict (line 45) | def _predict(self, X: np.ndarray) -> np.ndarray: FILE: qlib/model/riskmodel/shrink.py class ShrinkCovEstimator (line 7) | class ShrinkCovEstimator(RiskModel): method __init__ (line 54) | def __init__(self, alpha: Union[str, float] = 0.0, target: Union[str, ... method _predict (line 87) | def _predict(self, X: np.ndarray) -> np.ndarray: method _get_shrink_target (line 105) | def _get_shrink_target(self, X: np.ndarray, S: np.ndarray) -> np.ndarray: method _get_shrink_target_const_var (line 115) | def _get_shrink_target_const_var(self, X: np.ndarray, S: np.ndarray) -... method _get_shrink_target_const_corr (line 126) | def _get_shrink_target_const_corr(self, X: np.ndarray, S: np.ndarray) ... method _get_shrink_target_single_factor (line 141) | def _get_shrink_target_single_factor(self, X: np.ndarray, S: np.ndarra... method _get_shrink_param (line 150) | def _get_shrink_param(self, X: np.ndarray, S: np.ndarray, F: np.ndarra... method _get_shrink_param_oas (line 167) | def _get_shrink_param_oas(self, X: np.ndarray, S: np.ndarray, F: np.nd... method _get_shrink_param_lw_const_var (line 188) | def _get_shrink_param_lw_const_var(self, X: np.ndarray, S: np.ndarray,... method _get_shrink_param_lw_const_corr (line 205) | def _get_shrink_param_lw_const_corr(self, X: np.ndarray, S: np.ndarray... method _get_shrink_param_lw_single_factor (line 231) | def _get_shrink_param_lw_single_factor(self, X: np.ndarray, S: np.ndar... FILE: qlib/model/riskmodel/structured.py class StructuredCovEstimator (line 11) | class StructuredCovEstimator(RiskModel): method __init__ (line 45) | def __init__(self, factor_model: str = "pca", num_factors: int = 10, *... method _predict (line 69) | def _predict(self, X: np.ndarray, return_decomposed_components=False) ... FILE: qlib/model/trainer.py function _log_task_info (line 36) | def _log_task_info(task_config: dict): function _exe_task (line 42) | def _exe_task(task_config: dict): function begin_task_train (line 74) | def begin_task_train(task_config: dict, experiment_name: str, recorder_n... function end_task_train (line 91) | def end_task_train(rec: Recorder, experiment_name: str) -> Recorder: function task_train (line 108) | def task_train(task_config: dict, experiment_name: str, recorder_name: s... class Trainer (line 131) | class Trainer: method __init__ (line 137) | def __init__(self): method train (line 140) | def train(self, tasks: list, *args, **kwargs) -> list: method end_train (line 155) | def end_train(self, models: list, *args, **kwargs) -> list: method is_delay (line 172) | def is_delay(self) -> bool: method __call__ (line 181) | def __call__(self, *args, **kwargs) -> list: method has_worker (line 184) | def has_worker(self) -> bool: method worker (line 197) | def worker(self): class TrainerR (line 209) | class TrainerR(Trainer): method __init__ (line 222) | def __init__( method train (line 243) | def train( method end_train (line 276) | def end_train(self, models: list, **kwargs) -> List[Recorder]: class DelayTrainerR (line 293) | class DelayTrainerR(TrainerR): method __init__ (line 298) | def __init__( method end_train (line 313) | def end_train(self, models, end_train_func=None, experiment_name: str ... class TrainerRM (line 341) | class TrainerRM(Trainer): method __init__ (line 357) | def __init__( method train (line 384) | def train( method end_train (line 450) | def end_train(self, recs: list, **kwargs) -> List[Recorder]: method worker (line 466) | def worker( method has_worker (line 487) | def has_worker(self) -> bool: class DelayTrainerRM (line 491) | class DelayTrainerRM(TrainerRM): method __init__ (line 497) | def __init__( method train (line 524) | def train(self, tasks: list, train_func=None, experiment_name: str = N... method end_train (line 552) | def end_train(self, recs, end_train_func=None, experiment_name: str = ... method worker (line 596) | def worker(self, end_train_func=None, experiment_name: str = None): method has_worker (line 618) | def has_worker(self) -> bool: FILE: qlib/model/utils.py class ConcatDataset (line 7) | class ConcatDataset(Dataset): method __init__ (line 8) | def __init__(self, *datasets): method __getitem__ (line 11) | def __getitem__(self, i): method __len__ (line 14) | def __len__(self): class IndexSampler (line 18) | class IndexSampler: method __init__ (line 19) | def __init__(self, sampler): method __getitem__ (line 22) | def __getitem__(self, i: int): method __len__ (line 25) | def __len__(self): FILE: qlib/rl/aux_info.py class AuxiliaryInfoCollector (line 21) | class AuxiliaryInfoCollector(Generic[StateType, AuxInfoType]): method __call__ (line 27) | def __call__(self, simulator_state: StateType) -> AuxInfoType: method collect (line 30) | def collect(self, simulator_state: StateType) -> AuxInfoType: FILE: qlib/rl/contrib/backtest.py function _get_multi_level_executor_config (line 29) | def _get_multi_level_executor_config( function _convert_indicator_to_dataframe (line 64) | def _convert_indicator_to_dataframe(indicator: dict) -> Optional[pd.Data... function _generate_report (line 88) | def _generate_report( function single_with_simulator (line 127) | def single_with_simulator( function single_with_collect_data_loop (line 222) | def single_with_collect_data_loop( function backtest (line 317) | def backtest(backtest_config: dict, with_simulator: bool = False) -> pd.... FILE: qlib/rl/contrib/naive_config_parser.py function merge_a_into_b (line 15) | def merge_a_into_b(a: dict, b: dict) -> dict: function check_file_exist (line 26) | def check_file_exist(filename: str, msg_tmpl: str = 'file "{}" does not ... function parse_backtest_config (line 31) | def parse_backtest_config(path: str) -> dict: function _convert_all_list_to_tuple (line 73) | def _convert_all_list_to_tuple(config: dict) -> dict: function get_backtest_config_fromfile (line 82) | def get_backtest_config_fromfile(path: str) -> dict: FILE: qlib/rl/contrib/train_onpolicy.py function seed_everything (line 32) | def seed_everything(seed: int) -> None: function _read_orders (line 40) | def _read_orders(order_dir: Path) -> pd.DataFrame: class LazyLoadDataset (line 51) | class LazyLoadDataset(Dataset): method __init__ (line 52) | def __init__( method __len__ (line 66) | def __len__(self) -> int: method __getitem__ (line 69) | def __getitem__(self, index: int) -> Order: function train_and_test (line 100) | def train_and_test( function main (line 204) | def main(config: dict, run_training: bool, run_backtest: bool) -> None: FILE: qlib/rl/contrib/utils.py function read_order_file (line 11) | def read_order_file(order_file: Path | pd.DataFrame) -> pd.DataFrame: FILE: qlib/rl/data/base.py class BaseIntradayBacktestData (line 10) | class BaseIntradayBacktestData: method __repr__ (line 19) | def __repr__(self) -> str: method __len__ (line 23) | def __len__(self) -> int: method get_deal_price (line 27) | def get_deal_price(self) -> pd.Series: method get_volume (line 31) | def get_volume(self) -> pd.Series: method get_time_index (line 35) | def get_time_index(self) -> pd.DatetimeIndex: class BaseIntradayProcessedData (line 39) | class BaseIntradayProcessedData: class ProcessedDataProvider (line 55) | class ProcessedDataProvider: method get_data (line 58) | def get_data( FILE: qlib/rl/data/integration.py function init_qlib (line 18) | def init_qlib(qlib_config: dict) -> None: FILE: qlib/rl/data/native.py function get_ticks_slice (line 20) | def get_ticks_slice( class IntradayBacktestData (line 31) | class IntradayBacktestData(BaseIntradayBacktestData): method __init__ (line 34) | def __init__( method __repr__ (line 68) | def __repr__(self) -> str: method __len__ (line 74) | def __len__(self) -> int: method get_deal_price (line 77) | def get_deal_price(self) -> pd.Series: method get_volume (line 80) | def get_volume(self) -> pd.Series: method get_time_index (line 83) | def get_time_index(self) -> pd.DatetimeIndex: class DataframeIntradayBacktestData (line 87) | class DataframeIntradayBacktestData(BaseIntradayBacktestData): method __init__ (line 90) | def __init__(self, df: pd.DataFrame, price_column: str = "$close0", vo... method __repr__ (line 95) | def __repr__(self) -> str: method __len__ (line 99) | def __len__(self) -> int: method get_deal_price (line 102) | def get_deal_price(self) -> pd.Series: method get_volume (line 105) | def get_volume(self) -> pd.Series: method get_time_index (line 108) | def get_time_index(self) -> pd.DatetimeIndex: function load_backtest_data (line 116) | def load_backtest_data( class HandlerIntradayProcessedData (line 144) | class HandlerIntradayProcessedData(BaseIntradayProcessedData): method __init__ (line 147) | def __init__( method __repr__ (line 176) | def __repr__(self) -> str: function load_handler_intraday_processed_data (line 190) | def load_handler_intraday_processed_data( class HandlerProcessedDataProvider (line 204) | class HandlerProcessedDataProvider(ProcessedDataProvider): method __init__ (line 205) | def __init__( method get_data (line 219) | def get_data( FILE: qlib/rl/data/pickle_styled.py function _infer_processed_data_column_names (line 43) | def _infer_processed_data_column_names(shape: int) -> List[str]: function _find_pickle (line 70) | def _find_pickle(filename_without_suffix: Path) -> Path: function _read_pickle (line 85) | def _read_pickle(filename_without_suffix: Path) -> pd.DataFrame: class SimpleIntradayBacktestData (line 98) | class SimpleIntradayBacktestData(BaseIntradayBacktestData): method __init__ (line 101) | def __init__( method __repr__ (line 121) | def __repr__(self) -> str: method __len__ (line 125) | def __len__(self) -> int: method get_deal_price (line 128) | def get_deal_price(self) -> pd.Series: method get_volume (line 153) | def get_volume(self) -> pd.Series: method get_time_index (line 157) | def get_time_index(self) -> pd.DatetimeIndex: class PickleIntradayProcessedData (line 161) | class PickleIntradayProcessedData(BaseIntradayProcessedData): method __init__ (line 164) | def __init__( method __repr__ (line 200) | def __repr__(self) -> str: function load_simple_intraday_backtest_data (line 206) | def load_simple_intraday_backtest_data( function load_pickle_intraday_processed_data (line 220) | def load_pickle_intraday_processed_data( class PickleProcessedDataProvider (line 230) | class PickleProcessedDataProvider(ProcessedDataProvider): method __init__ (line 231) | def __init__(self, data_dir: Path) -> None: method get_data (line 236) | def get_data( function load_orders (line 252) | def load_orders( FILE: qlib/rl/interpreter.py class Interpreter (line 19) | class Interpreter: class StateInterpreter (line 35) | class StateInterpreter(Generic[StateType, ObsType], Interpreter): method observation_space (line 39) | def observation_space(self) -> gym.Space: method __call__ (line 43) | def __call__(self, simulator_state: StateType) -> ObsType: method validate (line 48) | def validate(self, obs: ObsType) -> None: method interpret (line 52) | def interpret(self, simulator_state: StateType) -> ObsType: class ActionInterpreter (line 67) | class ActionInterpreter(Generic[StateType, PolicyActType, ActType], Inte... method action_space (line 71) | def action_space(self) -> gym.Space: method __call__ (line 75) | def __call__(self, simulator_state: StateType, action: PolicyActType) ... method validate (line 80) | def validate(self, action: PolicyActType) -> None: method interpret (line 84) | def interpret(self, simulator_state: StateType, action: PolicyActType)... function _gym_space_contains (line 101) | def _gym_space_contains(space: gym.Space, x: Any) -> None: class GymSpaceValidationError (line 134) | class GymSpaceValidationError(Exception): method __init__ (line 135) | def __init__(self, message: str, space: gym.Space, x: Any) -> None: method __str__ (line 140) | def __str__(self) -> str: FILE: qlib/rl/order_execution/interpreter.py function canonicalize (line 30) | def canonicalize(value: int | float | np.ndarray | pd.DataFrame | dict) ... class FullHistoryObs (line 44) | class FullHistoryObs(TypedDict): class DummyStateInterpreter (line 56) | class DummyStateInterpreter(StateInterpreter[SAOEState, dict]): method interpret (line 59) | def interpret(self, state: SAOEState) -> dict: method observation_space (line 64) | def observation_space(self) -> spaces.Dict: class FullHistoryStateInterpreter (line 68) | class FullHistoryStateInterpreter(StateInterpreter[SAOEState, FullHistor... method __init__ (line 84) | def __init__( method interpret (line 101) | def interpret(self, state: SAOEState) -> FullHistoryObs: method observation_space (line 134) | def observation_space(self) -> spaces.Dict: method _mask_future_info (line 150) | def _mask_future_info(arr: pd.DataFrame, current: pd.Timestamp) -> pd.... class CurrentStateObs (line 156) | class CurrentStateObs(TypedDict): class CurrentStepStateInterpreter (line 164) | class CurrentStepStateInterpreter(StateInterpreter[SAOEState, CurrentSta... method __init__ (line 171) | def __init__(self, max_step: int) -> None: method observation_space (line 177) | def observation_space(self) -> spaces.Dict: method interpret (line 187) | def interpret(self, state: SAOEState) -> CurrentStateObs: class CategoricalActionInterpreter (line 199) | class CategoricalActionInterpreter(ActionInterpreter[SAOEState, int, flo... method __init__ (line 213) | def __init__(self, values: int | List[float], max_step: Optional[int] ... method action_space (line 222) | def action_space(self) -> spaces.Discrete: method interpret (line 225) | def interpret(self, state: SAOEState, action: int) -> float: class TwapRelativeActionInterpreter (line 233) | class TwapRelativeActionInterpreter(ActionInterpreter[SAOEState, float, ... method action_space (line 243) | def action_space(self) -> spaces.Box: method interpret (line 246) | def interpret(self, state: SAOEState, action: float) -> float: function _to_int32 (line 252) | def _to_int32(val): function _to_float32 (line 256) | def _to_float32(val): FILE: qlib/rl/order_execution/network.py class Recurrent (line 19) | class Recurrent(nn.Module): method __init__ (line 30) | def __init__( method _init_extra_branches (line 66) | def _init_extra_branches(self) -> None: method _source_features (line 69) | def _source_features(self, obs: FullHistoryObs, device: torch.device) ... method forward (line 99) | def forward(self, batch: Batch) -> torch.Tensor: class Attention (line 122) | class Attention(nn.Module): method __init__ (line 123) | def __init__(self, in_dim, out_dim): method forward (line 129) | def forward(self, Q, K, V): FILE: qlib/rl/order_execution/policy.py class NonLearnablePolicy (line 25) | class NonLearnablePolicy(BasePolicy): method __init__ (line 31) | def __init__(self, obs_space: gym.Space, action_space: gym.Space) -> N... method learn (line 34) | def learn(self, batch: Batch, **kwargs: Any) -> Dict[str, Any]: method process_fn (line 37) | def process_fn( class AllOne (line 46) | class AllOne(NonLearnablePolicy): method __init__ (line 52) | def __init__(self, obs_space: gym.Space, action_space: gym.Space, fill... method forward (line 57) | def forward( class PPOActor (line 69) | class PPOActor(nn.Module): method __init__ (line 70) | def __init__(self, extractor: nn.Module, action_dim: int) -> None: method forward (line 75) | def forward( class PPOCritic (line 86) | class PPOCritic(nn.Module): method __init__ (line 87) | def __init__(self, extractor: nn.Module) -> None: method forward (line 92) | def forward( class PPO (line 102) | class PPO(PPOPolicy): method __init__ (line 114) | def __init__( class DQN (line 164) | class DQN(DQNPolicy): method __init__ (line 173) | def __init__( function auto_device (line 214) | def auto_device(module: nn.Module) -> torch.device: function set_weight (line 220) | def set_weight(policy: nn.Module, loaded_weight: OrderedDict) -> None: function chain_dedup (line 231) | def chain_dedup(*iterables: Iterable) -> Generator[Any, None, None]: FILE: qlib/rl/order_execution/reward.py class PAPenaltyReward (line 17) | class PAPenaltyReward(Reward[SAOEState]): method __init__ (line 29) | def __init__(self, penalty: float = 100.0, scale: float = 1.0) -> None: method reward (line 33) | def reward(self, simulator_state: SAOEState) -> float: class PPOReward (line 53) | class PPOReward(Reward[SAOEState]): method __init__ (line 66) | def __init__(self, max_step: int, start_time_index: int = 0, end_time_... method reward (line 71) | def reward(self, simulator_state: SAOEState) -> float: FILE: qlib/rl/order_execution/simulator_qlib.py class SingleAssetOrderExecution (line 19) | class SingleAssetOrderExecution(Simulator[Order, SAOEState, float]): method __init__ (line 36) | def __init__( method reset (line 60) | def reset( method _get_adapter (line 100) | def _get_adapter(self) -> SAOEStateAdapter: method twap_price (line 104) | def twap_price(self) -> float: method _iter_strategy (line 107) | def _iter_strategy(self, action: Optional[float] = None) -> SAOEStrategy: method step (line 119) | def step(self, action: Optional[float]) -> None: method get_state (line 137) | def get_state(self) -> SAOEState: method done (line 140) | def done(self) -> bool: FILE: qlib/rl/order_execution/simulator_simple.py class SingleAssetOrderExecutionSimple (line 24) | class SingleAssetOrderExecutionSimple(Simulator[Order, SAOEState, float]): method __init__ (line 78) | def __init__( method get_backtest_data (line 123) | def get_backtest_data(self) -> BaseIntradayBacktestData: method step (line 147) | def step(self, amount: float) -> None: method get_state (line 231) | def get_state(self) -> SAOEState: method done (line 246) | def done(self) -> bool: method _next_time (line 249) | def _next_time(self) -> pd.Timestamp: method _cur_duration (line 265) | def _cur_duration(self) -> pd.Timedelta: method _split_exec_vol (line 269) | def _split_exec_vol(self, exec_vol_sum: float) -> np.ndarray: method _metrics_collect (line 296) | def _metrics_collect( method _get_ticks_slice (line 329) | def _get_ticks_slice(self, start: pd.Timestamp, end: pd.Timestamp, inc... method _dataframe_append (line 335) | def _dataframe_append(df: pd.DataFrame, other: Any) -> pd.DataFrame: function price_advantage (line 342) | def price_advantage( FILE: qlib/rl/order_execution/state.py class SAOEMetrics (line 18) | class SAOEMetrics(TypedDict): class SAOEState (line 70) | class SAOEState(NamedTuple): FILE: qlib/rl/order_execution/strategy.py function _get_all_timestamps (line 33) | def _get_all_timestamps( function fill_missing_data (line 51) | def fill_missing_data( class SAOEStateAdapter (line 71) | class SAOEStateAdapter: method __init__ (line 85) | def __init__( method _next_time (line 114) | def _next_time(self) -> pd.Timestamp: method update (line 126) | def update( method generate_metrics_after_done (line 209) | def generate_metrics_after_done(self) -> None: method _collect_multi_order_metric (line 221) | def _collect_multi_order_metric( method _collect_single_order_metric (line 249) | def _collect_single_order_metric( method saoe_state (line 285) | def saoe_state(self) -> SAOEState: class SAOEStrategy (line 301) | class SAOEStrategy(RLStrategy): method __init__ (line 304) | def __init__( method _create_qlib_backtest_adapter (line 325) | def _create_qlib_backtest_adapter( method reset (line 343) | def reset(self, outer_trade_decision: BaseTradeDecision | None = None,... method get_saoe_state_by_order (line 360) | def get_saoe_state_by_order(self, order: Order) -> SAOEState: method post_upper_level_exe_step (line 363) | def post_upper_level_exe_step(self) -> None: method post_exe_step (line 367) | def post_exe_step(self, execute_result: Optional[list]) -> None: method generate_trade_decision (line 381) | def generate_trade_decision( method _generate_trade_decision (line 400) | def _generate_trade_decision( class ProxySAOEStrategy (line 407) | class ProxySAOEStrategy(SAOEStrategy): method __init__ (line 414) | def __init__( method _generate_trade_decision (line 423) | def _generate_trade_decision(self, execute_result: list | None = None)... method reset (line 435) | def reset(self, outer_trade_decision: BaseTradeDecision | None = None,... class SAOEIntStrategy (line 445) | class SAOEIntStrategy(SAOEStrategy): method __init__ (line 448) | def __init__( method reset (line 505) | def reset(self, outer_trade_decision: BaseTradeDecision | None = None,... method _generate_trade_details (line 508) | def _generate_trade_details(self, act: np.ndarray, exec_vols: List[flo... method _generate_trade_decision (line 525) | def _generate_trade_decision(self, execute_result: list | None = None)... FILE: qlib/rl/order_execution/utils.py function dataframe_append (line 16) | def dataframe_append(df: pd.DataFrame, other: Any) -> pd.DataFrame: function price_advantage (line 25) | def price_advantage( function get_simulator_executor (line 48) | def get_simulator_executor(executor: BaseExecutor) -> SimulatorExecutor: FILE: qlib/rl/reward.py class Reward (line 16) | class Reward(Generic[SimulatorState]): method __call__ (line 26) | def __call__(self, simulator_state: SimulatorState) -> float: method reward (line 29) | def reward(self, simulator_state: SimulatorState) -> float: method log (line 33) | def log(self, name: str, value: Any) -> None: class RewardCombination (line 38) | class RewardCombination(Reward): method __init__ (line 41) | def __init__(self, rewards: Dict[str, Tuple[Reward, float]]) -> None: method reward (line 44) | def reward(self, simulator_state: Any) -> float: FILE: qlib/rl/simulator.py class Simulator (line 21) | class Simulator(Generic[InitialStateType, StateType, ActType]): method __init__ (line 54) | def __init__(self, initial: InitialStateType, **kwargs: Any) -> None: method step (line 57) | def step(self, action: ActType) -> None: method get_state (line 65) | def get_state(self) -> StateType: method done (line 68) | def done(self) -> bool: FILE: qlib/rl/strategy/single_order.py class SingleOrderStrategy (line 11) | class SingleOrderStrategy(BaseStrategy): method __init__ (line 14) | def __init__( method generate_trade_decision (line 24) | def generate_trade_decision(self, execute_result: list | None = None) ... FILE: qlib/rl/trainer/api.py function train (line 19) | def train( function backtest (line 66) | def backtest( FILE: qlib/rl/trainer/callbacks.py class Callback (line 32) | class Callback: method on_fit_start (line 35) | def on_fit_start(self, trainer: Trainer, vessel: TrainingVesselBase) -... method on_fit_end (line 38) | def on_fit_end(self, trainer: Trainer, vessel: TrainingVesselBase) -> ... method on_train_start (line 41) | def on_train_start(self, trainer: Trainer, vessel: TrainingVesselBase)... method on_train_end (line 44) | def on_train_end(self, trainer: Trainer, vessel: TrainingVesselBase) -... method on_validate_start (line 50) | def on_validate_start(self, trainer: Trainer, vessel: TrainingVesselBa... method on_validate_end (line 53) | def on_validate_end(self, trainer: Trainer, vessel: TrainingVesselBase... method on_test_start (line 56) | def on_test_start(self, trainer: Trainer, vessel: TrainingVesselBase) ... method on_test_end (line 59) | def on_test_end(self, trainer: Trainer, vessel: TrainingVesselBase) ->... method on_iter_start (line 62) | def on_iter_start(self, trainer: Trainer, vessel: TrainingVesselBase) ... method on_iter_end (line 65) | def on_iter_end(self, trainer: Trainer, vessel: TrainingVesselBase) ->... method state_dict (line 71) | def state_dict(self) -> Any: method load_state_dict (line 74) | def load_state_dict(self, state_dict: Any) -> None: class EarlyStopping (line 78) | class EarlyStopping(Callback): method __init__ (line 93) | def __init__( method state_dict (line 124) | def state_dict(self) -> dict: method load_state_dict (line 127) | def load_state_dict(self, state_dict: dict) -> None: method on_fit_start (line 133) | def on_fit_start(self, trainer: Trainer, vessel: TrainingVesselBase) -... method on_validate_end (line 140) | def on_validate_end(self, trainer: Trainer, vessel: TrainingVesselBase... method get_monitor_value (line 171) | def get_monitor_value(self, trainer: Trainer) -> Any: method _is_improvement (line 181) | def _is_improvement(self, monitor_value, reference_value): class MetricsWriter (line 185) | class MetricsWriter(Callback): method __init__ (line 188) | def __init__(self, dirpath: Path) -> None: method on_train_end (line 194) | def on_train_end(self, trainer: Trainer, vessel: TrainingVesselBase) -... method on_validate_end (line 198) | def on_validate_end(self, trainer: Trainer, vessel: TrainingVesselBase... class Checkpoint (line 203) | class Checkpoint(Callback): method __init__ (line 235) | def __init__( method on_fit_end (line 255) | def on_fit_end(self, trainer: Trainer, vessel: TrainingVesselBase) -> ... method on_iter_end (line 259) | def on_iter_end(self, trainer: Trainer, vessel: TrainingVesselBase) ->... method _save_checkpoint (line 270) | def _save_checkpoint(self, trainer: Trainer) -> None: method _new_checkpoint_name (line 288) | def _new_checkpoint_name(self, trainer: Trainer) -> str: FILE: qlib/rl/trainer/trainer.py class Trainer (line 30) | class Trainer: method __init__ (line 91) | def __init__( method initialize (line 123) | def initialize(self): method initialize_iter (line 133) | def initialize_iter(self): method state_dict (line 137) | def state_dict(self) -> dict: method get_policy_state_dict (line 157) | def get_policy_state_dict(ckpt_path: Path) -> OrderedDict: method load_state_dict (line 163) | def load_state_dict(self, state_dict: dict) -> None: method named_callbacks (line 176) | def named_callbacks(self) -> Dict[str, Callback]: method named_loggers (line 182) | def named_loggers(self) -> Dict[str, LogWriter]: method fit (line 188) | def fit(self, vessel: TrainingVesselBase, ckpt_path: Path | None = Non... method test (line 251) | def test(self, vessel: TrainingVesselBase) -> None: method venv_from_iterator (line 274) | def venv_from_iterator(self, iterator: Iterable[InitialStateType]) -> ... method _metrics_callback (line 309) | def _metrics_callback(self, on_episode: bool, on_collect: bool, log_bu... method _call_callback_hooks (line 321) | def _call_callback_hooks(self, hook_name: str, *args: Any, **kwargs: A... method _min_loglevel (line 326) | def _min_loglevel(self): function _wrap_context (line 335) | def _wrap_context(obj): function _named_collection (line 346) | def _named_collection(seq: Sequence[T]) -> Dict[str, T]: FILE: qlib/rl/trainer/vessel.py class SeedIteratorNotAvailable (line 30) | class SeedIteratorNotAvailable(BaseException): class TrainingVesselBase (line 34) | class TrainingVesselBase(Generic[InitialStateType, StateType, ActType, O... method assign_trainer (line 49) | def assign_trainer(self, trainer: Trainer) -> None: method train_seed_iterator (line 52) | def train_seed_iterator(self) -> ContextManager[Iterable[InitialStateT... method val_seed_iterator (line 58) | def val_seed_iterator(self) -> ContextManager[Iterable[InitialStateTyp... method test_seed_iterator (line 62) | def test_seed_iterator(self) -> ContextManager[Iterable[InitialStateTy... method train (line 66) | def train(self, vector_env: BaseVectorEnv) -> Dict[str, Any]: method validate (line 70) | def validate(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]: method test (line 74) | def test(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]: method log (line 78) | def log(self, name: str, value: Any) -> None: method log_dict (line 85) | def log_dict(self, data: Dict[str, Any]) -> None: method state_dict (line 89) | def state_dict(self) -> Dict: method load_state_dict (line 93) | def load_state_dict(self, state_dict: Dict) -> None: class TrainingVessel (line 98) | class TrainingVessel(TrainingVesselBase): method __init__ (line 115) | def __init__( method train_seed_iterator (line 142) | def train_seed_iterator(self) -> ContextManager[Iterable[InitialStateT... method val_seed_iterator (line 150) | def val_seed_iterator(self) -> ContextManager[Iterable[InitialStateTyp... method test_seed_iterator (line 157) | def test_seed_iterator(self) -> ContextManager[Iterable[InitialStateTy... method train (line 164) | def train(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]: method validate (line 187) | def validate(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]: method test (line 196) | def test(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]: method _random_subset (line 206) | def _random_subset(name: str, collection: Sequence[T], size: int | Non... FILE: qlib/rl/utils/data_queue.py class DataQueue (line 24) | class DataQueue(Generic[T]): method __init__ (line 59) | def __init__( method __enter__ (line 86) | def __enter__(self) -> DataQueue: method __exit__ (line 90) | def __exit__(self, exc_type, exc_val, exc_tb): method cleanup (line 93) | def cleanup(self) -> None: method get (line 113) | def get(self, block: bool = True) -> Any: method put (line 128) | def put(self, obj: Any, block: bool = True, timeout: int | None = None... method mark_as_done (line 131) | def mark_as_done(self) -> None: method done (line 135) | def done(self) -> int: method activate (line 138) | def activate(self) -> DataQueue: method __del__ (line 146) | def __del__(self) -> None: method __iter__ (line 150) | def __iter__(self) -> Generator[Any, None, None]: method _consumer (line 159) | def _consumer(self) -> Generator[Any, None, None]: method _producer (line 167) | def _producer(self) -> None: FILE: qlib/rl/utils/env_wrapper.py class InfoDict (line 26) | class InfoDict(TypedDict): class EnvWrapperStatus (line 35) | class EnvWrapperStatus(TypedDict): class EnvWrapper (line 51) | class EnvWrapper( method __init__ (line 96) | def __init__( method action_space (line 139) | def action_space(self) -> Space: method observation_space (line 143) | def observation_space(self) -> Space: method reset (line 146) | def reset(self, **kwargs: Any) -> ObsType: method step (line 195) | def step(self, policy_action: PolicyActType, **kwargs: Any) -> Tuple[O... method render (line 249) | def render(self, mode: str = "human") -> None: FILE: qlib/rl/utils/finite_env.py function fill_invalid (line 39) | def fill_invalid(obj: int | float | bool | T) -> T: function is_invalid (line 58) | def is_invalid(arr: int | float | bool | T) -> bool: function generate_nan_observation (line 72) | def generate_nan_observation(obs_space: gym.Space) -> Any: function check_nan_observation (line 84) | def check_nan_observation(obs: Any) -> bool: class FiniteVectorEnv (line 89) | class FiniteVectorEnv(BaseVectorEnv): method __init__ (line 125) | def __init__( method _reset_alive_envs (line 143) | def _reset_alive_envs(self) -> None: method _set_default_obs (line 149) | def _set_default_obs(self, obs: Any) -> None: method _set_default_info (line 153) | def _set_default_info(self, info: Any) -> None: method _set_default_rew (line 157) | def _set_default_rew(self, rew: Any) -> None: method _get_default_obs (line 161) | def _get_default_obs(self) -> Any: method _get_default_info (line 164) | def _get_default_info(self) -> Any: method _get_default_rew (line 167) | def _get_default_rew(self) -> Any: method _postproc_env_obs (line 173) | def _postproc_env_obs(obs: Any) -> Optional[Any]: method collector_guard (line 180) | def collector_guard(self) -> Generator[FiniteVectorEnv, None, None]: method reset (line 210) | def reset( method step (line 261) | def step( class FiniteDummyVectorEnv (line 301) | class FiniteDummyVectorEnv(FiniteVectorEnv, DummyVectorEnv): class FiniteSubprocVectorEnv (line 305) | class FiniteSubprocVectorEnv(FiniteVectorEnv, SubprocVectorEnv): class FiniteShmemVectorEnv (line 309) | class FiniteShmemVectorEnv(FiniteVectorEnv, ShmemVectorEnv): function vectorize_env (line 313) | def vectorize_env( FILE: qlib/rl/utils/log.py class LogLevel (line 41) | class LogLevel(IntEnum): class LogCollector (line 58) | class LogCollector: method __init__ (line 71) | def __init__(self, min_loglevel: int | LogLevel = LogLevel.PERIODIC) -... method reset (line 74) | def reset(self) -> None: method _add_metric (line 78) | def _add_metric(self, name: str, metric: Any, loglevel: int | LogLevel... method add_string (line 83) | def add_string(self, name: str, string: str, loglevel: int | LogLevel ... method add_scalar (line 91) | def add_scalar(self, name: str, scalar: Any, loglevel: int | LogLevel ... method add_array (line 106) | def add_array( method add_any (line 120) | def add_any(self, name: str, obj: Any, loglevel: int | LogLevel = LogL... method logs (line 133) | def logs(self) -> Dict[str, np.ndarray]: class LogWriter (line 137) | class LogWriter(Generic[ObsType, ActType]): method __init__ (line 169) | def __init__(self, loglevel: int | LogLevel = LogLevel.PERIODIC) -> None: method clear (line 183) | def clear(self): method state_dict (line 190) | def state_dict(self) -> dict: method load_state_dict (line 203) | def load_state_dict(self, state_dict: dict) -> None: method aggregation (line 218) | def aggregation(array: Sequence[Any], name: str | None = None) -> Any: method log_episode (line 236) | def log_episode(self, length: int, rewards: List[float], contents: Lis... method log_step (line 249) | def log_step(self, reward: float, contents: Dict[str, Any]) -> None: method on_env_step (line 260) | def on_env_step(self, env_id: int, obs: ObsType, rew: float, done: boo... method on_env_reset (line 288) | def on_env_reset(self, env_id: int, _: ObsType) -> None: method on_env_all_ready (line 298) | def on_env_all_ready(self) -> None: method on_env_all_done (line 304) | def on_env_all_done(self) -> None: class LogBuffer (line 308) | class LogBuffer(LogWriter): method __init__ (line 331) | def __init__(self, callback: Callable[[bool, bool, LogBuffer], None], ... method state_dict (line 335) | def state_dict(self) -> dict: method load_state_dict (line 342) | def load_state_dict(self, state_dict: dict) -> None: method clear (line 347) | def clear(self): method log_episode (line 352) | def log_episode(self, length: int, rewards: list[float], contents: lis... method on_env_all_done (line 370) | def on_env_all_done(self) -> None: method episode_metrics (line 374) | def episode_metrics(self) -> dict[str, float]: method collect_metrics (line 380) | def collect_metrics(self) -> dict[str, float]: class ConsoleWriter (line 385) | class ConsoleWriter(LogWriter): method __init__ (line 397) | def __init__( method clear (line 419) | def clear(self) -> None: method log_episode (line 425) | def log_episode(self, length: int, rewards: List[float], contents: Lis... method generate_log_message (line 448) | def generate_log_message(self, logs: Dict[str, float]) -> str: class CsvWriter (line 470) | class CsvWriter(LogWriter): method __init__ (line 482) | def __init__(self, output_dir: Path, loglevel: int | LogLevel = LogLev... method clear (line 487) | def clear(self) -> None: method log_episode (line 491) | def log_episode(self, length: int, rewards: List[float], contents: Lis... method on_env_all_done (line 506) | def on_env_all_done(self) -> None: class PickleWriter (line 514) | class PickleWriter(LogWriter): class TensorboardWriter (line 518) | class TensorboardWriter(LogWriter): class MlflowWriter (line 522) | class MlflowWriter(LogWriter): FILE: qlib/strategy/base.py class BaseStrategy (line 23) | class BaseStrategy: method __init__ (line 26) | def __init__( method executor (line 63) | def executor(self) -> BaseExecutor: method trade_calendar (line 67) | def trade_calendar(self) -> TradeCalendarManager: method trade_position (line 71) | def trade_position(self) -> BasePosition: method trade_exchange (line 75) | def trade_exchange(self) -> Exchange: method reset_level_infra (line 79) | def reset_level_infra(self, level_infra: LevelInfrastructure) -> None: method reset_common_infra (line 85) | def reset_common_infra(self, common_infra: CommonInfrastructure) -> None: method reset (line 91) | def reset( method _reset (line 114) | def _reset( method generate_trade_decision (line 133) | def generate_trade_decision( method get_data_cal_avail_range (line 149) | def get_data_cal_avail_range(self, rtype: str = "full") -> Tuple[int, ... method update_trade_decision (line 184) | def update_trade_decision( method alter_outer_trade_decision (line 205) | def alter_outer_trade_decision(self, outer_trade_decision: BaseTradeDe... method post_upper_level_exe_step (line 223) | def post_upper_level_exe_step(self) -> None: method post_exe_step (line 229) | def post_exe_step(self, execute_result: Optional[list]) -> None: class RLStrategy (line 240) | class RLStrategy(BaseStrategy, metaclass=ABCMeta): method __init__ (line 243) | def __init__( class RLIntStrategy (line 261) | class RLIntStrategy(RLStrategy, metaclass=ABCMeta): method __init__ (line 264) | def __init__( method generate_trade_decision (line 292) | def generate_trade_decision(self, execute_result: list = None) -> Base... FILE: qlib/tests/__init__.py class TestAutoData (line 16) | class TestAutoData(unittest.TestCase): method setUpClass (line 23) | def setUpClass(cls, enable_1d_type="simple", enable_1min=False) -> None: class TestOperatorData (line 64) | class TestOperatorData(TestAutoData): method setUpClass (line 66) | def setUpClass(cls, enable_1d_type="simple", enable_1min=False) -> None: class MockStorageBase (line 165) | class MockStorageBase: method __init__ (line 166) | def __init__(self, **kwargs): class MockCalendarStorage (line 170) | class MockCalendarStorage(MockStorageBase, CalendarStorage): method __init__ (line 171) | def __init__(self, **kwargs): method data (line 176) | def data(self) -> List[CalVT]: method __getitem__ (line 179) | def __getitem__(self, i: Union[int, slice]) -> Union[CalVT, List[CalVT]]: method __len__ (line 182) | def __len__(self) -> int: class MockInstrumentStorage (line 186) | class MockInstrumentStorage(MockStorageBase, InstrumentStorage): method __init__ (line 187) | def __init__(self, **kwargs): method data (line 197) | def data(self) -> Dict[InstKT, InstVT]: method __getitem__ (line 200) | def __getitem__(self, k: InstKT) -> InstVT: method __len__ (line 203) | def __len__(self) -> int: class MockFeatureStorage (line 207) | class MockFeatureStorage(MockStorageBase, FeatureStorage): method __init__ (line 208) | def __init__(self, instrument: str, field: str, freq: str, db_region: ... method data (line 226) | def data(self) -> pd.Series: method start_index (line 230) | def start_index(self) -> Union[int, None]: method end_index (line 236) | def end_index(self) -> Union[int, None]: method __getitem__ (line 242) | def __getitem__(self, i: Union[int, slice]) -> Union[Tuple[int, float]... method __len__ (line 263) | def __len__(self) -> int: class TestMockData (line 267) | class TestMockData(unittest.TestCase): method setUpClass (line 287) | def setUpClass(cls) -> None: FILE: qlib/tests/config.py function get_data_handler_config (line 53) | def get_data_handler_config( function get_dataset_config (line 69) | def get_dataset_config( function get_gbdt_task (line 94) | def get_gbdt_task(dataset_kwargs={}, handler_kwargs={"instruments": CSI3... function get_record_lgb_config (line 101) | def get_record_lgb_config(dataset_kwargs={}, handler_kwargs={"instrument... function get_record_xgboost_config (line 112) | def get_record_xgboost_config(dataset_kwargs={}, handler_kwargs={"instru... FILE: qlib/tests/data.py class GetData (line 18) | class GetData: method __init__ (line 21) | def __init__(self, delete_zip_file=False): method merge_remote_url (line 31) | def merge_remote_url(self, file_name: str): method download (line 44) | def download(self, url: str, target_path: [Path, str]): method download_data (line 72) | def download_data(self, file_name: str, target_dir: [Path, str], delet... method check_dataset (line 111) | def check_dataset(self, file_name: str): method _unzip (line 120) | def _unzip(file_path: [Path, str], target_dir: [Path, str], delete_old... method _delete_qlib_data (line 134) | def _delete_qlib_data(file_dir: Path): method qlib_data (line 153) | def qlib_data( FILE: qlib/typehint.py class InstDictConf (line 18) | class InstDictConf(TypedDict): FILE: qlib/utils/__init__.py function get_redis_connection (line 43) | def get_redis_connection(): function read_bin (line 54) | def read_bin(file_path: Union[str, Path], start_index, end_index): function get_period_list (line 71) | def get_period_list(first: int, last: int, quarterly: bool) -> List[int]: function get_period_offset (line 101) | def get_period_offset(first_year, period, quarterly): function read_period_data (line 109) | def read_period_data( function np_ffill (line 176) | def np_ffill(arr: np.array): function lower_bound (line 193) | def lower_bound(data, val, level=0): function upper_bound (line 209) | def upper_bound(data, val, level=0): function requests_with_retry (line 226) | def requests_with_retry(url, retry=5, **kwargs): function parse_config (line 242) | def parse_config(config): function drop_nan_by_y_index (line 259) | def drop_nan_by_y_index(x, y, weight=None): function hash_args (line 271) | def hash_args(*args): function parse_field (line 277) | def parse_field(field): function compare_dict_value (line 305) | def compare_dict_value(src_data: dict, dst_data: dict): function remove_repeat_field (line 328) | def remove_repeat_field(fields): function remove_fields_space (line 339) | def remove_fields_space(fields: [list, str, tuple]): function normalize_cache_fields (line 350) | def normalize_cache_fields(fields: [list, tuple]): function normalize_cache_instruments (line 359) | def normalize_cache_instruments(instruments): function is_tradable_date (line 375) | def is_tradable_date(cur_date): function get_date_range (line 386) | def get_date_range(trading_date, left_shift=0, right_shift=0, future=Fal... function get_date_by_shift (line 407) | def get_date_by_shift( function get_next_trading_date (line 451) | def get_next_trading_date(trading_date, future=False): function get_pre_trading_date (line 460) | def get_pre_trading_date(trading_date, future=False): function transform_end_date (line 469) | def transform_end_date(end_date=None, freq="day"): function get_date_in_file_name (line 493) | def get_date_in_file_name(file_name): function split_pred (line 506) | def split_pred(pred, number=None, split_date=None): function time_to_slc_point (line 544) | def time_to_slc_point(t: Union[None, str, pd.Timestamp]) -> Union[None, ... function can_use_cache (line 566) | def can_use_cache(): function exists_qlib_data (line 578) | def exists_qlib_data(qlib_dir): function check_qlib_data (line 638) | def check_qlib_data(qlib_config): function lazy_sort_index (line 650) | def lazy_sort_index(df: pd.DataFrame, axis=0) -> pd.DataFrame: function flatten_dict (line 681) | def flatten_dict(d, parent_key="", sep=".") -> dict: function get_item_from_obj (line 712) | def get_item_from_obj(config: dict, name_path: str) -> object: function fill_placeholder (line 758) | def fill_placeholder(config: dict, config_extend: dict): function auto_filter_kwargs (line 821) | def auto_filter_kwargs(func: Callable, warning=True) -> Callable: class Wrapper (line 858) | class Wrapper: method __init__ (line 861) | def __init__(self): method register (line 864) | def register(self, provider): method __repr__ (line 867) | def __repr__(self): method __getattr__ (line 870) | def __getattr__(self, key): function register_wrapper (line 876) | def register_wrapper(wrapper, cls_or_obj, module_path=None): function load_dataset (line 889) | def load_dataset(path_or_obj, index_col=[0, 1]): function code_to_fname (line 905) | def code_to_fname(code: str): function fname_to_code (line 925) | def fname_to_code(fname: str): FILE: qlib/utils/data.py function robust_zscore (line 16) | def robust_zscore(x: pd.Series, zscore=False): function zscore (line 35) | def zscore(x: Union[pd.Series, pd.DataFrame]): function deepcopy_basic_type (line 39) | def deepcopy_basic_type(obj: object) -> object: function update_config (line 70) | def update_config(base_config: dict, ext_config: Union[dict, List[dict]]): function guess_horizon (line 112) | def guess_horizon(label: List): FILE: qlib/utils/exceptions.py class QlibException (line 6) | class QlibException(Exception): class RecorderInitializationError (line 10) | class RecorderInitializationError(QlibException): class LoadObjectError (line 14) | class LoadObjectError(QlibException): class ExpAlreadyExistError (line 18) | class ExpAlreadyExistError(Exception): FILE: qlib/utils/file.py function get_or_create_path (line 16) | def get_or_create_path(path: Optional[Text] = None, return_dir: bool = F... function save_multiple_parts_file (line 44) | def save_multiple_parts_file(filename, format="gztar"): function unpack_archive_with_buffer (line 96) | def unpack_archive_with_buffer(buffer, format="gztar"): function get_tmp_file_with_buffer (line 153) | def get_tmp_file_with_buffer(buffer): function get_io_object (line 164) | def get_io_object(file: Union[IO, str, Path], *args, **kwargs) -> IO: FILE: qlib/utils/index_data.py function concat (line 21) | def concat(data_list: Union[SingleData], axis=0) -> MultiData: function sum_by_index (line 57) | def sum_by_index(data_list: Union[SingleData], new_index: list, fill_val... class Index (line 87) | class Index: method __init__ (line 100) | def __init__(self, idx_list: Union[List, pd.Index, "Index", int]): method __getitem__ (line 122) | def __getitem__(self, i: int): method _convert_type (line 125) | def _convert_type(self, item): method index (line 148) | def index(self, item) -> int: method __or__ (line 172) | def __or__(self, other: "Index"): method __eq__ (line 175) | def __eq__(self, other: "Index"): method __len__ (line 181) | def __len__(self): method is_sorted (line 184) | def is_sorted(self): method sort (line 187) | def sort(self) -> Tuple["Index", np.ndarray]: method tolist (line 201) | def tolist(self): class LocIndexer (line 206) | class LocIndexer: method __init__ (line 215) | def __init__(self, index_data: "IndexData", indices: List[Index], int_... method proc_idx_l (line 222) | def proc_idx_l(indices: List[Union[List, pd.Index, Index]], data_shape... method _slc_convert (line 229) | def _slc_convert(self, index: Index, indexing: slice) -> slice: method __getitem__ (line 253) | def __getitem__(self, indexing): class BinaryOps (line 316) | class BinaryOps: method __init__ (line 317) | def __init__(self, method_name): method __get__ (line 320) | def __get__(self, obj, *args): method __call__ (line 325) | def __call__(self, other): function index_data_ops_creator (line 337) | def index_data_ops_creator(*args, **kwargs): class IndexData (line 346) | class IndexData(metaclass=index_data_ops_creator): method __init__ (line 364) | def __init__(self, data: np.ndarray, *indices: Union[List, pd.Index, I... method loc (line 401) | def loc(self): method iloc (line 405) | def iloc(self): method index (line 409) | def index(self): method columns (line 413) | def columns(self): method __getitem__ (line 416) | def __getitem__(self, args): method _align_indices (line 420) | def _align_indices(self, other: "IndexData") -> "IndexData": method sort_index (line 437) | def sort_index(self, axis=0, inplace=True): method __invert__ (line 443) | def __invert__(self): method abs (line 446) | def abs(self): method replace (line 451) | def replace(self, to_replace: Dict[np.number, np.number]): method apply (line 459) | def apply(self, func: Callable): method __len__ (line 464) | def __len__(self): method sum (line 474) | def sum(self, axis=None, dtype=None, out=None): method mean (line 488) | def mean(self, axis=None, dtype=None, out=None): method isna (line 502) | def isna(self): method fillna (line 505) | def fillna(self, value=0.0, inplace: bool = False): method count (line 511) | def count(self): method all (line 514) | def all(self): method empty (line 521) | def empty(self): method values (line 525) | def values(self): class SingleData (line 529) | class SingleData(IndexData): method __init__ (line 530) | def __init__( method _align_indices (line 559) | def _align_indices(self, other): method reindex (line 569) | def reindex(self, index: Index, fill_value=np.nan) -> SingleData: method add (line 595) | def add(self, other: SingleData, fill_value=0): method to_dict (line 604) | def to_dict(self): method to_series (line 614) | def to_series(self): method __repr__ (line 617) | def __repr__(self) -> str: class MultiData (line 621) | class MultiData(IndexData): method __init__ (line 622) | def __init__( method _align_indices (line 645) | def _align_indices(self, other): method __repr__ (line 653) | def __repr__(self) -> str: FILE: qlib/utils/mod.py function get_module_by_module_path (line 25) | def get_module_by_module_path(module_path: Union[str, ModuleType]): function split_module_path (line 49) | def split_module_path(module_path: str) -> Tuple[str, str]: function get_callable_kwargs (line 67) | def get_callable_kwargs(config: InstConf, default_module: Union[str, Mod... function init_instance_by_config (line 122) | def init_instance_by_config( function class_casting (line 188) | def class_casting(obj: object, cls: type): function find_all_classes (line 206) | def find_all_classes(module_path: Union[str, ModuleType], cls: type) -> ... FILE: qlib/utils/objm.py class ObjManager (line 12) | class ObjManager: method save_obj (line 13) | def save_obj(self, obj: object, name: str): method save_objs (line 26) | def save_objs(self, obj_name_l): method load_obj (line 36) | def load_obj(self, name: str) -> object: method exists (line 52) | def exists(self, name: str) -> bool: method list (line 68) | def list(self) -> list: method remove (line 79) | def remove(self, fname=None): class FileManager (line 91) | class FileManager(ObjManager): method __init__ (line 96) | def __init__(self, path=None): method create_path (line 102) | def create_path(self) -> str: method save_obj (line 110) | def save_obj(self, obj, name): method save_objs (line 114) | def save_objs(self, obj_name_l): method load_obj (line 118) | def load_obj(self, name): method exists (line 122) | def exists(self, name): method list (line 125) | def list(self): method remove (line 128) | def remove(self, fname=None): FILE: qlib/utils/paral.py class ParallelExt (line 20) | class ParallelExt(Parallel): method __init__ (line 21) | def __init__(self, *args, **kwargs): function datetime_groupby_apply (line 33) | def datetime_groupby_apply( class AsyncCaller (line 72) | class AsyncCaller: method __init__ (line 84) | def __init__(self) -> None: method close (line 90) | def close(self): method run (line 93) | def run(self): method __call__ (line 110) | def __call__(self, func, *args, **kwargs): method wait (line 113) | def wait(self, close=True): method async_dec (line 119) | def async_dec(ac_attr): class DelayedTask (line 141) | class DelayedTask: method get_delayed_tuple (line 142) | def get_delayed_tuple(self): method set_res (line 148) | def set_res(self, res): method get_replacement (line 158) | def get_replacement(self): class DelayedTuple (line 163) | class DelayedTuple(DelayedTask): method __init__ (line 164) | def __init__(self, delayed_tpl): method get_delayed_tuple (line 168) | def get_delayed_tuple(self): method get_replacement (line 171) | def get_replacement(self): class DelayedDict (line 175) | class DelayedDict(DelayedTask): method __init__ (line 185) | def __init__(self, key_l, delayed_tpl): method get_delayed_tuple (line 189) | def get_delayed_tuple(self): method get_replacement (line 192) | def get_replacement(self): function is_delayed_tuple (line 196) | def is_delayed_tuple(obj) -> bool: function _replace_and_get_dt (line 211) | def _replace_and_get_dt(complex_iter): function _recover_dt (line 247) | def _recover_dt(complex_iter): function complex_parallel (line 269) | def complex_parallel(paral: Parallel, complex_iter): class call_in_subproc (line 298) | class call_in_subproc: method __init__ (line 307) | def __init__(self, func: Callable, qlib_config: QlibConfig = None): method _func_mod (line 324) | def _func_mod(self, *args, **kwargs): method __call__ (line 330) | def __call__(self, *args, **kwargs): FILE: qlib/utils/pickle_utils.py class RestrictedUnpickler (line 61) | class RestrictedUnpickler(pickle.Unpickler): method find_class (line 72) | def find_class(self, module: str, name: str): function restricted_pickle_load (line 99) | def restricted_pickle_load(file: BinaryIO) -> Any: function restricted_pickle_loads (line 121) | def restricted_pickle_loads(data: bytes) -> Any: function add_safe_class (line 144) | def add_safe_class(module: str, name: str) -> None: function get_safe_classes (line 165) | def get_safe_classes() -> Set[Tuple[str, str]]: FILE: qlib/utils/resam.py function resam_calendar (line 12) | def resam_calendar( function get_higher_eq_freq_feature (line 72) | def get_higher_eq_freq_feature(instruments, fields, start_time=None, end... function resam_ts_data (line 102) | def resam_ts_data( function get_valid_value (line 209) | def get_valid_value(series, last=True): function _ts_data_valid (line 228) | def _ts_data_valid(ts_feature, last=False): FILE: qlib/utils/serial.py class Serializable (line 11) | class Serializable: method __init__ (line 34) | def __init__(self): method _is_kept (line 38) | def _is_kept(self, key): method __getstate__ (line 47) | def __getstate__(self) -> dict: method __setstate__ (line 50) | def __setstate__(self, state: dict): method dump_all (line 54) | def dump_all(self): method _get_attr_list (line 60) | def _get_attr_list(self, attr_type: str) -> list: method config (line 81) | def config(self, recursive=False, **kwargs): method to_pickle (line 115) | def to_pickle(self, path: Union[Path, str], **kwargs): method load (line 136) | def load(cls, filepath): method get_backend (line 157) | def get_backend(cls): method general_dump (line 173) | def general_dump(obj, path: Union[Path, str]): FILE: qlib/utils/time.py function get_min_cal (line 32) | def get_min_cal(shift: int = 0, region: str = REG_CN) -> List[time]: function is_single_value (line 73) | def is_single_value(start_time, end_time, freq, region: str = REG_CN): class Freq (line 114) | class Freq: method __init__ (line 121) | def __init__(self, freq: Union[str, "Freq"]) -> None: method __eq__ (line 129) | def __eq__(self, freq): method __str__ (line 133) | def __str__(self): method __repr__ (line 137) | def __repr__(self) -> str: method parse (line 141) | def parse(freq: str) -> Tuple[int, str]: method get_timedelta (line 187) | def get_timedelta(n: int, freq: str) -> pd.Timedelta: method get_min_delta (line 204) | def get_min_delta(left_frq: str, right_freq: str): method get_recent_freq (line 229) | def get_recent_freq(base_freq: Union[str, "Freq"], freq_list: List[Uni... function time_to_day_index (line 258) | def time_to_day_index(time_obj: Union[str, datetime], region: str = REG_... function get_day_min_idx_range (line 283) | def get_day_min_idx_range(start: str, end: str, freq: str, region: str) ... function concat_date_time (line 309) | def concat_date_time(date_obj: date, time_obj: time) -> pd.Timestamp: function cal_sam_minute (line 323) | def cal_sam_minute(x: pd.Timestamp, sam_minutes: int, region: str = REG_... function epsilon_change (line 349) | def epsilon_change(date_time: pd.Timestamp, direction: str = "backward")... FILE: qlib/workflow/__init__.py class QlibRecorder (line 26) | class QlibRecorder: method __init__ (line 31) | def __init__(self, exp_manager: ExpManager): method __repr__ (line 34) | def __repr__(self): method start (line 38) | def start( method start_exp (line 97) | def start_exp( method end_exp (line 147) | def end_exp(self, recorder_status=Recorder.STATUS_FI): method search_records (line 165) | def search_records(self, experiment_ids, **kwargs): method list_experiments (line 200) | def list_experiments(self): method list_recorders (line 214) | def list_recorders(self, experiment_id=None, experiment_name=None): method get_exp (line 242) | def get_exp( method delete_exp (line 325) | def delete_exp(self, experiment_id=None, experiment_name=None): method get_uri (line 345) | def get_uri(self): method set_uri (line 361) | def set_uri(self, uri: Optional[Text]): method uri_context (line 373) | def uri_context(self, uri: Text): method get_recorder (line 392) | def get_recorder( method delete_recorder (line 461) | def delete_recorder(self, recorder_id=None, recorder_name=None): method save_objects (line 481) | def save_objects(self, local_path=None, artifact_path=None, **kwargs: ... method load_object (line 536) | def load_object(self, name: Text): method log_params (line 542) | def log_params(self, **kwargs): method log_metrics (line 567) | def log_metrics(self, step=None, **kwargs): method log_artifact (line 592) | def log_artifact(self, local_path: str, artifact_path: Optional[str] =... method download_artifact (line 608) | def download_artifact(self, path: str, dst_path: Optional[str] = None)... method set_tags (line 630) | def set_tags(self, **kwargs): class RecorderWrapper (line 656) | class RecorderWrapper(Wrapper): method register (line 661) | def register(self, provider): FILE: qlib/workflow/exp.py class Experiment (line 15) | class Experiment: method __init__ (line 21) | def __init__(self, id, name): method __repr__ (line 27) | def __repr__(self): method __str__ (line 30) | def __str__(self): method info (line 34) | def info(self): method start (line 44) | def start(self, *, recorder_id=None, recorder_name=None, resume=False): method end (line 63) | def end(self, recorder_status=Recorder.STATUS_S): method create_recorder (line 74) | def create_recorder(self, recorder_name=None): method search_records (line 89) | def search_records(self, **kwargs): method delete_recorder (line 103) | def delete_recorder(self, recorder_id): method get_recorder (line 114) | def get_recorder(self, recorder_id=None, recorder_name=None, create: b... method _get_or_create_rec (line 178) | def _get_or_create_rec(self, recorder_id=None, recorder_name=None) -> ... method _get_recorder (line 196) | def _get_recorder(self, recorder_id=None, recorder_name=None): method list_recorders (line 221) | def list_recorders( class MLflowExperiment (line 243) | class MLflowExperiment(Experiment): method __init__ (line 248) | def __init__(self, id, name, uri): method __repr__ (line 254) | def __repr__(self): method start (line 257) | def start(self, *, recorder_id=None, recorder_name=None, resume=False): method end (line 275) | def end(self, recorder_status=Recorder.STATUS_S): method create_recorder (line 280) | def create_recorder(self, recorder_name=None): method _get_recorder (line 287) | def _get_recorder(self, recorder_id=None, recorder_name=None): method search_records (line 317) | def search_records(self, **kwargs): method delete_recorder (line 325) | def delete_recorder(self, recorder_id=None, recorder_name=None): method list_recorders (line 342) | def list_recorders( FILE: qlib/workflow/expm.py class ExpManager (line 22) | class ExpManager: method __init__ (line 36) | def __init__(self, uri: Text, default_exp_name: Optional[Text]): method __repr__ (line 43) | def __repr__(self): method start_exp (line 46) | def start_exp( method _start_exp (line 94) | def _start_exp(self, *args, **kwargs) -> Experiment: method end_exp (line 98) | def end_exp(self, recorder_status: Text = Recorder.STATUS_S, **kwargs): method _end_exp (line 116) | def _end_exp(self, recorder_status: Text = Recorder.STATUS_S, **kwargs): method create_exp (line 119) | def create_exp(self, experiment_name: Optional[Text] = None): method search_records (line 138) | def search_records(self, experiment_ids=None, **kwargs): method get_exp (line 152) | def get_exp(self, *, experiment_id=None, experiment_name=None, create:... method _get_or_create_exp (line 217) | def _get_or_create_exp(self, experiment_id=None, experiment_name=None)... method _get_exp (line 247) | def _get_exp(self, experiment_id=None, experiment_name=None) -> Experi... method delete_exp (line 269) | def delete_exp(self, experiment_id=None, experiment_name=None): method default_uri (line 283) | def default_uri(self): method default_uri (line 292) | def default_uri(self, value): method uri (line 296) | def uri(self): method list_experiments (line 306) | def list_experiments(self): class MLflowExpManager (line 317) | class MLflowExpManager(ExpManager): method client (line 323) | def client(self): method _start_exp (line 328) | def _start_exp( method _end_exp (line 348) | def _end_exp(self, recorder_status: Text = Recorder.STATUS_S): method create_exp (line 353) | def create_exp(self, experiment_name: Optional[Text] = None): method _get_exp (line 365) | def _get_exp(self, experiment_id=None, experiment_name=None): method search_records (line 398) | def search_records(self, experiment_ids=None, **kwargs): method delete_exp (line 405) | def delete_exp(self, experiment_id=None, experiment_name=None): method list_experiments (line 422) | def list_experiments(self): FILE: qlib/workflow/online/manager.py class OnlineManager (line 101) | class OnlineManager(Serializable): method __init__ (line 110) | def __init__( method _postpone_action (line 145) | def _postpone_action(self): method first_train (line 156) | def first_train(self, strategies: List[OnlineStrategy] = None, model_k... method routine (line 184) | def routine( method get_collector (line 230) | def get_collector(self, **kwargs) -> MergeCollector: method add_strategy (line 246) | def add_strategy(self, strategies: Union[OnlineStrategy, List[OnlineSt... method prepare_signals (line 258) | def prepare_signals(self, prepare_func: Callable = AverageEnsemble(), ... method get_signals (line 289) | def get_signals(self) -> Union[pd.Series, pd.DataFrame]: method simulate (line 302) | def simulate( method delay_prepare (line 349) | def delay_prepare(self, model_kwargs={}, signal_kwargs={}): FILE: qlib/workflow/online/strategy.py class OnlineStrategy (line 19) | class OnlineStrategy: method __init__ (line 24) | def __init__(self, name_id: str): method prepare_tasks (line 37) | def prepare_tasks(self, cur_time, **kwargs) -> List[dict]: method prepare_online_models (line 46) | def prepare_online_models(self, trained_models, cur_time=None) -> List... method first_tasks (line 72) | def first_tasks(self) -> List[dict]: method get_collector (line 78) | def get_collector(self) -> Collector: class RollingStrategy (line 92) | class RollingStrategy(OnlineStrategy): method __init__ (line 97) | def __init__( method get_collector (line 123) | def get_collector(self, process_list=[RollingGroup()], rec_key_func=No... method first_tasks (line 155) | def first_tasks(self) -> List[dict]: method prepare_tasks (line 167) | def prepare_tasks(self, cur_time) -> List[dict]: method _list_latest (line 191) | def _list_latest(self, rec_list: List[Recorder]): FILE: qlib/workflow/online/update.py class RMDLoader (line 21) | class RMDLoader: method __init__ (line 26) | def __init__(self, rec: Recorder): method get_dataset (line 29) | def get_dataset( method get_model (line 62) | def get_model(self) -> Model: class RecordUpdater (line 66) | class RecordUpdater(metaclass=ABCMeta): method __init__ (line 71) | def __init__(self, record: Recorder, *args, **kwargs): method update (line 76) | def update(self, *args, **kwargs): class DSBasedUpdater (line 82) | class DSBasedUpdater(RecordUpdater, metaclass=ABCMeta): method __init__ (line 104) | def __init__( method prepare_data (line 180) | def prepare_data(self, unprepared_dataset: Optional[DatasetH] = None) ... method update (line 211) | def update(self, dataset: DatasetH = None, write: bool = True, ret_new... method get_update_data (line 251) | def get_update_data(self, dataset: Dataset) -> pd.DataFrame: function _replace_range (line 261) | def _replace_range(data, new_data): class PredUpdater (line 270) | class PredUpdater(DSBasedUpdater): method get_update_data (line 275) | def get_update_data(self, dataset: Dataset) -> pd.DataFrame: class LabelUpdater (line 284) | class LabelUpdater(DSBasedUpdater): method __init__ (line 292) | def __init__(self, record: Recorder, to_date=None, **kwargs): method get_update_data (line 295) | def get_update_data(self, dataset: Dataset) -> pd.DataFrame: FILE: qlib/workflow/online/utils.py class OnlineTool (line 19) | class OnlineTool: method __init__ (line 28) | def __init__(self): method set_online_tag (line 34) | def set_online_tag(self, tag, recorder: Union[list, object]): method get_online_tag (line 44) | def get_online_tag(self, recorder: object) -> str: method reset_online_tag (line 56) | def reset_online_tag(self, recorder: Union[list, object]): method online_models (line 67) | def online_models(self) -> list: method update_online_pred (line 76) | def update_online_pred(self, to_date=None): class OnlineToolR (line 87) | class OnlineToolR(OnlineTool): method __init__ (line 92) | def __init__(self, default_exp_name: str = None): method set_online_tag (line 102) | def set_online_tag(self, tag, recorder: Union[Recorder, List]): method get_online_tag (line 116) | def get_online_tag(self, recorder: Recorder) -> str: method reset_online_tag (line 129) | def reset_online_tag(self, recorder: Union[Recorder, List], exp_name: ... method online_models (line 146) | def online_models(self, exp_name: str = None) -> list: method update_online_pred (line 159) | def update_online_pred(self, to_date=None, from_date=None, exp_name: s... method _get_exp_name (line 180) | def _get_exp_name(self, exp_name): FILE: qlib/workflow/record_temp.py class RecordTemp (line 28) | class RecordTemp: method get_path (line 39) | def get_path(cls, path=None): method save (line 49) | def save(self, **kwargs): method __init__ (line 59) | def __init__(self, recorder): method recorder (line 63) | def recorder(self): method generate (line 68) | def generate(self, **kwargs): method load (line 81) | def load(self, name: str, parents: bool = True): method list (line 109) | def list(self): method check (line 120) | def check(self, include_self: bool = False, parents: bool = True): class SignalRecord (line 161) | class SignalRecord(RecordTemp): method __init__ (line 166) | def __init__(self, model=None, dataset=None, recorder=None): method generate_label (line 172) | def generate_label(dataset): method generate (line 190) | def generate(self, **kwargs): method list (line 208) | def list(self): class ACRecordTemp (line 212) | class ACRecordTemp(RecordTemp): method __init__ (line 215) | def __init__(self, recorder, skip_existing=False): method generate (line 219) | def generate(self, *args, **kwargs): method _generate (line 240) | def _generate(self, *args, **kwargs) -> Dict[str, object]: class HFSignalRecord (line 248) | class HFSignalRecord(SignalRecord): method __init__ (line 256) | def __init__(self, recorder, **kwargs): method generate (line 259) | def generate(self): method list (line 291) | def list(self): class SigAnaRecord (line 295) | class SigAnaRecord(ACRecordTemp): method __init__ (line 304) | def __init__(self, recorder, ana_long_short=False, ann_scaler=252, lab... method _generate (line 310) | def _generate(self, label: Optional[pd.DataFrame] = None, **kwargs): method list (line 351) | def list(self): class PortAnaRecord (line 358) | class PortAnaRecord(ACRecordTemp): method __init__ (line 373) | def __init__( method _get_report_freq (line 456) | def _get_report_freq(self, executor_config): method _generate (line 465) | def _generate(self, **kwargs): method list (line 552) | def list(self): class MultiPassPortAnaRecord (line 575) | class MultiPassPortAnaRecord(PortAnaRecord): method __init__ (line 594) | def __init__(self, recorder, pass_num=10, shuffle_init_score=True, **k... method random_init (line 617) | def random_init(self): method _generate (line 635) | def _generate(self, **kwargs): method list (line 686) | def list(self): FILE: qlib/workflow/recorder.py class Recorder (line 28) | class Recorder: method __init__ (line 42) | def __init__(self, experiment_id, name): method __repr__ (line 50) | def __repr__(self): method __str__ (line 53) | def __str__(self): method __hash__ (line 56) | def __hash__(self) -> int: method info (line 60) | def info(self): method set_recorder_name (line 71) | def set_recorder_name(self, rname): method save_objects (line 74) | def save_objects(self, local_path=None, artifact_path=None, **kwargs): method load_object (line 90) | def load_object(self, name): method start_run (line 105) | def start_run(self): method end_run (line 116) | def end_run(self): method log_params (line 122) | def log_params(self, **kwargs): method log_metrics (line 133) | def log_metrics(self, step=None, **kwargs): method log_artifact (line 144) | def log_artifact(self, local_path: str, artifact_path: Optional[str] =... method set_tags (line 157) | def set_tags(self, **kwargs): method delete_tags (line 168) | def delete_tags(self, *keys): method list_artifacts (line 179) | def list_artifacts(self, artifact_path: str = None): method download_artifact (line 194) | def download_artifact(self, path: str, dst_path: Optional[str] = None)... method list_metrics (line 216) | def list_metrics(self): method list_params (line 226) | def list_params(self): method list_tags (line 236) | def list_tags(self): class MLflowRecorder (line 247) | class MLflowRecorder(Recorder): method __init__ (line 263) | def __init__(self, experiment_id, uri, name=None, mlflow_run=None): method __repr__ (line 287) | def __repr__(self): method __hash__ (line 299) | def __hash__(self) -> int: method __eq__ (line 302) | def __eq__(self, o: object) -> bool: method uri (line 308) | def uri(self): method artifact_uri (line 312) | def artifact_uri(self): method get_local_dir (line 315) | def get_local_dir(self): method start_run (line 335) | def start_run(self): method _log_uncommitted_code (line 362) | def _log_uncommitted_code(self): method end_run (line 380) | def end_run(self, status: str = Recorder.STATUS_S): method save_objects (line 397) | def save_objects(self, local_path=None, artifact_path=None, **kwargs): method load_object (line 413) | def load_object(self, name, unpickler=pickle.Unpickler): method log_params (line 446) | def log_params(self, **kwargs): method log_metrics (line 451) | def log_metrics(self, step=None, **kwargs): method log_artifact (line 455) | def log_artifact(self, local_path, artifact_path: Optional[str] = None): method set_tags (line 459) | def set_tags(self, **kwargs): method delete_tags (line 463) | def delete_tags(self, *keys): method get_artifact_uri (line 467) | def get_artifact_uri(self): method list_artifacts (line 475) | def list_artifacts(self, artifact_path=None): method download_artifact (line 480) | def download_artifact(self, path: str, dst_path: Optional[str] = None)... method list_metrics (line 483) | def list_metrics(self): method list_params (line 487) | def list_params(self): method list_tags (line 491) | def list_tags(self): FILE: qlib/workflow/task/collect.py class Collector (line 19) | class Collector(Serializable): method __init__ (line 24) | def __init__(self, process_list=[]): method collect (line 35) | def collect(self) -> dict: method process_collect (line 53) | def process_collect(collected_dict, process_list=[], *args, **kwargs) ... method __call__ (line 79) | def __call__(self, *args, **kwargs) -> dict: class MergeCollector (line 90) | class MergeCollector(Collector): method __init__ (line 104) | def __init__(self, collector_dict: Dict[str, Collector], process_list:... method collect (line 118) | def collect(self) -> dict: class RecorderCollector (line 136) | class RecorderCollector(Collector): method __init__ (line 139) | def __init__( method collect (line 184) | def collect(self, artifacts_key=None, rec_filter_func=None, only_exist... method get_exp_name (line 251) | def get_exp_name(self) -> str: FILE: qlib/workflow/task/gen.py function task_generator (line 16) | def task_generator(tasks, generators) -> list: class TaskGen (line 53) | class TaskGen(metaclass=abc.ABCMeta): method generate (line 72) | def generate(self, task: dict) -> List[dict]: method __call__ (line 87) | def __call__(self, *args, **kwargs): function handler_mod (line 94) | def handler_mod(task: dict, rolling_gen): function trunc_segments (line 126) | def trunc_segments(ta: TimeAdjuster, segments: Dict[str, pd.Timestamp], ... class RollingGen (line 140) | class RollingGen(TaskGen): method __init__ (line 144) | def __init__( method _update_task_segs (line 181) | def _update_task_segs(self, task, segs): method gen_following_tasks (line 187) | def gen_following_tasks(self, task: dict, test_end: pd.Timestamp) -> L... method generate (line 228) | def generate(self, task: dict) -> List[dict]: class MultiHorizonGenBase (line 304) | class MultiHorizonGenBase(TaskGen): method __init__ (line 305) | def __init__(self, horizon: List[int] = [5], label_leak_n=2): method set_horizon (line 326) | def set_horizon(self, task: dict, hr: int): method generate (line 338) | def generate(self, task: dict): FILE: qlib/workflow/task/manage.py class TaskManager (line 35) | class TaskManager: method __init__ (line 86) | def __init__(self, task_pool: str): method list (line 102) | def list() -> list: method _encode_task (line 111) | def _encode_task(self, task): method _decode_task (line 118) | def _decode_task(self, task): method _dict_to_str (line 139) | def _dict_to_str(self, flt): method _decode_query (line 142) | def _decode_query(self, query): method replace_task (line 161) | def replace_task(self, task, new_task): method insert_task (line 177) | def insert_task(self, task): method insert_task_def (line 194) | def insert_task_def(self, task_def): method create_task (line 217) | def create_task(self, task_def_l, dry_run=False, print_nt=False) -> Li... method fetch_task (line 265) | def fetch_task(self, query={}, status=STATUS_WAITING) -> dict: method safe_fetch_task (line 289) | def safe_fetch_task(self, query={}, status=STATUS_WAITING): method task_fetcher_iter (line 312) | def task_fetcher_iter(self, query={}): method query (line 319) | def query(self, query={}, decode=True): method re_query (line 341) | def re_query(self, _id) -> dict: method commit_task_res (line 354) | def commit_task_res(self, task, res, status=STATUS_DONE): method return_task (line 371) | def return_task(self, task, status=STATUS_WAITING): method remove (line 384) | def remove(self, query={}): method task_stat (line 398) | def task_stat(self, query={}) -> dict: method reset_waiting (line 416) | def reset_waiting(self, query={}): method reset_status (line 429) | def reset_status(self, query, status): method prioritize (line 434) | def prioritize(self, task, priority: int): method _get_undone_n (line 448) | def _get_undone_n(self, task_stat): method _get_total (line 455) | def _get_total(self, task_stat): method wait (line 458) | def wait(self, query={}): method __str__ (line 481) | def __str__(self): function run_task (line 485) | def run_task( FILE: qlib/workflow/task/utils.py function get_mongodb (line 22) | def get_mongodb() -> Database: function list_recorders (line 60) | def list_recorders(experiment, rec_filter_func=None): class TimeAdjuster (line 82) | class TimeAdjuster: method __init__ (line 87) | def __init__(self, future=True, end_time=None): method set_end_time (line 91) | def set_end_time(self, end_time=None): method get (line 100) | def get(self, idx: int): method max (line 113) | def max(self) -> pd.Timestamp: method align_idx (line 119) | def align_idx(self, time_point, tp_type="start") -> int: method cal_interval (line 144) | def cal_interval(self, time_point_A, time_point_B) -> int: method align_time (line 157) | def align_time(self, time_point, tp_type="start") -> pd.Timestamp: method align_seg (line 174) | def align_seg(self, segment: Union[dict, tuple]) -> Union[dict, tuple]: method truncate (line 203) | def truncate(self, segment: tuple, test_start, days: int) -> tuple: method _add_step (line 238) | def _add_step(self, index, step): method shift (line 243) | def shift(self, seg: tuple, step: int, rtype=SHIFT_SD) -> tuple: function replace_task_handler_with_cache (line 283) | def replace_task_handler_with_cache(task: dict, cache_dir: Union[str, Pa... FILE: qlib/workflow/utils.py function experiment_exit_handler (line 17) | def experiment_exit_handler(): function experiment_exception_hook (line 31) | def experiment_exception_hook(exc_type, value, tb): FILE: scripts/check_data_health.py class DataHealthChecker (line 13) | class DataHealthChecker: method __init__ (line 21) | def __init__( method load_qlib_data (line 52) | def load_qlib_data(self): method check_features_dir_lowercase (line 79) | def check_features_dir_lowercase(self) -> Optional[pd.DataFrame]: method check_missing_data (line 109) | def check_missing_data(self) -> Optional[pd.DataFrame]: method check_large_step_changes (line 136) | def check_large_step_changes(self) -> Optional[pd.DataFrame]: method check_required_columns (line 165) | def check_required_columns(self) -> Optional[pd.DataFrame]: method check_missing_factor (line 185) | def check_missing_factor(self) -> Optional[pd.DataFrame]: method check_data (line 213) | def check_data(self): FILE: scripts/check_dump_bin.py class CheckBin (line 17) | class CheckBin: method __init__ (line 23) | def __init__( method _compare (line 79) | def _compare(self, file_path: Path): method check (line 110) | def check(self): FILE: scripts/collect_info.py class InfoCollector (line 11) | class InfoCollector: method sys (line 18) | def sys(self): method py (line 23) | def py(self): method qlib (line 27) | def qlib(self): method all (line 63) | def all(self): FILE: scripts/data_collector/baostock_5min/collector.py class BaostockCollectorHS3005min (line 26) | class BaostockCollectorHS3005min(BaseCollector): method __init__ (line 27) | def __init__( method get_trade_calendar (line 75) | def get_trade_calendar(self): method process_interval (line 88) | def process_interval(interval: str): method get_data (line 94) | def get_data( method get_data_from_remote (line 109) | def get_data_from_remote( method get_hs300_symbols (line 127) | def get_hs300_symbols(self) -> List[str]: method get_instrument_list (line 138) | def get_instrument_list(self): method normalize_symbol (line 144) | def normalize_symbol(self, symbol: str): class BaostockNormalizeHS3005min (line 148) | class BaostockNormalizeHS3005min(BaseNormalize): method __init__ (line 153) | def __init__( method calc_change (line 173) | def calc_change(df: pd.DataFrame, last_close: float) -> pd.Series: method _get_calendar_list (line 182) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: method calendar_list_1d (line 186) | def calendar_list_1d(self): method normalize_baostock (line 194) | def normalize_baostock( method generate_5min_from_daily (line 227) | def generate_5min_from_daily(self, calendars: Iterable) -> pd.Index: method adjusted_price (line 232) | def adjusted_price(self, df: pd.DataFrame) -> pd.DataFrame: method _get_1d_calendar_list (line 242) | def _get_1d_calendar_list(self) -> Iterable[pd.Timestamp]: method normalize (line 245) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: class Run (line 253) | class Run(BaseRun): method __init__ (line 254) | def __init__(self, source_dir=None, normalize_dir=None, max_workers=1,... method collector_class_name (line 262) | def collector_class_name(self): method normalize_class_name (line 266) | def normalize_class_name(self): method default_base_dir (line 270) | def default_base_dir(self) -> [Path, str]: method download_data (line 273) | def download_data( method normalize_data (line 296) | def normalize_data( FILE: scripts/data_collector/base.py class BaseCollector (line 20) | class BaseCollector(abc.ABC): method __init__ (line 32) | def __init__( method normalize_start_datetime (line 88) | def normalize_start_datetime(self, start_datetime: [str, pd.Timestamp]... method normalize_end_datetime (line 95) | def normalize_end_datetime(self, end_datetime: [str, pd.Timestamp] = N... method get_instrument_list (line 103) | def get_instrument_list(self): method normalize_symbol (line 107) | def normalize_symbol(self, symbol: str): method get_data (line 112) | def get_data( method sleep (line 132) | def sleep(self): method _simple_collector (line 135) | def _simple_collector(self, symbol: str): method save_instrument (line 152) | def save_instrument(self, symbol, df: pd.DataFrame): method cache_small_data (line 175) | def cache_small_data(self, symbol, df): method _collector (line 186) | def _collector(self, instrument_list): method collector_data (line 200) | def collector_data(self): class BaseNormalize (line 219) | class BaseNormalize(abc.ABC): method __init__ (line 220) | def __init__(self, date_field_name: str = "date", symbol_field_name: s... method normalize (line 236) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: method _get_calendar_list (line 241) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class Normalize (line 246) | class Normalize: method __init__ (line 247) | def __init__( method _executor (line 288) | def _executor(self, file_path: Path): method normalize (line 312) | def normalize(self): class BaseRun (line 322) | class BaseRun(abc.ABC): method __init__ (line 323) | def __init__(self, source_dir=None, normalize_dir=None, max_workers=1,... method collector_class_name (line 353) | def collector_class_name(self): method normalize_class_name (line 358) | def normalize_class_name(self): method default_base_dir (line 363) | def default_base_dir(self) -> [Path, str]: method download_data (line 366) | def download_data( method normalize_data (line 415) | def normalize_data(self, date_field_name: str = "date", symbol_field_n... FILE: scripts/data_collector/br_index/collector.py class IBOVIndex (line 22) | class IBOVIndex(IndexBase): method __init__ (line 26) | def __init__( method bench_start_date (line 44) | def bench_start_date(self) -> pd.Timestamp: method get_current_4_month_period (line 54) | def get_current_4_month_period(self, current_month: int): method get_four_month_period (line 89) | def get_four_month_period(self): method format_datetime (line 109) | def format_datetime(self, inst_df: pd.DataFrame) -> pd.DataFrame: method format_quarter (line 137) | def format_quarter(self, cell: str): method get_changes (line 152) | def get_changes(self): method get_new_companies (line 231) | def get_new_companies(self): method filter_df (line 279) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: FILE: scripts/data_collector/cn_index/collector.py function retry_request (line 38) | def retry_request(url: str, method: str = "get", exclude_status: List = ... class CSIIndex (line 49) | class CSIIndex(IndexBase): method calendar_list (line 51) | def calendar_list(self) -> List[pd.Timestamp]: method new_companies_url (line 65) | def new_companies_url(self) -> str: method changes_url (line 69) | def changes_url(self) -> str: method bench_start_date (line 74) | def bench_start_date(self) -> pd.Timestamp: method index_code (line 84) | def index_code(self) -> str: method html_table_index (line 93) | def html_table_index(self) -> int: method format_datetime (line 102) | def format_datetime(self, inst_df: pd.DataFrame) -> pd.DataFrame: method get_changes (line 123) | def get_changes(self) -> pd.DataFrame: method normalize_symbol (line 147) | def normalize_symbol(symbol: str) -> str: method _parse_excel (line 162) | def _parse_excel(self, excel_url: str, add_date: pd.Timestamp, remove_... method _parse_table (line 182) | def _parse_table(self, content: str, add_date: pd.DataFrame, remove_da... method _read_change_from_url (line 212) | def _read_change_from_url(self, url: str) -> pd.DataFrame: method _get_change_notices_url (line 282) | def _get_change_notices_url(self) -> Iterable[str]: method get_new_companies (line 296) | def get_new_companies(self) -> pd.DataFrame: class CSI300Index (line 328) | class CSI300Index(CSIIndex): method index_code (line 330) | def index_code(self): method bench_start_date (line 334) | def bench_start_date(self) -> pd.Timestamp: method html_table_index (line 338) | def html_table_index(self) -> int: class CSI100Index (line 342) | class CSI100Index(CSIIndex): method index_code (line 344) | def index_code(self): method bench_start_date (line 348) | def bench_start_date(self) -> pd.Timestamp: method html_table_index (line 352) | def html_table_index(self) -> int: class CSI500Index (line 356) | class CSI500Index(CSIIndex): method index_code (line 358) | def index_code(self) -> str: method bench_start_date (line 362) | def bench_start_date(self) -> pd.Timestamp: method get_changes (line 365) | def get_changes(self) -> pd.DataFrame: method get_history_companies (line 381) | def get_history_companies(self) -> pd.DataFrame: method get_data_from_baostock (line 407) | def get_data_from_baostock(date) -> pd.DataFrame: method get_new_companies (line 433) | def get_new_companies(self) -> pd.DataFrame: FILE: scripts/data_collector/contrib/fill_cn_1min_data/fill_cn_1min_data.py function get_date_range (line 20) | def get_date_range(data_1min_dir: Path, max_workers: int = 16, date_fiel... function get_symbols (line 38) | def get_symbols(data_1min_dir: Path): function fill_1min_using_1d (line 42) | def fill_1min_using_1d( FILE: scripts/data_collector/contrib/future_trading_date_collector/future_trading_date_collector.py function read_calendar_from_qlib (line 23) | def read_calendar_from_qlib(qlib_dir: Path) -> pd.DataFrame: function write_calendar_to_qlib (line 30) | def write_calendar_to_qlib(qlib_dir: Path, date_list: List[str], freq: s... function generate_qlib_calendar (line 37) | def generate_qlib_calendar(date_list: List[str], freq: str) -> List[str]: function future_calendar_collector (line 48) | def future_calendar_collector(qlib_dir: [str, Path], freq: str = "day"): FILE: scripts/data_collector/crypto/collector.py function get_cg_crypto_symbols (line 25) | def get_cg_crypto_symbols(qlib_data_path: [str, Path] = None) -> list: class CryptoCollector (line 56) | class CryptoCollector(BaseCollector): method __init__ (line 57) | def __init__( method init_datetime (line 106) | def init_datetime(self): method convert_datetime (line 118) | def convert_datetime(dt: [pd.Timestamp, datetime.date, str], timezone): method _timezone (line 128) | def _timezone(self): method get_data_from_remote (line 132) | def get_data_from_remote(symbol, interval, start, end): method get_data (line 151) | def get_data( class CryptoCollector1d (line 171) | class CryptoCollector1d(CryptoCollector, ABC): method get_instrument_list (line 172) | def get_instrument_list(self): method normalize_symbol (line 178) | def normalize_symbol(self, symbol): method _timezone (line 182) | def _timezone(self): class CryptoNormalize (line 186) | class CryptoNormalize(BaseNormalize): method normalize_crypto (line 190) | def normalize_crypto( method normalize (line 216) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: class CryptoNormalize1d (line 221) | class CryptoNormalize1d(CryptoNormalize): method _get_calendar_list (line 222) | def _get_calendar_list(self): class Run (line 226) | class Run(BaseRun): method __init__ (line 227) | def __init__(self, source_dir=None, normalize_dir=None, max_workers=1,... method collector_class_name (line 244) | def collector_class_name(self): method normalize_class_name (line 248) | def normalize_class_name(self): method default_base_dir (line 252) | def default_base_dir(self) -> [Path, str]: method download_data (line 255) | def download_data( method normalize_data (line 291) | def normalize_data(self, date_field_name: str = "date", symbol_field_n... FILE: scripts/data_collector/fund/collector.py class FundCollector (line 26) | class FundCollector(BaseCollector): method __init__ (line 27) | def __init__( method init_datetime (line 76) | def init_datetime(self): method convert_datetime (line 88) | def convert_datetime(dt: [pd.Timestamp, datetime.date, str], timezone): method _timezone (line 98) | def _timezone(self): method get_data_from_remote (line 102) | def get_data_from_remote(symbol, interval, start, end): method get_data (line 130) | def get_data( class FundollectorCN (line 150) | class FundollectorCN(FundCollector, ABC): method get_instrument_list (line 151) | def get_instrument_list(self): method normalize_symbol (line 157) | def normalize_symbol(self, symbol): method _timezone (line 161) | def _timezone(self): class FundCollectorCN1d (line 165) | class FundCollectorCN1d(FundollectorCN): class FundNormalize (line 169) | class FundNormalize(BaseNormalize): method normalize_fund (line 173) | def normalize_fund( method normalize (line 199) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: class FundNormalize1d (line 205) | class FundNormalize1d(FundNormalize): class FundNormalizeCN (line 209) | class FundNormalizeCN: method _get_calendar_list (line 210) | def _get_calendar_list(self): class FundNormalizeCN1d (line 214) | class FundNormalizeCN1d(FundNormalizeCN, FundNormalize1d): class Run (line 218) | class Run(BaseRun): method __init__ (line 219) | def __init__(self, source_dir=None, normalize_dir=None, max_workers=4,... method collector_class_name (line 239) | def collector_class_name(self): method normalize_class_name (line 243) | def normalize_class_name(self): method default_base_dir (line 247) | def default_base_dir(self) -> [Path, str]: method download_data (line 250) | def download_data( method normalize_data (line 286) | def normalize_data(self, date_field_name: str = "date", symbol_field_n... FILE: scripts/data_collector/future_calendar_collector.py class CollectorFutureCalendar (line 18) | class CollectorFutureCalendar: method __init__ (line 21) | def __init__(self, qlib_dir: Union[str, Path], start_date: str = None,... method calendar_list (line 42) | def calendar_list(self) -> List[pd.Timestamp]: method _format_datetime (line 51) | def _format_datetime(self, datetime_d: [str, pd.Timestamp]): method write_calendar (line 55) | def write_calendar(self, calendar: Iterable): method collector (line 60) | def collector(self) -> Iterable[pd.Timestamp]: class CollectorFutureCalendarCN (line 70) | class CollectorFutureCalendarCN(CollectorFutureCalendar): method collector (line 71) | def collector(self) -> Iterable[pd.Timestamp]: class CollectorFutureCalendarUS (line 88) | class CollectorFutureCalendarUS(CollectorFutureCalendar): method collector (line 89) | def collector(self) -> Iterable[pd.Timestamp]: function run (line 94) | def run(qlib_dir: Union[str, Path], region: str = "cn", start_date: str ... FILE: scripts/data_collector/index.py class IndexBase (line 17) | class IndexBase: method __init__ (line 29) | def __init__( method bench_start_date (line 65) | def bench_start_date(self) -> pd.Timestamp: method calendar_list (line 75) | def calendar_list(self) -> List[pd.Timestamp]: method get_new_companies (line 85) | def get_new_companies(self) -> pd.DataFrame: method get_changes (line 103) | def get_changes(self) -> pd.DataFrame: method format_datetime (line 120) | def format_datetime(self, inst_df: pd.DataFrame) -> pd.DataFrame: method save_new_companies (line 134) | def save_new_companies(self): method get_changes_with_history_companies (line 149) | def get_changes_with_history_companies(self, history_companies: pd.Dat... method parse_instruments (line 204) | def parse_instruments(self): FILE: scripts/data_collector/pit/collector.py class PitCollector (line 22) | class PitCollector(BaseCollector): method __init__ (line 31) | def __init__( method get_instrument_list (line 81) | def get_instrument_list(self) -> List[str]: method normalize_symbol (line 90) | def normalize_symbol(self, symbol: str) -> str: method get_performance_express_report_df (line 96) | def get_performance_express_report_df(code: str, start_date: str, end_... method get_profit_df (line 119) | def get_profit_df(code: str, start_date: str, end_date: str) -> pd.Dat... method get_forecast_report_df (line 146) | def get_forecast_report_df(code: str, start_date: str, end_date: str) ... method get_growth_df (line 169) | def get_growth_df(code: str, start_date: str, end_date: str) -> pd.Dat... method get_data (line 195) | def get_data( class PitNormalize (line 222) | class PitNormalize(BaseNormalize): method __init__ (line 223) | def __init__(self, interval: str = "quarterly", *args, **kwargs): method normalize (line 227) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: method _get_calendar_list (line 241) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class Run (line 245) | class Run(BaseRun): method collector_class_name (line 247) | def collector_class_name(self) -> str: method normalize_class_name (line 251) | def normalize_class_name(self) -> str: method default_base_dir (line 255) | def default_base_dir(self) -> [Path, str]: FILE: scripts/data_collector/us_index/collector.py class WIKIIndex (line 36) | class WIKIIndex(IndexBase): method __init__ (line 41) | def __init__( method bench_start_date (line 58) | def bench_start_date(self) -> pd.Timestamp: method get_changes (line 67) | def get_changes(self) -> pd.DataFrame: method format_datetime (line 83) | def format_datetime(self, inst_df: pd.DataFrame) -> pd.DataFrame: method calendar_list (line 102) | def calendar_list(self) -> List[pd.Timestamp]: method _request_new_companies (line 115) | def _request_new_companies(self) -> requests.Response: method set_default_date_range (line 123) | def set_default_date_range(self, df: pd.DataFrame) -> pd.DataFrame: method get_new_companies (line 130) | def get_new_companies(self): method filter_df (line 142) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: class NASDAQ100Index (line 146) | class NASDAQ100Index(WIKIIndex): method filter_df (line 152) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: method bench_start_date (line 157) | def bench_start_date(self) -> pd.Timestamp: method _request_history_companies (line 161) | def _request_history_companies(self, trade_date: pd.Timestamp, use_cac... method get_history_companies (line 178) | def get_history_companies(self): method get_changes (line 199) | def get_changes(self): class DJIAIndex (line 203) | class DJIAIndex(WIKIIndex): method bench_start_date (line 205) | def bench_start_date(self) -> pd.Timestamp: method get_changes (line 208) | def get_changes(self) -> pd.DataFrame: method filter_df (line 211) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: method parse_instruments (line 217) | def parse_instruments(self): class SP500Index (line 221) | class SP500Index(WIKIIndex): method bench_start_date (line 225) | def bench_start_date(self) -> pd.Timestamp: method get_changes (line 228) | def get_changes(self) -> pd.DataFrame: method filter_df (line 257) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: class SP400Index (line 262) | class SP400Index(WIKIIndex): method bench_start_date (line 264) | def bench_start_date(self) -> pd.Timestamp: method get_changes (line 267) | def get_changes(self) -> pd.DataFrame: method filter_df (line 270) | def filter_df(self, df: pd.DataFrame) -> pd.DataFrame: method parse_instruments (line 274) | def parse_instruments(self): FILE: scripts/data_collector/utils.py function get_calendar_list (line 56) | def get_calendar_list(bench_code="CSI300") -> List[pd.Timestamp]: function return_date_list (line 99) | def return_date_list(date_field_name: str, file_path: Path): function get_calendar_list_by_ratio (line 104) | def get_calendar_list_by_ratio( function get_hs_stock_symbols (line 169) | def get_hs_stock_symbols() -> list: function get_us_stock_symbols (line 280) | def get_us_stock_symbols(qlib_data_path: [str, Path] = None) -> list: function get_in_stock_symbols (line 361) | def get_in_stock_symbols(qlib_data_path: [str, Path] = None) -> list: function get_br_stock_symbols (line 402) | def get_br_stock_symbols(qlib_data_path: [str, Path] = None) -> list: function get_en_fund_symbols (line 453) | def get_en_fund_symbols(qlib_data_path: [str, Path] = None) -> list: function symbol_suffix_to_prefix (line 489) | def symbol_suffix_to_prefix(symbol: str, capital: bool = True) -> str: function symbol_prefix_to_sufix (line 510) | def symbol_prefix_to_sufix(symbol: str, capital: bool = True) -> str: function deco_retry (line 527) | def deco_retry(retry: int = 5, retry_sleep: int = 3): function get_trading_date_by_shift (line 551) | def get_trading_date_by_shift(trading_list: list, trading_date: pd.Times... function generate_minutes_calendar_from_daily (line 576) | def generate_minutes_calendar_from_daily( function get_instruments (line 611) | def get_instruments( function _get_all_1d_data (line 656) | def _get_all_1d_data(_date_field_name: str, _symbol_field_name: str, _1d... function get_1d_data (line 664) | def get_1d_data( function calc_adjusted_price (line 688) | def calc_adjusted_price( function calc_paused_num (line 778) | def calc_paused_num(df: pd.DataFrame, _date_field_name, _symbol_field_na... FILE: scripts/data_collector/yahoo/collector.py class YahooCollector (line 48) | class YahooCollector(BaseCollector): method __init__ (line 51) | def __init__( method init_datetime (line 100) | def init_datetime(self): method convert_datetime (line 112) | def convert_datetime(dt: [pd.Timestamp, datetime.date, str], timezone): method _timezone (line 122) | def _timezone(self): method get_data_from_remote (line 126) | def get_data_from_remote(symbol, interval, start, end, show_1min_loggi... method get_data (line 152) | def get_data( method collector_data (line 194) | def collector_data(self): method download_index_data (line 200) | def download_index_data(self): class YahooCollectorCN (line 205) | class YahooCollectorCN(YahooCollector, ABC): method get_instrument_list (line 206) | def get_instrument_list(self): method normalize_symbol (line 212) | def normalize_symbol(self, symbol): method _timezone (line 218) | def _timezone(self): class YahooCollectorCN1d (line 222) | class YahooCollectorCN1d(YahooCollectorCN): method download_index_data (line 223) | def download_index_data(self): class YahooCollectorCN1min (line 255) | class YahooCollectorCN1min(YahooCollectorCN): method get_instrument_list (line 256) | def get_instrument_list(self): method download_index_data (line 260) | def download_index_data(self): class YahooCollectorUS (line 264) | class YahooCollectorUS(YahooCollector, ABC): method get_instrument_list (line 265) | def get_instrument_list(self): method download_index_data (line 275) | def download_index_data(self): method normalize_symbol (line 278) | def normalize_symbol(self, symbol): method _timezone (line 282) | def _timezone(self): class YahooCollectorUS1d (line 286) | class YahooCollectorUS1d(YahooCollectorUS): class YahooCollectorUS1min (line 290) | class YahooCollectorUS1min(YahooCollectorUS): class YahooCollectorIN (line 294) | class YahooCollectorIN(YahooCollector, ABC): method get_instrument_list (line 295) | def get_instrument_list(self): method download_index_data (line 301) | def download_index_data(self): method normalize_symbol (line 304) | def normalize_symbol(self, symbol): method _timezone (line 308) | def _timezone(self): class YahooCollectorIN1d (line 312) | class YahooCollectorIN1d(YahooCollectorIN): class YahooCollectorIN1min (line 316) | class YahooCollectorIN1min(YahooCollectorIN): class YahooCollectorBR (line 320) | class YahooCollectorBR(YahooCollector, ABC): method retry (line 321) | def retry(cls): # pylint: disable=E0213 method get_instrument_list (line 340) | def get_instrument_list(self): method download_index_data (line 348) | def download_index_data(self): method normalize_symbol (line 351) | def normalize_symbol(self, symbol): method _timezone (line 355) | def _timezone(self): class YahooCollectorBR1d (line 359) | class YahooCollectorBR1d(YahooCollectorBR): class YahooCollectorBR1min (line 363) | class YahooCollectorBR1min(YahooCollectorBR): class YahooNormalize (line 367) | class YahooNormalize(BaseNormalize): method calc_change (line 372) | def calc_change(df: pd.DataFrame, last_close: float) -> pd.Series: method normalize_yahoo (line 382) | def normalize_yahoo( method normalize (line 439) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: method adjusted_price (line 447) | def adjusted_price(self, df: pd.DataFrame) -> pd.DataFrame: class YahooNormalize1d (line 452) | class YahooNormalize1d(YahooNormalize, ABC): method adjusted_price (line 455) | def adjusted_price(self, df: pd.DataFrame) -> pd.DataFrame: method normalize (line 475) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: method _get_first_close (line 480) | def _get_first_close(self, df: pd.DataFrame) -> float: method _manual_adj_data (line 491) | def _manual_adj_data(self, df: pd.DataFrame) -> pd.DataFrame: class YahooNormalize1dExtend (line 510) | class YahooNormalize1dExtend(YahooNormalize1d): method __init__ (line 511) | def __init__( method _get_old_data (line 529) | def _get_old_data(self, qlib_data_dir: [str, Path]): method normalize (line 536) | def normalize(self, df: pd.DataFrame) -> pd.DataFrame: class YahooNormalize1min (line 556) | class YahooNormalize1min(YahooNormalize, ABC): method __init__ (line 566) | def __init__( method _get_1d_calendar_list (line 584) | def _get_1d_calendar_list(self) -> Iterable[pd.Timestamp]: method calendar_list_1d (line 588) | def calendar_list_1d(self): method generate_1min_from_daily (line 595) | def generate_1min_from_daily(self, calendars: Iterable) -> pd.Index: method adjusted_price (line 600) | def adjusted_price(self, df: pd.DataFrame) -> pd.DataFrame: method symbol_to_yahoo (line 613) | def symbol_to_yahoo(self, symbol): class YahooNormalizeUS (line 617) | class YahooNormalizeUS: method _get_calendar_list (line 618) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class YahooNormalizeUS1d (line 623) | class YahooNormalizeUS1d(YahooNormalizeUS, YahooNormalize1d): class YahooNormalizeUS1dExtend (line 627) | class YahooNormalizeUS1dExtend(YahooNormalizeUS, YahooNormalize1dExtend): class YahooNormalizeUS1min (line 631) | class YahooNormalizeUS1min(YahooNormalizeUS, YahooNormalize1min): method _get_calendar_list (line 634) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: method _get_1d_calendar_list (line 638) | def _get_1d_calendar_list(self): method symbol_to_yahoo (line 641) | def symbol_to_yahoo(self, symbol): class YahooNormalizeIN (line 645) | class YahooNormalizeIN: method _get_calendar_list (line 646) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class YahooNormalizeIN1d (line 650) | class YahooNormalizeIN1d(YahooNormalizeIN, YahooNormalize1d): class YahooNormalizeIN1min (line 654) | class YahooNormalizeIN1min(YahooNormalizeIN, YahooNormalize1min): method _get_calendar_list (line 657) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: method _get_1d_calendar_list (line 661) | def _get_1d_calendar_list(self): method symbol_to_yahoo (line 664) | def symbol_to_yahoo(self, symbol): class YahooNormalizeCN (line 668) | class YahooNormalizeCN: method _get_calendar_list (line 669) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class YahooNormalizeCN1d (line 674) | class YahooNormalizeCN1d(YahooNormalizeCN, YahooNormalize1d): class YahooNormalizeCN1dExtend (line 678) | class YahooNormalizeCN1dExtend(YahooNormalizeCN, YahooNormalize1dExtend): class YahooNormalizeCN1min (line 682) | class YahooNormalizeCN1min(YahooNormalizeCN, YahooNormalize1min): method _get_calendar_list (line 686) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: method symbol_to_yahoo (line 689) | def symbol_to_yahoo(self, symbol): method _get_1d_calendar_list (line 696) | def _get_1d_calendar_list(self) -> Iterable[pd.Timestamp]: class YahooNormalizeBR (line 700) | class YahooNormalizeBR: method _get_calendar_list (line 701) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: class YahooNormalizeBR1d (line 705) | class YahooNormalizeBR1d(YahooNormalizeBR, YahooNormalize1d): class YahooNormalizeBR1min (line 709) | class YahooNormalizeBR1min(YahooNormalizeBR, YahooNormalize1min): method _get_calendar_list (line 712) | def _get_calendar_list(self) -> Iterable[pd.Timestamp]: method _get_1d_calendar_list (line 716) | def _get_1d_calendar_list(self): method symbol_to_yahoo (line 719) | def symbol_to_yahoo(self, symbol): class Run (line 723) | class Run(BaseRun): method __init__ (line 724) | def __init__(self, source_dir=None, normalize_dir=None, max_workers=1,... method collector_class_name (line 744) | def collector_class_name(self): method normalize_class_name (line 748) | def normalize_class_name(self): method default_base_dir (line 752) | def default_base_dir(self) -> [Path, str]: method download_data (line 755) | def download_data( method normalize_data (line 800) | def normalize_data( method normalize_data_1d_extend (line 840) | def normalize_data_1d_extend( method download_today_data (line 884) | def download_today_data( method update_data_to_bin (line 933) | def update_data_to_bin( FILE: scripts/dump_bin.py function read_as_df (line 20) | def read_as_df(file_path: Union[str, Path], **kwargs) -> pd.DataFrame: class DumpDataBase (line 53) | class DumpDataBase: method __init__ (line 68) | def __init__( method _backup_qlib_dir (line 141) | def _backup_qlib_dir(self, target_dir: Path): method _format_datetime (line 144) | def _format_datetime(self, datetime_d: [str, pd.Timestamp]): method _get_date (line 148) | def _get_date( method _get_source_data (line 169) | def _get_source_data(self, file_path: Path) -> pd.DataFrame: method get_symbol_from_file (line 176) | def get_symbol_from_file(self, file_path: Path) -> str: method get_dump_fields (line 179) | def get_dump_fields(self, df_columns: Iterable[str]) -> Iterable[str]: method _read_calendars (line 187) | def _read_calendars(calendar_path: Path) -> List[pd.Timestamp]: method _read_instruments (line 195) | def _read_instruments(self, instrument_path: Path) -> pd.DataFrame: method save_calendars (line 208) | def save_calendars(self, calendars_data: list): method save_instruments (line 214) | def save_instruments(self, instruments_data: Union[list, pd.DataFrame]): method data_merge_calendar (line 227) | def data_merge_calendar(self, df: pd.DataFrame, calendars_list: List[p... method get_datetime_index (line 242) | def get_datetime_index(df: pd.DataFrame, calendar_list: List[pd.Timest... method _data_to_bin (line 245) | def _data_to_bin(self, df: pd.DataFrame, calendar_list: List[pd.Timest... method _dump_bin (line 271) | def _dump_bin(self, file_or_data: [Path, pd.DataFrame], calendar_list:... method dump (line 298) | def dump(self): method __call__ (line 301) | def __call__(self, *args, **kwargs): class DumpDataAll (line 305) | class DumpDataAll(DumpDataBase): method _get_all_date (line 306) | def _get_all_date(self): method _dump_calendars (line 328) | def _dump_calendars(self): method _dump_instruments (line 334) | def _dump_instruments(self): method _dump_features (line 339) | def _dump_features(self): method dump (line 349) | def dump(self): class DumpDataFix (line 356) | class DumpDataFix(DumpDataAll): method _dump_instruments (line 357) | def _dump_instruments(self): method dump (line 380) | def dump(self): class DumpDataUpdate (line 392) | class DumpDataUpdate(DumpDataBase): method __init__ (line 393) | def __init__( method _load_all_source_data (line 462) | def _load_all_source_data(self): method _dump_calendars (line 487) | def _dump_calendars(self): method _dump_instruments (line 490) | def _dump_instruments(self): method _dump_features (line 493) | def _dump_features(self): method dump (line 533) | def dump(self): FILE: scripts/dump_pit.py class DumpPitData (line 24) | class DumpPitData: method __init__ (line 53) | def __init__( method _backup_qlib_dir (line 118) | def _backup_qlib_dir(self, target_dir: Path): method get_source_data (line 121) | def get_source_data(self, file_path: Path) -> pd.DataFrame: method get_symbol_from_file (line 128) | def get_symbol_from_file(self, file_path: Path) -> str: method get_dump_fields (line 131) | def get_dump_fields(self, df: Iterable[str]) -> Iterable[str]: method get_filenames (line 142) | def get_filenames(self, symbol, field, interval): method _dump_pit (line 150) | def _dump_pit( method dump (line 266) | def dump(self, interval="quarterly", overwrite=False): method __call__ (line 275) | def __call__(self, *args, **kwargs): FILE: tests/backtest/test_file_strategy.py class FileStrTest (line 15) | class FileStrTest(TestAutoData): method _gen_orders (line 22) | def _gen_orders(self, dealt_num_for_1000) -> pd.DataFrame: method test_file_str (line 45) | def test_file_str(self): FILE: tests/backtest/test_high_freq_trading.py class TestHFBacktest (line 12) | class TestHFBacktest(TestAutoData): method setUpClass (line 14) | def setUpClass(cls) -> None: method _gen_orders (line 17) | def _gen_orders(self, inst, date, pos) -> pd.DataFrame: method test_trading (line 29) | def test_trading(self): FILE: tests/backtest/test_soft_topk_strategy.py class MockPosition (line 6) | class MockPosition: method __init__ (line 7) | def __init__(self, weights): method get_stock_weight_dict (line 10) | def get_stock_weight_dict(self, only_stock=True): function test_soft_topk_logic (line 14) | def test_soft_topk_logic(): FILE: tests/backtest/test_soft_topk_strategy_cold_start.py class MockPosition (line 7) | class MockPosition: method __init__ (line 8) | def __init__(self, weights): method get_stock_weight_dict (line 11) | def get_stock_weight_dict(self, only_stock=True): function create_test_strategy (line 15) | def create_test_strategy(topk, risk_degree, impact_limit): function test_soft_topk_cold_start_impact_limit (line 30) | def test_soft_topk_cold_start_impact_limit(impact_limit, expected_fill): FILE: tests/data_mid_layer_tests/test_dataloader.py class TestDataLoader (line 17) | class TestDataLoader(unittest.TestCase): method test_nested_data_loader (line 19) | def test_nested_data_loader(self): FILE: tests/data_mid_layer_tests/test_dataset.py class TestDataset (line 15) | class TestDataset(TestAutoData): method testTSDataset (line 17) | def testTSDataset(self): class TestTSDataSampler (line 102) | class TestTSDataSampler(unittest.TestCase): method test_TSDataSampler (line 103) | def test_TSDataSampler(self): method test_TSDataSampler2 (line 126) | def test_TSDataSampler2(self): FILE: tests/data_mid_layer_tests/test_handler.py class HandlerTests (line 10) | class HandlerTests(TestAutoData): method to_str (line 11) | def to_str(self, obj): method test_handler_df (line 14) | def test_handler_df(self): FILE: tests/data_mid_layer_tests/test_handler_storage.py class TestHandler (line 12) | class TestHandler(DataHandlerLP): method __init__ (line 13) | def __init__( method get_feature_config (line 46) | def get_feature_config(self): class TestHandlerStorage (line 52) | class TestHandlerStorage(TestAutoData): method test_handler_storage (line 68) | def test_handler_storage(self): FILE: tests/data_mid_layer_tests/test_processor.py class TestProcessor (line 11) | class TestProcessor(TestAutoData): method test_MinMaxNorm (line 14) | def test_MinMaxNorm(self): method test_ZScoreNorm (line 35) | def test_ZScoreNorm(self): method test_CSZFillna (line 56) | def test_CSZFillna(self): method test_CSZScoreNorm (line 63) | def test_CSZScoreNorm(self): FILE: tests/dataset_tests/test_datalayer.py class TestDataset (line 7) | class TestDataset(TestAutoData): method testCSI300 (line 8) | def testCSI300(self): method testClose (line 25) | def testClose(self): FILE: tests/dependency_tests/test_mlflow.py class MLflowTest (line 11) | class MLflowTest(unittest.TestCase): method tearDown (line 14) | def tearDown(self) -> None: method test_creating_client (line 18) | def test_creating_client(self): FILE: tests/misc/test_get_multi_proc.py function get_features (line 12) | def get_features(fields): class TestGetData (line 17) | class TestGetData(TestAutoData): method test_multi_proc (line 20) | def test_multi_proc(self): FILE: tests/misc/test_index_data.py class IndexDataTest (line 8) | class IndexDataTest(unittest.TestCase): method test_index_single_data (line 9) | def test_index_single_data(self): method test_index_multi_data (line 38) | def test_index_multi_data(self): method test_sorting (line 64) | def test_sorting(self): method test_corner_cases (line 72) | def test_corner_cases(self): method test_ops (line 115) | def test_ops(self): method test_todo (line 129) | def test_todo(self): method test_squeeze (line 135) | def test_squeeze(self): FILE: tests/misc/test_sepdf.py class SepDF (line 9) | class SepDF(unittest.TestCase): method to_str (line 10) | def to_str(self, obj): method test_index_data (line 13) | def test_index_data(self): FILE: tests/misc/test_utils.py function cal_sam_minute (line 17) | def cal_sam_minute(x: pd.Timestamp, sam_minutes: int, region: str): class TimeUtils (line 72) | class TimeUtils(TestCase): method setUpClass (line 74) | def setUpClass(cls): method test_cal_sam_minute (line 77) | def test_cal_sam_minute(self): class DataUtils (line 116) | class DataUtils(TestCase): method setUpClass (line 118) | def setUpClass(cls): method test_guess_horizon (line 121) | def test_guess_horizon(self): FILE: tests/model/test_general_nn.py class TestNN (line 5) | class TestNN(TestAutoData): method test_both_dataset (line 6) | def test_both_dataset(self): FILE: tests/ops/test_elem_operator.py class TestElementOperator (line 11) | class TestElementOperator(TestMockData): method setUp (line 12) | def setUp(self) -> None: method test_Abs (line 19) | def test_Abs(self): method test_Sign (line 30) | def test_Sign(self): class TestOperatorDataSetting (line 43) | class TestOperatorDataSetting(TestOperatorData): method test_setting (line 44) | def test_setting(self): class TestInstElementOperator (line 49) | class TestInstElementOperator(TestOperatorData): method setUp (line 50) | def setUp(self) -> None: method test_abs (line 63) | def test_abs(self): FILE: tests/ops/test_special_ops.py class TestOperatorDataSetting (line 9) | class TestOperatorDataSetting(TestOperatorData): method test_setting (line 10) | def test_setting(self): method test_case2 (line 23) | def test_case2(self): FILE: tests/rl/test_data_queue.py class DummyDataset (line 14) | class DummyDataset(Dataset): method __init__ (line 15) | def __init__(self, length): method __getitem__ (line 18) | def __getitem__(self, index): method __len__ (line 22) | def __len__(self): function _worker (line 26) | def _worker(dataloader, collector): function _queue_to_list (line 32) | def _queue_to_list(queue): function test_pytorch_dataloader (line 39) | def test_pytorch_dataloader(): function test_multiprocess_shared_dataloader (line 47) | def test_multiprocess_shared_dataloader(): function test_exit_on_crash_finite (line 60) | def test_exit_on_crash_finite(): function test_exit_on_crash_infinite (line 75) | def test_exit_on_crash_infinite(): FILE: tests/rl/test_finite_env.py class FiniteEnv (line 49) | class FiniteEnv(gym.Env): method __init__ (line 50) | def __init__(self, dataset, num_replicas, rank): method reset (line 59) | def reset(self): method step (line 70) | def step(self, action): class FiniteEnvWithComplexObs (line 81) | class FiniteEnvWithComplexObs(FiniteEnv): method __init__ (line 82) | def __init__(self, dataset, num_replicas, rank): method reset (line 91) | def reset(self): method step (line 102) | def step(self, action): class DummyDataset (line 113) | class DummyDataset(Dataset): method __init__ (line 114) | def __init__(self, length): method __getitem__ (line 118) | def __getitem__(self, index): method __len__ (line 122) | def __len__(self): class AnyPolicy (line 126) | class AnyPolicy(BasePolicy): method forward (line 127) | def forward(self, batch, state=None): method learn (line 130) | def learn(self, batch): function _finite_env_factory (line 134) | def _finite_env_factory(dataset, num_replicas, rank, complex=False): class MetricTracker (line 140) | class MetricTracker(LogWriter): method __init__ (line 141) | def __init__(self, length): method on_env_step (line 147) | def on_env_step(self, env_id, obs, rew, done, info): method validate (line 155) | def validate(self): class DoNothingTracker (line 161) | class DoNothingTracker(LogWriter): method on_env_step (line 162) | def on_env_step(self, *args, **kwargs): function test_finite_dummy_vector_env (line 166) | def test_finite_dummy_vector_env(): function test_finite_shmem_vector_env (line 182) | def test_finite_shmem_vector_env(): function test_finite_subproc_vector_env (line 198) | def test_finite_subproc_vector_env(): function test_nan (line 214) | def test_nan(): function test_finite_dummy_vector_env_complex (line 219) | def test_finite_dummy_vector_env_complex(): function test_finite_shmem_vector_env_complex (line 235) | def test_finite_shmem_vector_env_complex(): FILE: tests/rl/test_logger.py class SimpleEnv (line 28) | class SimpleEnv(gym.Env[int, int]): method __init__ (line 29) | def __init__(self) -> None: method reset (line 34) | def reset(self, *args: Any, **kwargs: Any) -> int: method step (line 38) | def step(self, action: int) -> Tuple[int, float, bool, dict]: method render (line 58) | def render(self, mode: str = "human") -> None: class AnyPolicy (line 62) | class AnyPolicy(BasePolicy): method forward (line 63) | def forward(self, batch, state=None): method learn (line 66) | def learn(self, batch): function test_simple_env_logger (line 70) | def test_simple_env_logger(caplog): class SimpleSimulator (line 96) | class SimpleSimulator(Simulator[int, float, float]): method __init__ (line 97) | def __init__(self, initial: int, **kwargs: Any) -> None: method step (line 101) | def step(self, action: float) -> None: method get_state (line 108) | def get_state(self) -> float: method done (line 111) | def done(self) -> bool: class DummyStateInterpreter (line 115) | class DummyStateInterpreter(StateInterpreter[float, float]): method interpret (line 116) | def interpret(self, state: float) -> float: method observation_space (line 120) | def observation_space(self) -> spaces.Box: class DummyActionInterpreter (line 124) | class DummyActionInterpreter(ActionInterpreter[float, int, float]): method interpret (line 125) | def interpret(self, state: float, action: int) -> float: method action_space (line 129) | def action_space(self) -> spaces.Box: class RandomFivePolicy (line 133) | class RandomFivePolicy(BasePolicy): method forward (line 134) | def forward(self, batch, state=None): method learn (line 137) | def learn(self, batch): function test_logger_with_env_wrapper (line 141) | def test_logger_with_env_wrapper(): FILE: tests/rl/test_qlib_simulator.py function is_close (line 21) | def is_close(a: float, b: float, epsilon: float = 1e-4) -> bool: function get_order (line 25) | def get_order() -> Order: function get_configs (line 35) | def get_configs(order: Order) -> Tuple[dict, dict]: function get_simulator (line 90) | def get_simulator(order: Order) -> SingleAssetOrderExecution: function test_simulator_first_step (line 120) | def test_simulator_first_step(): function test_simulator_stop_twap (line 155) | def test_simulator_stop_twap() -> None: function test_interpreter (line 181) | def test_interpreter() -> None: FILE: tests/rl/test_saoe_simple.py function test_pickle_data_inspect (line 39) | def test_pickle_data_inspect(): function test_simulator_first_step (line 48) | def test_simulator_first_step(): function test_simulator_stop_twap (line 82) | def test_simulator_stop_twap(): function test_simulator_stop_early (line 104) | def test_simulator_stop_early(): function test_simulator_start_middle (line 118) | def test_simulator_start_middle(): function test_interpreter (line 137) | def test_interpreter(): function test_network_sanity (line 217) | def test_network_sanity(): function test_twap_strategy (line 250) | def test_twap_strategy(finite_env_type): function test_cn_ppo_strategy (line 278) | def test_cn_ppo_strategy(): function test_ppo_train (line 309) | def test_ppo_train(): FILE: tests/rl/test_trainer.py class ZeroSimulator (line 23) | class ZeroSimulator(Simulator): method __init__ (line 24) | def __init__(self, *args, **kwargs): method step (line 27) | def step(self, action): method get_state (line 34) | def get_state(self): method done (line 40) | def done(self) -> bool: class NoopStateInterpreter (line 44) | class NoopStateInterpreter(StateInterpreter): method interpret (line 52) | def interpret(self, simulator_state): class NoopActionInterpreter (line 56) | class NoopActionInterpreter(ActionInterpreter): method interpret (line 59) | def interpret(self, simulator_state, action): class AccReward (line 63) | class AccReward(Reward): method reward (line 64) | def reward(self, simulator_state): class PolicyNet (line 70) | class PolicyNet(nn.Module): method __init__ (line 71) | def __init__(self, out_features=1, return_state=False): method forward (line 76) | def forward(self, obs, state=None, **kwargs): function _ppo_policy (line 84) | def _ppo_policy(): function test_trainer (line 97) | def test_trainer(): function test_trainer_fast_dev_run (line 123) | def test_trainer_fast_dev_run(): function test_trainer_earlystop (line 144) | def test_trainer_earlystop(): function test_trainer_checkpoint (line 173) | def test_trainer_checkpoint(): FILE: tests/rolling_tests/test_update_pred.py class TestRolling (line 17) | class TestRolling(TestAutoData): method test_update_pred (line 19) | def test_update_pred(self): method test_update_label (line 79) | def test_update_label(self): FILE: tests/storage_tests/test_storage.py class TestStorage (line 23) | class TestStorage(TestAutoData): method test_calendar_storage (line 24) | def test_calendar_storage(self): method test_instrument_storage (line 43) | def test_instrument_storage(self): method test_feature_storage (line 97) | def test_feature_storage(self): FILE: tests/test_all_pipeline.py function train (line 19) | def train(uri_path: str = None): function fake_experiment (line 63) | def fake_experiment(): function backtest_analysis (line 84) | def backtest_analysis(pred, rid, uri_path: str = None): class TestAllFlow (line 147) | class TestAllFlow(TestAutoData): method tearDownClass (line 154) | def tearDownClass(cls) -> None: method test_0_train (line 158) | def test_0_train(self): method test_1_backtest (line 164) | def test_1_backtest(self): method test_2_expmanager (line 174) | def test_2_expmanager(self): function suite (line 181) | def suite(): FILE: tests/test_contrib_model.py class TestAllFlow (line 9) | class TestAllFlow(unittest.TestCase): method test_0_initialize (line 10) | def test_0_initialize(self): function suite (line 19) | def suite(): FILE: tests/test_contrib_workflow.py function train_multiseg (line 33) | def train_multiseg(uri_path: str = None): function train_mse (line 46) | def train_mse(uri_path: str = None): class TestAllFlow (line 60) | class TestAllFlow(TestAutoData): method tearDownClass (line 64) | def tearDownClass(cls) -> None: method test_0_multiseg (line 68) | def test_0_multiseg(self): method test_1_mse (line 72) | def test_1_mse(self): function suite (line 76) | def suite(): FILE: tests/test_dump_data.py class TestDumpData (line 26) | class TestDumpData(unittest.TestCase): method setUpClass (line 36) | def setUpClass(cls) -> None: method tearDownClass (line 48) | def tearDownClass(cls) -> None: method test_0_dump_bin (line 51) | def test_0_dump_bin(self): method test_1_dump_calendars (line 54) | def test_1_dump_calendars(self): method test_2_dump_instruments (line 64) | def test_2_dump_instruments(self): method test_3_dump_features (line 69) | def test_3_dump_features(self): method test_4_dump_features_simple (line 75) | def test_4_dump_features_simple(self): FILE: tests/test_get_data.py class TestGetData (line 19) | class TestGetData(unittest.TestCase): method setUpClass (line 23) | def setUpClass(cls) -> None: method tearDownClass (line 32) | def tearDownClass(cls) -> None: method test_0_qlib_data (line 35) | def test_0_qlib_data(self): method test_1_csv_data (line 43) | def test_1_csv_data(self): FILE: tests/test_pit.py class TestPIT (line 32) | class TestPIT(unittest.TestCase): method tearDownClass (line 34) | def tearDownClass(cls) -> None: method setUpClass (line 38) | def setUpClass(cls) -> None: method setUp (line 65) | def setUp(self): method to_str (line 70) | def to_str(self, obj): method check_same (line 73) | def check_same(self, a, b): method test_query (line 76) | def test_query(self): method test_no_exist_data (line 106) | def test_no_exist_data(self): method test_expr (line 130) | def test_expr(self): method test_unlimit (line 161) | def test_unlimit(self): method test_expr2 (line 229) | def test_expr2(self): method test_pref_operator (line 255) | def test_pref_operator(self): FILE: tests/test_register_ops.py class Diff (line 12) | class Diff(ElemOperator): method _load_internal (line 24) | def _load_internal(self, instrument, start_index, end_index, freq): method get_extended_window_size (line 28) | def get_extended_window_size(self): class Distance (line 33) | class Distance(PairOperator): method _load_internal (line 45) | def _load_internal(self, instrument, start_index, end_index, freq): class TestRegiterCustomOps (line 51) | class TestRegiterCustomOps(TestAutoData): method setUpClass (line 53) | def setUpClass(cls) -> None: method test_regiter_custom_ops (line 57) | def test_regiter_custom_ops(self): FILE: tests/test_structured_cov_estimator.py class TestStructuredCovEstimator (line 11) | class TestStructuredCovEstimator(unittest.TestCase): method test_random_covariance (line 12) | def test_random_covariance(self): method test_nan_option_covariance (line 30) | def test_nan_option_covariance(self): method test_decompose_covariance (line 48) | def test_decompose_covariance(self): method test_constructed_covariance (line 61) | def test_constructed_covariance(self): method test_decomposition (line 86) | def test_decomposition(self): FILE: tests/test_workflow.py class WorkflowTest (line 11) | class WorkflowTest(TestAutoData): method tearDown (line 16) | def tearDown(self) -> None: method test_get_local_dir (line 20) | def test_get_local_dir(self):