vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

Error on pandas ta indicator 'ichimoku'

Open vhphan opened this issue 3 years ago • 1 comments

vbt.IndicatorFactory.from_pandas_ta('ichimoku')

results in

Traceback (most recent call last): File "/home2/eproject/anaconda3/envs/backtester/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3444, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in vbt.IndicatorFactory.from_pandas_ta('ichimoku') File "/home2/eproject/anaconda3/envs/backtester/lib/python3.9/site-packages/vectorbt/indicators/factory.py", line 3693, in from_pandas_ta config = cls.parse_pandas_ta_config(pandas_ta_func, **parse_kwargs) File "/home2/eproject/anaconda3/envs/backtester/lib/python3.9/site-packages/vectorbt/indicators/factory.py", line 3539, in parse_pandas_ta_config if not pd.Index.equals(r.index, test_df.index): AttributeError: 'NoneType' object has no attribute 'index'

vhphan avatar Dec 28 '21 03:12 vhphan

Resolved by changing the test_index_len

vbt.IndicatorFactory.from_pandas_ta('ichimoku', dict(test_index_len=100))

vhphan avatar Dec 28 '21 06:12 vhphan