I get this error when placing a market order through the QC UI:
Brokerage Warning: Order failed, Order Id: 1 timestamp: 12/24/2017 11:42:56 PM quantity: 0.004 content: {"message":"Margin currently not available for BTC-USD"}
I do have cash to cover 0.004 BTC... Any suggestions would be appreciated
Jared Broad
they both show how to set the margin model appropriately.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Iman Mohtashemi
Sorry Jared, I don't see the specifc example you are referring to. Is it in the Lean solution?
Iman Mohtashemi
I think you meant this?
SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)Derek Tishler
The docs show a little on how you can set leverage when using AddX(). You an also use it on an asset after the fact like so.
With universes(coarse/fine) managing assets, you can use self.UniverseSettings.Leverage as seen here.
To understand what SetBrokerageModel is doing, you can read about that here. You will need AccountType set to Margin. Once you have the margin account being modeled, you can mess with leverage over 1, or the value that you set per asset/universe.
Iman Mohtashemi
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!