MCPcopy Create free account
hub / github.com/kernc/backtesting.py / _replace

Method _replace

backtesting/backtesting.py:436–439  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

434 self.__tag = tag
435
436 def _replace(self, **kwargs):
437 for k, v in kwargs.items():
438 setattr(self, f'_{self.__class__.__qualname__}__{k}', v)
439 return self
440
441 def __repr__(self):
442 return '<Order {}>'.format(', '.join(f'{param}={try_(lambda: round(value, 5), value)!r}'

Callers 5

cancelMethod · 0.45
_copyMethod · 0.45
_process_ordersMethod · 0.45
_reduce_tradeMethod · 0.45
_close_tradeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected