• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 1:27pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 1:27pm
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 2627Page 282930 47
  • 1 27Page 2829 47
  •  
  • Post #541
  • Quote
  • Jun 10, 2015 6:15pm Jun 10, 2015 6:15pm
  •  babelproofre
  • | Joined Oct 2009 | Status: Member | 23 Posts
Quote
Disliked
A question about the bootstrapping with replacement. Is that simply taking all the bars return (open to open) and switching them randomly around? Basically shaking the 100.000 bars keeping the beginning and end point?
Imagine a bag with 1000 marbles in it, where each marble is a single return. Bootstrap with replacement is taking one marble out, recording its value, and then putting it back in the bag, and repeating this another 999 times. Random permutation is taking all the marbles out, one at time without replacing them, until the bag is empty. Both of the above are single repetitions, so we must repeat the whole procedure again N times.
Quote
Disliked
Or is there more logic behind it? E.g. keep the switching within some time constraint (month/year).
This is much closer to a block bootstrap. Imagine a rod 1000 cms long, which we cut up into equal size lengths X ( e.g X = 5 cm ). These separate pieces are then treated exactly like the marbles above for the block bootstrap and block permutation respectively. The length X is typically chosen automatically, usually based upon the statistical significance of any auto correlation present in the time series.

Each of these procedures will produce different distributions to, obviously, test different null hypotheses.
 
 
  • Post #542
  • Quote
  • Edited 8:17pm Jun 10, 2015 7:31pm | Edited 8:17pm
  •  dfreeze
  • | Joined May 2015 | Status: Member | 11 Posts
Quoting surfeur
Disliked
{quote} You think that HMM are good for non linear time series ?
Ignored
In spite of being over my head, I can actually say yes I have reason to think so.

Non-linearity can be observed for different reasons, including changes in regimes -- transitions of an underlying hidden state. AFAIU, the work of Engel and Hamilton, Yuan (2013) and others supposes that there are fundamental states which correspond to and drive distinct market behaviors (i.e. distinct probability distributions for some feature set), and the transitions between these hidden states can be modeled from the observable data using a Markov switching process such as an HMM.

Some UW graduate lecture notes claim Markov regime-switching models have become "extremely popular" for modeling economic and financial time series including "business cycles, the term structure of interest rates, volatility in economic and financial variables, foreign exchange rate dynamics, inflation rate dynamics, etc."

There's a professed Ph.D. student in the Dukascopy community who posted an article last year describing an HMM he used to consistently outperform a random walk for a variety of currency pairs --- modeling regime transitions between up-trending, down-trending, and ranging states. And of course there's Kinlay's articles mentioned earlier (the website is slow but it loads).

So, yeah I do. But I have to cite other people's work cause I'm a little over my head. Just a few videos into mathematicalmonk's ML course. But the regime-switching idea seems really intuitive to me. Processes that are non-random have real-world dependencies, often hidden from view, and real-world things tend to exhibit persistence, whether they be interest rate differentials, MM agendas, lack thereof, the weather, or what-have-you. There's a persistence about the real world. My laptop isn't perpetually popping in & out of existence, and Mario Draghi isn't changing his mind back and forth 100x per second. Taking advantage of this the way HMMs do seems to be beneficial.
 
 
  • Post #543
  • Quote
  • Jun 11, 2015 12:41am Jun 11, 2015 12:41am
  •  KaBo
  • | Joined Dec 2014 | Status: Member | 32 Posts
Thanks babelproofre for the explanation. My question then is, why would we use the bootstrap with replacement? It would not keep the statistical information such as total up and down during the time. Wouldn't it make more sense to use the random permutation in our case to keep the statistical distribution equal?

In my tests the stops did not improve the results significantly but add one more parameter to test for bias. Daniel and the Asirikuy communitiy favor the all in (either long or short) method. Are your results with the stops significantly better, or do you have other reasons for it?
 
 
  • Post #544
  • Quote
  • Jun 11, 2015 9:26am Jun 11, 2015 9:26am
  •  babelproofre
  • | Joined Oct 2009 | Status: Member | 23 Posts
Quote
Disliked
My question then is, why would we use the bootstrap with replacement?
Well, it would depend on what you want to test, but generally a bootstrap with replacement would be used to measure the variability of a statistic of interest, e.g. confidence intervals. See https://en.wikipedia.org/wiki/Bootst...8statistics%29 for a more detailed description.
 
 
  • Post #545
  • Quote
  • Jun 13, 2015 7:50pm Jun 13, 2015 7:50pm
  •  ForexSamsam
  • | Joined Sep 2014 | Status: Member | 154 Posts
10 years (1994-2014) simulation with EURUSD with +0.8ATR =1 and -0.8*ATR =0
This with SVC with 104 samples and gamma = 0.006.
I encode my inputs with [-2,-1,0,1,2] with 6 days as inputs.
I use python Pandas with every tick to get this.

:-)
Attached Image (click to enlarge)
Click to Enlarge

Name: figure_1.png
Size: 41 KB
 
 
  • Post #546
  • Quote
  • Jun 14, 2015 8:59am Jun 14, 2015 8:59am
  •  ampleparking
  • | Joined May 2015 | Status: Member | 16 Posts
In my opinion it would be interesting to use the sample entropy instead of ATR to set the SL/TP thresholds.
 
 
  • Post #547
  • Quote
  • Jun 14, 2015 5:24pm Jun 14, 2015 5:24pm
  •  olsen-yersen
  • | Joined May 2011 | Status: Member | 222 Posts
Sample entropy to set the SL/TP ?That's intereting.Sample entropy alternative approach to measure random and deterministic elements in financial time series.Do you use Matlab code or can you give a link for sample entropy?
 
 
  • Post #548
  • Quote
  • Jun 14, 2015 6:45pm Jun 14, 2015 6:45pm
  •  ForexSamsam
  • | Joined Sep 2014 | Status: Member | 154 Posts
14 Years tick with SVC and 104 samples EUR_USD
I need a super computer !
Attached Image (click to enlarge)
Click to Enlarge

Name: figure_1.png
Size: 37 KB
 
 
  • Post #549
  • Quote
  • Jun 17, 2015 5:56pm Jun 17, 2015 5:56pm
  •  matinhas
  • | Joined Oct 2014 | Status: Member | 19 Posts
Quoting ForexSamsam
Disliked
14 Years tick with SVC and 104 samples EUR_USD I need a super computer ! {image}
Ignored
If your code is able to split the calculations by a big number of threads, this could be a solution: https://www.parallella.org/

I'm just making the first steps in ML, so I will not bore this thread with beginner questions. By the way, I have a server with 2x xeon quadcore, if you see it useful for your study, let me know.
 
 
  • Post #550
  • Quote
  • Jun 17, 2015 9:16pm Jun 17, 2015 9:16pm
  •  ForexSamsam
  • | Joined Sep 2014 | Status: Member | 154 Posts
I get very good result with EUR_USD but nothing with others pairs ?

I dont have any explanation ?
 
 
  • Post #551
  • Quote
  • Jun 17, 2015 9:36pm Jun 17, 2015 9:36pm
  •  ForexSamsam
  • | Joined Sep 2014 | Status: Member | 154 Posts
Quoting matinhas
Disliked
{quote} If your code is able to split the calculations by a big number of threads, this could be a solution: https://www.parallella.org/ I'm just making the first steps in ML, so I will not bore this thread with beginner questions. By the way, I have a server with 2x xeon quadcore, if you see it useful for your study, let me know.
Ignored
GPU is another solution, these device are build for paralleling calculation.
https://developer.nvidia.com/pycuda
 
 
  • Post #552
  • Quote
  • Jun 18, 2015 9:46am Jun 18, 2015 9:46am
  •  babelproofre
  • | Joined Oct 2009 | Status: Member | 23 Posts
A good read on testing for data mining bias here:-
http://www.adaptrade.com/Newsletter/NL-GoodOrLucky.htm
 
 
  • Post #553
  • Quote
  • Jun 22, 2015 11:07am Jun 22, 2015 11:07am
  •  alphadude
  • Joined Jul 2011 | Status: Member | 1,035 Posts
subscribed!!!

an honest question to machine learning gurus; does anyone trade a machine learning algo with success in real trading and for few months?

I personally tried machine learning a while back but due to the complexity and tiredness that it gets you into; i resorted to traditional method of doing research; and haven't looked back since.
 
 
  • Post #554
  • Quote
  • Jun 22, 2015 12:10pm Jun 22, 2015 12:10pm
  •  matinhas
  • | Joined Oct 2014 | Status: Member | 19 Posts
Quoting ForexSamsam
Disliked
{quote} GPU is another solution, these device are build for paralleling calculation. https://developer.nvidia.com/pycuda
Ignored
Exactly. With high performance GPU is excepted to have even better performance, but it require an initial investment considerable. With parallela you can start with few cards and increase the cluster as you go. This site, have almost a R framework for ML trading implementations (API for datafeed, order placement...) and also some useful libraries in case of computing with parallela. http://censix.com/downloads.html

For now, i'm running my base ideas in MATLAB, just for training some base concepts of ML, but R timeseries analyes and functions seams to be more adequate. I need to learn R...
 
 
  • Post #555
  • Quote
  • Jun 22, 2015 6:10pm Jun 22, 2015 6:10pm
  •  babelproofre
  • | Joined Oct 2009 | Status: Member | 23 Posts
Starting from page 33, some more good reading on data mining bias
https://r-forge.r-project.org/scm/vi...f?root=blotter
 
 
  • Post #556
  • Quote
  • Jun 23, 2015 12:47pm Jun 23, 2015 12:47pm
  •  stt
  • Joined Apr 2013 | Status: Always Learning | 345 Posts
Quoting alphadude
Disliked
subscribed!!! an honest question to machine learning gurus; does anyone trade a machine learning algo with success in real trading and for few months? I personally tried machine learning a while back but due to the complexity and tiredness that it gets you into; i resorted to traditional method of doing research; and haven't looked back since.
Ignored
if you doubt machine learning doesnt work for trading, see these recent headlines about HFs pushing in this area - http://www.bloomberg.com/news/articl...in-public-data

the type of stuff we discussed in this thread is already being done for years.. the new push is using more unstructured data...
Think : Trade : Live Life
 
 
  • Post #557
  • Quote
  • Jul 3, 2015 2:08am Jul 3, 2015 2:08am
  •  olsen-yersen
  • | Joined May 2011 | Status: Member | 222 Posts
Little bit off the topic.I want to maximize the correlation coefficiency of last 2 bars of an indicator to past 500 bars.What would be the best method to achive this?
Neural network(what type would be suitable?)? genetec algo?GA+NN?ARIMA ?Random forest?
 
 
  • Post #558
  • Quote
  • Jul 3, 2015 6:49am Jul 3, 2015 6:49am
  •  jaguar1637
  • | Joined Feb 2011 | Status: Member | 221 Posts
also, SVM ,Levenberg-Marquardt_nonlinear_least_squares, perceptrons, distributing kernel regression ... and so on ??
 
 
  • Post #559
  • Quote
  • Jul 3, 2015 2:36pm Jul 3, 2015 2:36pm
  •  shirotama
  • | Joined Oct 2014 | Status: Member | 23 Posts
Quoting ForexSamsam
Disliked
I get very good result with EUR_USD but nothing with others pairs ? I dont have any explanation ?
Ignored
Hello may i ask you something, do your input using amount of candle? if yes how many candle did you use? Thank you
 
 
  • Post #560
  • Quote
  • Jul 7, 2015 12:29pm Jul 7, 2015 12:29pm
  •  ForexSamsam
  • | Joined Sep 2014 | Status: Member | 154 Posts
Quoting shirotama
Disliked
{quote} Hello may i ask you something, do your input using amount of candle? if yes how many candle did you use? Thank you
Ignored
I am using 12 candles in inputs.With encoding like [-3,-2,-1,0,1,2,3] depending of height of each candle
 
 
  • Trading Discussion
  • /
  • Machine Learning with algoTraderJo
  • Reply to Thread
    • 1 2627Page 282930 47
    • 1 27Page 2829 47
0 traders viewing now
  • More
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