You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On optimize it should run smoothly as per documentation
Actual Behavior
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\sandeep\anaconda3\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\Users\sandeep\anaconda3\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "C:\sandcodes\backtest_realtime_f.py", line 2135, in bt_thread
stats, heatmap = bt.optimize(
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1745, in optimize
output = _optimize_grid()
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1635, in _optimize_grid
_, values = Backtest._mp_task(backtest_uuid, batch_index)
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1755, in _mp_task
return batch_index, [maximize_func(stats) if stats['# Trades'] else np.nan
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1755, in <listcomp>
return batch_index, [maximize_func(stats) if stats['# Trades'] else np.nan
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1756, in <genexpr>
for stats in (bt.run(**params)
File "C:\sandcodes\backtesting_sand_f\backtesting.py", line 1245, in run
broker: _Broker = self._broker(data=data)
TypeError: '_Broker' object is not callable
[]
Steps to Reproduce
bt = None
bt = Backtest(ticker, strat, #OpenLowIntraday, # OpenLow_SMA_Intraday,
cash=10000, commission=0.0003,
margin=1, #0.1, #best value as of now.. due to this trade count is changing
exclusive_orders=True, exclusive_orders_nocancel=True) # True)
if OPTIMIZE_MODE == True:
import numpy as np
print("ENTERING OPTIMIZE MODE TO SEARCH BEST HYPER PARAMETERS::: ")
stats, heatmap = bt.optimize(
_pat_mul=range(1, 10),
_macross_slope10threshold=list(np.arange(0.001, 1., 0.01)),
_entry_price_factor=list(np.arange(1.0015, 1.01, 0.0001)),
maximize='Equity Final [₹]',
max_tries=200,
random_state=0,
return_heatmap=True,
)
Additional info
Backtesting version: 0.3.3
bokeh.__version__:
OS: Windows
The text was updated successfully, but these errors were encountered:
Expected Behavior
On optimize it should run smoothly as per documentation
Actual Behavior
Steps to Reproduce
Additional info
bokeh.__version__
:The text was updated successfully, but these errors were encountered: