Friday, December 14, 2007

How to Make a Stock Index

There are, as I now count, six capital exchanges in Second Life. Yet only two of them (the ISE and VSTEX) have indices to measure that exchanges performance. There is also a service which provides indices and stock graphs, SL Quotes, available for public viewing. However, none of these aforementioned indices detail their methodology for how they produce this index (nor have I tried to replicate it). I thought, therefore, that it might be illustrative for readers to think about how a stock index is constructed and administered.

First, let's think about what a stock index should and should not do. We DO want it to
  • Incorporate many securities (conceivably all of them from a given exchange)
  • Adjust for new entrants and exits from the market, splits, and (probably) dividends
  • Reflect market performance
I think it would be safe to say that we DO NOT want it to
  • Be less volatile the least volatile stock, or more than the most volatile
  • Spike or decline sharply just because of an entrance or exit by a security, split or dividend
With those constraints in mind, I'd like to introduce the concept of market capitalization (MCAP).

Definition: MCAP = (Total outstanding shares) * (Price per share)

For Second Life, I'm going to alter that definition slightly because of some companies who have a LARGE volume of outstanding shares, but only a small portion of which is actually being traded, or in float:

Definition: SLMCAP = (Total shares in float) * (Price per share)

A market capitalization gives you an idea of how large a company is on the stock market. A company with 1,000 shares trading at L$100 is smaller than a company with 1,000,000 shares trading at L$0.50, even though the L$100 stock price is higher. This is a very important concept when constructing an index, because it demonstrates that you should not form an index by simply constructing a portfolio of one share of each stock, because larger prices can give disproportionately higher representation to smaller companies. (Such an index, by the way, is called a price-weighted index.)

You can make price-weighted indices that function well (the link I used cites the Dow Jones Industrial Average as one), but I think it gives, or could give, disproportionate weight to companies that aren't actually affecting the market that much.

In contrast to this, a market-weighted index will weight each company by its market capitalization, thus giving the larger companies more say in how much the index swings.

So how does one actually construct such an index? Well, one way to do it would simply be to add up all the SLMCAPs and leave it at that. Mathematically:

Index = SLMCAP1 + SLMCAP2 + ... + SLMCAPn

However, this number is likely to be quite large and cumbersome, so instead, you need to divide it by some divisor D.

Index = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn)/D

This divisor is very important, because it also allows the flexibility to adjust for buybacks, new entrants, secondary offers, dividends, and removals. You'll notice that I did not mention stock splits in the above. This is because (theoretically) a stock split does not affect market capitalization (ex: 2:1 stock split. Shares double, price halves, market cap stays the same). However, any of those other events would require a change in the divisor. To do this, you simply look at all values at time t, and solve:

Indext = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn)/Dnew

For Dnew, using all the new SLMCAPs with the change incorporated into them.

How about an example? Assume you had a new entrant into the market (a new IPO). First, you find the current index value the normal way:

Index = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn)/D

Then, you take that index value, and include the new company in the calculation, and solve for Dnew (I've bolded the new company for emphasis):

Indext = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn + SLMCAPn+1)/Dnew

You can disregard the previous D at after you calculate the new value, and go forward using the new value of D until another event occurs such that you need to change it again.

Any questions? I don't know how difficult it would be for exchange programmers to incorporate such a system into their operations. And, as mentioned above, I have no idea how SLQuotes or VSTEX or the ISE calculate their indices. However, I think that each exchange should have some sort of index following it so that investors can more easily get an understanding of how the market has changed.

8 comments:

Anand Chiney said...

dear,

can't we calculate Index on price basis only? let's say, there are 5 stocks of a sector... by averaging their prices we can calculate a sectorial index...

I donno more about this.. a simple idea... put some light on the method mentioned by me...

have a nice day

Guardian Market said...

Hey Anand! Thanks for your comment!

Suppose there are five stocks trading at $100 each. The index starts at 100, then, and each has equal weight. But what happens when one of the stocks does a 1:2 reverse split and is now worth $200 each? It now has twice the influence of the others.

Or suppose that a new stock IPOs at $10,000 each share, but much fewer shares. That stock would basically control the index.

This is why price averaging won't work for a stock index - there are lots of tricks that could make one company influence the index more than its fair share.

Unknown said...

Dear sir,

I am trying to create a customised volatility index. I would like to know how are you calculating Divisor. Can you show an example of how you are calculating divisor and also adjustments in divisor based on corporation actions...
Thanks for your guidance..

Guardian Market said...

Adeel,

First, let me apologize for my time-delayed response - I don't check back here often.

I'd have to think a little bit more about how to do a volatility index. Volatility would need to have some measurement of volatility as the numerator, and then a way of standardizing it as the denominator. Have you come to a solution since you posted your question? If not, can you let me know how you're thinking of constructing the index?

Feel free to email me directly at guardian.market at gmail dot com.

Mutuelle sante said...

By using your excellent instruction, now to make a stock index is a fairly easy process.Appreciate it

Musiq said...

How do you calculate the first Divosor? Is it the # of companies in the Index?

Guardian Market said...

Hi Musiq,

The calculation of the first divisor is dependent on what you want the initial value of your stock index to be. So, solve this equation listed above:

Index = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn)/D

When you know the market capitalizations AND the index value (your starting value).

If, for example, you want your stock index to start at 1000, then your divisor will be determined by

D = (SLMCAP1 + SLMCAP2 + ... + SLMCAPn) / 1000

Anonymous said...

Greetings,

I read your post and found it very helpful, but I am still kinda confused about how to construct a new index, for instance, if I want to start a hi-tech index that includes all the hi-tech companies in US, what should be my first step?

thank you!

Google