Shall I get some tips about useing Machine Learning on trading?

Discussion in 'Trading' started by cf0532, Dec 30, 2016.

  1. Maka

    Maka

    I haven't used neural networks, which is considered deep learning but I have built price algorithm using machine learning, specifically, supervised regression. Setting up an algorithm is not hard, the hard part would be making sure you have clean and normalized data and making sure your algorithm doesn't overfit your training data (can predict data it has seen very accurately but does not do a good job on data it hasn't seen).

    All the tools I use are open source. Mainly python and numerical packages developed for use with python.

    A. Gather Tools

    1) Python
    2) Numpy - numerical package for python
    3) Pandas - dataframe
    4) Sklearn - machine learning package http://scikit-learn.org/stable/documentation.html
    5) Ta-Lib - * for techincal indicators if you are using them

    B. Gather Data

    If you're just looking for historical prices, you can use the datareader function in pandas to pull stock data from yahoo.

    Ex.

    from pandas_datareader import data

    data = data.DataReader('AMZN','yahoo', '2009-01-01')

    If you're looking for futures data, you can use quandl.

    C. Clean Data

    The most important part is cleaning the data. This means transforming, normalizing, and dropping bad data. Your model is only as good as the data it is being fed.


    D. Train Your Data

    This is where the machine learning parts come in. You will feed your algorithm features(data points that is used to predict your target) and it will try to find the best combination that represent the target. You want to use cross validation to split then train your data. This is just taking a random sample of your data, usually a 80/20 split, and splitting it into training data and testing data. Your algorithm will learn from the training data and then you will use the testing data to evaluate the performance of your model.
     
    #51     Dec 31, 2016
    VPhantom likes this.
  2. Tim Smith

    Tim Smith

    Not really. And, if anything, the remainder of your post only serves to substantiate what you claimed I failed to substantiate. The content of your post has only served to re-enforce the very point I was making.
     
    #52     Dec 31, 2016
  3. ET180

    ET180

    I simply claimed that it's possible to become a great software engineer without spending any time in a classroom. Why? Because all you really need is a computer, time, and motivation. That's it. When you use the word "generally" in the first sentence of your previous post, that indicates that you're making a generalization. But you failed to provide any evidence to support your claim. Therefore, by definition, it's an unsubstantiated generalization. Nothing in my previous posts support any point you have attempted to make. Again, you failed to name a single example because you can't.
     
    #53     Dec 31, 2016
  4. Some traders of Christian persuasion believe that God, through his beloved son Jesus, controls the stock prices. Mechanically, this is accomplished by Jesus throwing dice in a special cup, observing the outcome, and by divine intervention, setting the stock prices with accordance to that outcome. Jesus does it every weekday, 9:30am to 4:00pm EST. Through the process of prayers and confessions, a trader hopes to please Jesus to such a degree that Jesus would allow the trader to take a peek inside the cup. Thus the term, the "holy grail", indicating the divine knowledge of the stock prices direction.
     
    Last edited: Dec 31, 2016
    #54     Dec 31, 2016
    SMA likes this.
  5. Tim Smith

    Tim Smith

    @ET180, you don't know my background, you are making many assumptions, your statements continue to re-enforce the very point I'm making. I'm not going to waste my time explaining something I made perfectly clear in the first place.
     
    #55     Jan 1, 2017
  6. #56     Jan 1, 2017
  7. #57     Jan 1, 2017
    aqtrader likes this.
  8. TopFroxx

    TopFroxx

    this is a crazy good post. weird that it had no likes before.
     
    #58     Jan 2, 2017
  9. Tim Smith

    Tim Smith

    Its not "crazy good", its stating the obvious.
     
    #59     Jan 2, 2017
  10. algofy

    algofy

    Shouldn't it belong in the obvious is the obvious thread then?
     
    #60     Jan 2, 2017