Skip to content

apesternikov/FXCM_currency

 
 

Repository files navigation

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

About

Using Machine Learning for live currency trading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%