How exactly does the stock market work?

Answer by Balaji Viswanathan:

TL;DR: "In the short term, the market is a voting machine. But, in the long term, the market is a weighing machine".  — Ben Graham[1]
Part 1: How the stock market works
Part 2: How does one evaluate Stocks

Part 1: Basics of a Stock Market
History: A long  time ago, humans ran businesses with just their money. The businesses  they ran were small and they grew the businesses only with their own  profits. However, not all businesses can be built with your own money.  What if you wanted to build a new factory that costs more than a million dollars? Banks won't lend money for young companies and your friends won't have that much.

In the 15th-16th century as the Europeans started exploring Asia and Americas, the big explorers felt they needed a lot of money and their kings were not providing them anymore. The wealthy guys demanded a lot of interest. Thus, they felt they need to raise money from a bunch of common people. Thus, in 1602, the Dutch East Indian company became the first company to issue shares of its company in the Amsterdam Stock Exchange and get traded on a continuous basis.

What is a Stock? Stocks  in a company provide you a share of the company's future profits in  return for the capital invested. For instance, if you buy 1 stock of  Apple now, you will be assured one-billionth of  Apple's profits in the  future (as there are almost a billion such stocks that Apple has issued  now).

Listing: In  a stock market, 1000s of companies are listed and these companies  (called public companies – as they have given out their shares to common  public) pay a fee to the exchanges, along with a promise to provide all  important info to the markets. In return they get an opportunity to put  their company in the stock market's board & have the ability to get  money from people visiting the market. The first time a company's stock  appears on the stock market's board is called an IPO (Initial Public Offer).

Brokers: Conceptually,  a stock exchange is similar to eBay. These guys allow companies to  be listed and connect the buyers & sellers. Since millions of people  trade in the market and it is practically impossible for these  exchanges to deal with all the individuals, they have assigned brokers who act between the exchanges and the individuals.

Part 2: How does one value a stock
Basic Terminology:
We will use a term EPS (Earnings per share) that is exactly as it sounds. It is the profits of the company divided by number of shares. For instance, Apple has $41 billion in profits and about 950 million shares, giving an EPS of about 41000/950 = $44/share. Thus, if you own a share of Apple, you are entitled to 44 bucks of Apple's profits this year.

Calculating Share price:
To evaluate how much you need to pay for that 1 Apple stock you need to do a simple addition of all the earnings you will get

         Stock Price = EPS in Year 1 + EPS in Year 2 +…

Now, you know that a dollar earned 10 years from now is not the same as a dollar earned now. Because, there is an interest rate i involved and money you get in 10 years is less worthy than the money you have now. Thus, you need to adjust that formulae.

        Stock Price = ((EPS in Year 1)/(1+i))+ (EPS in Year 2/(1+i)^2) +…

Now, there is a whole bunch of math involved (starting from the compound interest formula) and for the sake of simplicity, I will get you to the final results and reduce the stock price to two cases:

1. In case of a mature company that doesn't grow:
          Stock price = EPS/Interest rate

The expected Interest rate is relatively easy to calculate and depends on how risky the company is, how risky the market is and the current long term interest rate of government bonds. For many mature utility companies this interest rate comes to about 10%. Thus, utility companies that doesn't grow much is generally traded at about 10-15 times the EPS. (insert in the formula above).

The stock prices of these companies are very smooth and change only when there is a change in long term interest rates, the risk profile of the company (can change when hurricanes such as Sandy hits) or when market risk changes (for instance 2008 financial crisis). But on a regular day, not much action here. Let us move to the second category of shares:

2. For a growing company:
           Stock price = EPS of next year / (interest rate – expected growth rate of the company)

Let us use a simple example. If you assume Apple's next year EPS will be $48, the expected interest rate for such a risky company at 15% and an expected annual growth rate at 5%, you will get:

$48/(15%-5%) or $48/10% or $480 as the ideal stock price for the company. Where did I get this magical 5% number?

Getting the growth inputs:
Now, we need to find the growth rate of the company and figure out what the company will earn in the next year, the following year and so on. This is not an exact science and no one has a perfect answer to this question. This is why we need stock markets. Collectively, we all pool our intelligence to figure out the future growth of the company and thereby its current price.

To do this collective prediction, we constantly get new inputs and project that to future. For instance, if the company management gets hotshot new engineers, then we predict the future will be bright. What are the other news that investors typically use:

  1. Periodic financial results of the company that gives us a view into the company;s workings and its financial position
  2. Periodic results of similar companies that helps us guess this company;s results. Thus, when Apple sneezes everyone else catches a cold.
  3. Changes in the sector. If a new report comes that people are more inclined to using mobile phones, we predict growth of these companies will be high.
  4. Changes in the broader market.
  5. Changes in the international economy

Market Estimation:
In short, we try to use every possible information to guess the future growth of the company, plug that into our formula and find out the stock price. For instance, if Apple comes out a report saying people are buying less of iPads, we might ding Samsung too as we believe their Galaxy Tabs will sell less too.

Estimating growth rate is an art rather than a science, and is collectively done by millions of humans in a place called the stock market. Since, we need to constantly adjust the growth rate based on new information, stock prices constantly fluctuate.

Main advantages of a stock market:
1.  Starting/building a business: The market lets companies get money from a large number of people. That means there are more options to get money to build a business.

2.  Spreading risk: It lets you spread the risk of a business into a large  number of people. Since, each person is investing only a small portion  of their income in the stock of a particular company, the risk of a single company collapsing doesn't significantly affect investors.

3. Collective estimation of value.
Summary: Modern corporations require a lot of capital, which is beyond the reaches of a few individuals. Markets help companies raise money from a large number of  people and together these investors value their company. The theory is  that when a large number of people do their independent valuation, the  company's price comes more closer to its ideal worth.

 "In the short term, the market is a voting machine. But, in the long term, the market is a weighing machine".  — Buffett

(Disclaimer: This is an answer targeted at basic-intermediate level investor & not high frequency traders or experts. I deliberately approximated a few things to improve clarity).
[1] Buffett's metric says it's time to buy

Balaji Viswanathan's answer to Investing: What should everyone know about investing?
Balaji Viswanathan's answer to Economics: What should everyone know about economics?

View Answer on Quora

What does building a start up and having a child have in common?

Answer by Mahesh Murthy:

1. The conception is the most fun part.

2. Then getting the darn thing to take birth is painful

3. In the early months and years it keeps you awake night and day

4. During this time, there are only two modes – "in tears" and "not yet in tears"

5. It takes 2 to 3 years before it starts to move by itself

6. It takes 3 or 4 years to discover its own voice

7. And 8 to 10 years before you can leave it alone for extended periods and be confident it won't self-destruct

View Answer on Quora