calculate_indicators#
API documentation for tradeexecutor.strategy.pandas_trader.indicator.calculate_indicators Python function.
- calculate_indicators(strategy_universe, storage, indicators, execution_context, remaining, max_workers=8, label=None, all_combinations=None, verbose=True)[source]#
Calculate indicators for which we do not have cached data yet.
Use a thread pool to speed up IO
- Parameters:
indicators (tradeexecutor.strategy.pandas_trader.indicator.IndicatorSet | None) –
Indicator set we calculate for.
Can be
None
for a grid search, as each individual combination may has its own set.remaining (set[tradeexecutor.strategy.pandas_trader.indicator.IndicatorKey]) – Remaining indicator combinations for which we do not have a cached rresult
all_combinations (set[tradeexecutor.strategy.pandas_trader.indicator.IndicatorKey] | None) –
All available indicator combinations.
Only needed if we are doing indicator dependency resolution.
verbose – Stdout user printing with helpful messages.
strategy_universe (TradingStrategyUniverse) –
storage (IndicatorStorage) –
execution_context (ExecutionContext) –
label (str | None) –
- Return type:
dict[tradeexecutor.strategy.pandas_trader.indicator.IndicatorKey, tradeexecutor.strategy.pandas_trader.indicator.IndicatorResult]