Tensorflow / Machine Learning and Trading

Discussion in 'App Development' started by aphexcoil, Oct 4, 2017.

  1. Has anyone played with Tensorflow to train it to just make positive returns from the market? I'm sure someone has done something with this -- but I think the one real way to make this effective would be to actually have a general AI that is capable of scanning news stories and then hacking into the phone system to listen to calls from the CEO, etc.

    Just kidding about the last part -- but has anyone played around with machine learning and hooked it into an API?
  2. fan27


    I have not worked with Tensorflow, but I am currently building my own custom solution in GoLang. The concept is simple. Below is some code from the package I am working on

    comp := make(map[int][]string)

    targSym := "SPY"
    tf := "daily"
    allSyms := []string{"SPY", "QQQ"}
    bbc := BollingerBandsConf{14, 2, 2}
    mac := MaConf{200}
    cf642 := CompareFloat64{tf, "monthly", "monthly", LowerBollingerBand, bbc, Close, nil, Dynamic, 0, 2}
    cf644 := CompareFloat64{tf, "daily", "daily", SimpleMa, mac, Close, nil, GreaterThan, 0, 1}

    ccc := CloseChangeConf{14, 1, 1.5}
    cicd1 := CompareString{tf, "daily", deCloseChange, 1, ccc}
    cicd2 := CompareString{tf, "daily", deCloseChange, 2, ccc}
    cicd3 := CompareString{tf, "daily", deCloseChange, 3, ccc}
    cicw1 := CompareString{tf, "weekly", deCloseChange, 2, ccc}
    cicw2 := CompareString{tf, "weekly", deCloseChange, 2, ccc}
    cicw3 := CompareString{tf, "weekly", deCloseChange, 2, ccc}

    imc := IsMinConf{"low", 12}
    cb := CompareBool{tf, "monthly", deIsMin, 3, imc}

    // req defines which map elements are required for a backtest run
    req := []int{0, 1}

    comp[0] = []string{cf644.GetComponentDef()}
    comp[1] = []string{cf642.GetComponentDef()}
    comp[2] = []string{cb.GetComponentDef()}
    comp[3] = []string{cicd1.GetComponentDef(), cicd2.GetComponentDef(), cicd3.GetComponentDef()}
    comp[4] = []string{cicw1.GetComponentDef(), cicw2.GetComponentDef(), cicw3.GetComponentDef()}

    Based on the code above, 32 combination permutations were generated with over 11,000 strategies created on the fly, tested and results logged. Also note that 3 different time frames are being used. On my laptop it took about 10 seconds to run. I love Go :)

    PoundTheRock likes this.
  3. GoLang is awesome! When you say it took 10 seconds to run, how much data was it analyzing in total?
  4. fan27


    It analyzed all available daily, weekly and monthly data for SPY and QQQ. The idea is to identify strategy candidates on a very small subset of tickers and then run those candidates on a larger universe of tickers.
  5. I am learning a ML program called Weka via a 3 courses.
    (I'm part way through course 2)

    Department of Computer Science
    University of Waikato, New Zealand

  6. Kever


    Over the past few months I’ve built an automated system in python using Keras/Tensorflow and the Python API for Interactive Brokers. I’ve been messing with Forex but it is flexible. Keras is a very nice front end for Tensorflow that makes it much easier to use.

    Honestly, getting a truly useful system out of Keras/Tensorflow is the hard part. Even the much hyped machine learning is no magic path to a edge on the market. But hey, if it were easy....
  7. fan27


    I am releasing a beta version of a C# .NET Core custom built machine learning SDK sometime in Q1 of next year. It is designed specifically for quantitative finance. From what I have seen thus far out there, it is a very novel and intuitive approach. I will be looking for beta testers so stay tuned!!
    djames likes this.
  8. securty


    Hello, I am Emanuel Baltensperger from Switzerland.
    I am searching for AI based on the technology of Tensorflow to use for trading on the stock market.
    Is your product working and is it possible to use it as a customer?

    Actually, i think the best way to use is if it is working on Metatrader4
  9. securty


    I am trying to find Programmer that combinate Tensorflow AlphGo Zero with Metatrader 4. Are you please willing to help me?
  10. fan27


    I should have a beta product available by the end of January that I will let users try out. That version will not be able to convert found strategies to MetaTrader code but later versions will. Will let you know when it is ready.
    #10     Dec 31, 2017