pybroker.log 模块

日志记录模块。

class Logger(scope)[源代码]

基类:object

用于记录已触发事件信息的类。

参数:

scope -- pybroker.scope.StaticScope.

backtest_executions_loading(count: int)[源代码]
backtest_executions_start(test_dates: Sequence[datetime64])[源代码]
calc_bootstrap_metrics_completed()[源代码]
calc_bootstrap_metrics_start(samples, bars)[源代码]
debug_buy_shares_exceed_cash(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None, cash: Decimal, clamped_shares: Decimal)[源代码]
debug_clear_data_source_cache(cache_dir: str)[源代码]
debug_clear_indicator_cache(cache_dir: str)[源代码]
debug_clear_model_cache(cache_dir: str)[源代码]
debug_compute_indicators(is_parallel: bool)[源代码]
debug_disable_data_source_cache()[源代码]
debug_disable_indicator_cache()[源代码]
debug_disable_model_cache()[源代码]
debug_enable_data_source_cache(ns: str, cache_dir: str)[源代码]
debug_enable_indicator_cache(ns: str, cache_dir: str)[源代码]
debug_enable_model_cache(ns: str, cache_dir: str)[源代码]
debug_filled_buy_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_filled_sell_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_get_data_source_cache(cache_key)[源代码]
debug_get_indicator_cache(cache_key)[源代码]
debug_get_model_cache(cache_key)[源代码]
debug_place_buy_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_place_sell_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_position_limit_reached(symbol: str, pos_type: str, held: int, max_positions: int)[源代码]
debug_schedule_order(date: datetime64, exec_result)[源代码]
debug_set_data_source_cache(cache_key)[源代码]
debug_set_indicator_cache(cache_key)[源代码]
debug_set_model_cache(cache_key)[源代码]
debug_timeout_order(date: datetime64, pending_order)[源代码]
debug_unfilled_buy_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_unfilled_sell_order(date: datetime64, symbol: str, shares: Decimal, fill_price: Decimal, limit_price: Decimal | None)[源代码]
debug_unscheduled_order(exec_result)[源代码]
disable()[源代码]

禁用日志记录。

disable_progress_bar()[源代码]

禁用进度条日志记录。

download_bar_data_completed()[源代码]
download_bar_data_start()[源代码]
enable()[源代码]

启用日志记录。

enable_progress_bar()[源代码]

启用进度条日志记录。

indicator_data_loading(count: int)[源代码]
indicator_data_start(ind_syms: Sized)[源代码]
info_download_bar_data_start(symbols: Iterable[str], start_date: datetime, end_date: datetime, timeframe: str)[源代码]
info_indicator_data_start(ind_syms: Iterable[IndicatorSymbol])[源代码]
info_invalidate_data_source_cache()[源代码]
info_loaded_bar_data(symbols: Iterable[str], start_date: datetime, end_date: datetime, timeframe: str)[源代码]
info_loaded_indicator_data(ind_syms: Iterable[IndicatorSymbol])[源代码]
info_loaded_model(model_sym: ModelSymbol)[源代码]
info_loaded_models(model_syms: Iterable[ModelSymbol])[源代码]
info_optimize_search_space(hyperparams: Sequence[str])[源代码]
info_optimize_sequential_trials(sampler: str)[源代码]
info_train_model_completed(model_sym: ModelSymbol)[源代码]
info_train_model_start(model_sym: ModelSymbol)[源代码]
info_train_split_start(model_syms: Iterable[ModelSymbol])[源代码]
info_walkforward_between_time(between_time: tuple[str, str])[源代码]
info_walkforward_on_days(days: tuple[int])[源代码]
loaded_bar_data()[源代码]
loaded_indicator_data()[源代码]
loaded_models()[源代码]
optimize_start(n_trials: int, sampler: str, *, grid_size: int | None = None, windows: int = 1)[源代码]
train_split_completed()[源代码]
train_split_start(train_dates: Sequence[datetime64])[源代码]
walkforward_completed()[源代码]
walkforward_start(start_date: datetime, end_date: datetime)[源代码]
warn_set_model_cache_failed(cache_key, error)[源代码]