QuantStart Forex Backtesting and Live Trading

mhallsmoore, updated 🕥 2022-06-21 21:07:41

QuantStart Forex

QSForex is an open-source event-driven backtesting and live trading platform for use in the foreign exchange ("forex") markets, currently in an "alpha" state.

It has been created as part of the Forex Trading Diary series on QuantStart.com to provide the systematic trading community with a robust trading engine that allows straightforward forex strategy implementation and testing.

The software is provided under a permissive "MIT" license (see below).

Current Features

  • Open-Source - QSForex has been released under an extremely permissive open-source MIT License, which allows full usage in both research and commercial applications, without restriction, but with no warranty of any kind whatsoever.
  • Free - QSForex is completely free and costs nothing to download or use.
  • Collaboration - As QSForex is open-source many developers collaborate to improve the software. New features are added frequently. Any bugs are quickly determined and fixed.
  • Software Development - QSForex is written in the Python programming language for straightforward cross-platform support. QSForex contains a suite of unit tests for the majority of its calculation code and new tests are constantly added for new features.
  • Event-Driven Architecture - QSForex is completely event-driven both for backtesting and live trading, which leads to straightforward transitioning of strategies from a research/testing phase to a live trading implementation.
  • Transaction Costs - Spread costs are included by default for all backtested strategies.
  • Backtesting - QSForex features intraday tick-resolution multi-day multi-currency pair backtesting.
  • Trading - QSForex currently supports live intraday trading using the OANDA Brokerage API across a portfolio of pairs.
  • Performance Metrics - QSForex currently supports basic performance measurement and equity visualisation via the Matplotlib and Seaborn visualisation libraries.

Installation and Usage

1) Visit http://www.oanda.com/ and setup an account to obtain the API authentication credentials, which you will need to carry out live trading. I explain how to carry this out in this article: https://www.quantstart.com/articles/Forex-Trading-Diary-1-Automated-Forex-Trading-with-the-OANDA-API.

2) Clone this git repository into a suitable location on your machine using the following command in your terminal: git clone https://github.com/mhallsmoore/qsforex.git. Alternative you can download the zip file of the current master branch at https://github.com/mhallsmoore/qsforex/archive/master.zip.

3) Create a set of environment variables for all of the settings found in the settings.py file in the application root directory. Alternatively, you can "hard code" your specific settings by overwriting the os.environ.get(...) calls for each setting:

```

The data directory used to store your backtesting CSV files

CSV_DATA_DIR = "/path/to/your/csv/data/dir"

The directory where the backtest.csv and equity.csv files

will be stored after a backtest is carried out

OUTPUT_RESULTS_DIR = "/path/to/your/output/results/dir"

Change DOMAIN to "real" if you wish to carry out live trading

DOMAIN = "practice"

Your OANDA API Access Token (found in your Account Details on their website)

ACCESS_TOKEN = "1234123412341234"

Your OANDA Account ID (found in your Account Details on their website)

ACCOUNT_ID = "1234123412341234"

Your base currency (e.g. "GBP", "USD", "EUR" etc.)

BASE_CURRENCY = "GBP"

Your account equity in the base currency (for backtesting)

EQUITY = Decimal("100000.00") ```

4) Create a virtual environment ("virtualenv") for the QSForex code and utilise pip to install the requirements. For instance in a Unix-based system (Mac or Linux) you might create such a directory as follows by entering the following commands in the terminal:

mkdir -p ~/venv/qsforex cd ~/venv/qsforex virtualenv .

This will create a new virtual environment to install the packages into. Assuming you downloaded the QSForex git repository into an example directory such as ~/projects/qsforex/ (change this directory below to wherever you installed QSForex), then in order to install the packages you will need to run the following commands:

source ~/venv/qsforex/bin/activate pip install -r ~/projects/qsforex/requirements.txt

This will take some time as NumPy, SciPy, Pandas, Scikit-Learn and Matplotlib must be compiled. There are many packages required for this to work, so please take a look at these two articles for more information:

  • https://www.quantstart.com/articles/Quick-Start-Python-Quantitative-Research-Environment-on-Ubuntu-14-04
  • https://www.quantstart.com/articles/Easy-Multi-Platform-Installation-of-a-Scientific-Python-Stack-Using-Anaconda

You will also need to create a symbolic link from your site-packages directory to your QSForex installation directory in order to be able to call import qsforex within the code. To do this you will need a command similar to the following:

ln -s ~/projects/qsforex/ ~/venv/qsforex/lib/python2.7/site-packages/qsforex

Make sure to change ~/projects/qsforex to your installation directory and ~/venv/qsforex/lib/python2.7/site-packages/ to your virtualenv site packages directory.

You will now be able to run the subsequent commands correctly.

Practice/Live Trading

5) At this stage, if you simply wish to carry out practice or live trading then you can run python trading/trading.py, which will use the default TestStrategy trading strategy. This simply buys or sells a currency pair every 5th tick. It is purely for testing - do not use it in a live trading environment!

If you wish to create a more useful strategy, then simply create a new class with a descriptive name, e.g. MeanReversionMultiPairStrategy and ensure it has a calculate_signals method. You will need to pass this class the pairs list as well as the events queue, as in trading/trading.py.

Please look at strategy/strategy.py for details.

Backtesting

6) In order to carry out any backtesting it is necessary to generate simulated forex data or download historic tick data. If you wish to simply try the software out, the quickest way to generate an example backtest is to generate some simulated data. The current data format used by QSForex is the same as that provided by the DukasCopy Historical Data Feed at https://www.dukascopy.com/swiss/english/marketwatch/historical/.

To generate some historical data, make sure that the CSV_DATA_DIR setting in settings.py is to set to a directory where you want the historical data to live. You then need to run generate_simulated_pair.py, which is under the scripts/ directory. It expects a single command line argument, which in this case is the currency pair in BBBQQQ format. For example:

cd ~/projects/qsforex python scripts/generate_simulated_pair.py GBPUSD

At this stage the script is hardcoded to create a single month's data for January 2014. That is, you will see individual files, of the format BBBQQQ_YYYYMMDD.csv (e.g. GBPUSD_20140112.csv) appear in your CSV_DATA_DIR for all business days in that month. If you wish to change the month/year of the data output, simply modify the file and re-run.

7) Now that the historical data has been generated it is possible to carry out a backtest. The backtest file itself is stored in backtest/backtest.py, but this only contains the Backtest class. To actually execute a backtest you need to instantiate this class and provide it with the necessary modules.

The best way to see how this is done is to look at the example Moving Average Crossover implementation in the examples/mac.py file and use this as a template. This makes use of the MovingAverageCrossStrategy which is found in strategy/strategy.py. This defaults to trading both GBP/USD and EUR/USD to demonstrate multiple currency pair usage. It uses data found in CSV_DATA_DIR.

To execute the example backtest, simply run the following:

python examples/mac.py

This will take some time. On my Ubuntu desktop system at home, with the historical data generated via generate_simulated_pair.py, it takes around 5-10 mins to run. A large part of this calculation occurs at the end of the actual backtest, when the drawdown is being calculated, so please remember that the code has not hung up! Please leave it until completion.

8) If you wish to view the performance of the backtest you can simply use output.py to view an equity curve, period returns (i.e. tick-to-tick returns) and a drawdown curve:

python backtest/output.py

And that's it! At this stage you are ready to begin creating your own backtests by modifying or appending strategies in strategy/strategy.py and using real data downloaded from DukasCopy (https://www.dukascopy.com/swiss/english/marketwatch/historical/).

If you have any questions about the installation then please feel free to email me at [email protected]

If you have any bugs or other issues that you think may be due to the codebase specifically, feel free to open a Github issue here: https://github.com/mhallsmoore/qsforex/issues

License Terms

Copyright (c) 2015 Michael Halls-Moore

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Forex Trading Disclaimer

Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. Past performance is not indicative of future results. The high degree of leverage can work against you as well as for you. Before deciding to invest in foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts.

Issues

Bump numpy from 1.9.2 to 1.22.0

opened on 2022-06-21 21:07:37 by dependabot[bot]

Bumps numpy from 1.9.2 to 1.22.0.

Release notes

Sourced from numpy's releases.

v1.22.0

NumPy 1.22.0 Release Notes

NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

  • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
  • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
  • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
  • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
  • A new configurable allocator for use by downstream projects.

These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

Expired deprecations

Deprecated numeric style dtype strings have been removed

Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

(gh-19539)

Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

(gh-19615)

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mhallsmoore/qsforex/network/alerts).

Bump ipython from 3.1.0 to 7.16.3

opened on 2022-01-21 18:56:51 by dependabot[bot]

Bumps ipython from 3.1.0 to 7.16.3.

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mhallsmoore/qsforex/network/alerts).

Bump urllib3 from 1.10.4 to 1.26.5

opened on 2021-06-01 21:43:06 by dependabot[bot]

Bumps urllib3 from 1.10.4 to 1.26.5.

Release notes

Sourced from urllib3's releases.

1.26.5

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed deprecation warnings emitted in Python 3.10.
  • Updated vendored six library to 1.16.0.
  • Improved performance of URL parser when splitting the authority component.

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

1.26.4

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

1.26.3

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed bytes and string comparison issue with headers (Pull #2141)

  • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme (Pull #2107)

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

1.26.2

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

1.26.1

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

1.26.0

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

  • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning should opt-in explicitly by setting ssl_version=ssl.PROTOCOL_TLSv1_1 (Pull #2002) Starting in urllib3 v2.0: Connections that receive a DeprecationWarning will fail

  • Deprecated Retry options Retry.DEFAULT_METHOD_WHITELIST, Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST and Retry(method_whitelist=...) in favor of Retry.DEFAULT_ALLOWED_METHODS, Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT, and Retry(allowed_methods=...) (Pull #2000) Starting in urllib3 v2.0: Deprecated options will be removed

... (truncated)

Changelog

Sourced from urllib3's changelog.

1.26.5 (2021-05-26)

  • Fixed deprecation warnings emitted in Python 3.10.
  • Updated vendored six library to 1.16.0.
  • Improved performance of URL parser when splitting the authority component.

1.26.4 (2021-03-15)

  • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

1.26.3 (2021-01-26)

  • Fixed bytes and string comparison issue with headers (Pull #2141)

  • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme. (Pull #2107)

1.26.2 (2020-11-12)

  • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

1.26.1 (2020-11-11)

  • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

1.26.0 (2020-11-10)

  • NOTE: urllib3 v2.0 will drop support for Python 2. Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>_.

  • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

  • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning

... (truncated)

Commits
  • d161647 Release 1.26.5
  • 2d4a3fe Improve performance of sub-authority splitting in URL
  • 2698537 Update vendored six to 1.16.0
  • 07bed79 Fix deprecation warnings for Python 3.10 ssl module
  • d725a9b Add Python 3.10 to GitHub Actions
  • 339ad34 Use pytest==6.2.4 on Python 3.10+
  • f271c9c Apply latest Black formatting
  • 1884878 [1.26] Properly proxy EOF on the SSLTransport test suite
  • a891304 Release 1.26.4
  • 8d65ea1 Merge pull request from GHSA-5phf-pp7p-vc2r
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mhallsmoore/qsforex/network/alerts).

Bump requests from 2.7.0 to 2.20.0

opened on 2019-10-18 17:03:02 by dependabot[bot]

Bumps requests from 2.7.0 to 2.20.0.

Changelog *Sourced from [requests's changelog](https://github.com/psf/requests/blob/master/HISTORY.md).* > 2.20.0 (2018-10-18) > ------------------- > > **Bugfixes** > > - Content-Type header parsing is now case-insensitive (e.g. > charset=utf8 v Charset=utf8). > - Fixed exception leak where certain redirect urls would raise > uncaught urllib3 exceptions. > - Requests removes Authorization header from requests redirected > from https to http on the same hostname. (CVE-2018-18074) > - `should_bypass_proxies` now handles URIs without hostnames (e.g. > files). > > **Dependencies** > > - Requests now supports urllib3 v1.24. > > **Deprecations** > > - Requests has officially stopped support for Python 2.6. > > 2.19.1 (2018-06-14) > ------------------- > > **Bugfixes** > > - Fixed issue where status\_codes.py's `init` function failed trying > to append to a `__doc__` value of `None`. > > 2.19.0 (2018-06-12) > ------------------- > > **Improvements** > > - Warn user about possible slowdown when using cryptography version > < 1.3.4 > - Check for invalid host in proxy URL, before forwarding request to > adapter. > - Fragments are now properly maintained across redirects. (RFC7231 > 7.1.2) > - Removed use of cgi module to expedite library load time. > - Added support for SHA-256 and SHA-512 digest auth algorithms. > - Minor performance improvement to `Request.content`. > - Migrate to using collections.abc for 3.7 compatibility. > > **Bugfixes** > > - Parsing empty `Link` headers with `parse_header_links()` no longer > return one bogus entry. > ... (truncated)
Commits - [`bd84045`](https://github.com/psf/requests/commit/bd840450c0d1e9db3bf62382c15d96378cc3a056) v2.20.0 - [`7fd9267`](https://github.com/psf/requests/commit/7fd9267b3bab1d45f5e4ac0953629c5531ecbc55) remove final remnants from 2.6 - [`6ae8a21`](https://github.com/psf/requests/commit/6ae8a2189235b62d7c5b2a6b95528750f046097c) Add myself to AUTHORS - [`89ab030`](https://github.com/psf/requests/commit/89ab030cdb83a728a30e172bc65d27ba214d2eda) Use comprehensions whenever possible - [`2c6a842`](https://github.com/psf/requests/commit/2c6a8426aebd853966747f2c851f551c583cb21a) Merge pull request [#4827](https://github-redirect.dependabot.com/requests/requests/issues/4827) from webmaven/patch-1 - [`30be889`](https://github.com/psf/requests/commit/30be889651e7034eaa56edaf5794d68ffbfde9ed) CVE URLs update: www sub-subdomain no longer valid - [`a6cd380`](https://github.com/psf/requests/commit/a6cd380c640087218695bc7c62311a4843777e43) Merge pull request [#4765](https://github-redirect.dependabot.com/requests/requests/issues/4765) from requests/encapsulate_urllib3_exc - [`bbdbcc8`](https://github.com/psf/requests/commit/bbdbcc8f0553f112ff68b0950b4128bd8af000fc) wrap url parsing exceptions from urllib3's PoolManager - [`ff0c325`](https://github.com/psf/requests/commit/ff0c325014f817095de35013d385e137b111d6e8) Merge pull request [#4805](https://github-redirect.dependabot.com/requests/requests/issues/4805) from jdufresne/https - [`b0ad249`](https://github.com/psf/requests/commit/b0ad2499c8641d29affc90f565e6628d333d2a96) Prefer https:// for URLs throughout project - Additional commits viewable in [compare view](https://github.com/requests/requests/compare/v2.7.0...v2.20.0)


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/mhallsmoore/qsforex/network/alerts).

change the instrument pair format from 'aaabbb' to 'aaa_bbb'

opened on 2017-11-19 17:40:33 by zhuyuecai

the format of pair string is too hard coded. Thus the whole package can only deal with pure currency pairs. But for some new supported product, it doesn't work at all, ex:AU200_AUD, wheat_usd, etc. The format should be changed such that instead of instrument = "%s_%s" % (event.instrument[:3], event.instrument[3:]) we can simply input the pair string. and we just need pair.split('_') to get the list of the two instrument.

moreover, why not use some oanda api wrapper to do the execution instead of writing our own? There are well developed python wrappers for v1 and v20 account, we just need to do an conditional import

V20 Friendly

opened on 2017-03-15 23:26:40 by maxss280 None
Michael Halls-Moore

Senior Engineer

GitHub Repository Homepage