LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
With interactive brokers you typically can't trade futures that have physical delivery after the "first notice" date, I know in grains first notice is typicall the last business day of the month prior to expiry. The link is the example from IB. The example shows that longs and shorts are treated differently but on the futures physical delivery tab, IB shows that long and shorts are both cutoff 1 day prior to first notice. So my questions would be: does algoseek's data account for this?(guessing no) and does the expiry filter go off of last trade or first notice?
One could liquidate or roll any positoins at month end if they have less than 30 days to expiry, but as the rules can be different for softs, metals, grains, etc... you need lots of rules to trade mulitple types of futures
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.
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.
Gurumeher Sawhney
16.5k
,
Algoseek's data provides the futures pricing data while QuantConnect calculates the last day to trade a specific future based upon the contract specifications. For example for corn futures, the expiry will fall on the business day prior to the 15th calendar day of the contract month:
Then you have aproximately 2 weeks where in a backtest can trade but interactive brokers will not let you. because interactive brokers will close out your positions the last business day of the month prior to expiration
0
Jared Broad
STAFF
,
Awesome thank you jbl1486 - it might be a modeling inaccuracy. We'll look into it and see about a patch to LEAN.
Who is trading in that final month? Do other brokerages allow trading?
1
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.
Jbl1486
39
,
to trade past first notice your broker must be able to accept physical delivery and interactive brokers doesn't allow for this. Typically even if you were to receive notice of intent to deliver you can get out of it the same day or you could trade out of it in the exchange for physical market, but that is outside the realm of algo trading. I believe in the past we would take the nearer of last trade date and first notice and make sure that any open positions were closed or rolled prior
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.
Loading...
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!