Neural Networks Revisited

Discussion in 'Automated Trading' started by maninmoon, May 24, 2016.

  1. Of particular interest would be comment from somebody actually running a NN for live trading. Across a portfolio of currency pairs or stocks.
     
    #141     Jun 3, 2016
  2. I have introduced early stopping into my system. I do this by measuring the slope of the recent values of MSE over the past x iterations. However, this gets triggered very rarely - I had assumed it would trigger often and I would save time.
     
    #142     Jun 6, 2016
  3. You can install a previous linux version into a chroot jail. It's a bit complicated and not for everyone, though. I'm running 14.04 right now and have 12.04 in a chroot for some legacy programs. chroot's can only work so far back in time since some programs require specific kernel interfaces that may not be in newer kernels. If you're only going one major LTS version back (or less), it should be ok.

    I plan on upgrading to 16.04 later this year. Not sure if I'll keep the 12.04 chroot or if it will still work.

    I tried programming NN's a couple years ago without much success. My conclusion was the CPU time and other resources weren't worth the trouble for 70%-ish accuracy (with 50% being random). A mechanical system with a few rules could do the same thing in real time without the heavy load.

    userque has the right idea by building from small pieces from the ground up. Others have also mentioned the pro's and con's of data simplification. I've had my own ideas I've been curious to try with data simplification and temporal multi-level pattern matching, but I've got bad health and programming something of this complexity from the ground up isn't the easiest thing for me anymore. On the flip side, simplified pattern matching would be much faster than any ML... provided the theory works.
     
    #143     Jun 9, 2016
    userque likes this.
  4. Occam

    Occam

    To add to bjohnson777's fine suggestion above regarding chroot, another possible solution might be building and installing the earlier GCC version yourself, which is usually pretty simple (but not always). When you ./configure, just specify a different directory with '--prefix', and you can switch between different GCC "worlds" using shell variables or your Makefile or whatever might work for you.
     
    #144     Jun 9, 2016
  5. I want to trade my simple neural net across 20 stocks. In simulation I could Train "walking-forward" based on a single stock - train for x months, paper-trade for y months and keep rolling this window forward. Or I could train across all stocks in each window. Do people think it is best to train on the target stock alone - or across everything?
     
    #145     Jun 10, 2016
  6. What accuracy are you targeting? 70% actually sound very high. AlphaGo only get 57% accuracy on matching a human's decisions. And many trend-following CTAs have win-rates in the low 50%.
     
    #146     Jun 10, 2016
  7. userque

    userque

    Too many variables to give a meaningful answer.

    I would try both ways and see which is best.
     
    #147     Jun 10, 2016
  8. Occam just made me remember something I forgot... Looking at my package list in my xubuntu 14.04 install, I have gcc-4.8 and gcc-4.9 installed. Doing a package search on packages.ubuntu.com for "gcc base", it might be possible to "forward-port" the older package kinda like Occam was saying, but in a deb file(s). Perhaps the deb files are designed to peacefully co-exist since I have 2 versions installed?

    Sometimes it's also possible to tweak the source code a little if it doesn't compile. Depending on the deeper problem, that could easily get out of hand and over my head, though.

    CUDA might have an option for a "static" compile that would compile in all the needed libs into the executable. That could make the install self contained and portable. From there, copy from the old OS to the new OS.

    Training would be done with previous data. Save a chunk of the most recent data for the "live" test. If your methods don't produce the desired results, step back and re-evaluate. Individual stocks do have a kind of "personality" to how they trade. I don't know if this is strong enough to warrant the all-or-1 question. This would also need to be tested as mentioned.

    My personal opinion is to start simple. A few years ago I was watching some seminar where the guy basically said you need one good stock to go long with when times are good, and you need one weak stock to go short with when times are bad. The whole point is to make money easily, it doesn't really matter how. I think it was userque who mentioned the NUGT/DUST pair. I've been watching the SPY ETF and the SPXL/SPXU pair. Each of those, being index ETF's, will help mitigate a single stock "failure" and move somewhat predictably. Being a group of stocks, good/bad news days and earnings days will have minimal impact on the index ETF as a whole (hopefully). This "should" help minimize excessive price jumps that could confuse an AI. There are many index ETF pairs and different leverages. I recommend picking ones with high volume for liquidity (and consistent data) and you're comfortable with... like with a particular sector you know and can shadow your AI's decisions.

    Step back and analyze for a minute. If half of the trade decisions are correct and half of the trade decisions are wrong, then that is 50% accuracy. 50% accuracy is random. It's like flipping a coin. Heads you go long, tails you go short. You could get the same results by using a random number function and a trailing stop. With careful loss management rules, this trading strategy might partially work, but it's not what we're after.

    70% accuracy is only +20% points better than random. The other 30% points will represent failures. Personally, I don't like that 20-30 weighting as it's too heavy on the failure side. My guess is that a fully developed AI should be closer to 90% accurate. The 10% failures will be due to human reactions that a computer just can't understand at this point in history.

    Some people might gasp at 90%, but with proper data, this should be possible. Over the past few years I've been programming and experimenting with enhancing existing technical indicators and making some of my own. I'm sensing that there are a lot of things that we're missing. I've found some interesting things, but I'm not ready to release all my notes, yet.
     
    #148     Jun 10, 2016
  9. Here's an interesting thing. I have created a simple neural net with 1 input (20 day price change) on a stock A that go UP over time. I then created artificial data AR by sorting the prices in reverse time order i.e the stock now looks like it is gone down. My intuition tells me that the performance of a simple trading rule on these two stock should be similar over time. However, testing shows they are quite different... What would other people expect?
     
    #149     Jun 23, 2016
  10. Simples

    Simples

    Easy. For a generally uptrending stock I'd expect the reverse to outperform the "going with the MA breakout"-type.

    Learn trading first before deciding the computer is smarter than you :p
     
    #150     Jun 23, 2016