Exception while optimizing
I am trying to optimize a strategy. It is working fine when I am using indicators such as AnnualReturn, Drawdown but whenever I use Sharpe or Sharpe_A, it throws the following exception and starts running endlessly.
Starting Portfolio Value: 100000.00 Exception in thread Thread-75: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.6/multiprocessing/pool.py", line 463, in _handle_results task = get() File "/usr/lib/python3.6/multiprocessing/connection.py", line 251, in recv return _ForkingPickler.loads(buf.getbuffer()) AttributeError: Can't get attribute 'Lines_LineSeries_LineIterator_DataAccessor_ObserverBase_Observer_DataTrades_a179e3eb9e354bd68d683450f934ee8a' on <module 'backtrader.lineseries' from '/usr/local/lib/python3.6/dist-packages/backtrader/lineseries.py'>
I think that this might be because of some deadlock due to multiprocessing. How can I correct this?
vladisld last edited by
@zuj Please take a look at the following post:
and the links inside - this is a known issue with several possible solutions.