Hi everyone,
By using the new Atreyu brokerage model, it's now possible to route orders to specific US exchanges. We created a tutorial that uses tick data to capitalize on inter-exchange arbitrage opportunities that occur when the asking price on one exchange is lower than the bid price on another exchange. We tested the strategy over January 2021 and it generated a 34 Sharpe ratio.
Importantly, some of the performance of our algorithm may be attributed to the assumption that the quotes in the tick slice are still available by the time our orders reach the exchanges, which may not be true in live trading.
Review the attached backtest to see how the algorithm works. The full tutorial is available here.
Best,
Derek Melchin
Spacetime
thank you for sharing this example.
Fred Painchaud
Thanks for this. How do you sign up with Atreyu? Looks like I need to use the form at https://www.atreyugroup.com/ ? I am guessing you need to be in the US and most probably in certain states to trade with them?
Thanks again.
Jared Broad
Hey Fred,
Drop us an email at contact@quantconnect.com and we'll make the introduction. They only accept professional / full-time traders at this time but they're offering a $280 Trading Firm pack on QC for the first 30 accounts.
Best
Jared
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 everyone,
Here's a video that explains the strategy:
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.
Quant Stratege
Hi,
I have no idea of QC/Atreyu latency but don't you think that most of resting orders you try to fill with this algo will be gone ?
Done a simple test by delaying execution between 4 and 9 milliseconds which represent 12% orders generated from your algo. We can see that most resting quantity are no more there. Even if we can't make any assumption on 88% other orders as we did not received any tick for them before 9 milliseconds, I have some doubt about performance of this algo. Will be nice to have some live stats with Atreyu.
Could you also confirm that Atreyu standard fees is $0.0015/share or it is based on some volume traded conditions ?
Best.
.ekz.
Fascinating. Thanks for sharing Derek.
Curious: Does Atreyu work for Crypto? I'd imagine there're arb opportunities across the coin exchanges.
Derek Melchin
Hi Quant Stratege,
The algorithm above determines the exchanges to buy and sell from but doesn’t submit the orders immediately. When the algorithm above submits the orders after the delay, there is likely not a profitable arbitrage opportunity using the exchanges determined earlier in the backtest.
In live trading, orders take time to reach the exchanges. As a result, the performance of the arbitrage algorithm at the top of this thread likely doesn’t match the true live trading performance during the testing period. It’s just a “toy implementation” to demonstrate the concept of inter-exchange arbitrage.
The fees for Atreyu are $0.0015/share. Refer to the documentation here.
Hi .ekz.,
The Atreyu brokerage currently only supports Equities. Refer to the documentation here.
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.
Derek Melchin
Hi Quant Stratege,
At Atreyu's request, we've updated our documentation so fees are now $0.0035/share. Refer to the documentation here.
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.
Warren Harding
Will this work with IB?
Derek Melchin
Hi Warren,
The algorithm will not work with IB. It can only be executed with the Atreyu brokerage.
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.
Mak K
Hi Derek,
Thanks for this, it's a very cool demonstration of the concept, do you think something like this can be feasible at all for a retail trader or is it solely something interesting to know?
Thanks!
Mak K
Hi all,
I ran the same algo from 2019 to 2020 and got entirely different results, any idea why this is the case?
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.
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!