pybroker.log module

Logging module.

class Logger(scope)[source]

Bases: object

Class for logging information about triggered events.

Parameters:

scopepybroker.scope.StaticScope.

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

Disables logging.

disable_progress_bar()[source]

Disables logging a progress bar.

download_bar_data_completed()[source]
download_bar_data_start()[source]
enable()[source]

Enables logging.

enable_progress_bar()[source]

Enables logging a progress bar.

indicator_data_loading(count: int)[source]
indicator_data_start(ind_syms: Sized)[source]
info_download_bar_data_start(symbols: Iterable[str], start_date: datetime, end_date: datetime, timeframe: str)[source]
info_indicator_data_start(ind_syms: Iterable[IndicatorSymbol])[source]
info_invalidate_data_source_cache()[source]
info_loaded_bar_data(symbols: Iterable[str], start_date: datetime, end_date: datetime, timeframe: str)[source]
info_loaded_indicator_data(ind_syms: Iterable[IndicatorSymbol])[source]
info_loaded_model(model_sym: ModelSymbol)[source]
info_loaded_models(model_syms: Iterable[ModelSymbol])[source]
info_train_model_completed(model_sym: ModelSymbol)[source]
info_train_model_start(model_sym: ModelSymbol)[source]
info_train_split_start(model_syms: Iterable[ModelSymbol])[source]
info_walkforward_between_time(between_time: tuple[str, str])[source]
info_walkforward_on_days(days: tuple[int])[source]
loaded_bar_data()[source]
loaded_indicator_data()[source]
loaded_models()[source]
train_split_completed()[source]
train_split_start(train_dates: Sequence[datetime64])[source]
walkforward_completed()[source]
walkforward_start(start_date: datetime, end_date: datetime)[source]
warn_bootstrap_sample_size(n: int, sample_size: int)[source]