BLD: refinements to positions synchronization in live mode

This commit is contained in:
Frederic Fortier
2017-12-25 06:54:06 -05:00
parent 683f24b24f
commit 869ef8ec87
3 changed files with 30 additions and 52 deletions
+9 -9
View File
@@ -279,6 +279,15 @@ class NotEnoughCapitalError(ZiplineError):
).strip()
class NotEnoughCashError(ZiplineError):
msg = (
'Total {currency} amount on {exchange} is lower than the cash '
'reserved for this algo: {free} < {cash}. While trades can be made on '
'the exchange accounts outside of the algo, exchange must have enough '
'free {currency} to cover the algo cash.'
).strip()
class LastCandleTooEarlyError(ZiplineError):
msg = (
'The trade date of the last candle {last_traded} is before the '
@@ -306,12 +315,3 @@ class BalanceTooLowError(ZiplineError):
'add positions to hold a free amount greater than {amount}, or clean '
'the state of this algo and restart.'
).strip()
class CashTooLowError(ZiplineError):
msg = (
'Total {currency} amount on exchanges is lower than the cash reserved '
'for this algo: {free} < {cash}. While trades can be made on the '
'exchange accounts outside of the algo, they must not compromise '
'the required amount of free {currency}.'
).strip()