Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f03a0ed

Browse files
added a reference to strategy class to OptReturn
1 parent 5ceeb29 commit f03a0ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtrader/cerebro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ def runstrategies(self, iterstrat, predata=False):
13221322
if attrname.startswith('data'):
13231323
setattr(a, attrname, None)
13241324

1325-
oreturn = OptReturn(strat.params, analyzers=strat.analyzers)
1325+
oreturn = OptReturn(strat.params, analyzers=strat.analyzers, strategycls=type(strat))
13261326
results.append(oreturn)
13271327

13281328
return results

0 commit comments

Comments
 (0)