TradingBlox comes with sample FOREX pairs that include interest rates for various currencies (e.g. in Data\Forex\USD_Rates.txt).
Where do others get this historical information for pairs outside of the sample set? Places like HistData.com have esoteric pair *price* info but not the carry rates (which can have a big impact!).
Where do others get this data for their testing?
FOREX Historical Carry Rates
-
- Contributor
- Posts: 3
- Joined: Thu Feb 24, 2011 2:05 am
-
- Site Admin
- Posts: 9015
- Joined: Tue Apr 06, 2004 1:41 pm
- Location: Boston, MA
- Contact:
Re: FOREX Historical Carry Rates
You can get the data from forex brokers like:
http://www.oanda.com/forex-trading/anal ... ical-rates
However each broker is likely different, so you should get the bid/ask and carry rates from the broker you are using.
Trading Blox has a real time direct and automated connection with FXCM and IB in beta now for Forex trading.
http://www.oanda.com/forex-trading/anal ... ical-rates
However each broker is likely different, so you should get the bid/ask and carry rates from the broker you are using.
Trading Blox has a real time direct and automated connection with FXCM and IB in beta now for Forex trading.
-
- Contributor
- Posts: 3
- Joined: Thu Feb 24, 2011 2:05 am
Re: FOREX Historical Carry Rates
Thanks! That Oanda page seems broken. The submit input tag is not within the form element & thus won't actually submit... but with a little inline editing, I got the result needed.
The cURL command for anyone looking to automatically parse all currency rates for the max date range is below too (in case it's useful). A few things to note:
* Date range is the first part of the value block (URL encoded)
* Sed pipelines are also below to strip out the HTML (much better ways to do this)
* A little date parsing & it's close to looking like the *_Rates.txt files
The cURL command for anyone looking to automatically parse all currency rates for the max date range is below too (in case it's useful). A few things to note:
* Date range is the first part of the value block (URL encoded)
* Sed pipelines are also below to strip out the HTML (much better ways to do this)
* A little date parsing & it's close to looking like the *_Rates.txt files
Code: Select all
curl 'https://fx1.oanda.com/mod_perl/user/interestrates.pl' \
-H 'Origin: http://www.oanda.com' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Accept-Language: en-US,en;q=0.8,mt;q=0.6' \
-H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Script' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \
-H 'Cache-Control: max-age=0' \
-H 'Referer: http://www.oanda.com/forex-trading/analysis/historical-rates' \
-H 'Connection: keep-alive' -H 'DNT: 1' \
--data 'startdate=01%2F01%2F2000&enddate=01%2F01%2F2018¤cy=AUD¤cy=GBP¤cy=CAD¤cy=CNY¤cy=CZK¤cy=DKK¤cy=EUR¤cy=HUF¤cy=HKD¤cy=INR¤cy=JPY¤cy=MXN¤cy=TWD¤cy=NZD¤cy=NOK¤cy=PLN¤cy=SAR¤cy=SGD¤cy=ZAR¤cy=SEK¤cy=CHF¤cy=THB¤cy=TRY¤cy=USD¤cy=XAU¤cy=XAG¤cy=US30¤cy=NAS100¤cy=SPX500¤cy=UK100¤cy=DE30¤cy=HK33¤cy=JP225¤cy=BCO¤cy=CORN¤cy=WHEAT¤cy=NL25¤cy=FR40¤cy=EU50¤cy=SUGAR¤cy=SOYBN¤cy=NATGAS¤cy=WTICO¤cy=XCU¤cy=USB02Y¤cy=USB05Y¤cy=USB10Y¤cy=USB30Y¤cy=CH20¤cy=DE10YB¤cy=US2000¤cy=UK10YB' \
--compressed \
| sed 's/<[^>]*>/,/g' | sed 's/,,/,/g'| sed 's/,,/,/g' | sed 's/^..//' | sed 's/.$//g'
-
- Site Admin
- Posts: 9015
- Joined: Tue Apr 06, 2004 1:41 pm
- Location: Boston, MA
- Contact:
Re: FOREX Historical Carry Rates
Thanks, that's great.