GithubHelp home page GithubHelp logo

forex's Introduction

Forex

  1. OandaHistoricalData.py : is for downloading Forex Data from Oanda, by using Oanda's provided rest api.

Get data in pandas dataframe using sample syntax like:

ohd = OandaHistoricalData()

df = ohd.getCandlesData(insrtument='GBP_USD', count=5, candleFormat='midpoint' ,granularity='H4', start=start_time, end=end_time, csv='Y')

OR

use download_all_data.py to download data from multiple instruments in csv format.

  1. download_all_data.py : is for downloading candle data of 10 currency insturments for different time-intervals When you run this code, set start_time, end_time, granualarities and instruments, as per your needs.
  • start_time = '2000-01-01 00:00'
  • end_time = '2018-05-20 22:00'
  • granularities = ['M1','M5','M15','M30','H1','H2','H4','H8','D','W','M']
  • insrtuments = ['EUR_USD','GBP_USD','USD_CAD','USD_CHF','USD_JPY','EUR_GBP','EUR_CHF','AUD_USD','EUR_JPY','GBP_JPY']
  1. download_one_instrument.py : is for downloading candle data of 1 currency insturments for specific time-interval. When you run this code, set start_time, end_time, granualarity and instrument, as per your needs.
  • start_time = '2017-06-01 00:00'
  • end_time = '2017-06-20 22:00'
  • granularity = 'H1'
  • insrtument = 'EUR_USD'
  1. WrangleOandaData.py : is for processing downloaded forex candle data, and adding columns like
  • Bollinger Band
  • High Low difference
  • High Open difference
  • Low Open difference
  • Percentage Change
  • Bands of pct change
  • Bands of pips change

You can modify this class to add your favorite studies.

  1. prepare_csv_for_deeplearning.py : is for creating csv files with processed data. It creates two csv files, one is with all columns, and other is with less columns, which are mainly focused on deep learning.

Do not forget to change following paths

  • oanda_file_dir = 'exact path where downloaded files are kept'
  • processed_oanda_file_dir = 'exact path where new processed csv files can be stored'

Dependecies

  • python 2.7
  • pandas
  • numpy
  • requests
  • json
  • datetime

forex's People

Contributors

dlaxon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.