Funds¶
Some U.S. stock indexes¶
- Dow Jones = 30 stocks
- S&P 100 ~ 50% of U.S. stock market capitalization
- S&P 500 ~ 80% of U.S. stock market capitalization
- Russell 1000
- Russell 3000
- Russell 2000 = Russell 3000 excluding Russell 1000, small-cap index
- Wilshire 5000
How do stock indexes work?¶
% change in index is % increase/decrease in total value of companies in the index (except for Dow)
% change in index does not include dividend return
Mutual Funds¶
- Owned by the investors (mutual), managed by the sponsor
- Easy way to get diversification
- Can also perhaps benefit from professional active management
- Can usually invest directly with no need for a brokerage account
- Over 7,000 U.S. mutual funds $∼$ number of U.S. stocks
- Mutual funds for stocks, bonds, international stocks, real estate, ...
Net Asset Value¶
- NAV (net asset value per share) is calculated daily after close of trading.
- Equals value of portfolio less any expenses not yet paid divided by number of shares outstanding
- Invest money $\rightarrow$ get shares in fund at next end-of-day NAV
- Withdraw money $\rightarrow$ sell shares at next end-of-day NAV
Example¶
Invest 10,000 Thursday end-of-day NAV = 250, get 40 shares
# of shares can be fractional
Fund $\uparrow$, withdraw 6,000, next end-of-day NAV = 300
- 6,000 / 300 = 20 shares that are redeemed
- Still have 20 shares, worth 20 $\times$ 300 = 6,000
Active and passive funds¶
- Passive funds track an index. They do not try to "beat the market." They have low expenses.
- Vanguard was the original and largest provider of index mutual funds: Vanguard 500, Vanguard Total Market, ...
- Active funds try to beat the market or their market sector by choosing the best stocks. They have higher expenses.
- There is some evidence that active fund managers can beat the market before payment of fees.
- But there is little evidence of extra returns to investors, after payment of managers' fees.
- There is also little evidence of repeat performance, except that the worst funds after fees tend to remain the worst.
Other types of funds¶
- Hedge funds, private equity funds, venture capital funds, funds of funds
- Less regulated
- Open only to qualified investors (minimum net worth or income)
- Higher fees, minimum investments, sometimes lock-ups
Exchange Traded Funds (ETFs)¶
ETFs were invented in 1990. Now ~ 3,000 U.S. ETFs.
ETFs are listed on stock exchanges and trade like stocks. You buy/sell them through your broker.
Another easy way to get diversification. And lower fees than mutual funds.
There are ETFs for stocks, bonds, international stocks, real estate, currencies, commodities
ETFs calculate NAVs daily, but you do not buy/sell at the NAV. You buy/sell at the price determined by the market.
How do ETFs work?¶
- ETFs are not open to new cash investments.
- Neither can anyone withdraw cash from them.
- They are open to exchanges with authorized participants (APs).
- APs deliver baskets of assets and receive ETF shares when ETF market price is higher than NAV.
- APs deliver shares and receive baskets of assets when ETF market price is lower than NAV.
- This activity moves the ETF market price towards NAV.
Futures based ETFs¶
- Commodity ETFs generally hold futures contracts on the commodity instead of the physical commodity.
- An example is USO (U.S. Oil). A counter-example is GLD.
- There are also ETFs that take positions in stock index futures to deliver
- multiples (2-to-1 or 3-to-1) of the stock index return (levered ETFs)
- the negative of the stock index return (inverse ETFs) or multiples of the negative (levered inverse ETFs)
Some example of ETFs¶
- SPY = S&P 500
- IWM = Russell 2000
- IEF = Treasury bonds
- LQD = corporate bonds
- UUP = short foreign currencies (bet on dollar)
- QUAL = "quality stocks"
- MTUM = high momentum stocks
- etfdf.com/screener/
Returns¶
Basic definition¶
- Return usually means rate of return = percent gain = (price + dividends - purchase price) / purchase price
- Often work with close-to-close returns = (closing price + dividend if any - prior day closing price) / prior day closing price
- Letting $r_i=$ return on day $i$, return over longer period is $$(1+r_1) (1+r_2) + \cdots (1+r_n) - 1$$
- For an account with multiples deposits and withdrawals, best definition of return is IRR
Dividend example¶
- Chevron's 2021 Q2 dividend
- Nasdaq's statement: Chevron Corporation (CVX) will begin trading ex-dividend on August 18, 2021. A cash dividend payment of $1.34 per share is scheduled to be paid on September 10, 2021. Shareholders who purchased CVX prior to the ex-dividend date are eligible for the cash dividend payment.
- Three dates:
- August 18: (begins trading ex-dividend)
- August 19: (shareholders of record will receive the dividend)
- September 10: (dividend is paid)
- Aug 18 = ex-dividend date means must purchase on Aug 17 or before to be shareholder of record on Aug 19 (T+2 settlement)
Close-to-close returns¶
- Put dividend on the ex-dividend date Aug 18
- Return from close Aug 17 to close Aug 18 is $(P_{\text{Aug18}} + 1.34) / P_{\text{Aug17}}$
Stock splits¶
- If a company does an $n$-for-1 stock split, then each shareholder gets $n$ new shares for each of her existing shares. Shares are worth $1/n$ as much.
- Companies traditionally split their stocks to get the price in a more affordable trading range.
- It was customary to trade in round lots (100 shares)
- Odd lots are now common. Can even trade fractional shares.
- Data providers routinely adjust past prices for splits (e.g., cut all past prices in half when a company does a 2-for-1 split).
Dividend and split adjusted prices¶
- Yahoo and some other providers adjust past prices whenever a dividend is paid (in addition to split adjustments).
- Yahoo's Aug 17 adjusted price for CVX was $$ P_{\text{Aug17, adj}}=P_{\text{Aug17}}-1.34 $$
- Percent change in adjusted prices (no adjustment for Aug 18) is $$\frac{P_{\text{Aug18}}-P_{\text{Aug17, adj}}}{P_{\text{Aug17, adj}}} = \frac{P_{\text{Aug18}}+1.34-P_{\text{Aug17}}}{P_{\text{Aug17}}-1.34} \approx \frac{P_{\text{Aug18}}+1.34-P_{\text{Aug17}}}{P_{\text{Aug17}}}$$
Prior prices are adjusted by the same ratio, preserving % changes as they were:
$$P_{\text{Aug17, adj}}=\frac{P_{\text{Aug17}}-1.34}{P_{\text{Aug17}}} \times P_{\text{Aug17}}$$ $$P_{\text{Aug16, adj}}=\frac{P_{\text{Aug17}}-1.34}{P_{\text{Aug17}}} \times P_{\text{Aug16}}$$ $$P_{\text{Aug15, adj}}=\frac{P_{\text{Aug17}}-1.34}{P_{\text{Aug17}}} \times P_{\text{Aug15}}$$ $$\text{etc.}$$
Data¶
Daily Returns¶
import yfinance as yf
ticker = 'CVX'
price = yf.download(ticker, start="1970-01-01")["Adj Close"]
ret = price.pct_change().dropna()
ret.name = "return"
ret.describe()
[*********************100%%**********************] 1 of 1 completed
count 13581.000000 mean 0.000567 std 0.016794 min -0.221248 25% -0.008281 50% 0.000000 75% 0.009218 max 0.227407 Name: return, dtype: float64
Time Series¶
ret.plot()
<AxesSubplot: xlabel='Date'>
(1+ret).cumprod().plot()
<AxesSubplot: xlabel='Date'>
(1+ret).cumprod().plot(logy=True)
<AxesSubplot: xlabel='Date'>
Distribution¶
ret.plot(kind="box")
<AxesSubplot: >
ret.plot(kind="kde")
<AxesSubplot: ylabel='Density'>
Predictability¶
import seaborn as sns
sns.regplot(x=ret.iloc[:-1], y=ret.iloc[1:], ci=None)
plt.xlabel("Prior Day Return")
plt.ylabel("Daily Return")
plt.show()
Annual Returns¶
price_annual = price.resample("Y").last()
ret_annual = price_annual.pct_change().dropna()
ret_annual.name = "annual return"
ret_annual.describe()
count 53.000000 mean 0.137076 std 0.233928 min -0.316028 25% -0.048960 50% 0.115426 75% 0.285149 max 0.764966 Name: annual return, dtype: float64
Time Series¶
ret_annual.plot()
<AxesSubplot: xlabel='Date'>
(1+ret_annual).cumprod().plot()
<AxesSubplot: xlabel='Date'>
(1+ret_annual).cumprod().plot(logy=True)
<AxesSubplot: xlabel='Date'>
Distribution¶
ret_annual.plot(kind="box")
<AxesSubplot: >
ret_annual.plot(kind="kde")
<AxesSubplot: ylabel='Density'>
Predictability¶
sns.regplot(
x=ret_annual.iloc[:-1],
y=ret_annual.iloc[1:],
ci=None
)
plt.xlabel("Prior Year Return")
plt.ylabel("Annual Return")
plt.show()