Machine Learning

possible to have ML strategy based on one time frame and backtests done on another?

for example, lets say I want to create a strategy based on 4H timeframe but when i do back testing or learning I use lower timeframe data like 1min or tick, that way the backtesting or learning will be more accurate compared to OHLC of just 4H bars. thanks,
 
possible to have ML strategy based on one time frame and backtests done on another?

for example, lets say I want to create a strategy based on 4H timeframe but when i do back testing or learning I use lower timeframe data like 1min or tick, that way the backtesting or learning will be more accurate compared to OHLC of just 4H bars. thanks,

Yes, the backtester always runs on the 1 minute time frame. All higher time frame candles are created dynamically from the 1 minute candles as they are 'pushed' through the backtester in the same way as would happen when running on a live market. At the end of each 1 min candle the take-profit and stop-loss are checked (if set).

The backtester also runs during live/paper trading so you can compare 'simulated' trading at the same time as live trading. The only time the results may deviate is where very tight SL / TP have been set and both could have been triggered during a 1 minute candle - the backtester doesn't know which one happened first so takes a pessimistic view and assume SL hit first.

DeepThought builds it's own 1-min candles from ticks from the live market then stores them in an SQLite database for historical testing. I've tried to remove as much dependence on Metatrader as possible (only really using it as an order entry system) as Metatrader has been unreliable when accessing historical data and it's backtest results never seem to match actual results.

Hope that makes sense,

Cheers
 
kiwifxguy, I purchased your software and playing around with it. I know you mentioned that you are working on integrating deep-learning into your software. wondering if you have come across these two java based libraries that can do deep-learning...

http://deeplearning4j.org/
http://0xdata.com/h2o-2/

I know your app is in C++ so are you looking for a deep-learning package or going to write one from scratch?

Also regarding GP, I know your program can do GA but could it be possible to explore GP as well? something like Discipulus http://www.rmltech.com/products.aspx

and one last thing, possible to work on a algo that can find the best timeframe for trading based on ga or gp findings rather than finding parameters using GA for a specific timeframe?

thanks,
 
kiwifxguy, I purchased your software and playing around with it. I know you mentioned that you are working on integrating deep-learning into your software. wondering if you have come across these two java based libraries that can do deep-learning...

http://deeplearning4j.org/
http://0xdata.com/h2o-2/

I know your app is in C++ so are you looking for a deep-learning package or going to write one from scratch?

Also regarding GP, I know your program can do GA but could it be possible to explore GP as well? something like Discipulus http://www.rmltech.com/products.aspx

Hi KillerKhan,

For deep learning I've been more looking into libraries that use the GPU such as http://gpumlib.sourceforge.net. You could use a Python script (a 'python predictor') to interface between DeepThought and those Java libraries.

I may look at GP sometime but from what I've read, for trading systems where the patterns are weak and buried in noise, GP has a tendency to overfit and doesn't perform well on out of sample data. I'll need to do some more research on this and see if anyone has solved the problem of how to control for overfitting.

and one last thing, possible to work on a algo that can find the best timeframe for trading based on ga or gp findings rather than finding parameters using GA for a specific timeframe?

thanks,

Yes, this should be able to be done by changing the config for the bar series from

Code:
<bar-series>
    <identifier>EURUSDh4</identifier>
    <bar-series-type>const-time</bar-series-type>      
    <source type="bar-series">EURUSDm1</source>
    <history-source-type>bar-series</history-source-type>    
    <price-to-pip-multiplier>10000.0</price-to-pip-multiplier>
    <average-spread>0.0</average-spread>
    <bar-duration-minutes>240</bar-duration-minutes>
    <delay-minutes-offset>0</delay-minutes-offset>
  </bar-series>

to

Code:
<bar-series>
    <identifier>EURUSDh4</identifier>
    <bar-series-type>const-time</bar-series-type>      
    <source type="bar-series">EURUSDm1</source>
    <history-source-type>bar-series</history-source-type>    
    <price-to-pip-multiplier>10000.0</price-to-pip-multiplier>
    <average-spread>0.0</average-spread>
    [B]<bar-duration-minutes ga-subst="duration">240</bar-duration-minutes>[/B]
    <delay-minutes-offset>0</delay-minutes-offset>
  </bar-series>

and adding the following to the genetic algo section:
Code:
<genetic-algo>
    ...
    <parameter id="duration" type="integer" low="10" high="360" step="10" /> 
    ...
  </genetic-algo>

which will include durations of candles from 10 minutes to 6 hours in 10 minute increments.

If you want to limit the timeframes, use a categorical:

Code:
<parameter id="duration" type="categorical" values="20,45,60,90,120,180,240,360" />

Cheers
 
Hello Kiwifxguy,

Another vote for GP. 3 of such programs will be Trading System Lab (http://www.tradingsystemlab.com/), Adaptrade (www.adaptrade.com) and Chaos hunter (www.chaoshunter.com).

Best regards.

-zhao

Hi KillerKhan,

For deep learning I've been more looking into libraries that use the GPU such as http://gpumlib.sourceforge.net. You could use a Python script (a 'python predictor') to interface between DeepThought and those Java libraries.

I may look at GP sometime but from what I've read, for trading systems where the patterns are weak and buried in noise, GP has a tendency to overfit and doesn't perform well on out of sample data. I'll need to do some more research on this and see if anyone has solved the problem of how to control for overfitting.



Yes, this should be able to be done by changing the config for the bar series from

Code:
<bar-series>
    <identifier>EURUSDh4</identifier>
    <bar-series-type>const-time</bar-series-type>      
    <source type="bar-series">EURUSDm1</source>
    <history-source-type>bar-series</history-source-type>    
    <price-to-pip-multiplier>10000.0</price-to-pip-multiplier>
    <average-spread>0.0</average-spread>
    <bar-duration-minutes>240</bar-duration-minutes>
    <delay-minutes-offset>0</delay-minutes-offset>
  </bar-series>

to

Code:
<bar-series>
    <identifier>EURUSDh4</identifier>
    <bar-series-type>const-time</bar-series-type>      
    <source type="bar-series">EURUSDm1</source>
    <history-source-type>bar-series</history-source-type>    
    <price-to-pip-multiplier>10000.0</price-to-pip-multiplier>
    <average-spread>0.0</average-spread>
    [B]<bar-duration-minutes ga-subst="duration">240</bar-duration-minutes>[/B]
    <delay-minutes-offset>0</delay-minutes-offset>
  </bar-series>

and adding the following to the genetic algo section:
Code:
<genetic-algo>
    ...
    <parameter id="duration" type="integer" low="10" high="360" step="10" /> 
    ...
  </genetic-algo>

which will include durations of candles from 10 minutes to 6 hours in 10 minute increments.

If you want to limit the timeframes, use a categorical:

Code:
<parameter id="duration" type="categorical" values="20,45,60,90,120,180,240,360" />

Cheers
 
I tried the Dakota swarm system fom Biocomp but it wasn't profitable. Great idea that can't keep up with the irrational markets. I am reluctant to shell out thousands to just keep finding it isn't even profitable. One program EA looked fantastic on the MT5 strategy tester but lost from the first trade in real trading !
 
kiwifxguy, can we feel in csv files to deep-thought that have DoM data like market depth, not just OHLC? do you have a script that will export DoM from MT5 or another platform to use for deep-thought training and then when ready use same script for ongoing trading? thanks,
 
kiwifxguy, can we feel in csv files to deep-thought that have DoM data like market depth, not just OHLC? do you have a script that will export DoM from MT5 or another platform to use for deep-thought training and then when ready use same script for ongoing trading? thanks,

Hi KillerKhan,

This should be able to be achieved using the CSV feature. There's a tutorial here: http://www.deep-thought.co/tutorials/using-mt4-indicators. You'll need to modify the EA with your logic to extract the data for live trading. I haven't tested DeepThought with MT5 - are any brokers offering this for live trading yet?

Cheers
 
Hello Killerkhan,

You are right, but Trading System Lab must have made some major customisation as the price is very very expensive.

Best regards.

-zhao

Customization or not the fact is GP introduces data-mining bias because it continually ignores systems that do not perform well. I find it hard to accept that this data-mining bias can be reduced, save eliminated. Out of sample testing makes things even worse if used more than once with more that just one system. IMO the idea that some GP will find you a profitable system is questionable at its origin. I prefer strategy developing tools like Price Action Lab that work with mathematical price action in OHLC domain only and can be used in discretionary mode.
 
This '' machine learning'' software nothing but waste of money.It is a command line software(it is not a platform).The only technical support you get is '' read the manual , read the manual'' .He doesnt respond to emails.Mql files full of errors.if you are lucky to get respond to your email he expects you to fix those errors.I am learning to use Rapidminer and Weka.They have their own communities and there are plenty of support material on the net.And they are all FREE.
What a waste of 200 dollars.
 
This '' machine learning'' software nothing but waste of money.It is a command line software(it is not a platform).The only technical support you get is '' read the manual , read the manual'' .He doesnt respond to emails.Mql files full of errors.if you are lucky to get respond to your email he expects you to fix those errors.I am learning to use Rapidminer and Weka.They have their own communities and there are plenty of support material on the net.And they are all FREE.
What a waste of 200 dollars.

Hi Erkan (aka xyz1453),

Sorry you feel this way. However since you've posted in a public forum, I feel obligated to respond here. Your first email for support was:

I bought the DeepThought software about 6 month ago.But I am really struggling to understand how to use DeepThought software. Meantime during this 6 month I learnt to use Eureka software,Rapidminer, even Weka but I dont know what to do with DeepThought software. All I see is a command line nothing else.I dont know where to extract the indicator values in CSV file.I dont where this svm, random decision trees and other algos are.I see that you have written some scripts in python in the manual(pdf file) but I dont know where will I extract these codes? You mention of expert advisors in mql4 which I have never seen so far.I have created some indicators and trading systems in Chaos Hunter software.I saved them as text file but converting text file to CSV is not difficult.I want to do continous prediction/optimization (similar to this http://pybrain.org/docs/tutorial/optimization.html#continuous-optimization) for Chaos Hunter indicators and classification for Chaos Hunter buy-sell systems in DeepThought software.But I dont know how to use DeepThought software. Please help.

to which my response was

Thanks for your message. DeepThought is a commandline tool, and a GUI is in development. I'd strongly recommend that you read the manual as all the questions are answered there. You should also follow the tutorials here: http://www.deep-thought.co/tutorials and this blog: http://machinelearningtrading.wordpress.com/2014/01/30/a-single-svm-trading-strategy. The Metatrader EA's are in the DeepThought install dir (C:\DeepThought\Metatrader EA) and the Dll is in the folder C:\DeepThought\Metatrader DLL. If you haven't done so already, you should install the latest version as given in the update emails from http://...

I can only give specific responses to specific questions. It seemed that you hadn't read the manual or looked at the DeepThought tutorials which is the best way to understand the software.

In another email you mentioned errors in the EA, my reponse was

Are you using the latest version and did you put the DLL in the <metatrader install>\MQL4\Libraries folder? The MT4 introduced some breaking changes when they made MT4 the same as MT5. I'd also recommend starting MT4 with the /portable option as detailed here http://www.deep-thought.co/tutorials/using-mt4-indicators. Let me know if still not working and I'll email you the EA I'm using for live trading. MT4 also suffers from stability issues due to bugs in MT4, so making changes to the EA while it's attached to a chart can cause hangs/crashes. When I make changes I generally remove the EA, exit and restart MT4 then add the EA back to the chart.

Apologies for the late response, DeepThought is something I do in addition to my day job

It looked like you'd tried to run the EA without placing the DLL in the correct MT4 folder. At no point did I tell you to fix the errors yourself, unless you consider placing configs and DLLs in the correct place fixing it yourself. I also emailed you a copy of the EA and the DeepThought config I'm using for live trading (on EURUSD):

Attached is the EA I'm using in live trading. I'm using FXCM, so you may need to modify the symbols if using another broker. I've also attached the config I'm using and a python script it uses - use it at your own risk.

For optimisation, DeepThought uses a genetic algorithm which run on HTCondor. Details are given in the manual and a setup for HTCondor given in the appendix

I should also have mentioned that I'm in Australia so responses may be delayed depending on your timezone.

Anyway, best of luck autotrading MT4 with Rapidminer or Weka. I'll let the court of public opinion decide on this. I certainly hope this isn't going to turn into a flame war...

Cheers
Jonathan
 
Hi Jonathan ,

It is funny that you are very fast to respond in the public form and it is not timezone depended.You give your customer support in the forum :) ? Please do not forget you offer one year customer support I still have few months customer support left :) .

Anyway, I am not debating but I am frustrated and I am very dissapointed. Having a knowledge of something (AI , nuclear physic,heart surgery, etc...) is different , selling this knowlege is different.These are different skills....You must be clear and concise.You can not expect from everyone to hold B.S in computer science.

I purchased Chaos Hunter software which was expensive from Ward ,the CEO of Ward still answering my mails giving explanations with files and pictures.When necessary they give support via Teamwiever.They dont say here it is sort it out yourself.

Finding a programmer who can build a bridge(via DLL,library files ) between Rapidminer, Weka etc.. and Metatrader is not difficult and it doesnt take a phd build one.

Regards
 
Hi Jonathan ,


I purchased Chaos Hunter software which was expensive from Ward
Regards

I was interested in chaoshunter too but was put off by the price. I see you have gone onto other products ? Was ch a disappointment profit wise ??
 
Hi,

Yes indeed the Chaos Hunter software is expensive.There are similar (GP) free softwares like Eureka .But customer care with Ward is excellent.In particular Marge Sheralds is very helpful.

I created some indicators with CH which I hardly thought they would exist.I know how to take them to further stage with very advanced math with another software.And as I anticipated I created some very profitable( > % 83 winning percentage with low drawdown on majors and gold)'' out of sample'' buy-sell systems.The thing is GP ,NN and SVM's are prone to noise.If you know how to surf the noise, noise is your friend.

My thinking is get the CH results , use them as input in the commitee of NN's ,SVM'S,random forest trees(which is a subset of nearest neighbour algos) for regression and classification.Then do ensemble learning with self training NN.That is why at the begining Deepthought was so appealing to me.I am a lonely trader with little coding experience.I wish Deepthought was more customer care oriented ,I mean they would care more about their customers.
 
My thinking is get the CH results , use them as input in the commitee of NN's ,SVM'S,random forest trees(which is a subset of nearest neighbour algos) for regression and classification.Then do ensemble learning with self training NN.That is why at the begining Deepthought was so appealing to me.I am a lonely trader with little coding experience.I wish Deepthought was more customer care oriented ,I mean they would care more about their customers.

I think it is an excellent idea. Coding is also a problem in my case. I can do simple things but I have no experience for anything advances. This is one reason I got Price Action Lab but I'm still struggling to find the best risk/reward for currency pairs. If I manage that then I may use the output with an NN to determine the best configuration. Has anyone of you used Price Action Lab before and especially with forex data?
 
i cant download DeepThought Trial

i cant download DeepThought Trial, saying connection reset.Any idea ??

Krzysztof
 
Top