Fixed bug in Account.is_liquidatable - it should have used maintenance health not initial health when deciding an account could be liquidated.
This commit is contained in:
parent
2700c12578
commit
c090e7f6dd
|
@ -731,7 +731,7 @@ class Account(AddressableAccount):
|
|||
def is_liquidatable(self, frame: pandas.DataFrame) -> bool:
|
||||
if self.being_liquidated and self.init_health(frame) < 0:
|
||||
return True
|
||||
elif self.init_health(frame) < 0:
|
||||
elif self.maint_health(frame) < 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue