wrap_nones#

API documentation for tradeexecutor.strategy.pandas_trader.indicator.wrap_nones Python function.

wrap_nones(f)[source]#

Turn None return values to empty pandsa Series.

  • This is a function decorator that wraps pandas_ta technical indicator functinos

  • Many of these functions return None instead of empty series when having not enough data

  • We wrap these to empty Pandas series

  • This is used with IndicatorSet.add()

Returns:

A function that returns pd.Series([]) on None

Parameters:

f (Callable) –

Return type:

Callable