Commit Graph

7 Commits

Author SHA1 Message Date
Martin Molinero c9e6268cbd Remove OrderFeeParameters.AccountCurrency
- Removing OrderFeeParameters.AccountCurrency. Where required replacing
for constructor parameter defaulting to USD.
- Updating IB fee model to use to correct fee currency
2018-12-28 15:57:53 -03:00
Martin Molinero 0933da9303 Refactor previous commits
- Removing `AccountCurrency` from `Cash` and `Brokerage` classes.
`ICurrencyConverter` will now provide the `AccountCurrency`
- Adding new static `OrderFee.Zero` which will return a 0 order fee in
`NullCurrency`
- Adding static `Currencies.USD` value, replacing all "USD".
- Addin new static `Currencies.NullCurrency`
- Updating Bitfinex `FeeModel` so it return fees in quote currency.
Adding unit tests
2018-12-13 11:30:40 -03:00
Martin Molinero c5daf9ac9a Refactor IFeeModel
- Refactoring `IFeeModel`. *This is a breaking change* for implementations
inheriting directly from the interface. Deleting old and adding a new method
`OrderFee GetOrderFee(OrderFeeParameters parameters)` that will use a parameter
and a result object.
- Refactoring `CashAmount` so it does not embed a `ICurrencyConverter`
instance.
- Updating unit tests
- The `Security.QuoteCurrency`, a `Cash` instance, will provide access
to the `AccountCurrency` as a property.
- Will maintain backwards compatibility with old python custom
FeeModels, Adding unit test.

> Note that for now, consumers will ignore the currency, as before, and
directly consume the amount
2018-12-06 16:20:36 -03:00
Martin Molinero 1997197f47 Fix failing unit tests 2018-09-18 12:10:42 -03:00
Martin Molinero 41873b2315 Fixing unit tests 2018-08-31 16:06:41 -03:00
Stefano Raggi 4b4f8efb0d Fix InteractiveBrokersBrokerageModel fee model with Forex
When calling SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage) fees were reported as zero for Forex orders
2017-08-24 18:48:52 +02:00
Stefano Raggi ea26f261e8 Add tests for algorithm initialization
Different call sequences for AddSecurity, SetBrokerageModel, SetSecurityInitializer
2017-05-31 19:51:06 +02:00