Error

Hi…Havent change anything in the code and suddenly this errot messages appear when trying to do backtest…





"

line 131, in handle_data
Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Traceback (most recent call last):
  File "/zbin/conda-bin/zipline", line 11, in <module>
    sys.exit(main())
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/__main__.py", line 103, in _
    return f(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/__main__.py", line 291, in run
    pwd_path=pwd_path
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/run_algo.py", line 227, in _run
    overwrite_sim_params=False,
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 770, in run
    for perf in self.get_generator():
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/gens/tradesimulation.py", line 213, in transform
    for capital_change_packet in every_bar(dt):
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/gens/tradesimulation.py", line 137, in every_bar
    handle_data(algo, current_data, dt_to_use)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/events.py", line 216, in handle_data
    dt,
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/events.py", line 235, in handle_data
    self.callback(context, data)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 503, in handle_data
    self._handle_data(self, data)
  File "user_algo.py", line 131, in handle_data
  File "user_algo.py", line 138, in run_strategy
  File "user_algo.py", line 179, in generate_signals
  File "user_algo.py", line 186, in signal_function
KeyError: 'RSI_period'  "



Looks like a parameter 'RSI_period' is not defined where you expect it to be. Please have a look at your code to see if this is the case. Else please send a mail to blueshift-support@quantinsti.com with a sample strategy that can reproduce this error.

…Thanx Sir





manage to check my codes…Yes it is missing the 'RSI_period"





Thank you for fast reply