Machine Learning (Theory)


The Stock Prediction Machine Learning Problem

Tags: Machine Learning jl@ 6:41 pm

…is discussed in this nytimes article. I generally expect such approaches to become more common since computers are getting faster, machine learning is getting better, and data is becoming more plentiful. This is another example where machine learning technology may have a huge economic impact. Some side notes:

  1. We-in-research know almost nothing about how these things are done (because it is typically a corporate secret).
  2. … but the limited discussion in the article seem naive from a machine learning viewpoint.
    1. The learning process used apparently often fails to take into account transaction costs.
    2. What little of the approaches is discussed appears modeling based. It seems plausible that more direct prediction methods can yield an edge.
  3. One difficulty with stock picking as a research topic is that it is inherently a zero sum game (for every winner, there is a loser). Much of the rest of research is positive sum (basically, everyone wins).
16 Comments to “The Stock Prediction Machine Learning Problem”
  1. You might also be interested in this NYTimes article about predicting airline airfares.

  2. Anonymous says:

    This zero sum game seems very interesting. If everyone can earn money by using a stock prediction tool, who is the loser?

  3. Mark Palatucci says:

    I was wondering if you could elaborate on how you see stock picking as a “zero sum game”. I can certainly see how this is true in the case of speculative trading, where the underlying value of the concern does not change much in a given time. But I don’t see how this is true in the case of true investing, where values of concerns change considerably over time. (Note that I’m talking about value of a company, not its share price). If a company continues to build wealth (value), then every buyer could be a winner. Of course, this all depends on a company continuing to grow in value – and more generally that the sum total of human wealth continues to grow. There are certainly applications of machine learning beyond speculative trading and tomorrow’s stock price. One alternative goal being the prediction of the true (and latent) ‘value’ of a company at some time, either in the present or future. Of course, this is a very difficult thing to do, as many of the ways great investors value a company (management, IP, brand, durable/non-durable products) are not easily quantifiable as features in our predictor.

    I’ve been following the Bridgeway company mentioned in this NY times article for a few years. If I remember correctly, the guy behind it was a researcher at MIT who did quantitative modeling and then left his job to start Bridgeway…When I read their prospectus a few years back I was surprised by the degree in which they talked about their Christianity in their prospectus. A closer look showed their early performance wasn’t that great – but then they had a breakout year in their small value fund (>70% return). That is when the hype with Bridgeway and “quant” started. Of course, lots of funds in small value returned >50%, as that asset class dogged during the tech boom of the 90s.

    The whole idea of the “quant” fund is nothing new. In fact, many speculate it was a cause of the ’87 crash. The thing to keep in mind is that the mutual fund industry is entirely driven by marketing. I think it was Ben Graham who noticed at one point that the number of mutual funds actually exceeded the number of stocks on the NYSE. A mutual fund will tell you exactly what you want to hear in order to get your money – regardless of the potential quality of the investment. Just think “tech fund, energy fund, airline fund, telecom fund, china fund, etc..”. Whatever kind of fund you want, you can find it. I don’t think “quant” funds are anything different – just the latest mutual fund “buzz” word.

    I think the more subtle, yet dramatic impact of machine learning on the finance industry will occur not in the prediction of stock prices, but rather in optimizing the mundane and everyday tasks like large block trading (Michael Kerns gave a great talk about this at ICML)..

    Of course, predicting the stock market is such a hard and potentially rewarding problem that its appeal will never cease. I’m sure the future will not lack NY times articles about the and how it’s being used to generate above average returns for investors.

  4. jl says:

    On zero-sumness: Suppose we value all stocks at the value of their last trade. Then, for a previous trade at a higher price, the seller won and the buyer lost. For a previous trade at a lower price, the buyer won and the seller lost.

    Actually, it’s a slightly negative-sum game, if you take into account transaction costs. What this means is that if a new stock picking strategy makes some investors rich then it surely makes others poor.

    There are _some_ advantages to these systems. One of the advantages is that they may increase liquidity (by having more outstanding trade offers). This is helpful in one of the regimes where the approximation money=utility breaks down. For example, if a player needs to cash out of the stock market (to build a house, retire, etc…), a high liquidity is helpful. Similarly, machine learning might be helpful in coping with inadequate liquidity in an automated way, as you mention. Another advantage (perhaps) is that they give people choosing funds a wider range of reasonable (=low overhead) mechanisms for expressing their preferences.

  5. jl says:

    Another possible advantage was mentioned in the article. “Risk”, for whatever reasonable definition you use, decreases as an investment is portfoliod across a larger set. So, a large number of individually risky investments might collectively have low risk. The implication of this is that risky investments are encouraged, which is arguably good: it may encourage startup companies for example.

  6. Anonymous says:

    You are neglecting here the most fundamental property of a stock: that it represents a share of ownership in a corporation. The corporation does stuff like spend money and earn profits; these actions then affect the value of the stock (for example, some profits get turned into dividends, stock buybacks, etc.). The true value of a stock is its expected future discounted payoff to its owner; its last trade price is only someone’s estimate of that value.

  7. Anonymous says:

    Actually “zero-sumness” depends somewhat on the investor. Not all investors are equal. What may be negative sum for a mutual fund could be positive sum for a hedge fund since they are regulated quite differently.

    misha b

  8. jl says:

    The argument for zero-sumness holds for any fixed valuation, include the long term return of the stock (even when discounted in some sane manner).

  9. Alex Simma says:

    While I understand the arguments for the stock marget being a zero-sum game, I don’t think they take into account the long-term perspective (though John’s last comment about startups hints at it). Roughly, the argument for capital markets is that they are an efficient way of allocating capital, and as a reasult, lead to greater economic growth.

    Having a high stock price benefits a company — secondary offerings allow easier access to capital, fewer stock options(aka less dilution) need to be granted for the same amount of compensation, lower interest rates for bonds, etc. So efficient pricing of stocks moves capital from the bad companies to the good companies which can make better use of the capital, leading to higher growth. While it may be debated whether quants help improve allocation efficiency or just speculate in the short-term, if the former is the case, quants certainly have a net positive role. The crucial thing about the markets is that investors not only go up and down with the market — they also move markets.

  10. jakester says:

    The question of “is the stock market a zero-sum game” is an issue I’ve argued at length about with others. It contradicts peoples’ underlying notion that money can be made on the stock market.

    Here are several counter arguments that I’ve heard:

    1. Stocks pay dividends, and thus the stock owner makes money.
    2. Different users utility functions are different, and so the value of a stock to me may be different from the value of a stock to you.
    3. When you buy a stock you aren’t just buying a speculation, you actually own a piece of the company and thus a piece of their assets.

    In general, stocks very rarely pay dividends now, so (1) isn’t such a huge factor. But aren’t points (2) and (3) still valid arguments?

  11. Charles Fox says:

    Try telling Warren Buffet he’s playing a zero sum game… the whole /point/ of trading is that it’s a form of resource allocation, the market tries to optimize putting the capital in the most useful place to benefit society. Anyone who goes into this game with the selfish, sero-sum mindset is near doomed to failure from the start.
    Charles Fox
    (former quant+value hedgehog)

  12. jl says:

    Argument (3) seems to be a statement about risk rather than value.

    Argument (2) seems valid: both people can benefit from a trade when the utility is not defined strictly by monetary value. Alex Simma and Charles Fox’s argument is also valid, although perhaps imperfectly so. What is good for society and what is good for the investor are sometimes at odds.

  13. Tony Plate says:

    The book Trading
    and Exchanges
    by Larry Harris has a great explanation of
    how stock markets work and why people trade in them. He
    identifies various types of traders, based on their reasons
    for investing. For example, one type is a speculator, who
    trade to increase their capital. Another type is a
    long-term investor who trades in order to transfer their
    money through time (e.g., in retirement funds). Yet another
    type is a gambler, who trades for the thrill of the game.
    Between speculators, trading can be viewed as zero-sum.
    However, trades between people with different reasons for
    trading, e.g., between speculators and retirement investors
    can be quite profitable, in terms of respective utility, not
    dollars, for both parties (as you recognize). Harris does a
    fantastic job of describing these various interactions and
    how markets facilitate them. I’d highly recommend his book
    to someone who would like a richer understanding of markets.

    Regarding the comment “What this means is that if a new
    stock picking strategy makes some investors rich then it
    surely makes others poor”, I’m not sure how this plays out
    in the long term. There is definitely an I-win-you-lose
    component to investing, and when superior investors enter
    the market, inferior investors will lose out (on average,
    but the signal to noise ratio is tiny). Is that a bad
    thing? How is it different from new textile machinery
    making clothing cheaper and resulting in the loss of income
    to traditional manufacturers? Is technological advance in
    stock trading somehow different? I don’t have any strong
    sense of the answers to these questions, other than that the
    issues are subtle.

  14. Anonymous says:

    All three of the above points can be reasons why the market is not zero-sum. (1) is a special case of (3): dividends convert some of my ownership of the company into cash. (Similarly, stock buybacks (one of the reasons dividends are less prevalent these days) mean that my percentage share of the company goes up.)

    (3) is not fundamentally a statement about risk: while risk is often present, one can have a viable market without it. For example, suppose that I know of some activity which only I can perform, which is guaranteed to make $11k in the end, but costs $1k to start. If I don’t have the $1k, I can’t do the activity unless I can attract invenstors. With investors, I can sell stock: say 10 shares, each worth 3% ownership, for $100 each. I can then perform the activity, get the $10k profit, and own $7k of it myself ($3k will belong to the investors). Because of this market, everyone will be better off (by a total of $10k among all of us).

    More usually, the activity that’s enabled by the investment will involve a combination of risk and expected profit. But it doesn’t fundamentally have to be one or the other, so long as either the risk or the profit is desirable to someone, and so long as there’s both someone willing to do the activity and someone who has money to pay for it.

    (2) is also a nice argument, one which I hadn’t really thought about before. It actually seems like the exception rather than the rule for both the buyer and the seller to have the same attitudes towards risk and present-vs-future payoffs.

  15. […] While doing research on machine learning and data mining, I encountered an online discussion on whether or not stock investing, as well as computer-assisted stock picking, is a zero-sum game.The discussions were initiated because of a New York Times article “How a Computer Knows What Many Managers Don’t“. There are quite a few good and informative points raised by contributors that are on either side of the debate.My personal answer to the debate is: it depends. It depends on the type of the investors concerned (speculators, manipulators, serious value investors, etc.) and investing time-frame (day-trader, short- and long-term traders). When a company continues to provide goods or services that the world needs, its value (and the stock price) increases over time and everyone could be a winner, though a better investor would win more. One such example is BHP over last three years. Almost everyone has been making money from BHP not because other people have “lost” money, but rather because the Company’s value has increased due to the world’s demand for its products.Even if a trade is zero-sum, as it seems so on a short term basis, the trade increases the liquidity for the market, which is positive for the whole system.One may compare stock-trading to sports. Each of individual games in a sports competition seems a zero-sum game: one side wins and the other loss, even though the outcome is not zero-sum for the players: the winners take more home than what the losers loss. For the rest of the world, it provides entertainment value and, arguably, improves the health and well-being of human kind. Stock trading is a competition, participated by millions of people worldwide. Even though each trade may seem a zero-sum game, the system rewards hard-working, highly-motivated people and with better skills or tools, machine-learning tools included. In addition to liquidity, a trade, zero-sum or not, provides entertainment for everyone (that’s what you are doing anyway when you watch CNBC), and rewards managers and company employees who work in the company and, hopefully, offers incentives for them to develop even better products and services for the rest of us.The debate will never ends, but in the mean time, let’s work hard and try to stay on the positive side of the competition. […]

  16. Simon Hughes says:

    Actually, the stock market is generally considered a positive sums game, as historically, on average, it goes up year on year. Now there have been downturns, but the ‘sumedness’ refers to the statistical average performance, which historically has been a net gain.

Sorry, the comment form is closed at this time.

Powered by WordPress