What is a stock index?
A stock index or stock market index is a method of measuring the value of a section of the stock market. It is computed from the prices of selected stocks (typically a weighted average). It is a tool used by investors and financial managers to describe the market, and to compare the return on specific investments. For example, S&P 500 is based on the market capitalizations of 500 large companies having common stock listed on the NYSE or NASDAQ.
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction: What is a stock index?
### Input: 
### Response: A stock index or stock market index is a method of measuring the value of a section of the stock market. It is computed from the prices of selected stocks (typically a weighted average). It is a tool used by investors and financial managers to describe the market, and to compare the return on specific investments. For example, S&P 500 is based on the market capitalizations of 500 large companies having common stock listed on the NYSE or NASDAQ.