How is price determined in the stock market?

This question has bugged me for ages. I understand that on a base level, the price of a share or stock, is governed by demand and supply. The supply of a stock is for all intents and purposes, finite, so if the demand for that stock increases, the price increases. Obviously when demand decreases (or supply increases) the price should drop.

All good, perfectly understood. Now, let’s assume I have 1000 shares in Yahoo. Today’s share price is roughly $27. That means that I can sell my 1000 shares and I will receive $27,000 dollars for those shares. To sell those shares, there needs to be a buyer, who will pay $27,000 to buy those shares, or a number of buyers, who will all pay $27 per share, for a percentage of those 100 shares (e.g. 10 buyers each buy 100 shares).

What I would like to know is three things:

  • What happens when there isn’t a buyer for my shares?
  • What happens behind the scenes when I sell my shares?
  • What is the underlying process, that allows my 1000 shares to be sold to one or more buyers at the price I agreed with my broker (or online trading account)?

I am trying to understand how the inner working of the stock market function. There needs to be two parties at the exchange, who agree a price, but what doesn’t make sense then, is that my price has already been set? It is the point of exchange, which I think is the black box I don’t understand.

I’d love some feedback on this. I am interesting in creating a computer model of a stock market, and I need to understand this issue before I can continue.

How I built my personal website in 10 easy steps

Here is an example of how you can use the RSS Toolkit to take RSS feeds from around the web and display them on your website. Although my personal website no longer uses this code, the example remains relevant.

  1. Download RSS Toolkit from CodePlex:
  2. Link my Blogger posts feed, comments feed, Flickr feed and to Feedburner. Force Blogger feeds to output as RSS 2.0 from Feedburner (switch off Smart Feed), otherwise RSS Toolkit can’t process the ATOM entry links correctly.
  3. Set each Feedburner feed to the appropriate RssDataSource and set the DataSource to bind to a simple ASP.Net Repeater.
  4. Setup the RSS Toolkit Caching using the application settings suggested here.
  5. Revamp website design using templates from the Open Source Web Design templates library.
  6. Publish, and see results of my new old website.

And, now for some code:

Update: Well now this is only 6 steps, but who’s counting..

Yahoo, Microsoft and Google

Microsoft made the right move in backing off from the Yahoo deal. Yahoo are in a mess. Yahoo know they are disjointed and screwed, their Y!OS is proof enough of that. Until Yahoo can reassemble their offering into something cohesive, and reunite all that they have, Yahoo will still have the same problems it has now. Yahoo, also believed that Microsoft had undervalued them. I believe that the market quite aptly demonstrated that Microsoft overvalued them, otherwise Yahoo’s share price wouldn’t have collapsed 20% yesterday. The market sets the price Mr Yang, not you.

Microsoft have similar problems. Not many people know where to find Microsoft’s search engine, even though it is easier to type than both Google and Yahoo. It is simply, but who would know that? Microsoft changes and rebrands their offering so often, the consumers have got completely lost, and given up on them. I don’t believe it is for any other reason that has such a dire market share.

What Google does well, is simply that it delivers everything consistently, and makes it simple to use their tools. I have one Google account, and that account page shows we all the services I am using. It makes that easy. Yahoo has a multitude of web sites under its umbrella that look different and act different. Y!OS needs to fix this for starters.

The search engine market isn’t dead yet, but I for one am happy to see three players left in the market. I’m happy to use whichever service I feel is the best. I’m certainly not brand biased. I’m one of the floating voters Yahoo and Microsoft need to win over. Bring it on guys.