About FOREX Data

The FOREX Data by OANDA serves 185 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.


OANDA was co-founded by Dr. Stumm, a computer scientist and Dr. Olsen, an economist, in 1997. The company was born out of the belief that the Internet and technology would open up the markets for both currency data and trading. OANDA uses innovative computer and financial technology to provide Internet-based forex trading and currency information services to everyone, from individuals to large corporations, from portfolio managers to financial institutions. OANDA is a market maker and a trusted source for currency data. It has access to one of the world's largest historical, high-frequency, filtered currency databases.

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

class ForexCarryTradeAlgorithm(QCAlgorithm):

    def Initialize(self) -> None:

        self.SetStartDate(2008, 1, 1) 
        # We will use hard-coded interest rates
        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
        for ticker in self.rates:
            self.AddForex(ticker, Resolution.Daily, Market.Oanda)
        self.month = -1

    def OnData(self, slice: Slice) -> None:
        if self.month == self.Time.month:
        self.month = self.Time.month
        sorted_rates = sorted(self.rates.items(), key = lambda x: x[1])
        self.SetHoldings(sorted_rates[0][0], -0.5)
        self.SetHoldings(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: