Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
204 lines (203 sloc) 8.18 KB
<style>.ticker-table .map-symbol {
display: block;
font-size: 0.8em;
}</style>
<p>
QuantConnect provides all OANDA Brokerage CFD contracts for backtesting and trading.
</p><br/>
<table class="table qc-table table-itemized table-reflow">
<thead>
<tr>
<th colspan="2">
Data Properties
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data Provider</td>
<td><a href="/data/provider/oanda">OANDA</a>
</td>
</tr>
<tr>
<td>Start Date</td>
<td>
Mixed Dates: Earliest starts May 30th, 2004
</td>
</tr>
<tr>
<td>Symbol Universe</td>
<td>
51 CFD Contracts
(<a href="https://www.oanda.com/forex-trading/markets/live" rel="nofollow" target="_BLANK"><i class="fa fa-link"></i>
More Information</a>)
</td>
</tr>
</tbody>
</table>
<table class="table qc-table table-reflow ticker-table hidden-xs">
<thead>
<tr>
<th colspan="6">
Contracts Available
</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/data#symbol/cfd/oanda/AU200AUD">AU200AUD</a><span class="map-symbol">(Oanda: 'AU200_AUD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/BCOUSD">BCOUSD</a><span class="map-symbol">(Oanda: 'BCO_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/CORNUSD">CORNUSD</a><span class="map-symbol">(Oanda: 'CORN_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/DE30EUR">DE30EUR</a><span class="map-symbol">(Oanda: 'DE30_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/EU50EUR">EU50EUR</a><span class="map-symbol">(Oanda: 'EU50_EUR')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/DE10YBEUR">DE10YBEUR</a><span class="map-symbol">(Oanda: 'DE10YB_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/CH20CHF">CH20CHF</a><span class="map-symbol">(Oanda: 'CH20_CHF')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/FR40EUR">FR40EUR</a><span class="map-symbol">(Oanda: 'FR40_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/HK33HKD">HK33HKD</a><span class="map-symbol">(Oanda: 'HK33_HKD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/JP225USD">JP225USD</a><span class="map-symbol">(Oanda: 'JP225_USD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/NAS100USD">NAS100USD</a><span class="map-symbol">(Oanda: 'NAS100_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/NATGASUSD">NATGASUSD</a><span class="map-symbol">(Oanda: 'NATGAS_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/NL25EUR">NL25EUR</a><span class="map-symbol">(Oanda: 'NL25_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/SOYBNUSD">SOYBNUSD</a><span class="map-symbol">(Oanda: 'SOYBN_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/SPX500USD">SPX500USD</a><span class="map-symbol">(Oanda: 'SPX500_USD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/SUGARUSD">SUGARUSD</a><span class="map-symbol">(Oanda: 'SUGAR_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/SG30SGD">SG30SGD</a><span class="map-symbol">(Oanda: 'SG30_SGD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/UK100GBP">UK100GBP</a><span class="map-symbol">(Oanda: 'UK100_GBP')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/UK10YBGBP">UK10YBGBP</a><span class="map-symbol">(Oanda: 'UK10YB_GBP')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/US2000USD">US2000USD</a><span class="map-symbol">(Oanda: 'US2000_USD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/US30USD">US30USD</a><span class="map-symbol">(Oanda: 'US30_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/USB02YUSD">USB02YUSD</a><span class="map-symbol">(Oanda: 'USB02Y_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/USB05YUSD">USB05YUSD</a><span class="map-symbol">(Oanda: 'USB05Y_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/USB10YUSD">USB10YUSD</a><span class="map-symbol">(Oanda: 'USB10Y_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/USB30YUSD">USB30YUSD</a><span class="map-symbol">(Oanda: 'USB30Y_USD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/WHEATUSD">WHEATUSD</a><span class="map-symbol">(Oanda: 'WHEAT_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/WTICOUSD">WTICOUSD</a><span class="map-symbol">(Oanda: 'WTICO_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGAUD">XAGAUD</a><span class="map-symbol">(Oanda: 'XAG_AUD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGCAD">XAGCAD</a><span class="map-symbol">(Oanda: 'XAG_CAD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGCHF">XAGCHF</a><span class="map-symbol">(Oanda: 'XAG_CHF')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/XAGEUR">XAGEUR</a><span class="map-symbol">(Oanda: 'XAG_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGGBP">XAGGBP</a><span class="map-symbol">(Oanda: 'XAG_GBP')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGHKD">XAGHKD</a><span class="map-symbol">(Oanda: 'XAG_HKD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGJPY">XAGJPY</a><span class="map-symbol">(Oanda: 'XAG_JPY')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGNZD">XAGNZD</a><span class="map-symbol">(Oanda: 'XAG_NZD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/XAGSGD">XAGSGD</a><span class="map-symbol">(Oanda: 'XAG_SGD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAGUSD">XAGUSD</a><span class="map-symbol">(Oanda: 'XAG_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUAUD">XAUAUD</a><span class="map-symbol">(Oanda: 'XAU_AUD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUCAD">XAUCAD</a><span class="map-symbol">(Oanda: 'XAU_CAD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUCHF">XAUCHF</a><span class="map-symbol">(Oanda: 'XAU_CHF')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/XAUEUR">XAUEUR</a><span class="map-symbol">(Oanda: 'XAU_EUR')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUGBP">XAUGBP</a><span class="map-symbol">(Oanda: 'XAU_GBP')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUHKD">XAUHKD</a><span class="map-symbol">(Oanda: 'XAU_HKD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUJPY">XAUJPY</a><span class="map-symbol">(Oanda: 'XAU_JPY')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUNZD">XAUNZD</a><span class="map-symbol">(Oanda: 'XAU_NZD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/XAUSGD">XAUSGD</a><span class="map-symbol">(Oanda: 'XAU_SGD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUUSD">XAUUSD</a><span class="map-symbol">(Oanda: 'XAU_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XAUXAG">XAUXAG</a><span class="map-symbol">(Oanda: 'XAU_XAG')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XCUUSD">XCUUSD</a><span class="map-symbol">(Oanda: 'XCU_USD')</span>
</td>
<td><a href="/data#symbol/cfd/oanda/XPDUSD">XPDUSD</a><span class="map-symbol">(Oanda: 'XPD_USD')</span>
</td>
</tr>
<tr>
<td><a href="/data#symbol/cfd/oanda/XPTUSD">XPTUSD</a><span class="map-symbol">(Oanda: 'XPT_USD')</span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>
To use OANDA Brokerage FX products in QuantConnect you must specify the QuantConnect symbol not the OANDA one. CFD data must be added in the Initialize() method manually. Specify <code>Market.Oanda</code> to backtest on OANDA historical data.
</p>
<div class="section-example-container">
<pre class="csharp">
// Manual add symbols required in your initialize method:
public override void Initialize() {
AddCfd("AU200AUD", Resolution.Minute, Market.Oanda);
}
// Access data via dedicated event handlers:
public void OnData(TradeBars data) {
data["AU200AUD"].Close;
}
// Access data via grouped time slice method handlers:
public override void OnData(Slice data) {
data.Bars["AU200AUD"].Close;
}
</pre>
<pre class="python">
# Manual add symbols required in your initialize method:
def Initialize(self):
sef.AddCfd("AU200AUD", Resolution.Minute, Market.Oanda)
# Access data via grouped time slice method handlers:
def OnData(self, data):
data.Bars["AU200AUD"].Close;
</pre>
</div>