• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 6:13pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:13pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Algorithmic Quant Trading (Machine Learning + Stat-Arb) 25 replies

Forex with Machine Learning Software Project 1 reply

Machine Learning + Retail Forex = Profitable? (Quant) 1 reply

Potential new machine learning style software. 79 replies

My most recent advancements into machine learning 16 replies

  • Trading Discussion
  • /
  • Reply to Thread
  • Subscribe
  • 233
Attachments: Machine Learning with algoTraderJo
Exit Attachments
Tags: Machine Learning with algoTraderJo
Cancel

Machine Learning with algoTraderJo

  • Last Post
  •  
  • 1 4243444546 Page 47
  • 1 444546 Page 47
  •  
  • Post #921
  • Quote
  • May 30, 2018 3:34pm May 30, 2018 3:34pm
  •  Roffild
  • | Joined May 2018 | Status: Member | 18 Posts
Random Forest is easier to train because it is less prone to noise.
On Forex it is impossible to separate the noise from real data.
 
 
  • Post #922
  • Quote
  • May 30, 2018 3:50pm May 30, 2018 3:50pm
  •  MariaEduard
  • | Additional Username | Joined Apr 2018 | 238 Posts
Quoting Roffild
Disliked
On Forex it is impossible to separate the noise from real data.
Ignored
Can you elaborate this statement, please? By the way, do you prefer technical & fundamental both, or any specific one?
 
 
  • Post #923
  • Quote
  • May 30, 2018 7:06pm May 30, 2018 7:06pm
  •  synicz
  • Joined Jan 2017 | Status: Member | 627 Posts
Quoting Roffild
Disliked
Random Forest is easier to train because it is less prone to noise. On Forex it is impossible to separate the noise from real data.
Ignored
Unfortunately that statement is not quite true.
While RF do reduce variance in your forecast, they are not "less prone to noise". Your forecasts are likely to be more stable but it is still affected by noise (AKA bias).

Another property of RF that makes it not quite desirable for time series data such as FX is the method of sampling. As time series have a natural temporal ordering, random sampling may distort or erode some key information or pattern, or worse, create fictatious ones! Although the workaround this is rather simple.
I look for value wherever it can be found
 
1
  • Post #924
  • Quote
  • May 30, 2018 7:07pm May 30, 2018 7:07pm
  •  synicz
  • Joined Jan 2017 | Status: Member | 627 Posts
Interesting thread btw. Any quants in here?
I look for value wherever it can be found
 
1
  • Post #925
  • Quote
  • May 30, 2018 7:39pm May 30, 2018 7:39pm
  •  Roffild
  • | Joined May 2018 | Status: Member | 18 Posts
Quoting MariaEduard
Disliked
{quote} Can you elaborate this statement, please? By the way, do you prefer technical & fundamental both, or any specific one?
Ignored
When learning a neural network on the basis of pictures, a person can precisely specify the class of the object being recognized. For example, you can select images on which an orange or an apple. On the price chart there is no such exact division into classes. What is noise on the price chart?

I do not separate noise from real data, because a random forest is less prone to this factor than neural networks.

It is possible to construct a random forest on a learning sample. Then, this sample is divided by random forest into classes for the subsequent training of the neural network.
 
 
  • Post #926
  • Quote
  • Jun 19, 2018 8:12am Jun 19, 2018 8:12am
  •  herbie88
  • | Joined Jan 2018 | Status: Member | 63 Posts
Currently, reinforcement learning (RL) doesn't actually work in reality at least for Boston Dynamics.'' Apart from very very basic motor tasks or simple deterministic games, reinforcement learning doesn’t work at all outside of simulation'' https://www.quora.com/How-does-Bosto...chine-learning
Anyone with any comment about application of reinforcement learning in trading?
 
 
  • Post #927
  • Quote
  • Jun 29, 2018 2:15pm Jun 29, 2018 2:15pm
  •  vladi1979
  • | Joined Oct 2015 | Status: Member | 16 Posts
Quoting herbie88
Disliked
Anyone with any comment about application of reinforcement learning in trading?
Ignored
I wrote a blog about statistical control of trades including using RL to do so.

https://vladdsm.github.io/myblog_att...alControl.html

My implementation in trading is to use RL to supervise many standalone EA's and to let it choose the best ones. I tried it several times to finally realize that principle is working at least on the extent to limit losses.

Implementation is based on this vignette
 
 
  • Post #928
  • Quote
  • Aug 17, 2018 5:47am Aug 17, 2018 5:47am
  •  coolsnake
  • | Joined Dec 2009 | Status: Member | 12 Posts
ML is interesting method to do trading. I like to study it. Thanks.
 
 
  • Post #929
  • Quote
  • Edited 6:52pm Oct 7, 2018 6:32pm | Edited 6:52pm
  •  michaellobry
  • Joined Dec 2013 | Status: Member | 727 Posts
Quoting algoTraderJo
Disliked
Hello fellow traders, I am starting this thread hoping to share with you some of my developments in the field of machine learning. Although I may not share with you exact systems or coding implementations (don't expect to get anything to "plug-and-play" and get rich from this thread) I will share with you ideas, results of my experiment and possibly other aspects of my work. I am starting this thread in the hopes that we will be able to share ideas and help each other improve our implementations. I will start with some simple machine learning strategies...
Ignored
Hello algoTraderJo, thank you very much for creating this thread. I'm very happy and appreciate it a lot. Can I ask some questions?

I've read these links about ML (machine learning):
- https://sigmoidal.io/machine-learning-for-trading/
- https://www.quora.com/How-would-one-...-of-the-market
- https://www.forexfactory.com/showthread.php?t=467452
- https://www.forexfactory.com/showthread.php?t=795902

Question:
1. I aim to develop in and learn about ML. I didn't study ML yet. At university I never studied Math, CS or data science, so is linear algebra required for learning ML? My goal is only to implement ML aspects in my trade manager.mq4 EA.

2. What are some examples of ML that I can integrate in my trade manager.mq4? This EA uses indicators (oscillators, bands, MA's, volume indicators), rules and filters. With ML you split algorithms in line with alphas, but what are specific ML examples for this?

3. I read that the best way to get started with ML is doing the udemy and udacity course. What do you recommend additionally? Remember, my goal is only integrating in my TM.mq4 EA (coding in mql4). I have basic proficiency in Python, Cpp and Java.

Thank you in advance.
Join our skype group.
 
 
  • Post #930
  • Quote
  • Edited 3:26am May 27, 2019 3:05am | Edited 3:26am
  •  scherzi
  • Joined Aug 2013 | Status: Member | 582 Posts
Quoting herbie88
Disliked
Currently, reinforcement learning (RL) doesn't actually work in reality at least for Boston Dynamics.'' Apart from very very basic motor tasks or simple deterministic games, reinforcement learning doesn’t work at all outside of simulation'' https://www.quora.com/How-does-Bosto...chine-learning Anyone with any comment about application of reinforcement learning in trading?
Ignored
Financial data exploitation using non-deterministic scenarios (environments) such as Forex data began using Monte Carlo prediction. The problem is that for high-dimensionality scenarios like Forex, it seems that Monte Carlo does not work well.

https://medium.com/deep-math-machine-learning-ai

For those who try to let a RL agent alone to learn FX, the environment has so many different dimensions (like trends, waves, candle combinations, relative price positions, momentum, etc...) that designing the different states information, the possible actions, etc... would require thousands, if not millions, of possible combined features for your adjacency matrices.

So with RL for Forex we should think about using non-linear analysis. Instead of calculating the Q(a,s) value and the Belmann equation, just use a neural network to represent your Q(a,s) value for a certain state and action.

But again. The more the dimensionality the more the complexisty and inefficiency.

I think it is better to apply the above on a predefined strategy that will reduce exponentially the complexity of the problem and allow designing much more accurate and understandable action and state models.

Therefore, if Monte Carlo and Markov have not been good enough to deal with your RL problem, try deep learning or something like that.

However, you will also face a second issue: you will need to implement a bridge application to allow your agent to perform real trading using your broker's EA, MT4 sockets or whatever.

As well as a money and trade management system in the long-term.
 
 
  • Post #931
  • Quote
  • May 27, 2019 4:50am May 27, 2019 4:50am
  •  mjk.metso
  • | Joined Jan 2018 | Status: Member | 18 Posts
Quoting scherzi
Disliked
{quote} Financial data exploitation using non-deterministic scenarios (environments) such as Forex data began using Monte Carlo prediction. The problem is that for high-dimensionality scenarios like Forex, it seems that Monte Carlo does not work well. https://medium.com/deep-math-machine-learning-ai For those who try to let a RL agent alone to learn FX, the environment has so many different dimensions (like trends, waves, candle combinations, relative price positions, momentum, etc...) that designing the different states information,...
Ignored
Q-learning is not a good fit for forex as it is not fit for continuous tasks even with a neural network implementation such as DQN or DDQN (I actually have a DDQN+PER setup that I can plug in to my broker). I would go with policy gradient methods as they are more suited for stochastic environments and continuous tasks.

If people are interested I could start a journal for my development of AI for the purpose of forex trading. I'm an university student doing my data science/software engineering degree with a minor in AI so I'm not sure how often I would have time to update the journal but it might be interesting for those who are also interested in the topic of AI and trading.
 
1
  • Post #932
  • Quote
  • Edited 7:52am May 27, 2019 4:58am | Edited 7:52am
  •  scherzi
  • Joined Aug 2013 | Status: Member | 582 Posts
Quoting mjk.metso
Disliked
{quote} Q-learning is not a good fit for forex as it is not fit for continuous tasks even with a neural network implementation such as DQN or DDQN (I actually have a DDQN+PER setup that I can plug in to my broker). I would go with policy gradient methods as they are more suited for stochastic environments and continuous tasks. If people are interested I could start a journal for my development of AI for the purpose of forex trading. I'm an university student doing my data science/software engineering degree with a minor in AI so I'm not sure how...
Ignored
Indeed, network memory issues must be also resolved. It is not just plug and play

I forgot to mention this:
https://github.com/keras-rl/keras-rl
 
 
  • Post #933
  • Quote
  • May 27, 2019 8:03am May 27, 2019 8:03am
  •  scherzi
  • Joined Aug 2013 | Status: Member | 582 Posts
One small detail you may not notice when checking the keras-rl repo.

https://soygema.github.io/starcraftI...ne_learning/#0

 
 
  • Post #934
  • Quote
  • May 27, 2019 2:24pm May 27, 2019 2:24pm
  •  mjk.metso
  • | Joined Jan 2018 | Status: Member | 18 Posts
Quoting scherzi
Disliked
One small detail you may not notice when checking the keras-rl repo. https://soygema.github.io/starcraftI...ne_learning/#0
Ignored
Didn't even know Keras-rl was a thing haha. I prefer writing my own implementations (also kinda required when studying software engineering ).
 
1
  • Post #935
  • Quote
  • May 27, 2019 3:28pm May 27, 2019 3:28pm
  •  scherzi
  • Joined Aug 2013 | Status: Member | 582 Posts
Quoting mjk.metso
Disliked
{quote} Didn't even know Keras-rl was a thing haha. I prefer writing my own implementations (also kinda required when studying software engineering ).
Ignored
I tried a few years ago unsupervised or partially supervised learning and the results did not satisfy me. Therefore, what I spend time on is identifying patterns I can define as deterministic states, so that the problem becomes how to optimize a solution to something that can has already and repeteadily solved manually. I take the technical analysis approach, but each one chooses the way that better suits him/her.

I think it is important to spend time learning to read the markets and understanding what is actually a profitable pattern.

I have to leave.

Nice chat.

Bye.
 
1
  • Post #936
  • Quote
  • Edited 12:12pm Nov 9, 2019 12:01pm | Edited 12:12pm
  •  deergo
  • | Joined Aug 2009 | Status: Busy | 28 Posts
Out of curiosity I went to https://asirikuy.com/ which the original poster uses in the first few posts, just to check out the platform, it turns out they're not accepting new members, I know its been a while since the original post but its surprising the service is running but not taking new members. Doesn't look like an established company, not polished enough or maybe just a bit out of date.
 
 
  • Post #937
  • Quote
  • Nov 7, 2020 9:13pm Nov 7, 2020 9:13pm
  •  mirko2017
  • | Joined Nov 2018 | Status: Member | 42 Posts
Hello, I want to ask you, if someone has information about how can I use Empirical Mode Decomposition (EMD) model together with NARX model in Deep Learning. I saw in Internet that with combined model EMD-NARX we can achieve 0,99999998 accuracy in predicting every 5min bar on EURUSD in FOREX market.
I want to predict the CLOSE price of the candle on EUR/USD, for example.
I want to use OHLC data of the three curences, for example EURUSD, USDJPY and EURJPY, to use theirs correlation between them, as so called triangular arbitrage. Also I am thinking if I can use tick by tick data together with OHLC data as input for training of my NARX model. Maybe it could be better for prediction.
Can you help me, please.
 
1
  • Post #938
  • Quote
  • Feb 3, 2021 6:21pm Feb 3, 2021 6:21pm
  •  andrea182
  • | Joined Jan 2010 | Status: Member | 124 Posts
Hi,
I’ve created all the model described by AlgotraderJo at post 423 with MT4 and Python as described in the connection between this 2 solution in this project ( https://github.com/dingmaotu/mql-zmq )
Attached you can find the following files:

· ServerAlgoTraderJo-LinearRegression-MLEMSE.py is the server and it’s should be started before start the ea on MT4
· RetrainLinearRegressionPythonMLEMSE.mq4 is the client that creates the data sample for retrain the model at each new candle and
· Include, Library and Script downloaded from https://github.com/dingmaotu/mql-zmq in order to test the integration between the platform (I suggest you to first execute this library and scripts with success)

The model is (or at least should be) equal the model described by algotraderjo, the expert advisor should be attached at 1h EURUSD chart and has the following external variable:

· TradingHour = 2 represent the hour in order to take the decision (A value of AlgotraderJo)
· timestamp = 3; Number of timestamp used for train the mode (C value of AlgotraderJo)
· trainSample = 5; Number of sample in order to train the model (B value of AlgotraderJo)
· futureBar =23; Number of bar used to calculate MLE and MSE in order to train the model (D value of algotraderJo)
· ATRFactor = 1; used for the calculation of the stop loss
· feature = 1; it’s something more than that’s presented by AlgotraderJo and there are 3 possible value (1 for open(t)-open(t-1)/open(t-1), 2 for open(t)-open(t-1)/open(t-1) and open(t)-high(t-1)/high(t-1), 3 for open(t)-open(t-1)/open(t-1) and open(t)-high(t-1)/high(t-1) and open(t)-high(t-1)/high(t-1)
Below is a backtest with the data extracted from Tickstory and GMT corrected as described in this thread.
Attached Image (click to enlarge)
Click to Enlarge

Name: cc7f42d35216c39716513b108527ba17.png
Size: 33 KB



If someone want to help me with further development of this model please contact me.
Thanks,
Andrea182
Attached File(s)
File Type: rar AlgoTraderJoMT4.rar   978 KB | 187 downloads
 
2
  • Post #939
  • Quote
  • Feb 4, 2021 4:02am Feb 4, 2021 4:02am
  •  andrea182
  • | Joined Jan 2010 | Status: Member | 124 Posts
Hello,

in the image attached below you can find the result of the optimization process in more than 10 years of data

Attached Image (click to enlarge)
Click to Enlarge

Name: TesterGraph.gif
Size: 15 KB

Almost all the results are above 1 of PF...seems interesting...

Andrea182
 
 
  • Post #940
  • Quote
  • Last Post: Feb 7, 2021 7:28pm Feb 7, 2021 7:28pm
  •  patara
  • | Joined Aug 2015 | Status: Member | 52 Posts
I create lot of different profitable and very profitable strategies with machine learning algos in live trading and in out of sample tests .The problem is the strategy fades away after some time because the market range is keep changing.

The common practice of backtesting is to test the strategy on few years of training data from left to right and optimize it then hope it does not fall apart later in live trading.What I personally think is look at backward backtesting from right to left instead.

Example split the trainning data in small intervals like 2000-3000 bars according to price range.Create binary signals for each trainning data interval then feed and train the second ensemble model with these binary signals and trainning data intervals .The problem with this is how to form a historical trainning data chain-link for the second ensemble model?
 
 
  • Trading Discussion
  • /
  • Machine Learning with algoTraderJo
  • Reply to Thread
    • 1 4243444546 Page 47
    • 1 444546 Page 47
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023