AI for Trading Series №7: Stocks, Indices and Funds

Gain an overview of Stocks, Indices and Funds.

Purva Singh
10 min readDec 17, 2020
Photo by Jamie Street on Unsplash



  • Indices refer to an aggregated value of a group of stocks as a single number. For example, we have S&P500 and DJIA (Dow Jones Industrial Average) for USA, NIKKEI and HANG SENG for Asia and FTSE, EURO STOXX for Europe. These are all example of indices.
  • Indices are created by financial research and credit rating companies such as Standard and Poor’s, Dow Jones and Financial Times. They are published by stock exchanges such as Nasdaq or the London Stock Exchange.
  • Business news may refer to whether the index went up or down.
  • They are virtual profiles and are not actual funds that people invest in.
  • Indices track subgroups of the market, and may be designed specifically to track stocks in the same stock exchange, same country, or same sector.
  • Indices give investors a measure of the market’s status.
  • Professional investment managers may use indices as benchmarks against which they can evaluate their own fund’s performance.

Market Captialization

Consider a scenario where we want to to track only smaller companies or what if we just want to track only high-growth companies? Having a more specific index would definitely help if our investment research is focused on companies with similar characteristics.

The creators of index often make indices that group stocks by Market Capitalization defined as large-cap, mid-cap and small-cap.

Market Capitalization or “Market Cap” refers to the total dollar market value of a company’s outstanding shares of stock. It is calculated by multiplying the total number of a company’s outstanding shares by the current market price of one share.

For example, the S&P divides a list of stocks into the S&P 500, S&P MidCap 400 and the S&P SmallCap 600. The S&P 500 contains large-cap stocks such as Lockheed Martin, an aerospace company. The S&P MidCap 400 contains stocks such as Delphi, an automotive technology company. The S&P SmallCap 600 contains a small-cap stocks such as The New York Times. Now, within each of these indices, the stocks are then ranked as more growth or more value stocks.

Growth Stock v/s Value Stock

  • Indices can also include stocks based on whether companies are considered growth or value stocks.
  • Growth stock tends to have high growth is sales or earnings and have potential for future growth. For example, if a company creates new ways for people to commute from one place to another, it might be considered a growth stock due to its potential for increased future sales.
  • Values stock tends to be a matured company that has stable sales, revenue and earnings. So for example, a company that sells bathroom products will have a stable flow of earnings. But this company will have fewer expectations for a future rapid growth.
  • Continuing our S&P example as explained above, from the S&P SmallCap 600 list, stocks are selected for the S&P SmallCap 600 Growth Index or the S&P SmallCap 600 Value Index.


In order to decide whether a particular company is growth or value we can look at valuation metrics such as price to earnings ratio, price to sales ratio and price to book ratio. Then, within a list of companies in an index, we can rank these stocks by these metrics and say that stock is more on one end of the spectrum relative to the other stocks.

  • Price to earnings ratio : the stock price divided by the company’s earnings per share over the past four quarters.
  • Price to sales ratio : the the stock price divided by the sales per share over the past four quarters.
  • Price to book ratio : the stock price divided by the book value per share. The book value is the company’s accounting value, which is assets minus liabilities.
  • Growth stocks tend to have high price to earnings, price to sales, and price to book ratios. Value stocks tend to have lower price to earnings, price to sales, and price to book ratios.
  • For example, in general, software and biotechnology stocks tend to have higher PE ratios, while agriculture and construction companies tend to have lower PE ratio.

Price Weighting and Market Cap Weighting

Consider the index NIKKEI 225, which tracks the price movements of 225 stocks. Now, in order to get a single index number, we can simply add up all the single share price of all the 225 stocks. This is called Price Weighting or Equal Weighting. Dow Jones Index is also price-weighted index.

We can also take weighted average of the stocks so that all the stocks are not treated the same. For example, we can give more weight to stocks of bigger companies rather than smaller companies because the movement of a larger company’s price will have more effect on the overall change in the stock market. This is called Market Cap Weighting. Major indices that follow market-capitalization weighting are the S&P500, Hang Seng, MERVAL, FTSE and EURO STOXX.

Adding or Removing Companies from an Index

In June 2018, Monsanto, a U.S. based agriculture company was acquired by Bayer, a German-based pharmaceutical company. Monsanto was listed in the S&P500, but after the acquisition, S&P500 removed Monsanto from the S&P500, which is called an index delete. S&P500 also added Twitter, which is called an index add.

Prior to its replacement, Monsanto was worth about $50 billion and Twitter was worth about $30 billion. Now, lets consider an imaginary company, X, that serves as a placeholder for Monsanto before change and Twitter after the change. Next, we calculate the percentage change in X’s market cap from $50 billion to $30 billion and apply that to the previous index to get current day’s index.

Investment Funds

An investment fund is a collection of investor money that a professional money manager allocates towards a portfolio of assets. It is a professionally managed portfolio of investor money. Investing in funds is beneficial for us since a smart combination of assets together can give better returns or less risk than a single stock can achieve.

Active vs. Passive Funds

  • Actively Managed Fund: These funds seeks to outperform its benchmark (such as an index). For example, the Fidelity Contrafund targets large cap growth stocks and seeks to outperform the S&P 500 index. Actively Managed Funds are also termed as alpha funds.
  • Passively Managed Fund: These funds seek to track its benchmark (such as an index), i.e. the goal of a passively managed fund is to match the performance of an index. They are also referred to as index funds. Note that an index fund is not an index. For example, the Vanguard 500 index Investor Fund is a fund that allocates the investor’s money towards a portfolio that tries to match the S&P500 index. Passively Managed Fund are also termed as Beta Funds.

Smart Beta Portfolios

  • A given portfolio can combine both active and passive management. This is often referred to as Smart Beta. General idea is to start with weights based on an existing index and use that as a starting point from which we can try to make improvements. If we modify the weights up and down from its original values, then we can aim to either improve returns or reduce risk.
  • When we use the universe of stocks from an index, and then apply some weighting scheme other than market cap weighting, it can be considered a type of smart beta fund.
  • By contrast, a purely alpha fund may create a portfolio of specific stocks, not related to an index, or may choose from the global universe of stocks. The other characteristic that makes a smart beta portfolio “beta” is that it gives its investors a diversified broad exposure to a particular market.

Types of Funds : Mutual Funds and Hedge Funds

Mutual Funds

Mutual funds are available to the everyday investors and have restrictions on certain strategies, such as shorting stocks or using derivatives. So they are usually long only, i.e., the fund managers buy and hold stocks that they expect will perform well in the future.

Investors are allowed to put money into or pull money out of most mutual funds on any business day, i.e. there is no lock-up periods. Some popular mutual funds include the Vanguard Equity Income Fund, BlackRock Technology Opportunities Fund.

There are two types of mutual funds -

  • Open-end funds: These funds allow investors to buy into the fund after the fund has already started operating and investing. It also allows investors to withdraw money directly from fund. Open-end mutual funds must keep a part of their investment in cash, incase the investors wish to redeem their shares.
  • Open-end funds follow the Holding Cash strategy. Holding cash means that portfolio cannot make use of all of its assets in the given investment strategy. Also, if many investors wish to redeem their investment at the same time, the funds may need to sell their existing investments to get cash and increase liquidity. The total return of an open end fund is a weighted average of its portfolio return and the return on its cash holdings.
  • Close-end funds: Since the need to maintain cash tends to erode the total return of the open-end fund, the financial services industry created a closed-end fund to address this issue. Closed End Funds accept investors at the start of the fund, and do not take new investments nor handle redemptions afterward. This means that the closed end fund does not need to keep cash for liquidity purposes or to handle redemptions. Investors who wish to stop investing in the fund may sell their shares to other investors on a stock exchange, the same way they would sell stocks.

Hedge Funds

Hedge funds have fewer restrictions on their trading strategies, which allows them to take short positions and also use derivatives such as options or futures. Hedge funds usually take money from high net worth individuals or institutions and require a higher minimum investment and require lock-up periods during which investors are not allowed to withdraw their investments.

Hedge funds employ hedging strategies in an attempt to deliver market neutral returns. Market Neutral Return implies that a portfolio’s gains or losses are less effected by the overall market movement. Hedging refers to entering into a transaction in order to reduce exposure to price fluctuations by buying derivatives such as futures, options.

Evaluation of Funds: Relative and Absolute Returns

There are two ways in which a fund is evaluated based on their performance: relative v/s absolute returns.

Relative Returns

Relative returns refer to how the fund compares to a benchmark, which is usually an index. Mutual funds (both active and passive) are evaluated relative to their benchmark.

For example, lets consider an actively managed fund that chooses to focus on a portfolio of stocks that are also listed in the S&P500 index. Now, if the S&P500 has an annual return of 2% and the fund returns 3%, then the fund outperformed its benchmark by 1%, and the relative return in this case is 1%. Since, this is an actively managed fund, we can refer to this relative return as an active return.

For a passively managed fund, the performance however, is based on how closely the fund attracts index. For example, if S&P500 has an annual return of 2% and so did the passively managed fund, we can say that the fund is meeting its investment objective and the relative return is 0.Since, this is a passively managed fund, we can refer to this relative return as a tracking error.

Tracking Error formula

Formula for Calculating Tracking Error. (Source: AI for Trading nano degree course on Udacity)

Absolute Returns

Absolute returns refer to a fund’s goal to target a certain return regardless of how the market performs. Hedge funds are usually evaluated by absolute returns.

Net Asset Value (NAV)

When an investor puts money in a fund, they receive shares in the find which increase or decrease in value as the fund’s portfolio value goes up or down. The share represents a fraction of the fund’s fair value. To get the fair value of a fund, we start with the value of its investments, also called its Assets Under Management (AUM).

Now, we subtract the Expenses (cost of running the fund such as employee salaries, transaction costs and taxes) from AUM. Next, we take the net value of the fund and divide it by the number of shares in the fund. The fair value per share that we get is called the Net Asset Value (NAV).

NAV: Net Asset Value AUM: Assets Under Management NAV = (AUM - Expenses) / (number of shares)

Expense Ratio

Usually, the expenses associated with the fund are defined as a fraction of assets under management, which is called the Gross Expense Ratio. Sometimes, when funds are just starting out and trying to attract investors, they give discounts to their new customers. So these customers actually pay less than the gross expense ratio. This is called the Net Expense Ratio.

AUM: Assets Under Management Gross Expense Ratio: Expenses / AUM Net Expense Ratio: (Expenses - Discounts) / AUM

Transaction Costs

Transaction costs are costs from buying or selling (trading) stocks or other assets. They can be commissions paid to brokers or bargain-making investment banks. It can also be the cost of moving the market price by trading a large block of shares. The main type of transaction cost for institutional investors (mutual funds, hedge funds) are the costs of moving the market price from large trades.

This article is a part of my ‘AI for Trading’ Series. You can find the link to previous articles from the series:


  1. AI for Trading nano degree course on Udacity.
  2. How to Model Volatility with ARCH and GARCH for Time Series Forecasting in Python’ by Jason Browniee.
  3. AI for Trading GitHub: Volatility



Purva Singh

Hi! I am a tech enthusiast currently working on leveraging language technologies to solve financial use-cases! View my work here: