About FOREX Data
The FOREX Data by QuantConnect serves 71 foreign exchange (FOREX) pairs, starts on various dates from January 2007, and is delivered on any frequency from tick to daily. This dataset is created by QuantConnect processing raw tick data from OANDA.
About QuantConnect
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
About QuantConnect
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
Algorithm Example
from AlgorithmImports import *
from QuantConnect.DataSource import *
class ForexCarryTradeAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2008, 1, 1)
self.set_cash(25000)
# We will use hard-coded interest rates for each base currency
self.rates = {
"USDAUD": 1.5, # Australia
"USDCAD": 0.5, # Canada
"USDCNY": 4.35, # China
"USDEUR": 0.0, # Euro Area
"USDINR": 6.5, # India
"USDJPY": -0.1, # Japan
"USDMXN": 4.25, # Mexico
"USDTRY": 7.5, # Turkey
"USDZAR": 7.0 # South Africa
}
# Subscribe to forex data for trading
for ticker in self.rates:
self.add_forex(ticker, Resolution.DAILY)
# Use a month counter as variable to control rebalancing
self.month = -1
def on_data(self, slice: Slice) -> None:
# Monthly rebalance checker
if self.month == self.time.month:
return
self.month = self.time.month
# Long the pair with highest interest rate and sell the pair with the lowest to earn the max monetary inflation difference between the two
sorted_rates = sorted(self.rates.items(), key = lambda x: x[1])
self.set_holdings(sorted_rates[0][0], -0.5)
self.set_holdings(sorted_rates[-1][0], 0.5)
Example Applications
The FOREX price data enables you to trade currency pairs in the global mark. Examples include the following strategies:
- Exploring the impact that daily worldwide news cycles has on international currencies
- Carry Trade: borrow from a lower interest currency pair to fund the purchase of a currency pair with a higher interest rate
Pricing
Cloud Access
Freely harness gigabytes of FOREX data in the QuantConnect Cloud for your backtesting and live trading purposes.
Second Download
FOREX Second resolution archives in LEAN format for on premise backtesting and research. One file per ticker/day.
Minute Download
FOREX Minute resolution archives in LEAN format for on premise backtesting and research. One file per ticker/day.
Hour Download
FOREX Hour resolution archives in LEAN format for on premise backtesting and research. One file per ticker.
Daily Download
FOREX Daily resolution archives in LEAN format for on premise backtesting and research. One file per ticker.
Bulk Second Updates
Bulk download second data
Bulk Minute Updates
Bulk download minute data
Bulk Hour Updates
Bulk download hour data
Bulk Daily Updates
Bulk download daily data
Bulk Second Download
Bulk download second data
Bulk Minute Download
Bulk download minute data
Bulk Hour Download
Bulk download hour data
Bulk Daily Download
Bulk download daily data
Explore Other Datasets
CNBC Trading
Dataset by Quiver Quantitative
Data Link
Dataset by Nasdaq
US Treasury Yield Curve
Dataset by Treasury Department