Giter Site home page Giter Site logo

zbanga / fxcm_currency Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 33.0 58.54 MB

Using Machine Learning for live currency trading

Jupyter Notebook 100.00%
live-trading fxcm currency machine-learning machinelearningfinance machine-learning-finance machine-learning-for-trading machine-learning-for-finance forex-prediction

fxcm_currency's Introduction

FXCM_currency

Using a simple machine learning model with a Logistic Regression model to predict and trade currencies. Currently it is on fixed/static time prediction (next bar), improvements will be used for varying forward time window prediction(Instead of using 5 min bars to predict the next 5 mins, aim to predict longer ahead)

Another interesting idea is trying to predict over an amount (basically transaction costs). Will aim to bin the data after minusing the transaction costs.

Example: https://github.com/SolbiatiAlessandro/RNN-stocks-prediction (dynamic prediction).

Also will aim to look at or account for variable change in prediction, say you in are currently in a trade but new data (or news) comes in suggesting that the current prediction is no longer accurate (try to minimise position or close out the current position).

Live trading is being implemented and working rudementary (trade at your own risk)

Documentation for FXCM API: http://fxcmpy.tpq.io/

Adpated from and credits go to : http://hilpisch.com/fxcm_ai.html

Download or install jupyter notebook to view files

Add your token from FXCM to the fxcm.cfg to start trading (Create a demo account and login to https://tradingstation.fxcm.com/ and find the token (should be under account)

Unique implimentation of this is binning the data according to voltility

Results:

Out-of-sample:

alt tag

Out-of-sample with transaction costs:

Assuming FXCM active traders costs

alt tag

In-sample:

alt tag

fxcm_currency's People

Contributors

mgazzin avatar zbanga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fxcm_currency's Issues

Make Pickle

Save model in pickle form and keep track of it

execution error

System: Ubuntu 16.4
python: 3
running in jupyter Notebook
File: TripleBarrier.ipynb
`NameError Traceback (most recent call last)
in
----> 1 data_in[cols].iplot()

NameError: name 'cols' is not defined`

File: Automated Algo.ipynb
`eyError Traceback (most recent call last)
in
----> 1 data.iplot()

~/anaconda3/lib/python3.7/site-packages/cufflinks/plotlytools.py in _iplot(self, kind, data, layout, filename, sharing, title, xTitle, yTitle, zTitle, theme, colors, colorscale, fill, width, dash, mode, interpolation, symbol, size, barmode, sortbars, bargap, bargroupgap, bins, histnorm, histfunc, orientation, boxpoints, annotations, keys, bestfit, bestfit_colors, mean, mean_colors, categories, x, y, z, text, gridcolor, zerolinecolor, margin, labels, values, secondary_y, secondary_y_title, subplots, shape, error_x, error_y, error_type, locations, lon, lat, asFrame, asDates, asFigure, asImage, dimensions, asPlot, asUrl, online, **kwargs)
1156 sharing='private'
1157 if sharing is None:
-> 1158 sharing=auth.get_config_file()['sharing']
1159
1160 if not filename:

KeyError: 'sharing'`

Running the code

Can you walk through running the code? Is it just copying this code into a python script? If that is the case, my results after commission are much lower than the images you show.

image

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.