Fixes GetBuyingPowerModel Method of DefaultBrokerageModel (#6215)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled

`CashBuyingPowerModel`, which reflected on `AlphaStreamBrokerageModel`, a margin-only brokerage.

It also didn't consider the account type, so `InteractiveBrokersBrokerageModel` was using the margin model even if `AccountType.Cash` was selected.

Removes `GetBuyingPowerModel` method from other Brokerage Models when their cases are covered by `DefaultBrokerageModel`

Fixes some typoes in `TradierBrokerageModel`

Fixes unit and regression tests. For the regression tests, we have explicitly set the brokerage model.
This commit is contained in:
Alexandre Catarino
2022-02-17 22:41:55 +00:00
committed by GitHub
parent c598a8d260
commit 3e52816f6e
14 changed files with 27 additions and 125 deletions
@@ -22,6 +22,7 @@ class BasicSetAccountCurrencyAlgorithm(QCAlgorithm):
self.SetStartDate(2018, 4, 4) #Set Start Date
self.SetEndDate(2018, 4, 4) #Set End Date
self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash);
# Before setting any cash or adding a Security call SetAccountCurrency
self.SetAccountCurrency("EUR")
self.SetCash(100000) #Set Strategy Cash