.chapter22<-function(i=0){ "i C22: Liquidity/credit risk i Explanations - --------------------------- -- ----------------- 1 How to define liquidity? 21 Credit risk 2 Why liquidity is important? 22 Credit rating 3 How to measure liquidity? 23 Credit spread 4 : several ratios 24 : basis point 5 : size 25 Spread and credit rating 6 : turnover 26c R code 7 : trading volume 27 Term structure 8 : dollar trading volume 28 Z- score 9 Roll Spread 29 : ranges 10 Amihud's (2002) illiquidity 30 A=D+E 11 Pastor and Stambaugh (2003) 31 KMV model 12 data (FRED) BIS indicator 32 : logic 13 High-frequency data 33 : math 14 : Mode and EX 34 Credit rating/default prob 15 : bid-ask spread 35 Distance to Default 16 TORQ database (free) 36 Recovery rates given default 17 : source and data 37 Recovery rates based on the industry 18 : manual 38 Recovery rate and LGD (loss given default) 19 Videos 39 Rating Transition Matrix: 1-year 20 Links 40 : 5-year Example #1:>.c22 # see the above list Example #2:>.c22() # see the above list Example #3:>.c22(1) # see the first explanation ";.zchapter22(i)} .n22chapter<-40 .zchapter22<-function(i){ if(i==0){ print(.c22) }else{ .printEachQ(22,i,.n22chapter) } } .c22<-.chapter22 .C22EXPLAIN1<-"How to define liquidity? //////////////////////////////// Liquidity is defined as a) How quickly convert an asset into cash b) without losing its true value /////////////////////////////// " .C22EXPLAIN2<-"Why liquidity is important? //////////////////////////////// For several reasons that liquidity matters a) short-term survival b) less costly for investors /////////////////////////////// " .C22EXPLAIN3<-"How to measure liquidity? //////////////////////////////// Accounting: 1) current ratio 2) quick ratio 3) cash ratio Finance 1) bid-ask spread 2) Aminud (2002) illiquidity 3) Pastor and Stambaugh (2003) 4) Others /////////////////////////////// " .C22EXPLAIN4<-" current ratio, quick and cash ratios //////////////////////////////// Current assets Current ratio = -------------- current liablities Current assets - Inventory Quick ratio = --------------------------- current liablities Cash & its equvalents Cash ratio = ---------------------- current liabilities /////////////////////////////// " .C22EXPLAIN5<-"size //////////////////////////////// The bigger the firm, the higher the liquidity. The logic is that when a company has just started, its size will be relatively small. Its trading will be less frequent after it is listed on a stock exchange. In other words, its liquidity would be small. When a firm grows, its size will increase as well. Its trading volumes will become more active, i.e., more liquidity. Thus, the relative size will be an excellent measure to measure liquidity. The size here is defined as the price times the shares outstanding. The market cap for IBM is $223.54B. //////////////////////////////// " .C22EXPLAIN6<-"Turnover //////////////////////////////// The turnover is the total trading volume divided by its corresponding market capitalization (price times the number of shares outstanding). The higher the turnover, the higher the liquidity. Assume two firms have the same market capitalization of $10m. The first firm’s annual turnover is 5, while the second firm’s annual turnover is 1. Then, we could claim that the first firm is more liquid than the second firm. We have one line code to find out the current IBM stock price. //////////////////////////////// " .C22EXPLAIN7<-"Trading volume //////////////////////////////// Here, the trading volume is defined as the number of shares traded. The higher the trading volume, the higher the liquidity. The following codes will estimate IBM and DELL's average daily trading volumes. Since the trading volume for DELL is much higher than that of DELL, we could argue that DELL is more liquid. //////////////////////////////// " .C22EXPLAIN8<-"dollar trading volume //////////////////////////////// THE DOLLAR TRADING VOLUME Many argue that the number of shares traded could be a better measure of liquidity. For example, if we use dollar trading volume, IBM is more liquid than DELL, see the results below. infile<-'http://datayyy.com/data_csv/ibmDaily.csv' x<-read.csv(infile,header=T) mean(x[1:252,6]*x[1:252,4])/10e6 //////////////////////////////// " .C22EXPLAIN9<-"Roll (1984) spread //////////////////////////////// Roll (1984) designs a method to estimate the spreads by using the first order covariance of price changes. S=2 *sqrt(-cov(A, B) ) (1) where A= deltaP(t-1) B= deltaPP(t) For more detail, see the term project /////////////////////////////// " .C22EXPLAIN10<-"Amihud's (2002) illiquidity //////////////////////////////// Amihud (2002) illiquidity measure uses the absolute daily return over its corresponding trading dollar volume. A monthly stock illiquidity measure is the mean of daily illiquidity measure. 1 |Ri| illiq(t)= --- * sum (--------------- ) (1) n pi * Vi where illiq(t) is a monthly illiquidity measure, n is the number of trading days within the month, Ri is daily return on day i, Vi is the trading volume on day i and Pi is the closing price of the underlying stock on day i. For more detail, see Term Projects /////////////////////////////// " .C22EXPLAIN11<-"Pastor and Stambaugh (2003) liquidity measure //////////////////////////////// Basic logic:Pastor and Stambaugh (2003) design the following regression to estimate individual stock s liquidity. y(t)=alha + 1*x1(t-1)+ 2*x2(t-1)+error(t) (1) where,y(t) is the excess stock return on day t, the excess return is defined as R(t)-Rm(t), R(t) is the stock return, Rm(t) is the market return at time t; x1(t-1) is the lagged stock return, i.e., R(t-1), X2(t-1) is the lagged dollar trading volume, i.e., x2(t-1)=P(t-1)*V(t-1), P(t-1) is the daily closing price of the stock at t-1 and V(t-1) is the daily trading volume at t-1. /////////////////////////////// " .C22EXPLAIN12<-"Data for liquidity (FRED) //////////////////////////////// FRED data https://fred.stlouisfed.org/tags/series?t=liquidity BIS: Global liquidity indicators -------------------------------- The BIS uses the term \"global liquidity\" to refer to the ease of financing in global financial markets. The BIS global liquidity indicators (GLIs) track credit to non-bank borrowers, covering both loans extended by banks and funding from global bond markets through the issuance of international debt securities (IDS). The main focus is on foreign currency credit denominated in three major reserve currencies (US dollars, euros and Japanese yen) to non-residents, ie borrowers outside the respective currency areas. https://data.bis.org/topics/GLI /////////////////////////////// " .C22EXPLAIN13<-"High-frequency data //////////////////////////////// > show_cq1day(10) SYMBOL DATE TIME BID OFR BIDSIZ OFRSIZ MODE QSEQ EX 1 AC 19901101 9:30:44 12.875 13.125 32 5 10 1586 N 2 AC 19901101 9:30:47 12.750 13.250 1 1 12 0 M 3 AC 19901101 9:30:51 12.750 13.250 1 1 12 0 B 4 AC 19901101 9:30:52 12.750 13.250 1 1 12 0 X 5 AC 19901101 10:40:13 12.750 13.125 2 2 12 0 M 6 AC 19901101 13:36:15 12.875 13.000 32 10 12 1593 N 7 AC 19901101 13:36:17 12.750 13.125 1 1 12 0 B 8 AC 19901101 13:36:21 12.750 13.125 1 1 12 0 X 9 AC 19901101 13:40:03 12.875 13.000 32 8 12 1594 N 10 AC 19901101 13:46:17 12.875 13.000 24 8 12 1596 N > shere SYMBOL : ticker DATE : Trading day TIME : second-by-second time stamp BID : Bid price OFR : Offer price BIDSIZ : size of the bid OFRSIZ : offer size MODE : conditions, see c13(7) QSEQ : Sequence number EX : Exchange sybmol, see c13(7) /////////////////////////////// " .C22EXPLAIN14<-"Definitions of MODE and EX //////////////////////////////// Quote condition. These conditions apply to quotes on all exchanges except as indicated. 0 - invalid field for that issue (e.g.,Nasdaq NMS issue). 1 Depth on offer side (1) - Indicated more size behind the quote being disseminated for the offer. This depth may be at the ask price of the quote or at a price immediately outside the disseminated ask quote. 2 Depth on bid side (2) - Similar to Mode 1 in indicating depth, but only for bid quotation 3 Closing quote (3) Indicates the last quote from a participant for that security during the trading day. There may be two closing quotes per symbol at the same price for market-onclose (MOC) transactions.4 4 News dissemination (4) - A regulatory halt used when relevant news influencing the stock is disseminated. Trading is suspended until the resultant impact has been assessed. 5 Fast trading (5) - Used during extremely active periods of short duration. While in this mode, quotes are entered on a \"best efforts\" basis. 6 Depth on bid and offer (6) - Indicated more size behind the reported quote for both bid and offer. The depth may be either at or immediately outside the quote. 7 Order imbalance (7) A non-regulatory halt used when there is a severe buy or sell order imbalance. To prevent a disorderly market,trading is temporarily suspended. 8 Closed market maker (NASD) (8) - This condition is disseminated by each market maker to signify either the last quote of the day or the premature close of a market maker for the day. In the latter case, the market maker can re-open by transmitting a quote accompanied by Mode 12. more...., see https://www.acsu.buffalo.edu/~keechung/TEM/TAQ%20User%20Guide.pdf /////////////////////////////// " .C22EXPLAIN15<-"bid-ask spread //////////////////////////////// Spread = askPrice - bidPrice spread askPrice - bidPrice relative Spread = --------- = ------------- average average average= (askPrice + bidPrice)/2 /////////////////////////////// " .C22EXPLAIN16<-"The TORQ database //////////////////////////////// The TORQ database contains transactions, quotes, order processing data and audit trail data for a sample of 144 NYSE stocks for the three months November, 1990 through January 1991. This document covers installation, formatting and use of the data. Conceptual and institutional details concerning the data are given in a companion publication Hasbrouck and Sosebee (1992). These data are distributed for purposes of academic research. No warranty is made that they are free of errors. The user assumes all responsibility for the consequences of any errors. /////////////////////////////// " .C22EXPLAIN17<-" //////////////////////////////// ?? Source: http://people.stern.nyu.edu/jhasbrou/Research/Working%20Papers/ Index of /~jhasbrou/Research/Working Papers [ICO] Name Last modified Size Description [DIR] Parent Directory - [ ] Appendix07.nb 02-Jul-2010 12:28 204K [ ] Appendix07.pdf 02-Jul-2010 12:28 355K [TXT] Coint01.sas 02-Jul-2010 12:28 8.7K [ ] CointDocumentation01.pdf 02-Jul-2010 12:28 332K [ ] CointProgs02.zip 02-Jul-2010 12:30 7.7M [ ] CompNBBO02.pdf 18-Oct-2010 14:26 551K [ ] F202Z.zip 02-Jul-2010 12:30 8.7M [ ] FL32.pdf 02-Jul-2010 12:28 592K [ ] HFQ03.pdf 11-Dec-2017 08:12 1.2M [ ] HS6.pdf 02-Jul-2010 12:29 333K [ ] HS10-11-10.pdf 18-Oct-2010 14:26 790K [ ] IslandXS17.pdf 02-Jul-2010 12:29 1.2M [ ] NYSE.PDF 02-Jul-2010 12:29 173K [DIR] Old Stuff/ 04-Feb-2005 15:28 - [ ] TORQ.zip 02-Jul-2010 12:33 49M [ ] TORQDOC3.PDF 02-Jul-2010 12:29 140K [DIR] _notes/ 17-Jan-2010 08:10 - [DIR] _vti_cnf/ 25-Jan-2016 11:51 - [ ] acd05.pdf 02-Jul-2010 12:28 1.6M [ ] hfq05.pdf 21-Mar-2013 12:08 1.2M /////////////////////////////// " .C22EXPLAIN18<-"TORQ manual //////////////////////////////// https://pages.stern.nyu.edu/~jhasbrou/Research/Working%20Papers/TORQDOC3.PDF /////////////////////////////// " .C22EXPLAIN19<-"Videos //////////////////////////////// What is liquidity? (1m5s) https://www.youtube.com/watch?v=Sy7IuMJKiUs How We Determine Liquidity | Trading Concepts (21m7s) https://www.youtube.com/watch?v=jnXiAYcdn-Q /////////////////////////////// " .C22EXPLAIN20<-"Links //////////////////////////////// http://www.investopedia.com/university/ratios/liquidity-measurement/ratio3.asp http://www.investopedia.com/university/ratios/liquidity-measurement/ http://www.bauer.uh.edu/rsusmel/phd/lecture%207.pdf https://kelley.iu.edu/cholden/Goyenko%20Holden%20and%20Trzcinka%20(2009).pdf Convenient liquidity measure for financial markets Oleh Danyliv, Bruce Bland, Daniel Nicholass, https://arxiv.org/pdf/1412.5072.pdf TORQ manual https://pages.stern.nyu.edu/~jhasbrou/Research/Working%20Papers/TORQDOC3.PDF https://www.jstor.org/stable/2490741?seq=1#page_scan_tab_contents http://www.investopedia.com/university/ratios/liquidity-measurement/ratio3.asp http://www.investopedia.com/university/ratios/liquidity-measurement/ http://www.bauer.uh.edu/rsusmel/phd/lecture%207.pdf https://kelley.iu.edu/cholden/Goyenko%20Holden%20and%20Trzcinka%20(2009).pdf https://www.jstor.org/stable/2490741?seq=1#page_scan_tab_contents Wikipedia https://en.wikipedia.org/wiki/Credit_risk Investopeid http://www.investopedia.com/terms/c/creditrisk.asp /////////////////////////////// " .C22EXPLAIN21<-"Credit risk //////////////////////////////// A credit risk is the risk of default on a debt that may arise from a borrower failing to make required payments. In the first resort, the risk is that of the lender and includes lost principal and interest, disruption to cash flows, and increased collection costs. https://en.wikipedia.org/wiki/Credit_risk /////////////////////////////// " .C22EXPLAIN22<-"Credit rating //////////////////////////////// A credit rating is an evaluation of the credit risk of a prospective debtor (an individual, a business, company or a government), predicting their ability to pay back the debt, and an implicit forecast of the likelihood of the debtor defaulting.[1] The credit rating represents an evaluation of a credit rating agency of the qualitative and quantitative information for the prospective debtor, including information provided by the prospective debtor and other non-public information obtained by the credit rating agency's analysts. https://en.wikipedia.org/wiki/Credit_rating /////////////////////////////// " .C22EXPLAIN23<-"Credit spread //////////////////////////////// A credit spread is the difference in yield between two bonds of similar maturity but different credit quality. For example, if the 10-year Treasury note is trading at a yield of 6% and a 10-year corporate bond is trading at a yield of 8%, the corporate bond is said to offer a 200-basis-point spread over the Treasury. /////////////////////////////// " .C22EXPLAIN24<-"Unit: basis point //////////////////////////////// one basis point is 1 hundred of 1%. In other words, we divide 100 twice 35 BP(basis point) = 35/100/100 = 0.0035 /////////////////////////////// " .C22EXPLAIN25<-"One example: spread and credit rating //////////////////////////////// year1 year2 year3 year5 year7 year10 year30 Aaa/AAA 5 8 12 18 28 42 65 Aa1/AA+ 10 18 25 34 42 54 77 Aa2/AA 14 29 38 50 57 65 89 Aa3/AA- 19 34 43 54 61 69 92 A1/A+ 23 39 47 58 65 72 95 A2/A 24 39 49 61 69 77 103 A3/A- 32 49 59 72 80 89 117 Baa1/BBB+ 38 61 75 92 103 115 151 Baa2/BBB 47 75 89 107 119 132 170 Baa3/BBB- 83 108 122 140 152 165 204 Ba1/BB+ 157 182 198 217 232 248 286 Ba2/BB 231 256 274 295 312 330 367 Ba3/BB- 305 330 350 372 392 413 449 B1/B+ 378 404 426 450 472 495 530 B2/B 452 478 502 527 552 578 612 B3/B- 526 552 578 604 632 660 693 Caa/CCC+ 600 626 653 682 712 743 775 /////////////////////////////// " .C22EXPLAIN26<-" //////////////////////////////// /////////////////////////////// " .C22EXPLAIN27<-"Term structure of interest rate //////////////////////////////// The retionship between time and risk-free rate. https://finance.yahoo.com/markets/bonds/ For example, on 5/11/2026 Bonds Symbol Name Price Change Change % 52 Wk Range ------ ------------------------------- --------- ----------- ---------- ----------------- ZN=F 10-Year T-Note Futures,Jun-2026 110.328125 -0.078125 -0.07% 109.41-114.38 ^IRX 13 WEEK TREASURY BILL 3.6000 +0.0050 +0.14% 3.59 -5.35 ZT=F 2-Year T-Note Futures,Jun-2026 103.42578125 -0.02734375 -0.03% 103.18-104.61 ^TNX CBOE Interest Rate 10 Year T No 4.4100 +0.0460 +1.05% 3.35 5.00 ^TYX Treasury Yield 30 Years 4.9860 +0.0390 +0.79% 3.72 5.15 ^FVX Treasury Yield 5 Years 4.0680 +0.0550 +1.37% /////////////////////////////// " .C22EXPLAIN28<-"Z- score //////////////////////////////// The co-called Z-score is used to predict the possibility of a firm goes to bankruptcy. This score is a weighted average of 5 ratios based on a firms balance sheet and income statement. For public firms, Altman (1968) offers the following formula. Z = 3.3X1 + 0.99X2 + 0.6X3 + 1.2X4 + 1.4X5 Variable Definition -------- --------------------- X1 EBIT/Total Assets X2 Net Sales/Total Assets X3 Market Value of Equity/Total Liabilities X4 Working Capital/Total Assets X5 Retained Earnings/Total Assets /////////////////////////////// " .C22EXPLAIN29<-"Z- score (levels) //////////////////////////////// Z-score Range Description -------- ----------- > 3.0 Safe 2.7 to 2.99 On Alert. 1.8 to 2.7 Good chances of going bankrupt within 2 years. < 1.80 Probability of Financial distress is very high /////////////////////////////// " .C22EXPLAIN30<-"A=D+E //////////////////////////////// The value of a firm is the sum if its debt and equity. A = D + E A: toal assets D: debt E : equity /////////////////////////////// " .C22EXPLAIN31<-"KMV model //////////////////////////////// We have the following euqation: E = max?(A-D,0) E: equity A: assets D: debt Recall for a call option, we have the following payoff function. Payoff (call)=max?(sT-K,0) where sT is the terminal stock price K is the exercise price /////////////////////////////// " .C22EXPLAIN32<-"KMV model (logic) //////////////////////////////// The payoff function for a call option buyer is given below. payoff(call) = Max( sT-X, 0) (1) where sT is the stock price at T T is the maturity X is the exercise price For example, we then sT=10, and x=15 The price of the cal is zero since noboy is willing to pay $15 to buy a share when its market value is $10. when sT=20, the payoff will be $5. Now, let's look at the relationship between D and E. ---------------------------------- Concept #1: Equity holder is a so-called residual benefit claimner. It means that only after debt (bond) holders get paid then the equity holders would get anything left. A= E + D Where A is assets E is equity D is debt Obviously, only when A > D, E>0 E = max(A-D,0) (2) This is the same as the payoff for a call option: payoff(call) = Max( sT- X, 0) (1) E = Max( A - D, 0) (2) /////////////////////////////// " .C22EXPLAIN33<-"KMV model (math) //////////////////////////////// E= A*N(d1) - e^(-rT) D* N(d2) (1) A N(d1)*A*sigmaA sigmaE=--*deltaSigmaA = -------------- (2) E E A ln(----) + (r+0.5*sigmaA^2)*T D d1= ----------------------------- sigmaA * sqrt(T) d2= d1 - sigmaA*sqrt(T) /////////////////////////////// " .C22EXPLAIN34<-"Credit rating and default probability //////////////////////////////// Default rate (%) Moodys/S&P Rating category Muni Corp Muni Corp Aaa/AAA 0.00 0.52 0.00 0.60 Aa/AA 0.06 0.52 0.00 1.50 A/A 0.03 1.29 0.23 2.91 Baa/BBB 0.13 4.64 0.32 10.29 Ba/BB 2.65 19.12 1.74 29.93 B/B 11.86 43.34 8.48 53.72 Caa-C/CCC-C 16.58 69.18 44.81 69.19 Averages Investment grade 0.07 2.09 0.20 4.14 Non-investment grade 4.29 31.37 7.37 42.35 All 0.10 9.70 0.29 12.98 /////////////////////////////// " .C22EXPLAIN35<-"Distance to Default //////////////////////////////// Distance to default (DD) is defined by the following formula, where A is the market value of the total assets and simga_A is its risk. The interpretation of this measure is clear, the higher DD, the safer is the firm. A- Default Point DD = -------------------- A * sigma(A) /////////////////////////////// " .C22EXPLAIN36<-"Recovery rates given default //////////////////////////////// Table 15.7 Recovery rates based on the seniority Recovery rate (% of face value) ----------------------------- Senior-secured debt 58% Senior-unsecured debt 48% Senior-subordinate 35% Subordinated 32% Discounted and zero coupon 21% /////////////////////////////// " .C22EXPLAIN37<-"Recovery rates based on the industry //////////////////////////////// Recovery rates based on the industry Industry Average Recovery Rate Number of observations --------- ------------------ --------------- Public Utilities 70.5% 56 Chemical, petroleum, rubber and plastic products 62.7% 35 Machinery, instruments and related products 48.7% 36 Services- business and personal 46.2% 14 Food and kindred products 45.3% 18 Wholesale and retail trade 44.0% 12 Diversified manufacturing 42.3% 20 Casino, hotel and recreation 40.2% 21 Building materials, metals, and fabricated products 38.8% 68 Transportation and transportation equipment 38.4% 52 Communication, broadcasting, movie production 37.1% 65 Printing and publishing Financial institutions 35.7% 66 Construction and real estate 35.3% 35 General merchandize stores 33.2% 89 Mining and petroleum drilling 33.0% 45 Textile and apparel products 31.7% 31 Wood, paper and leather products 29.8% 11 Lodging, hospitals, and nursing faciliti es 26.5% 22 -------------------------------------- ----- --- Total 41.0% 696 /////////////////////////////// " .C22EXPLAIN38<-"Recovery rate and LGD (loss given default) //////////////////////////////// Recovery rate and LGD (loss given default) LGD (Loss given default) is equal to 1 minus the Recovery Rate. LGD=1-Recoverary rate /////////////////////////////// " .C22EXPLAIN39<-"1-year Rating Transition Matrix //////////////////////////////// Year T+1 -------------------------------------------------------------------- Year T AAA AA A BBB BB B CCC Default AAA 0.9081 0.0833 0.0068 0.0006 0.0008 0.0002 0.0001 0.0001 AA 0.0070 0.9065 0.0779 0.0064 0.0006 0.0013 0.0002 0.0001 A 0.0009 0.0227 0.9105 0.0552 0.0074 0.0026 0.0001 0.0006 BBB 0.0002 0.0033 0.0595 0.8593 0.0530 0.0117 0.0112 0.0018 BB 0.0003 0.0014 0.0067 0.0773 0.8053 0.0884 0.0100 0.0106 B 0.0001 0.0011 0.0024 0.0043 0.0648 0.8346 0.0407 0.0520 CCC 0.0021 0.0000 0.0022 0.0130 0.0238 0.1124 0.6486 0.1979 D 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 /////////////////////////////// " .C22EXPLAIN40<-"Moodys Average 5-year Rating Transition Matrix (1920-1992) //////////////////////////////// Source: Moody's Investor Service, July, 1997, Moody's Rating Migration and the Credit Quality Correlation, http://www.efalken.com/banking/html's/matrices.htm Note that WR (Withdraw Rating) indicates that Moodys has withdrawn their ratings. Year T+5 --------------------------------------------------------------------- Year T Aaa Aa A Baa Ba B Caa-C Default WR Aaa 0.6078 0.1521 0.0433 0.0096 0.0049 0.0009 0.0003 0.0014 0.1796 Aa 0.0343 0.5414 0.1593 0.0342 0.0116 0.0020 0.0002 0.0058 0.2112 A 0.0020 0.0585 0.5574 0.1034 0.0258 0.0069 0.0008 0.0108 0.2343 Baa 0.0009 0.0092 0.1001 0.4706 0.0803 0.0200 0.0032 0.0228 0.2928 Ba 0.0004 0.0026 0.0192 0.1040 0.3648 0.0809 0.0129 0.0590 0.3562 B 0.0002 0.0009 0.0048 0.0241 0.1025 0.3212 0.0353 0.1291 0.3819 Caa-C 0.0000 0.0000 0.0002 0.0157 0.0403 0.0777 0.2960 0.2798 0.2904 /////////////////////////////// "