Back

Supported Forex pairs?

Curious, is there a list of Forex pairs that QC supports? When sampling, a bunch of cross pairs and exotic pairs seem to have issues.

GBPJPY
Error message: "GBPJPY: requires JPY to have a non-zero conversion rate. This can be caused by lack of data."

EURNZD
Doesn't hit OnData(TradeBars data) 

GBPAUD
Error message: "GBPAUD: requires AUD to have a non-zero conversion rate. This can be caused by lack of data."

USDDKK
Doesn't hit OnData(TradeBars data) 

Update Backtest








You can search for data in the data manager on the left tab. We only have 13 majors at the moment but @Deval is in the process of downloading, converting and uploading all of the FXCM & Oanda pairs.

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.


@Levi - we found and fixed an issue related to this today. Our 13 current pairs are now all properly working.

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.


Great! Thanks Jared! Looking forward to checking this out.

On a side note, do you have any advice on building Forex tick data for Lean consumption? I'm working on a program that builds Lean tick data from a NinjaTrader export file. I reviewed how Forex tick data is parsed in Lean and it doesn't seem to parse the Latest price from the file but rather takes the average of the parsed Ask and Bid price. 

BidPrice = csv[1].ToDecimal();
AskPrice = csv[2].ToDecimal();
Value = (BidPrice + AskPrice) / 2;

Now, I'm very new to Forex but this seems strange. NinjaTrader's export file actually provides Bid, Ask, and Latest prices and the Latest price doesn't seem to be the average of the Bid and Ask. In most cases the Latest price is actually either the Bid or Ask price.

Time; Latest; Bid; Ask; Volume;
20160605 200015 0170000;1.13449;1.13449;1.1345;1

I'm ultimately trying to carefully convert an algorithm from NinjaTrader to Lean and I was hoping to start with having identical data but it doesn't look like that's possible. Do you feel taking the average of the Bid and Ask is the better approach or was that just a limitation of your data provider? Is this how Latest price is determined in Live trading? And is it possible to not use the average of Bid and Ask for both BackTesting and Live trading? 

0

AFAIK - In high volume and dispurse markets like FX there is no latest / last trade as there is so much volume. We made a fictional Value as the midpoint for all the datapoints. You could make it more accurate using fill models - set your fill price to the bid/ask depending on the order you're placing (sell at offer, buy at tick asking).

That value column is only used in fills; it shouldn't affect your backtesting if you're directly using Bid/Ask values of ticks.

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.


@Levi - If you haven't seen it, there's a toolbox project which allows for downloading of any FXCM data into LEAN format.   

0

Hey Jared,

I get what you're saying about the fictional price. If all you have is Ask and Bid and not Latest price, then the average of the both is as good as you're going to get.

But If you truely don't have Latest, then there's something wrong somewhere. Attached is a simple project that buys on first bar. A tag is added to the order that shows the Price, Ask, and Bid of the latest tick at the time of purchase. 

It shows @ 2016-06-20 00:00:01,
the Price = 1.137425
the Ask   = 1.13746
the Bid    = 1.13739

Which jives with the fictional price. (1.13746 + 1.13739) / 2 = 1.137425 = Price.

But, the FillPrice of the order is $1.137495 which is different than the tick Price. It's actually slightly higher than the Ask price. The difference in this example is rather small but I'm coming across many larger differences enough to throw off the outcome of my algo.

I'm using the FxcmBrokerage model which uses the ImmediateFillModel. After poking around it looks like the FillPrice should be the Ask or Bid. 

 

0


Thanks Levi, you've spotted a bug in the spread slippage model - we're fixing it now (ETA tomorrow) but in the meantime you can use:

var eurusd = AddSecurity(SecurityType.Forex, "EURUSD", Resolution.Tick);
eurusd.SlippageModel = new ConstantSlippageModel(0);

Which uses 0 slippage and fills at the ask price.

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.


It would nice to have the list of forex pairs available as a property of an object in the API.

0

Thanks Brian; we toyed with having it in the API but like Equities this changes over time with low volume currency pairs getting delisted resulting in confusion. Long term we'll make them selectable via universe methods like equities.

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.


Update Backtest





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.


Loading...

This discussion is closed