UniverseOptions#
API documentation for tradeexecutor.strategy.universe_model.UniverseOptions Python class in Trading Strategy framework.
- class UniverseOptions[source]#
Bases:
object
Options that we can pass for the trading strategy universe creation.
These can be given on the command line, or from the parent execution context. It allows to override parameters given in the strategy file easily without need to edit the file.
The most common use case is to speed up backtesting by decreasing the stop loss check frequency.
The default options do not override anything:
universe_options = UniverseOptions()
See Testing the strategy module how these options are used.
- __init__(candle_time_bucket_override=None, stop_loss_time_bucket_override=None, start_at=None, end_at=None)#
- Parameters:
candle_time_bucket_override (Optional[TimeBucket]) –
stop_loss_time_bucket_override (Optional[TimeBucket]) –
- Return type:
None
Methods
__init__
([candle_time_bucket_override, ...])Attributes
candle_time_bucket_override
Optionally passed backtest end time
Optionally passed backtest start time.
stop_loss_time_bucket_override
- start_at: Optional[datetime] = None#
Optionally passed backtest start time.
Can be used in create_trading_universe() to set the data range.
- end_at: Optional[datetime] = None#
Optionally passed backtest end time
Can be used in create_trading_universe() to set the data range.
- __init__(candle_time_bucket_override=None, stop_loss_time_bucket_override=None, start_at=None, end_at=None)#
- Parameters:
candle_time_bucket_override (Optional[TimeBucket]) –
stop_loss_time_bucket_override (Optional[TimeBucket]) –
- Return type:
None