In simulated order.py:_process_sp() there can be occasions when actual_spis in 'None','NaN','Infinity' (last 2 are as per BF docs - think I've found Nonebefore since have something in my code testing that). Currently my backtest logs show an exception thrown File "C:\\...\\flumine\\simulation\\simulatedorder.py", line 391, in _process_sp\n size = round(remaining_risk / (actual_sp - 1.0), 2)\nTypeError: unsupported operand type(s) for -: 'str' and 'float'" Have a sample recorded file with 'Nan' if would help ? Suggest fix could be
def _process_sp(self, publish_time: int, runner: RunnerBook) -> None:
# calculate matched on BSP reconciliation
actual_sp = runner.sp.actual_sp
if actual_sp not in ['None','NaN','Infinity',0.0] :
......
In simulated
order.py:_process_sp()
there can be occasions whenactual_sp
is in'None','NaN','Infinity'
(last 2 are as per BF docs - think I've foundNone
before since have something in my code testing that). Currently my backtest logs show an exception thrownFile "C:\\...\\flumine\\simulation\\simulatedorder.py", line 391, in _process_sp\n size = round(remaining_risk / (actual_sp - 1.0), 2)\nTypeError: unsupported operand type(s) for -: 'str' and 'float'"
Have a sample recorded file with 'Nan' if would help ? Suggest fix could be