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
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.
Alexandre Catarino
100.5k
,
We have some examples of statistical arbitrage in this forum. Please use the search feature. Our team have been developing quantitative strategies and, fortunatelly, we have two examples of statistical arbitrage:
Also, checkout the tutorials for other strategies.
0
Jenny S
409
,
Thank you Alexandre!
I've explored many of QC site's regions - docs, tutorials, forum, exmaples (downloaded the complete LEAN project) and search feature, in order to enrich and deepen my understanding, and it was very enlightening indeed.
I guess the point I'm missing is how to select which exchange to buy and sell a certain equity, and surprisingly did not find any reference to this issue, then probably I'm doing something wrong.
0
Alexandre Catarino
100.5k
,
In tick resolution, there is information on the exchange:
public override void OnData(Slice data) {
foreach (var tick in data.Ticks["SPY"]) {
var exchange = tick.Exchange;
}
}
where Exchange is a string with that represents the exchange according to this mapping:
/// Canada Market Short Codes:
public static Dictionary<string, string> Canada = new Dictionary<string, string>()
{
{"T", "Toronto"},
{"V", "Venture"}
};
}
However, you cannot select the exchange your orders go to. The brokerage will find the best deal for you.
0
Jenny S
409
,
I'm using tick's Exchange property (along with the above dictionaries) through Security.DataFilter propertyinside Initialize method (so OnData is already getting filtered ticks).
The missing piece of the puzzle is your ending, that I cannot select the exchange.
Thanks for clarifying this issue!
0
Jared Broad
STAFF
,
At this time LEAN doesn't support routing to specific exchanges.
0
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.
Jenny S
409
,
Thank you Jared.
In this case, it's immpossible to execute the strategy "buy eBay if it's price on NASDAQ is between 35.3 and 35.4", because I cannot be sure that the equity will be bought on NASDAQ, and therefore buying price can be out of bounds.
And in a wider aspect, I cannot rely on an equity's price as a desicion criteria.
Is this correct, or is there a way to perform this?
0
Photi G
29
,
Hi guys,
I have similar question as Jenny S. I am looking to figure out if there is a way to connect different exchanges via REST on the same algorithm and perform arbitrage. So to clarify:
1. Is a statistical arbitrage strategy that the Universe contains both US & UK stocks feasible? 2. Is an arbitrage strategy of crypto-pairs across different Crypto-Exchanges feasible from a framework point of view?
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!