---
title:
output:
  revealjs::revealjs_presentation:
    theme: white
    css: white-edits.css
    highlight: tango
    transition: slide
    self_contained: false
    pandoc_args: ["--wrap=preserve"]
    reveal_plugins: ["chalkboard","search"]
    transitionSpead: fast
    mathjax: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_SVG"
    reveal_options:
      minScale: 1.0
      maxScale: 1.0
      width: 1536
      height: 864
      slideNumber: true
      controlsTutorial: true
      chalkboard:
        theme: whiteboard
        readOnly: false
---

## ACCT 101: Bonds {data-background-video="../Backgrounds/title.mp4" data-background-video-loop=true class="header no-toc-progress present-only" data-state="no-toc-progress"}

<!-- "reveal_plugins:..." and "chalkboard:" are handled by prep.py -->
```{r helpers, echo=FALSE, warning=FALSE, message=F}
library(knitr)
library(kableExtra)
html_df <- function(text, cols=NULL, col1=FALSE, full=F) {
  if(!length(cols)) {
    cols=colnames(text)
  }
  if(!col1) {
    kable(text,"html", col.names = cols, align = c("l",rep('c',length(cols)-1))) %>%
      kable_styling(bootstrap_options = c("striped","hover"), full_width=full)
  } else {
    kable(text,"html", col.names = cols, align = c("l",rep('c',length(cols)-1))) %>%
      kable_styling(bootstrap_options = c("striped","hover"), full_width=full) %>%
      column_spec(1,bold=T)
  }
}
```

<h3 class="date"><br>Session 8</h3>
<h2 class="author"><br>Dr. Richard M. Crowley<br>rcrowley@smu.edu.sg<br><a href="http://rmc.link/">http://rmc.link/</a></h2>

## ACCT 101: Bonds {data-background="../Backgrounds/title.jpg" class="header no-toc-progress present-not" data-state="no-toc-progress"}

<h3 class="date"><br>Session 8</h3>
<h2 class="author"><br>Dr. Richard M. Crowley<br>rcrowley@smu.edu.sg<br><a href="http://rmc.link/">http://rmc.link/</a></h2>

# Front matter {data-background="../Backgrounds/section.jpg" class="header"}

## Quiz 2 {data-background="../Backgrounds/studying.jpg" class="default"}

- Covers everything since Quiz 1
    - Inventory
    - PP&E
    - Intangibles
    - Liabilities
    - Bonds
- For calculations, the level of rounding will be specified
- Same format as quiz 1
    - Practice quiz and additional practice are on eLearn

## Learning objectives {data-background="../Backgrounds/default.jpg" class="default"}

<div class="left">
![Diagram](../Course_Diagrams/ACCT_101_course_map_8.png){width=450px}
</div>
<div class="right">

Liabilities (Chapter 9)

1. Account for bonds at par
2. Account for bonds not at par
3. Account for bond buybacks
</div>

# Bonds {data-background="../Backgrounds/section.jpg" class="header"}

## What is a bond? {data-background="../Backgrounds/default.jpg" class="default"}

<div class="left">

- An interest bearing note payable
- Issued by a company in a manner similar to stock
    - Often to investors (like stock)
    - Trades on an exchange daily (like stock)
    - Does not offer ownership
        - For the simpler bonds we'll cover in this course
- Usually due in 5 or 10 years, frequently longer
- Interest is usually paid every 6 months
</div>
<div class="right">
<img src="../Figures/Bond.jpg" style="max-height:300px">
</div>

## Types of bonds {data-background="../Backgrounds/default.jpg" class="default"}
- Backing
    - Secured bonds: Backed by assets such as real estate (mortgage bonds) or other assets (collateral trust bonds)
    - *Unsecured bonds*: No asset backing; also called debentures
- Principal Payments
    - *Term Bonds*: Mature on a single date
    - Serial bonds: Pay off principal in installments
- Other features
    - Convertible bonds: Bonds that can be converted into common stock at the creditor's request
    - Callable bonds: Bonds that can be paid early at a stated amount prior to maturity at the debtor's request

> You only need to price **unsecured term bonds** in this course

## Bond characteristics {data-background="../Backgrounds/default.jpg" class="default"}
- From the bond holder's perspective
    - Higher precedence than stock during bankruptcy
    - No voting rights
    - No ownership
- From the bond issuer's perspective
    - Interest payments are tax deductible
    - Guaranteed cash outflows
    - Raises funds without giving up ownership
    
## Life of a bond {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/Bond.png" style="height:600px">

## Bond terms {data-background="../Backgrounds/reference.jpg" class="default"}

- Term: length of time of the bond
- Maturity date: when the bond is due
- Par value: The amount the bond will pay at maturity
    - Aka: principal amount, maturity value, face value
- Coupon rate: Yearly % of interest paid
    - Aka: Stated interest rate, nominal rate
- Yield: Yearly percent return if you purchase the bond today
    - This was our discount rate last week
    - Aka: Market interest rate, effective interest rate
- Price: % of par value you need to pay to purchase
    - $100 \Rightarrow$ Full price, "At par"
    - $<100 \Rightarrow$ Discount
    - $>100 \Rightarrow$ Premium

## Bond quote terms {data-background="../Backgrounds/reference.jpg" class="default"}

- CUSIP: Unique identifier given to the bond
    - Ex.: <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C195802&symbol=F.GD">345277AE7</a>, <a href="https://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C97149&symbol=F.GY">345370CA6</a>, <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C10166&symbol=F.GI">345370BH2</a>
- Name: Name given to the bond
    - Usually the debtor's ticker symbol followed by a bond-specific portion
        - <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C195802&symbol=F.GD">F.GD</a>, <a href="https://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C97149&symbol=F.GY">F.GY</a>, <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C10166&symbol=F.GI">F.GI</a>
- Day count: 30/360 or actual
    - *30/360*: Assumes 30 days per month, 360 days per year
        - Most common day count for bonds
        - Easier to calculate
    - Actual: Count the number of days

> Bond quotes available at <a href="http://finra-markets.morningstar.com/BondCenter/">Morningstar</a>

## How to do day counts {data-background="../Backgrounds/default.jpg" class="default"}

- Actual/Actual day count:
    - Use the actual number of days divided by the number of days in the year (365 or 366)
- 30/360 day count:
    - Full months have 30 days each
    - Full years have 360 days
    - If the starting date is the last day of the month, call it the 30th
    - If the adjusted starting date is the 30th, then if the ending date is the last day of a month, call it the 30th as well
        - If not, the 31st becomes the 1st of the next month
        - If not, the 28th or 29th (February) stays where it is


> Example: Between June 20th and August 25th, there are actually 66 days.  Using 30/360, we say there are 65 days

## How to do day counts {data-background="../Backgrounds/reference.jpg" class="default"}

<img src="../Diagrams/30_360.png" width="27%">

## Day counts, 30/360 {data-background="../Backgrounds/question1.jpg" class="default"}

<ol>
<li style="margin-bottom:3em"> How many days are there between August 13th and December 20th?
<li style="margin-bottom:3em"> How many days are there between August 13th and December 10th?
<li style="margin-bottom:3em"> How many days are there between December 30th and March 31st?
<li style="margin-bottom:3em"> How many days are there between December 20th and March 31st?
</ol>

## Day counts, 30/360 {data-background="../Backgrounds/answer.jpg" class="default exclude"}

<img src="../Diagrams/Calendars_30_360_soln.png" width="1000px">

# Valuing bonds {data-background="../Backgrounds/section.jpg" class="header"}

## Recap of NPV {data-background="../Backgrounds/default.jpg" class="default"}

- We had 2 formulas last week that will help us calculate bond values
    - Single cash flow in the future: $NPV = \frac{CF}{(1+r)^T}$
    - Repeated cash flow (annuity): $NPV = \frac{CF}{r} \cdot \left[1-\frac{1}{(1+r)^T}\right]$
- From an investor's perspective, a bond is:
    - An initial payment
    - An annuity received every 6 months
        - Annuity: Receiving the same cash flow every period for a set number of periods
    - A final cash flow
- Investors pay the NPV of a bond when discounting by the *yield*

## Let's value a bond! {data-background="../Backgrounds/default.jpg" class="default"}

- The bond: <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C531743&symbol=MSFT.GG">MSFT.GG</a>
    - Microsoft issued on September 27, 2010
    - 10 year bond
    - $3.10\%$ yield when it was issued
    - $3.00\%$ coupon rate
    - Semiannual coupon payments (interest payments)
    - 30/360
    - \$1B par value, in total

- One trick needed:
    - Since this (and most other) bonds pay their interest *semiannually*, we need to calculate using half-years

## Using our NPV formulas {data-background="../Backgrounds/default.jpg" class="default"}

> How much would investors pay for the bond?

- Principal, $P$, is $1B
- Annuity cash flow = $3.00\%$ of principal per year, paid in 2 payments
    - $3\% \times \$1B = \$30M$ per year, so $CF=\$15M$ semiannually
- Discount rate = yield = $3.10\%$, $r=\frac{3.10\%}{2}=1.55\%$ semiannually
- Number of *semiannual periods*, $T=20$

## Using our NPV formulas: Annuity {data-background="../Backgrounds/default.jpg" class="default"}

- $P=\$1B$, $CF=\$15M$, $r=1.55\%$, $T=20$

> Annuity portion

$$\begin{align*}
Annuity\ NPV&=\frac{CF}{r} \cdot \left[1-\frac{1}{(1+r)^{T}}\right] \\
&=\frac{15M}{0.0155} \cdot \left[1-\frac{1}{(1+0.0155)^{20}}\right] \\
&\approx \$256M
\end{align*}$$

## Using our NPV formulas: Principal {data-background="../Backgrounds/default.jpg" class="default"}

- $P=\$1B$, $CF=\$15M$, $r=1.55\%$, $T=20$

> Final cash flow (principal)

$$\begin{align*}
Principal\ NPV&=\frac{P}{(1+r)^T} \\
&= \frac{\$1B}{(1+0.0155)^{20}} \\
&\approx \$735M
\end{align*}$$

## Using our NPV formulas: Principal {data-background="../Backgrounds/default.jpg" class="default"}

- $P=\$1B$, $CF=\$15M$, $r=1.55\%$, $T=20$

> Bond price, i.e., bond NPV

$$\begin{align*}
NPV&= Annuity\ NPV + Principal\ NPV \\
&= \$256M + \$735M \\
&= \$991M 
\end{align*}$$

- This means that investors paid \$991M for the bond issue when it was issued.

> Note: If you solve this more precisely, you will get an answer \$.01M off from Morningstar's price, as the bond was actually a 10 year and 3 day issue.  We will ignore those 3 days.  We won't deal with these fractional years for bond pricing.

## Simplifying our equation {data-background="../Backgrounds/reference.jpg" class="default"}

- We can bring everything together into 1 equation:

$$\begin{equation*}
Price = \frac{CF}{r} \cdot \left[1-\frac{1}{(1+r)^T}\right] + \frac{P}{(1+r)^T}
\end{equation*}$$

- Variables:
    - $P$: Principal amount, aka the par value
    - $i$: Coupon rate
    - $y$: Yield
    - $Y$: Length of bond, in years
    - $n$: Number of payments per year
- Then:
    - $CF=\frac{P\times i}{n}$: Cash flow per coupon
    - $T=Y\times n$: Number of payments
    - $r=y/n$: Discount rate

## Applying the equation to our bond {data-background="../Backgrounds/default.jpg" class="default"}

$$\begin{equation*}
Price = \frac{CF}{r} \cdot \left[1-\frac{1}{(1+r)^T}\right] + \frac{P}{(1+r)^T}
\end{equation*}$$

- Given:
    - $P=\$1B,\quad i=3\%,\quad y=3.10\%,\quad Y=10,\quad n=2$
- Calculate:
    - $CF=\frac{p\times i}{n} = \frac{\$1B \times 3\%}{2}=\$15M$
    - $T=Y\times n=10\times 2 = 20$
    - $r=y/n = 3.10\%/2 = 1.55\%$

$$\begin{align*}
Price &= \frac{\$15M}{0.0155} \cdot \left[1-\frac{1}{(1+0.0155)^{20}}\right] + \frac{\$1B}{(1+0.0155)^{20}} \\
&\approx \$991M
\end{align*}$$

## What about the table method? {data-background="../Backgrounds/default.jpg" class="default"}

- The table method is allowed on the final exam, and annuity and NPV tables will be provided
- Table equation: $Price=CF \times Annuity\_factor + P\times NPV\_factor$
    - $Annuity\_factor$ comes from the cell in the annuity table corresponding to $T$ periods and $r$ discount rate
    - $NPV\_factor$ comes from the cell in the NPV table corresponding to $T$ periods and $r$ discount rate

> The *equation method* is more accurate, works for any $r$ and $T$, and can also be used in your other classes

## Practice {data-background="../Backgrounds/question1.jpg" class="default"}

- Bond: McDonald's <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C702618&symbol=MCD4248394">MCD4248394</a>
    - Principal of \$700M
    - Coupon rate of 3.375\%
    - Yield of 3.39\%
    - 5 year bond
    - Semiannual coupon payments

> What is the price?

<p style="margin-bottom:10em"></p>

## Solution {data-background="../Backgrounds/answer.jpg" class="default exclude"}

- $P = \$700M$
- $CF = \$700M \times 3.375\%/2\ per\ year=\$11.8125M$
- $T = 5\ years \times 2\ per\ year = 10\text{ half-years}$
- $r = 3.39\%/2\ per\ year = 1.695\%$

$$
\begin{align*}
  Price &= \frac{CF}{r} \cdot \left[1-\frac{1}{(1+r)^T}\right] + \frac{P}{(1+r)^T} \\
  &= \frac{\$11.8125M}{0.01695} \cdot \left[1-\frac{1}{(1+0.01695)^{10}}\right] + \frac{\$700M}{(1+0.01695)^{10}} \\
  &\approx \$699.52M
\end{align*}
$$

# Accounting for bonds: Par {data-background="../Backgrounds/section.jpg" class="header"}

## Accounting for bonds {data-background="../Backgrounds/default.jpg" class="default"}

- We need to know:
    - Principal
    - Price (we can solve for this if not given)
    - Yield
    - Coupon amount (or rate)
    - Coupon payments per year
    - Count basis (30/360 usually)
- Types of bonds:
    - Bond *at par*: Coupon rate = yield $\Leftrightarrow$ price = par value
    - *Discount* bond: Coupon rate < yield $\Leftrightarrow$ price < par value
    - *Premium* bond: Coupon rate > yield $\Leftrightarrow$ price > par value
- Steps
    1. Account for bond issuance
    2. Account for coupon payments
    3. Account for accrued interest expense at year end
    4. In the final period, pay back the principal

## Bonds at par {data-background="../Backgrounds/default.jpg" class="default"}

- Example bond for these slides:
    - Principal = \$100M
    - Price = \$100M
    - Yield = 5%
    - Coupon rate = 5%
    - Semiannual coupon payments (every 6 months)
    - Count basis: 30/360
- Assume it's a 10 year bond issued on March 10th, 2018
- Assume the firm issuing the bond uses a Dec 31 year end

## Bonds at par: Issuance {data-background="../Backgrounds/default.jpg" class="default"}

- If a bond is at par value, the accounting is the same structure as a note payable
- Step 1: Account for bond issuance

<img src="../Diagrams/JE_9-1.png" width="60%">

## Bonds at par: Coupon payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2: Account for coupon payments
    - Interest expense
    - Cash payment is the coupon

<img src="../Diagrams/JE_9-2.png" width="60%">

## Bonds at par: Adjusting entry {data-background="../Backgrounds/default.jpg" class="default"}

- Step 3: Account for accrued interest expense at year end
    - The accrued interest is based on the number of *days*
        - We'll use 30/360 day counts unless otherwise stated
        - Interest owed will be $CF \times \frac{days}{180}$

<img src="../Diagrams/JE_9-3.png" width="60%">

## Bonds at par: Coupon after adjusting {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2 revisited: Account for coupon payments

<img src="../Diagrams/JE_9-4.png" width="60%">

## Bonds at par: Final payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 4: In the final period, pay back the principal (and a coupon)
- Since interest expense is the same every period for bonds at par, we can figure this out

<img src="../Diagrams/JE_9-5.png" width="60%">

## Practice: Bonds at par {data-background="../Backgrounds/group.jpg" class="default"}

- Bond: Ford's <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C195802&symbol=F.GD">F.GD</a>
    - Principal: $366.53M
    - Yield: 9.3%
    - Coupon rate: 9.3%
    - Semiannual coupons
    - 30/360
    - Issued on March 1, 1998
    - 32 year bond
    - Note: Ford's fiscal year ends on December 31

> Determine Ford's journal entries for the bond for issuance, the first coupon, the adjusting entry, and the second coupon

## {data-background="../Backgrounds/graph_paper.png" class="print-only"}


# Accounting for bonds: Discount {data-background="../Backgrounds/section.jpg" class="header"}

## Discount bonds {data-background="../Backgrounds/default.jpg" class="default"}

- Trading at a price *below* par!
    - Equivalent to having a coupon rate *lower than* yield
- Example bond for these slides:
    - Principal = \$100M
    - *Price = \$92.56M*
    - *Yield = 6%*
    - Coupon rate = 5%
    - Semiannual coupon payments (every 6 months)
    - Count basis: 30/360
- Assume it's a 10 year bond issued on March 10th, 2018
- Assume the firm issuing the bond uses a Dec 31 year end

## Effective interest method {data-background="../Backgrounds/reference.jpg" class="default"}

- Recall:
    - Bond payable amount is the par value
    - Cash amount is the price
- Since these aren't equal, our very first entry won't balance!

> We'll use the *Effective Interest Method* to fix this

- Record a *contra-liability* to our bond payable to reflect the difference
    - Account name is *Discount on bonds payable*
- Over time, we remove the discount by recording extra interest expense each period
- Define *Carrying value* to be $Payable-Discount$

> Interest expense will be $Carrying\ value\times yield/n$

## Bonds at discount: Issuance {data-background="../Backgrounds/default.jpg" class="default"}

- Step 1: Account for bond issuance

<img src="../Diagrams/JE_9-6.png" width="60%">

## Bonds at discount: Coupon payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2: Account for coupon payments
    - Need to use the effective interest method!

<img src="../Diagrams/JE_9-7.png" width="60%">

## Bonds at discount: Adjusting entry {data-background="../Backgrounds/default.jpg" class="default"}

- Step 3: Account for accrued interest expense at year end
    - Interest owed and interest expense will be multiplied by $\frac{days}{180}$

<img src="../Diagrams/JE_9-8.png" width="60%">

## Bonds at discount: Coupon after adjusting {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2 revisited: Account for coupon payments

<img src="../Diagrams/JE_9-9.png" width="60%">

## Bonds at discount: Final payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 4: In the final period, pay back the principal (and a coupon)
- You won't be asked to figure this out without extra information

<img src="../Diagrams/JE_9-10.png" width="50%">

# Accounting for bonds: Premium {data-background="../Backgrounds/section.jpg" class="header"}

## Premium bonds {data-background="../Backgrounds/default.jpg" class="default"}

- Trading at a price *above* par!
    - Equivalent to having a coupon rate *higher than* yield
- Example bond for these slides:
    - Principal = \$100M
    - *Price = \$108.18M*
    - *Yield = 4%*
    - Coupon rate = 5%
    - Semiannual coupon payments (every 6 months)
    - Count basis: 30/360
- Assume it's a 10 year bond issued on March 10th, 2018
- Assume the firm issuing the bond uses a Dec 31 year end

## Effective interest method {data-background="../Backgrounds/reference.jpg" class="default"}

- Recall:
    - Bond payable amount is the par value
    - Cash amount is the price
- Since these aren't equal, our very first entry won't balance!

> We'll use the *Effective Interest Method* to fix this

- Record a *liability* along with our bond payable to reflect the difference
    - Account name is *Premium on bonds payable*
- Over time, we remove the premium by recording lower interest expense each period
- Define *Carrying value* to be $Payable+Premium$

> Interest expense will be $Carrying\ value\times yield/n$

## Bonds at premium: Issuance {data-background="../Backgrounds/default.jpg" class="default"}

- Step 1: Account for bond issuance

<img src="../Diagrams/JE_9-11.png" width="60%">

## Bonds at premium: Coupon payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2: Account for coupon payments
    - Need to use the effective interest method!

<img src="../Diagrams/JE_9-12.png" width="60%">

## Bonds at premium: Adjusting entry {data-background="../Backgrounds/default.jpg" class="default"}

- Step 3: Account for accrued interest expense at year end
    - Interest owed and interest expense will be multiplied by $\frac{days}{180}$

<img src="../Diagrams/JE_9-13.png" width="60%">

## Bonds at premium: Coupon after adjusting {data-background="../Backgrounds/default.jpg" class="default"}

- Step 2 revisited: Account for coupon payments

<img src="../Diagrams/JE_9-14.png" width="60%">

## Bonds at premium: Final payment {data-background="../Backgrounds/default.jpg" class="default"}

- Step 4: In the final period, pay back the principal (and a coupon)
- You won't be asked to figure this out without extra information

<img src="../Diagrams/JE_9-15.png" width="50%">

# Bonds not at par {data-background="../Backgrounds/section.jpg" class="header"}

## What's actually going on here? {data-background="../Backgrounds/default.jpg" class="default"}

- The effective interest method distributes the discount or premium over the life of the bond
    - The discount or premium hits 0 just as the last coupon is paid
- Discounts lead to higher expenses each year
    - We treat the shortfall in cash for a discount bond as a large amount of interest expense, and amortize it over the life of the bond
- Premiums lead to lower expenses each year
    - We treat the excess cash for a premium bond as free money that will cancel out some of our interest payments, and thus we amortize it over the life of the bond

## Visualizing Carrying value {data-background="../Backgrounds/default.jpg" class="default"}

```{r bondtable_par, echo=FALSE, warning = FALSE, fig.width=8}
#Semiannual 5% coupon bonds
suppressPackageStartupMessages(library(plotly))
m <- list(
  l = 60,
  r = 50,
  b = 60,
  t = 100,
  pad = 4
)
period <- 0:20
r1 <- 0.06
r2 <- 0.05
r3 <- 0.04
carry1 <- as.vector(rep(0,21))
carry2 <- as.vector(rep(0,21))
carry3 <- as.vector(rep(0,21))
interest <- as.vector(rep(2500000,21))
interest[[1]] <- 0
iexp1 <- as.vector(rep(0,21))
iexp2 <- as.vector(rep(0,21))
iexp3 <- as.vector(rep(0,21))
carry1[[1]] <- 2500000/0.03*(1-1/1.03^20) + 100000000/1.03^20
carry2[[1]] <- 2500000/0.025*(1-1/1.025^20) + 100000000/1.025^20
carry3[[1]] <- 2500000/0.02*(1-1/1.02^20) + 100000000/1.02^20
for (x in 2:21) {
  iexp1[[x]] <- carry1[[x-1]] * r1/2
  carry1[[x]] <- carry1[[x-1]] + iexp1[[x]] - interest[[x]]
  iexp2[[x]] <- interest[[x]]
  carry2[[x]] <- carry2[[x-1]]
  iexp3[[x]] <- carry3[[x-1]] * r3/2
  carry3[[x]] <- carry3[[x-1]] + iexp3[[x]] - interest[[x]]
}
df <- data.frame(period,carry1,carry2,carry3,iexp1,iexp2,iexp3,interest)

plot_ly(df,x=~period,y=~carry1, name='Discount', type='scatter', mode='markers', width = 800, height = 500) %>%
  add_trace(y=~carry2, name='At Par', mode='markers') %>%
  add_trace(y=carry3, name='Premium', mode='markers') %>%
  layout(autosize = F, margin = m, xaxis=list(title="Period"), yaxis=list(title="Carrying value"))
```


## Interest Expense {data-background="../Backgrounds/default.jpg" class="default"}

```{r carrying2, echo=FALSE, warning = FALSE, plotly=TRUE}
plot_ly(df,x=~period,y=~iexp1, name='Discounted', type='scatter', mode='markers', width = 800, height = 500) %>%
  add_trace(y=~iexp2, name='At Par', mode='markers') %>%
  add_trace(y=iexp3, name='Premium', mode='markers') %>%
  layout(autosize = F, margin = m,
         xaxis=list(title="Period",range=c(1,20)), yaxis=list(title="Interest expense"))
```

## Practice: Bonds not at par {data-background="../Backgrounds/group.jpg" class="default"}

> For each of the following bonds, calculate the price and determine Ford's journal entries for the bond for issuance, and the next 3 journal entries (1 adjusting and 2 coupon payments).  Ford's fiscal year end is December 31st.

<div class="left">
- Bond: Ford's <a href="https://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C97149&symbol=F.GY">F.GY</a> (Discount)
    - Principal: $1,800M
    - Yield: 7.53%
    - Coupon rate: 7.45%
    - Semiannual coupons
    - 30/360
    - Issued on July 16, 1999
    - 32 year bond
</div>
<div class="right">
- Bond: Ford's <a href="http://finra-markets.morningstar.com/BondCenter/BondDetail.jsp?ticker=C10166&symbol=F.GI">F.GI</a> (Premium)
    - Principal: $300M
    - Yield: 9.04%
    - Coupon rate: 9.950%
    - Semiannual coupons
    - 30/360
    - Issued on February 15, 1992
    - 40 year bond
</div>

## {data-background="../Backgrounds/graph_paper.png" class="print-only"}

## {data-background="../Backgrounds/graph_paper.png" class="print-only"}

# Bond retirement {data-background="../Backgrounds/section.jpg" class="header"}

## Bond retirement {data-background="../Backgrounds/default.jpg" class="default"}

- Firms can retire a bond in two ways:
    1. Work with creditors to establish a price to pay to end the bond.
    2. Buy back bonds on the market.
- To retire a bond:
    1. Record any accrued interest expense
    2. Debit out the bond payable account and any interest payable
    3. Close out any premium or discount account
    4. Credit the amount of cash paid to retire the bond
    5. Record the difference to a *gain on bond retirement* if credit balance, or to a *loss on bond retirement* if debit balance

## Bond retirement example: Bond at par {data-background="../Backgrounds/default.jpg" class="default"}

> Suppose our example bond at par was retired after 1.25 years, on 2019.06.10, for par plus accrued interest.

- Par: \$100M, Coupon rate: 5%, Yield: 5\%
- Carrying value on 2019.03.10: \$100M
- Accrued interest (to pay): $\$100M \times \frac{5\%}{2} \times \frac{90}{180}=\$1.25M$
- Accrued interest expense: $\$100M \times \frac{5\%}{2} \times \frac{90}{180} = \$1.25M$

<img src="../Diagrams/JE_9-17.png" width="60%">

## Bond retirement example: Discount bond {data-background="../Backgrounds/default.jpg" class="default"}

> Suppose our example discount bond was retired after 1.25 years, on 2019.06.10, for par plus accrued interest.

- Par: \$100M, Coupon rate: 5%, Yield: 6\%
- Carrying value on 2019.03.10: \$93.12M (discount: \$6.88M)
- Accrued interest (to pay): $\$100M \times \frac{5\%}{2} \times \frac{90}{180}=\$1.25M$
- Accrued interest expense: $\$93.12M \times \frac{6\%}{2} \times \frac{90}{180} = \$1.40M$

<img src="../Diagrams/JE_9-16.png" width="60%">

## Bond retirement example: Premium bond {data-background="../Backgrounds/default.jpg" class="default"}

> Suppose our example premium bond was retired after 1.25 years, on 2019.06.10, for par plus accrued interest.

- Par: \$100M, Coupon rate: 5%, Yield: 4\%
- Carrying value on 2019.03.10: \$107.50M (premium: \$7.50M)
- Accrued interest (to pay): $\$100M \times \frac{5\%}{2} \times \frac{90}{180}=\$1.25M$
- Accrued interest expense: $\$107.50M \times \frac{4\%}{2} \times \frac{90}{180} = \$1.07M$

<img src="../Diagrams/JE_9-18.png" width="60%">

# End matter {data-background="../Backgrounds/ending.jpg" class="header"}

## Wrap up {data-background="../Backgrounds/ending.jpg" class="default"}

- For next week
    1. **Quiz 2**
    2. Reading
        - Chapter 11 (Cash flows)
    3. Homework 4: Bonds
        - Graded based on effort!
    4. Extra practice available
        + Bonds eLearn quiz
        + Quiz 2 practice exam
        + Quiz 2 additional practice
        + Quiz 2 book problems
- Survey on the class session at <a href="https://rmc.link/101survey8">rmc.link/101survey8</a>

## Packages used for these slides {data-background="../Backgrounds/code.jpg" class="default stack"}

- kableExtra
- knitr
- plotly
- revealjs

## References {data-background="../Backgrounds/books-old.jpg" class="default stack never"}

## Custom code {data-background="../Backgrounds/code.jpg" class="default stack never"}

<small style="width:100%">
```{r, eval=F}

```
</small>

## NOTES {class="never"}

- Add in something about "only update carrying value when paying a coupon"
- Maybe reorganize the slides to do calculation first, then journal entries? E.g., show a nice spreadsheet for calculating everything -- it's more intuitive than the current method.

Example: 
You should update the carrying value after each coupon payment.  

Let's take a simplified example:  Assume that the carrying value is 100M for a discount bond, and then you see the following three journal entries:

A coupon payment with a CR to Discount on Bond payable of 3M.
An adjusting entry with a CR to Discount on Bond payable of 1M.
A coupon payment with a CR to Discount on Bond payable of 2M, which also included removing the interest payable from #2.
In this case, our carrying value starts at 100M.
After Entry 1 (a coupon payment), it becomes 100M + 3M = 103M.
After Entry 2, it does not change. We did not pay a coupon in entry 2.
After Entry 3 (a coupon payment), it becomes 103M + 1M + 2M = 106M.  Note that we add in the changes from both the adjusting entry and the coupon payment journal entry, since both are tied to the coupon paid in Entry 3.


Also: mention that the change in bond discount/premium is amortization.