Regular visitors will have noticed ever increasing amounts of spam on the Trading Gurus Community Forum. On November 24th 2012 we implemented some changes:

1. New users will be moderated 2. Registered users who have a post count of zero will not be able to view attachments or download code. 3. Registered users who have a post count of zero will not be able to create a new thread

As an additional countermeasure we anticipate introducing a modest paywall in the near future.

If this is your first visit here our apologies for the inconvenience.

Existing users may wish to contribute their ideas to this thread.

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Experimental brain surgery for Ray?

  1. #21
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Hi Jim,

    Thanks for posting your backtest, interesting how 2004 seems to be such a good year.

    Quote Originally Posted by Jim View Post
    My academic background involved doing lots of optimisation with the help of mainframes. Consequently back in the heady days of the dot com boom I ran a simple S/R based system fed with prices of the NASDAQ index through a genetic optimiser (on my PC I hasten to add!). I was interested to discover that in my simulations short term trades made lots of money. Then I discovered that you couldn't actually trade the NASDAQ index. Then I discovered that if you do actually trade the NDX futures you experience slippage from time to time!
    Sounds similar to my initial experiments with FX towards the end of 2010. I used some Monte Carlo code to try find a profitable RSI and MACD combination strategy based upon google finance data and a custom backtest code. It looked highly successful until I went into walk forward testing - at which point I discovered the perils of curve fitting by Monte Carlo!

    Of course, the major difference here is that you have managed to leave academia... and presumably have found some trading strategies that work.

    Quote Originally Posted by Jim:1364
    Note that apart from spreads, there's also slippage and commission to worry about.
    Don't introduce me to slippage and other charges yet... I'm not quite ready to have my dreams crushed!

    Cheers,

    Dr T

  2. #22
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Quote Originally Posted by Jim View Post
    The usual answer would be inadvertent curve fitting in the absence of foreknowledge of the "credit crunch". Maybe the usual answer doesn't apply to neural networks though?
    I've tried to avoid curve fitting by employing a few strategies, i.e. frequently retraining the network with recent and randomly selected segments of the time-series, using a simple network (only 2 nodes in the hidden layer) and using relatively few training cycles.

    The theory (or blind hope) was that by re-training the same weight vector (the free parameters of the ANN) periodically with new data, the network would learn the general 'rules' of the time series - re-enforcing recurring rules and gradually discarding non- or transient rules. My aim was/is to have an adaptive intelligent strategy.

    Actually, my aim is to have a profitable trading strategy. But I had thought that an ANN could adapt to changing market conditions and assist with achieving this goal.

    ANNs can be quite good at combining data that is related in a non-trivial way, but it very much depends upon the inputs being appropriately prepared.

    Cheers,

    Dr T

  3. #23
    Junior Member
    Join Date
    Mar 2012
    Posts
    2
    Dr_T very good work. It is amazing. Thanks for the effort and the sharing of the source code.

    However I am still wondering is there would be a possibility to use the SVM code provided there.

  4. #24
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    492
    Hi John,

    Welcome to the Trading Gurus community.

    I've heard a few people suggest that support vector machines are a form of artificial intelligence better suited to trading than neural networks. Have you experimented with both, and if so do you agree?

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  5. #25
    Junior Member
    Join Date
    Mar 2012
    Posts
    2

    Hi Jim

    One major opinion is that those methods are a way to squeeze more pips from already profitable strategy.

    I would like to cite a very famous post of mbkernel in Forex TSD (as it is quiet harsh I cite the most important part).

    At first, bypass the complexity and heuristics of fitting neural networks (yes, it really is a "black art" unfortunately) and work on more important data and statistical issues with a simple, linear model first.

    A former colleague of mine did work in a quantitative hedge fund and he asserted that anything which worked had to work with simple regression. After that, then yes, fancier stuff might be able to extract a bit more performance, but basic research starts with simplicity.
    and

    I'd much rather trade a linear model with 4 inputs (possibly derived themselves with some fundamental insight) which was crafted from well bootstrapped and bagged models (look up "boosting" and "bagging") with enough out of sample analysis to convince me there really is some phenomenon there. Even in our products we can often get 80% of the performance of the neural network with regression models (there is lots of secret sauce in the input variables).

    I really do like neural networks---in the right application they do kick ass.
    So the neural net model would be used to boost already good strategy.

    As for the SVM versus NNets I do not have big experience to compare them.

    SVM are way more powerful than the common neural nets in the sense they are designed with the robustness in mind. They are not very popular among traders because they are much harder to understand in their principle.

    Today there are other neural nets that are also very powerful like the deep belief networks or liquid state machines.

    On the other hand my opinion is completely a contrario.

    I think that the powerful representations by advanced models are critical for the success on the market. What you do not have as infrastructure you can compensate by smart models.

    My theory is that even the most basic models like the MA crossing with the price when you apply a complex model you may have an edge.

    For example for MA cross with the price you may have many profitable combinations. Which one is going to perform on real market data? A mathematical model may help with that. And it still will be the Moving average expert.

    Here you may see a very simple idea implemented directly in Metatrader 4.
    Last edited by JohnLast; 03-27-2012 at 04:12 PM.

  6. #26
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Hi John,

    Thanks for your comments. Various sources around the internet suggest that ANNs can be effective filters for simple strategies (such as your MA example) - the KISS principle does repeatedly rear its head. However, my experiments have been quite naive, just using past price changes to predict future price action. As might be expected, I've had limited success with this. The interesting thing is, you end up in the situation that some training cycles produce an ANN that works well out of sample... and others don't! Sound familiar? So how do we know which ANN to use?

    I've been meaning to look into the possibility of using SVMs as a solution. Their solutions are considered to be more robust than ANNs. Your post above did prompt me to download LibSVM (http://www.csie.ntu.edu.tw/~cjlin/libsvm/) and plug it into Matlab... not much time to play at the moment, but watch this space!

    What I can say is that my initial experiments of using support vector regression to predict the most profitable price movement from past prices has not been any more convincing than what I've seen from ANNs. I've had a brief look at classification and that seemed to have very poor performance out of sample... but nothing conclusive yet.

    One option is to use support vector classification to classify trained ANNs as either profitable or not. This is kind of interesting because it essentially leaves the strategy entirely up to AI... and would make most people feel a bit uncomfortable! I suspect the cascade of complexity would end in tears, but it could make for an interesting experiment.

    Of course, this does beg the question, why not just feed a series of optimised MA strategies into an SVC instead?

    Hmmm... interesting things to ponder...

    Thanks,

    Dr T

  7. #27
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    492
    Hi John,

    Thanks for your enlightening comments.

    Quote Originally Posted by JohnLast View Post
    One major opinion is that those methods are a way to squeeze more pips from already profitable strategy.
    So rather than following RAI's current way of doing things, that approach would favour using an ANN to tune the parameters of something like Ray Robot 2? RR2 has been trading cable profitably for 4 months or so, but he hasn't had the benefit of any "static" optimisation yet, let alone the "adaptive" sort.

    On the other hand my opinion is completely a contrario. I think that the powerful representations by advanced models are critical for the success on the market. What you do not have as infrastructure you can compensate by smart models. My theory is that even the most basic models like the MA crossing with the price when you apply a complex model you may have an edge.
    Personally I'm not a big fan of moving averages, so RR2 is kept even simpler than that. He uses no indicators at all! Is his current modest success just a matter of beginner's luck? To get a real edge does his artificially stupid electronic brain need wrapping up inside a much more complex model?

    Something else to ponder, and paraphrasing Dr. T slightly - Why not just feed a set of "unoptimised non-MA strategies" into an SVC instead?

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  8. #28
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    492
    Some more stuff to ponder. I've found myself hosting a heated debate over on LinkedIn about the merits of NNs, simulated market data, brain surgery for Ray, and all sorts of other controversial matters. I even mentioned RAI at one point!

    On the AI side of things Jonathan Ludwig recommended a "great piece of freeware" called Eureqa II:

    http://www.nutonian.com/eureqa-ii/

    All of this excitement reminded me that 12 months or so ago I downloaded the attached "Data mining/SVM" presentations. They outline the approaches taken by the top 3 contestants in the INFORMS Data Mining Contest 2010.

    Cheers,

    Jim
    Attached Files Attached Files
    Last edited by Jim; 04-11-2012 at 01:24 PM. Reason: Added LinkedIn link
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  9. #29
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Hi Jim,

    Thanks for posting the PDFs, I just had a look, they make for interesting reading. I've not made much progress with RAI or my SVM experiments. Hopefully I'll find a little more time to put into this and post a few results here.

    Would it be possible for you to post a link to the LinkedIn discussion?

    Thanks,

    Dr T

  10. #30
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    492
    Hi Dr. T,

    I added a link to the LinkedIn "debate" to my initial post. Unfortunately you will discover that it has generated vastly more heat than light!

    Do you frequent LinkedIn also? I'm to be found here.

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •