Address reviews

- `CashBook[NullCurrency] { get; }` will throw an exception
- Revert `Currencies.USD` changes in user facing algorithms
- Improve some documentation
- Revert some format changes
- Adding more asserts for regression test
- Adding new regression tests using a custom fee model which returns
`OrderFee.Zero`
- Adding a non-usd account currency test to the cash book tests
- Adding some unit tests for `NullCurrency` and `OrderFee.Zero`
This commit is contained in:
Martin Molinero
2018-12-13 16:47:49 -03:00
parent 0933da9303
commit 0af7ba14f5
41 changed files with 394 additions and 164 deletions
+1 -3
View File
@@ -101,9 +101,7 @@ class CustomFeeModel(FeeModel):
* parameters.Order.AbsoluteQuantity
* d.Decimal(0.00001))
self.algorithm.Log("CustomFeeModel: " + str(fee))
return OrderFee(CashAmount(
fee,
parameters.AccountCurrency))
return OrderFee(CashAmount(fee, "USD"))
class CustomSlippageModel:
def __init__(self, algorithm):