Hello all, hope I'm OK to ask a newbie question here. I have an IKBR account that I use for discrectionary trading, and I would like to backtest a strategy on QuantConnect.
But once backtesting is finally concluded how do I go about using the algo on my IBKR account?
1) does QuantConnect have a way for us to connect our IKBR account to it?
2) or can we import the algo into IKBR trader workstation
Being in Canada IKBR is our only choice for algo trading but they don't allow robust backtesting from what I've read. I have some experience a few different programming languages and I've been doing discrentionary trading for 3 years, so it should be a worth experiment.
Thanks for any help you can provide in regards to these questions.
Brent
Jared Broad
Hey there, we have live trading as shown in this video:
https://www.youtube.com/watch?v=Uf-uKzHRA2s&ab_channel=QuantConnectWe don't support backtesting on Canadian stocks, but some users have had success live trading with Canadian accounts on US stocks.
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.
Conor Flynn
Hi Brent,
If you are looking to backtest a strategy I would still recommend using QuantConnect rather than looking for an alternative. Your backtesting should still be a good indication of how well your strategy would work on the Canadian stock market and would also help you avoid selection bias when backtesting.
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.
Jared Broad
Hey Dave, we have finished the code changes required to maintain backward compatibility but didn't want to deploy it on the weekend. We've now got the data, code, and new tests in place and will re-deploy Monday-AM.
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.
Dave Mueller
Awesome! I'm going to check it out tonight =)
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.
Jared Broad
Sorry Dave still delayed; please subscribe to notifications and I'll update this thread as soon as its pushed. We found differences in the ticker symbology and are mapping the tickers back to the current QC format so the data should be nearly identical and not require changes to your code.
It'll likely be 1 day of engineering, 2 days of data processing and then 1 day of retesting. ETA Thursday-Friday.
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.
Arthur Asenheimer INVESTOR
Take all the time you need. Stability and reliability is more important than a quick implementation.
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.
Grigori Gustin
Hi Jared/QC team,
I have noticed that there is access to ask/bid prices in research notebooks for second resolution.
However, I could not access to tick data - is there any work still in progress or the problem is in my code?
Also, is ask/bid data is already available during backtesting?
Thanks, Grigori.
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.
Jared Broad
Hey Grigori! Yes, it was deployed quietly yesterday.
Tick data is also available but it is not the same format as QuoteBars, each Tick has a TickType attached to it. The value of TickType.Quote marks ticks which are bids/asks. These are presented as a list for a specific moment of time.
Our tick data for Equities is now also timestamped to the millisecond! Previously it was rounded down to the previous second
--.
Live Trading does not have the new quote feed yet -- we're working on that and it'll be installed in the next week or two. We're literally waiting on physical delivery of some 10GB fiber modules and with the virus, everything is moving slowly.
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.
Grigori Gustin
> Tick data is also available but it is not the same format as QuoteBars, each Tick has a TickType attached to it.
Trying to access Resolution.Tick through qb.History() call gives me the following exception:
"Exception : cannot handle a non-unique multi-index!"
Still did not figure out the root cause, the date range seems valid (couple of hours) and it worked before.
Could you please help me on this?
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.
Jared Broad
No problem Grigori but please create a new thread with a sample attached of what you're trying to do or send in a ticket for private support.
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.
Hugh Todd
I've been testing the quoteBars in slice with some low volume ETFs I follow and the availability of bid/ask improves the information content gathered from these price series. Thanks for the continuing improvements to the site. When do you see this data being available for live trading? Thanks, Hugh
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.
Jared Broad
Thanks Hugh;
All going well - we'll do the installation of the new live feed this weekend. We've wired up a brand new rack and are just waiting on a cross-connect cable install for the new data feed. Old live algorithms will need to be stopped and redeployed to move to the new infrastructure.
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.
Laurent Crouzet
Jared Broad I really think it will be an important and a very useful development for QC and the QC's community that all algorithms (those that are working and the new ones) use the new bid/ask structure!
If I understand well, that would also imply that all currently validated Alphas (those on the marketplace) will be stopped and redeployed, right?
Does it also mean that it would deplete the portfolio (cancellation of all insights) of these Alphas? Or as long as everything goes smoothly during the week-end (as no market is open), the Alphas will still keep their current investments?
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.
Hugh Todd
Thanks Jared. We appreciate the efforts you all are putting into this.
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.
Jared Broad
Pleasure Hugh!
Laurent: All QuantConnect backtest algorithms currently use spread, and soon live trading will as well. Once the new live feed is installed Alphas will need to be stopped and redeployed. An Alpha should reinitialize its state in the event of a shutdown, so it should resume their previous positions. When we eventually restart them we'll do it after market close; before universe selection; on Friday. This should minimize the impact of most of the alphas. We'll mark on the charts when the alpha was redeployed with the spread data.
A nice side effect as well -- our new live history server should be 10x faster =) Not quite sure how much faster yet as it's a new approach which should make things close to backtesting speeds.
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.
Laurent Crouzet
Ok, thank you Jared. Hopefully, everything will be as smooth as possible!
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.
Davide Carbone
Hi Jared,
do you have an estimated release date for the L1 Equity Quote in live mode?
Thanks
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.
Cary Cocke
Words cannot express my thanx and praises enough!
OUTSTANDING WORK......this is why I love QC
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.
Arthur Asenheimer INVESTOR
Now that L1 Equity Quotes are available for backtesting, the next step would be a good market impact model (slippage model).
For example, when a Buy Market Order is submitted, I have to take into account not only the spread, but also the available volume at the next best bid price offer.
So if you want to buy 1,000 shares of XYZ and the current bid price is $ 100.00, but only 100 shares are offered at that price, the order will not be executed in full at $ 100.00, but will reach the next level in the order book and execute the next orders at $ 100.01 and so on.
As a result, the average execution price wil be higher than current backtesting suggests.
If you want to display it 100% realistically, you would need the complete history with the highest granularity (Tick) of the entire order book (Full DOM = Full Depth of Market, i.e. Level 2 Data). You can imagine that this would pose completely new challenges to the hardware performance as the data volumes would be enormous. Therefore it makes sense to work with models that are very close to reality.
Quantopian offers various slippage models for this. I personally prefer to talk about market impact models as this is also common practice in the scientific literature.
As you can see in the documentation here, the Alpha Streams Brokerage Model uses a constant Slippage model.
So my question is: Since we now have L1 Equity Quote Data, I wonder if it wouldn't be possible to create better/more realistic Slippage Models based on that data?
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.
Arthur Asenheimer INVESTOR
Edit: Edit: A good approach would be the square-root formula for market impact, which we can use now where L1 Quote Data and thus the Spreads are available.
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.
Derek Melchin
Hi Arthur,
Interesting suggestion. Users will find our documentation on creating custom slippage models useful when implementing this.
To go forward with this, I recommend starting a new forum thread where alternative slippage models can be discussed. Such a discussion is out of the scope of this thread.
Best,
Derek Melchin
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.
Hugh Todd
Is this available for live trading yet? I'm seeing errors when I try to reference quote bars during live trading with QC data and don't know if it is my model or the state of development.
Thanks, Hugh
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!