My understanding of Logistic Regression is that it is actually a classifier, hence used for predicting either a categorical outcome (ie. binary or an outcome with specific labels) as opposed to a continuous outcome. I would have expected that predicting a stock price would be a continuous outcome, so I don't understand how a stock price can actually be a classification. Can someone please enlighten me?

An example of research paper using Logistic Regression to predict a stock price.

  • 4
    $\begingroup$ You can use logistic regression for classification; to me to define it as a classifier would be somewhere between puzzling and perverse. But here as elsewhere cultural differences between statistics and machine learning may be at play; and as always the same tool allows different uses.. $\endgroup$ – Nick Cox Oct 26 '15 at 20:32
  • $\begingroup$ I am quoting sklearn, so there's definitely a machine learning bent to my perversion :-) scikit-learn.org/stable/modules/linear_model.html $\endgroup$ – user3188040 Oct 26 '15 at 20:43
  • 1
    $\begingroup$ For further elaboration on Nick's point, you might be interested in this thread: stats.stackexchange.com/questions/127042/… $\endgroup$ – Sycorax Oct 26 '15 at 20:43
  • 7
    $\begingroup$ I'd say that to claim that logistic regression is "actually a classifier" is strictly wrong. It can be used as one, but that doesn't make it "actually" one -- it's very like saying a ruler is "actually a device for seeing whether objects are larger or smaller than 6-inches in length" -- you can certainly use it that way, but it would be wrong to say that's what it actually is. It's not even its most common use. (A lot of writing in ML seems to be surprisingly parochial; I doubt this can really be ignorance, but it tends to convey that impression.) $\endgroup$ – Glen_b Oct 26 '15 at 21:25

Instead of predicting how much the stock gains or loses, the models are predicting the sign of the gain or loss, i.e. a binary outcome.

  • $\begingroup$ Hmm ok, so predicting direction (up / down). Could we also have outcomes that represent the amount of the move? (10% up, 20%up, 30%up, etc.)? $\endgroup$ – user3188040 Oct 26 '15 at 20:22
  • 2
    $\begingroup$ You could try to predict binned outcomes, perhaps using an ordinal model, but I'm not sure how well that will do, since binning reduces the amount of information available to the model, and the model is sensitive to the choice of bins. The direct path to predicting quantity of stock returns would just be to build some sort of Gaussian-error regression model. $\endgroup$ – Sycorax Oct 26 '15 at 20:26
  • 2
    $\begingroup$ if you want to predict the amount of the move, you could use a variety of regression methods depending on your (possibly educated) assumptions about the sampling distribution of percent change in stock prices. I bet the data would be symmetrically distributed, so a Gaussian-family regression model may suffice. $\endgroup$ – Brash Equilibrium Oct 26 '15 at 20:47
  • $\begingroup$ user777 & Brash E. thanks that's a very good idea to try out. Anyhow back to just the logistic regression, would altering the binary outcome from an up/down decision to a ">10% up" versus "not >10% up" decision effect the performance of the logistic regression? --- I'm guessing not, as the LogRegression is not assuming anything about the distribution of future prices $\endgroup$ – user3188040 Oct 26 '15 at 21:05
  • $\begingroup$ The outcomes are dichotomous. It's a perfectly valid model. It's just not directly comparable to the up/down model since you've changed the definition of what a "success" is in the Bernoulli trial. Different data, different model. $\endgroup$ – Sycorax Oct 26 '15 at 21:12

The poor phrasing of the abstract* suggests a possible misuse of the term; I've often seen Linear Regression of the logarithm used to predict asset price movements (the idea being that asset prices tend to change by percentages of their current value, rather than by consistent nominal values).

*Full disclosure: I only read the abstract.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.