Config

The config subpackage groups the core configuration types.

Adapter, testkit, and example configurations remain in their owning packages.

class BacktestDataConfig

Bases: object

Represents the data configuration for one specific backtest run.

bar_spec
bar_types
catalog_backend

Returns the configured catalog backend.

catalog_fs_protocol
catalog_fs_rust_storage_option_keys
catalog_fs_storage_option_keys
catalog_path
client_id
data_type
end_time
filter_expr
instrument_id
instrument_ids
metadata
optimize_file_loading
start_time
class BacktestEngineConfig

Bases: object

Configuration for BacktestEngine instances.

bypass_logging
cache
catalogs
controller
data_engine
delay_post_stop
exec_engine
instance_id
load_state
logging
msgbus
portfolio
risk_engine
run_analysis
save_state
shutdown_on_error
streaming
timeout_connection
timeout_disconnection
timeout_portfolio
timeout_reconciliation
timeout_shutdown
trader_id
class BacktestRunConfig

Bases: object

Represents the configuration for one specific backtest run. This includes a backtest engine with its actors and strategies, with the external inputs of venues and data.

chunk_size
data
dispose_on_completion
end
engine
id
raise_exception
start
venues
class BacktestVenueConfig

Bases: object

Represents a venue configuration for one specific backtest engine.

account_type
allow_cash_borrowing
bar_adaptive_high_low_ordering
bar_execution
base_currency
book_type
default_leverage
fee_model
fill_model
frozen_account
latency_model
leverages
liquidation_cancel_open_orders
liquidation_enabled
liquidation_trigger_ratio
liquidity_consumption
margin_model
modules
name
oms_type
oto_trigger_mode
price_protection_points
queue_position
reject_stop_orders
routing
starting_balances
support_contingent_orders
support_gtd_orders
trade_execution
use_market_order_acks
use_position_ids
use_random_ids
use_reduce_only
class CacheConfig

Bases: object

Configuration for Cache instances.

bar_capacity
buffer_interval_ms
bulk_read_batch_size
drop_instruments_on_reset
encoding
flush_on_start
persist_account_events
save_market_data
tick_capacity
timestamps_as_iso8601
use_instance_id
use_trader_prefix
class DataActorConfig

Bases: object

Common configuration for [DataActor] based components.

actor_id
log_commands
log_events
class DataCatalogConfig

Bases: object

Configuration for a catalog available to request-time historical data loading.

catalog_backend

Returns the catalog backend implementation to use.

fs_protocol

Returns the fsspec file system protocol for the data catalog.

fs_rust_storage_option_keys
name

Returns the catalog registration name.

params

Returns backend-specific catalog parameters.

path

Returns the path to the data catalog.

read_only

Returns whether the catalog rejects response write-back.

class DataClientConfig

Bases: object

Shared configuration for data clients registered with a live node.

dict()
handle_revised_bars
instrument_provider
json()
routing
to_importable(factory=None)
class DataEngineConfig

Bases: object

Configuration for DataEngine instances.

buffer_deltas
debug
disable_historical_cache
emit_quotes_from_book
emit_quotes_from_book_depths
external_clients
time_bars_build_delay
time_bars_build_with_no_updates
time_bars_interval_type
time_bars_origin_offset
time_bars_skip_first_non_full_bar
time_bars_timestamp_on_close
validate_data_sequence
class ExecutionAlgorithmConfig

Bases: object

Configuration for an execution algorithm.

exec_algorithm_id
log_commands
log_events
class ExecutionClientConfig

Bases: object

Shared configuration for execution clients registered with a live node.

dict()
instrument_provider
json()
routing
to_importable(factory=None)
class ExecutionEngineConfig

Bases: object

Configuration for ExecutionEngine instances.

allow_overfills
carry_replay_events_on_reopen
debug
external_clients
load_cache
manage_own_order_books
purge_account_events_interval_mins
purge_account_events_lookback_mins
purge_closed_orders_buffer_mins
purge_closed_orders_interval_mins
purge_closed_positions_buffer_mins
purge_closed_positions_interval_mins
purge_from_database
snapshot_orders
snapshot_positions
snapshot_positions_interval_secs
class FileWriterConfig

Bases: object

Configures file log output.

directory
file_format
file_name
file_rotate
class ImportableActorConfig

Bases: object

Configuration for creating actors from importable paths.

actor_path
config
config_path
class ImportableConfig

Bases: object

An importable client configuration and optional factory descriptor.

path: str
config: dict
factory: ImportableFactoryConfig | None = None
create() object

Construct the original configuration class with all recorded fields.

dict() dict[str, object]

Return the descriptor fields without converting their Python values.

json() bytes

Encode the descriptor as JSON bytes, rejecting unsupported values.

classmethod parse(raw: str | bytes) ImportableConfig

Decode a JSON descriptor while retaining all configuration fields.

class ImportableControllerConfig

Bases: object

Configuration for creating controllers from importable paths.

config
config_path
controller_path
class ImportableExecutionAlgorithmConfig

Bases: object

Configuration for creating execution algorithms from importable paths.

config
config_path
exec_algorithm_path
class ImportableFactoryConfig

Bases: object

A factory import path in module:qualified_name form.

path: str
create() object

Import and construct the configured factory.

class ImportableStrategyConfig

Bases: object

Configuration for creating strategies from importable paths.

config
config_path
strategy_path
class InstrumentProviderConfig

Bases: object

Configuration for instrument providers.

filter_callable
filters
load_all
load_ids
log_warnings
class LiveDataEngineConfig

Bases: object

Configuration for live data engines.

buffer_deltas
debug
emit_quotes_from_book
emit_quotes_from_book_depths
external_clients
time_bars_build_delay
time_bars_build_with_no_updates
time_bars_interval_type
time_bars_origin_offset
time_bars_skip_first_non_full_bar
time_bars_timestamp_on_close
validate_data_sequence
class LiveExecutionEngineConfig

Bases: object

Configuration for live execution engines.

allow_overfills
debug
external_clients
filter_position_reports
filter_unclaimed_external_orders
filtered_client_order_ids
generate_missing_orders
inflight_check_interval_ms
inflight_check_retries
inflight_check_threshold_ms
load_cache
manage_own_order_books
max_single_order_queries_per_cycle
open_check_interval_secs
open_check_lookback_mins
open_check_missing_retries
open_check_open_only
open_check_threshold_ms
own_books_audit_interval_secs
position_check_interval_secs
position_check_lookback_mins
position_check_retries
position_check_threshold_ms
purge_account_events_interval_mins
purge_account_events_lookback_mins
purge_closed_orders_buffer_mins
purge_closed_orders_interval_mins
purge_closed_positions_buffer_mins
purge_closed_positions_interval_mins
reconciliation
reconciliation_instrument_ids
reconciliation_lookback_mins
reconciliation_startup_delay_secs
single_order_query_delay_ms
snapshot_orders
snapshot_positions
snapshot_positions_interval_secs
submission_recovery_policy
class LiveNodeConfig

Bases: object

Configuration for live Nautilus system nodes.

cache
catalogs
controller
data_clients
data_engine
delay_post_stop_secs
environment
exec_clients
exec_engine
instance_id
load_state
logging
loop_debug
msgbus
plugins
portfolio
queue_monitor
risk_engine
save_state
shutdown_on_error
streaming
timeout_connection_secs
timeout_disconnection_secs
timeout_portfolio_secs
timeout_reconciliation_secs
timeout_shutdown_secs
trader_id
class LiveRiskEngineConfig

Bases: object

Configuration for live risk engines.

bypass
debug
full_position_exit_venues
max_notional_per_order
max_order_modify_rate
max_order_submit_rate
class LoggerConfig

Bases: object

Configuration for the Nautilus logger.

buffered_stdout
bypass_logging
clear_log_file
component_levels
file_config
fileout_level
fileout_sync_on_flush
static from_spec(spec)

Parses a configuration from a spec string.

# Format

Semicolon-separated key-value pairs or bare flags: `text stdout=Info;fileout=Debug;RiskEngine=Error;my_crate::module=Debug;is_colored `

# Errors

Returns an error if the spec string contains invalid syntax or log levels.

is_colored
log_components_only
print_config
stdout_level
class MessageBusConfig

Bases: object

Configuration for MessageBus instances.

autotrim_maxlen
autotrim_mins
buffer_interval_ms
encoding
encoding_builtin
encoding_market_data
external_streams
heartbeat_interval_secs
stream_per_topic
streams_prefix
timestamps_as_iso8601
types_filter
use_instance_id
use_trader_id
use_trader_prefix
class OrderEmulatorConfig

Bases: object

Configuration for OrderEmulator instances.

debug
class PluginConfig

Bases: object

Configuration for one Rust-native plug-in instance loaded by a live node.

config
path
sha256
type_name
class PortfolioConfig

Bases: object

Configuration for Portfolio instances.

bar_updates
convert_to_account_base_currency
debug
equity_curve
min_account_state_logging_interval_ms
snapshot_interval_ms
use_mark_prices
use_mark_xrates
class QueueMonitorConfig

Bases: object

Configuration for runner queue pressure monitoring.

mean_dispatch_ns_clear
mean_dispatch_ns_trigger
queue_depth_clear
queue_depth_trigger
class RiskEngineConfig

Bases: object

Configuration for RiskEngineConfig instances.

bypass
debug
full_position_exit_venues
max_notional_per_order
max_order_modify_rate
max_order_submit_rate
class RotationConfig

Bases: object

static interval(interval_ns)
interval_ns
max_size
mode
static no_rotation()
schedule_ns
static scheduled_dates(interval_ns, schedule_ns)
static size(max_size)
class RoutingConfig

Bases: object

Configuration for live client message routing.

default
venues
class StrategyConfig

Bases: object

The base model for all trading strategy configurations.

external_order_instrument_ids
log_commands
log_events
log_rejected_due_post_only_as_warning
manage_contingent_orders
manage_gtd_expiry
manage_stop
market_exit_interval_ms
market_exit_max_attempts
market_exit_reduce_only
market_exit_time_in_force
oms_type
order_id_tag
strategy_id
use_hyphens_in_client_order_ids
use_uuid_client_order_ids
class StreamingConfig

Bases: object

Configuration streaming live or backtest runs to a persistence writer.

catalog_path
data_types
flush_interval_ms
fs_protocol
instrument_types
max_file_size
params
record_filters
record_types
replace_existing
rotation_config
rotation_interval_ns
rotation_mode
schedule_ns
writer_backend
class TearsheetConfig

Bases: object

Configuration for tearsheet generation.

Parameters:
  • charts (list[TearsheetChart], default built-ins) – Charts to include in the tearsheet, in order. Example: charts=[TearsheetRunInfoChart(title=”Run Info”)].

  • theme (str, default "plotly_white") – Theme name for visualization styling. Built-in themes: “plotly_white”, “plotly_dark”, “nautilus”, “nautilus_dark”.

  • layout (GridLayout | None, default None) – Custom grid layout specification. If None, auto-calculated based on charts.

  • title (str, default "NautilusTrader Backtest Results") – Title for the tearsheet.

  • include_benchmark (bool, default True) – Whether to include benchmark comparison in visualizations. Only applies when benchmark_returns data is provided.

  • benchmark_name (str, default "Benchmark") – Display name for the benchmark in visualizations.

  • height (int, default 1500) – Total height of the tearsheet in pixels.

  • show_logo (bool, default True) – Whether to display NautilusTrader logo in the tearsheet.

charts: list[TearsheetChart]
theme: str = 'plotly_white'
layout: GridLayout | None = None
title: str = 'NautilusTrader Backtest Results'
include_benchmark: bool = True
benchmark_name: str = 'Benchmark'
height: int = 1500
property chart_names: list[str]

The names of the configured charts, in order.