Hello All! Iam having trouble with finding the best way to order futures contracts. In the university example and the updates to it uses setHoldings(_crude, .75); or setHoldings(_crude, 1); However when you look at the trade logs its ordering something like 978 instead of 1, that is 978 units instead of 1 contract. In each CL contract there are 1000 barrels, so either you should be ordering in sizes of 1000's, or 1's. No broker is going to interpret 978 as 1 contract, and ordering 1 in QC is like ordering 1/1000 of a contract in relation to your equity changes while holding that position of 1. Say that brokers do understand that 1000= 1 contract, if you try to do something like sell -3000 in order to close you 1000 position and open a -2000 position then QC says its invalid because you may not have enough to short -3000 ( even though its really only shorting -2000). Any thoughts on the best most accurate way to order futures contracts that makes sense to brokers?
Jared Broad
The custom data futures importing in the QCU are not realistically modeled as futures. There is no accounting for the contract size or margin requirements of the future contract. Currently its only modeled as a simple tradable asset. Additionally, SetHoldings is a fraction of your unlevered buying power. 1 = 100% of your cash/margin long, -2 = 200% of your cash/margin short. If you'd like to buy "1" of something, you can use Order(symbol, quantity) or Buy(symbol, quantity), Sell(symbol, quantity) helpers. We're working on options and futures support now which would include complete / realistic models.
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.
Timothy Comisky
Thanks for another quick response Jared! Sounds like we'll have to wait for those futures models updates
Timothy Comisky
Jared Broad
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.
Timothy Comisky
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!