Closed jrycw closed 3 years ago
class Strategy(object): def backtest(self, ohlcv, variables=dict(), filters=dict(), lookback=None, plot=False, signals=False, side='long', cscv_nbins=10, cscv_objective=lambda r: r.mean(), html=None, compounded=True, execution_price='close', **args):
There might be a potential issue if using dictionary as the default argument for variables and filters, since dictionary is mutable.
dictionary
variables
filters
I will argue that using None as the default argument might be a safer approach.
None
Thanks for the feedback, I updated ecea8d9 to fixed it.
There might be a potential issue if using
dictionary
as the default argument forvariables
andfilters
, sincedictionary
is mutable.I will argue that using
None
as the default argument might be a safer approach.