Derivatives Practice Problems (With Python)
Derivatives Practice Problems (With Python)
July 7, 2025
DR
T
AF
DR
1 Interest Rates 5
1.1 Return with Discrete Compounding . . . . . . . . . . . . . . . . . . . . . 6
T
1.2 Return with Continuous Compounding . . . . . . . . . . . . . . . . . . . 9
1.3 Equivalent Annual Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Equivalent Continuous Rate . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5
AF
Bond Pricing with Continuous Compounding . . . . . . . . . . . . . . . . 17
1.6 Bond Pricing with Discrete Compounding . . . . . . . . . . . . . . . . . 20
1.7 Compounding Conventions Across Bond Markets . . . . . . . . . . . . . 22
1.8 Yield to Maturity (YTM) Estimation . . . . . . . . . . . . . . . . . . . . 25
1.9 Par Yield with Continuous Compounding . . . . . . . . . . . . . . . . . . 28
1.10 Par Yield with Discrete Compounding . . . . . . . . . . . . . . . . . . . 31
DR
3
Derivatives Practice Problems Alexandre Landi
T
AF
DR
Interest Rates
T
AF
DR
5
Derivatives Practice Problems Alexandre Landi
Problem
An investor receives $1,100 in one year in return for an investment of $1,000 now. Cal-
culate the percentage return per annum under the following compounding conventions:
• Annual compounding
• Semiannual compounding
• Monthly compounding
T
(Adapted from Hull (2021), Practice Question 4.3)
Solution
AF
Let:
m
r
F V = IV 1 +
m
m
r FV
1+ =
m IV
1/m
r FV
1+ =
m IV
r F V 1/m
= −1
m IV
F V 1/m
!
r= −1 ·m
IV
1100
r= −1
1000
= 1.10 − 1
= 0.10
= 10.00%
T
• Semiannual compounding (m = 2):
AF
1100 1/2
!
r= −1 ·2
1000
= (1.0488 − 1) · 2
= 0.0488 · 2
= 0.0976
= 9.76%
DR
1100 1/12
!
r= − 1 · 12
1000
= (1.00797 − 1) · 12
= 0.00797 · 12
= 0.0957
= 9.57%
Answer
• Annual: 10.00%
• Semiannual: 9.76%
• Monthly: 9.57%
Python Solution
import numpy as np
Parameters:
FV: Future Value
IV: Initial Investment
compounding_periods: Compounding frequency per year
Returns:
Nominal annual interest rate
"""
T
rate_per_period = (FV / IV) ** (1 / compounding_periods) - 1
nominal_rate = rate_per_period * compounding_periods
return nominal_rate
# Inputs
FV = 1100
IV = 1000
AF
frequencies = {
1: "Annual",
2: "Semiannual",
12: "Monthly"
}
Video Explanation
Problem
An investor receives $1,100 in one year in return for an investment of $1,000 now. Cal-
culate the percentage return per annum with continuous compounding.
Solution
Let:
T
• Initial value: IV = 1,000
m
r
F V = IV · m→∞
lim 1+
m
= IV · er
DR
Solve for r:
FV
er =
IV
FV
r = ln
IV
1100
r = ln
1000
= ln(1.1)
≈ 0.0953
= 9.53%
Answer
The percentage return per annum with continuous compounding is approximately 9.53%.
Python Solution
import numpy as np
Parameters:
FV: Future Value
IV: Initial Investment
Returns:
Annual rate with continuous compounding
"""
return np.log(FV / IV)
T
# Example usage
r_cont = compute_continuous_return(1100, 1000)
print(f"Continuous return: {r_cont:.2%}")
Video Explanation
AF
A video explanation of this exercise can be found here:
DR
Problem
A bank quotes an annual nominal interest rate of 7% with quarterly compounding. What
is the equivalent annual rate (EAR), assuming annual compounding?
Solution
Let:
T
• r: nominal annual interest rate = 7% = 0.07
• rq = r
= 0.07
AF
= 0.0175: interest rate per quarter
m 4
F V1 = P (1 + rq )
The future value after four quarters (one year) using quarterly compounding is:
The equivalent annual rate ra is defined such that the future value under annual com-
pounding is:
F Va = P (1 + ra )
P (1 + ra ) = P (1 + rq )4
1 + ra = (1 + rq )4
ra = (1 + rq )4 − 1
Substituting rq = 0.0175:
ra = (1 + 0.0175)4 − 1
= (1.0175)4 − 1
≈ 1.0719 − 1
≈ 0.0719
≈ 7.19%
T
Answer
Python Solution
AF
def compute_ear(nominal_rate, compounding_periods):
"""
Compute the Effective Annual Rate (EAR) from a nominal
rate and compounding frequency.
Parameters:
nominal_rate (float): Annual nominal interest rate
DR
Returns:
float: Effective Annual Rate (EAR)
"""
ear = (1 + nominal_rate / compounding_periods) ** compounding_periods - 1
return ear
# Example usage
ear = compute_ear(0.07, 4)
print(f"Effective Annual Rate (EAR): {ear:.4%}")
Video Explanation
T
AF
DR
Problem
A bank quotes an annual nominal interest rate of 7% with quarterly compounding. What
is the equivalent rate with continuous compounding?
Solution
Let:
T
• r: nominal annual interest rate = 7% = 0.07
• rq = r
f
= 0.07
4
AF
= 0.0175: quarterly interest rate
The idea is to find the continuously compounded rate rc that produces the same future
value after one year as quarterly compounding at a nominal rate of 7%.
DR
F Vc = P erc
P erc = P (1 + rq )4
erc = (1 + rq )4
rc = ln (1 + rq )4
= 4 · ln(1 + rq )
0.07
rc = 4 · ln 1 +
4
= 4 · ln(1.0175)
≈ 4 · 0.0171
≈ 0.0694
≈ 6.94%
T
Answer
import numpy as np
Parameters:
nominal_rate: Annual nominal rate (e.g., 0.07 for 7%)
compounding_periods: Number of compounding periods per year
Returns:
Equivalent continuous rate
"""
r_q = nominal_rate / compounding_periods
r_c = compounding_periods * np.log(1 + r_q)
return r_c
# Example usage
r_c = compute_continuous_equivalent(0.07, 4)
print(f"Continuous equivalent rate: {r_c:.4%}")
Video Explanation
T
AF
DR
Problem
T
A bond has the following characteristics:
• Maturity: 30 months
AF
• Coupon: 4% annually, paid semiannually
Since the bond pays 4% annually in two equal semiannual installments, we have:
P V = C · e−r·t
Where:
• C: cash flow
• t: time in years
T
−0.040·0.5
0.5 2 0.040 e = 0.9802 2 · 0.9802 = 1.9604
1.0 2 0.042 e−0.042·1.0 = 0.9589 2 · 0.9589 = 1.9177
−0.044·1.5
1.5 2 0.044 e = 0.9362 2 · 0.9362 = 1.8723
−0.046·2.0
2.0 2 0.046 e = 0.9123 2 · 0.9123 = 1.8242
AF
2.5 102 0.048 e−0.048·2.5 = 0.8870 102 · 0.8870 = 90.4659
= 98.04
Answer
Python Solution
import numpy as np
total_pv = 0
for months, rate, amount in cash_flows:
t = months / 12
df = np.exp(-rate * t)
pv = amount * df
print(f"Time: {t:.2f} yrs | Rate: {rate:.3%} | DF: {df:.4f} | PV: {pv:.4f}")
total_pv += pv
T
AF
DR
Problem
T
A bond has the following characteristics:
Where:
• C: cash flow
• t: time in years
T
Bond Price = 1.9608 + 1.9186 + 1.8736 + 1.8261 + 90.5942
= 98.17
Answer
AF
The cash price of the bond is approximately $98.17.
Python Solution
cash_flows = [
(6, 0.040, 2),
(12, 0.042, 2),
(18, 0.044, 2),
(24, 0.046, 2),
(30, 0.048, 102),
]
m = 2 # Semiannual compounding
total_pv = 0
Motivation
In theoretical finance problems, we often specify whether interest rates are compounded
annually, semiannually, or continuously. But in the real world, these conventions are not
interchangeable or arbitrarily chosen — they reflect deep-rooted market practices, legal
norms, and practical considerations.
This section explores how different markets apply compounding conventions in practice
and why it matters in pricing and valuation.
T
AF
Why Compounding Convention Matters
When discounting future cash flows, the compounding method used must match the
convention of the interest rate curve you’re working with — not the frequency of bond
coupon payments.
Key Point: Just because a bond pays coupons semiannually does not mean you must
DR
This distinction ensures correct pricing, arbitrage-free models, and consistency between
instruments like bonds, FRAs, and swaps.
T
gages (Retail) pounding
Floating-Rate Notes Quarterly (typical) Rate reset determines com-
(FRNs) pounding; often quarterly
AF
Why Continuous Compounding in Derivatives?
• Compounded rates are smooth and differentiable, ideal for yield curve modeling.
Sources
Source URL
U.S. Treasury yield conventions https://home.treasury.gov/policy-issues/
financing-the-government/interest-rate-statistics/
interest-rates-frequently-asked-questions
German Bund quoting standards (ECB) https://www.ecb.europa.eu/stats/financial_markets_and_
interest_rates/euro_area_yield_curves/html/index.en.
html
Investopedia: Bond Yield Conventions https://www.investopedia.com/articles/bonds/08/
bond-yield-convention-conversion.asp
Bloomberg: Swap and zero curve docu- https://www.bloomberg.com/professional/solution/curves
mentation
Bankrate: U.S. Treasury coupon payment https://www.bankrate.com/investing/
norms how-often-do-treasury-bonds-pay-interest
Conclusion
In summary, compounding conventions vary across instruments and regions. Bond an-
alysts and derivatives traders must be vigilant in aligning the valuation method with
the proper market standard — mismatching conventions can lead to pricing errors and
arbitrage opportunities.
Understanding these conventions ensures accurate pricing, risk assessment, and regulatory
compliance in global markets.
T
AF
DR
Problem
T
• Current market price: $104
Goal: Estimate the bond’s yield to maturity (YTM), expressed as a semiannual rate.
AF
(Adapted from Hull (2021), Practice Question 4.11)
12 4
18 4
24 4
30 4
36 104
4 4 4 4 4 104
104 = 1
+ 2
+ 3
+ 4
+ 5
+
(1 + y) (1 + y) (1 + y) (1 + y) (1 + y) (1 + y)6
5
X 4 104
= i
+
i=1 (1 + y) (1 + y)6
Intermediate Answer
The bond’s cash price is $104. The yield that gets us closest is:
T
YTM ≈ 3.2% (semiannual) ⇒ 6.4% per annum (compounded semiannually)
Python Solution
AF
cash_flows = [4, 4, 4, 4, 4, 104]
price_target = 104
We can solve for the semiannual yield to maturity (YTM) numerically using the numpy_financial
package:
This yields:
Interpretation
The par yield is the annual coupon rate that would make the bond’s price equal its face
value. With continuously compounded discounting, higher discounting power reduces
present value. Thus, a slightly higher coupon (7.07%) is required to offset the steeper
discounting from compounding continuously at rising rates.
T
AF
DR
Problem
We are given zero rates and asked to compute the par yield — the annualized coupon
rate at which a bond would be priced at par.
• Maturity: 2 years
T
• Objective: Find coupon rate c such that bond price = 100
AF
(Adapted from Hull (2021), Practice Question 4.12)
Let c be the annual coupon rate (expressed in decimal form). Since the bond pays
semiannual coupons, each coupon payment is 2c .
The bond makes four payments: one every 6 months. The present value of each payment
is computed using the corresponding continuously compounded discount factor:
• At t = 2.0: receive c
2
+ 100, discount by e−0.07·2.0
General Framework
We aim to determine the coupon rate c that prices a bond at par (P V = 100) using
continuously compounded zero rates.
Let:
T
• n: Total number of coupon payments (e.g., 4 for a 2-year semiannual bond)
c −R1 t1 c −R2 t2 c
PV = ·e + ·e + ··· + + F · e−Rn tn
m m m
n
c −Ri ·ti
+ F · e−Rn ·tn
X
PV = ·e
i=1 m
This general form is useful to understand how the par yield is shaped by the term structure
of zero rates. The higher the zero rates, the lower the discount factors, and thus the higher
the coupon c required to maintain a price of 100.
So the total present value (PV) of the bond is:
c c c c
P V = · e−0.05·0.5 + · e−0.06·1.0 + · e−0.065·1.5 + + 100 · e−0.07·2.0
2 2 2 2
c
= · e−0.05·0.5 + e−0.06·1.0 + e−0.065·1.5 + e−0.07·2.0 + 100 · e−0.07·2.0
2
c
PV = · (0.9753 + 0.9418 + 0.9071 + 0.8694) + 100 · 0.8694
2
c
= · 3.6936 + 86.94
2
29 © 2025 Alexandre Landi
Derivatives Practice Problems Alexandre Landi
c
100 = · 3.6936 + 86.94
2
c
13.06 = · 3.6936
2
c 13.06
= ≈ 3.535
2 3.6936
c = 7.07%
Interpretation
The par yield is the annual coupon rate that would make the bond’s price equal its face
value. With continuously compounded discounting, higher discounting power reduces
T
present value. Thus, a slightly higher coupon (7.07%) is required to offset the steeper
discounting from compounding continuously at rising rates.
Answer
AF
• Par yield with continuous compounding: 7.07% per annum
Python Solution
import numpy as np
DR
Problem
We are given zero rates and asked to compute the par yield — the annualized coupon
rate at which a bond would be priced at par.
• Maturity: 2 years
T
• Objective: Find coupon rate c such that bond price = 100
AF
(Adapted from Hull (2021), Practice Question 4.12)
1.0 6.0%
1.5 6.5% (1.065)−1.5 = 0.9096
2.0 7.0% (1.07)−2.0 = 0.8734
Let c be the annual coupon rate (in decimal form). Since the bond pays semiannual
coupons, each coupon payment is 2c . The bond pays this amount at each time point, and
the face value at maturity:
• At t = 2.0: receive c
2
+ 100, discount by (1.07)−2.0
General Framework
Let:
T
Present Value of the Bond
c c c c
· (1 + R1 )−t1 + · (1 + R2 )−t2 + · (1 + R3 )−t3 + + F · (1 + R4 )−t4
PV =
m
AF
m m m
n
c
· (1 + Ri )−ti + F · (1 + Rn )−tn
X
PV =
i=1 m
Step-by-Step Computation
DR
c c c c
PV = · (1.05)−0.5 + · (1.06)−1.0 + · (1.065)−1.5 + + 100 · (1.07)−2.0
2 2 2 2
c
= · (0.9759 + 0.9434 + 0.9096 + 0.8734) + 100 · 0.8734
2
c
= · 3.7023 + 87.34
2
Solve for c
We set P V = 100:
c
100 = · 3.7023 + 87.34
2
c
12.66 = · 3.7023
2
c 12.66
= ≈ 3.42
2 3.7023
c = 6.84%
Interpretation
The par yield is the coupon rate that makes the bond worth exactly its face value.
Because discrete compounding discounts cash flows less aggressively than continuous
compounding, the par yield here is lower.
Answer
Python Solution
T
import numpy as np
Problem
Suppose that risk-free zero interest rates with continuous compounding are as follows:
T
Calculate the forward interest rates for the second, third, fourth, fifth, and sixth quarters.
Let:
• ft1 ,t2 : continuously compounded forward rate for the period between t1 and t2
ln er1 t1 +ft1 ,t2 (t2 −t1 ) = ln er2 t2
r1 t1 + ft1 ,t2 (t2 − t1 ) = r2 t2
r2 t2 − r1 t1
ft1 ,t2 =
t2 − t1
Application
T
Now compute each quarterly forward rate:
t1 = 0.25, r1 = 0.030
t2 = 0.50, r2 = 0.032
0.032 · 0.5 − 0.030 · 0.25
⇒
AF
f0.25,0.5 =
0.25
= 3.40%
t1 = 0.50, r1 = 0.032
t2 = 0.75, r2 = 0.034
0.034 · 0.75 − 0.032 · 0.5
⇒ f0.5,0.75 = = 3.80%
0.25
t1 = 0.75, r1 = 0.034
DR
t2 = 1.00, r2 = 0.035
0.035 · 1.0 − 0.034 · 0.75
⇒ f0.75,1.0 = = 3.90%
0.25
t1 = 1.00, r1 = 0.035
t2 = 1.25, r2 = 0.036
0.036 · 1.25 − 0.035 · 1.0
⇒ f1.0,1.25 = = 4.10%
0.25
t1 = 1.25, r1 = 0.036
t2 = 1.50, r2 = 0.037
0.037 · 1.5 − 0.036 · 1.25
⇒ f1.25,1.5 = = 4.30%
0.25
Answer
Python Solution
import numpy as np
T
using continuously compounded zero rates.
"""
return (r2 * t2 - r1 * t1) / (t2 - t1)
Video Explanation
DR
Problem
Suppose that discrete zero interest rates (annual compounding) are as follows:
T
Calculate forward interest rates for the second, third, fourth, fifth, and sixth quarters
under discrete compounding, which is commonly used in practice.
AF
(Adapted from Hull (2021), Practice Question 4.4)
Solution
Let:
Let:
VA = (1 + R2 )t2
• Strategy B: Invest at rate R1 until t1 , then reinvest at forward rate f1,2 from t1
to t2 . The value at t2 is:
Since both strategies are risk-free, they must produce the same value in a no-arbitrage
market:
(1 + R2 )t2
(1 + f1,2 )t2 −t1 =
(1 + R1 )t1
T
Now take the (t2 − t1 )th root of both sides:
1
(1 + R2 )t2
!
t2 −t1
AF 1 + f1,2 =
(1 + R1 )t1
Subtract 1:
1
(1 + R2 )t2
!
t2 −t1
f1,2 = −1
(1 + R1 )t1
We now compute the quarterly forward rates under discrete compounding using the
following formula:
DR
1
(1 + R2 )t2
!
t2 −t1
ft1 ,t2 = −1
(1 + R1 )t1
where:
Using this, we compute the forward rates for the second to sixth quarters:
1
(1+0.032)0.5
0.25
• Quarter 2: f0.25,0.5 = (1+0.030)0.25
− 1 = 3.40%
1
(1+0.034)0.75
0.25
• Quarter 3: f0.5,0.75 = (1+0.032)0.5
− 1 = 3.80%
1
(1+0.035)1
0.25
• Quarter 4: f0.75,1.0 = (1+0.034)0.75
− 1 = 3.80%
1
(1+0.036)1.25
0.25
• Quarter 5: f1.0,1.25 = (1+0.035)1
− 1 = 4.00%
1
(1+0.037)1.5
0.25
• Quarter 6: f1.25,1.5 = (1+0.036)1.25
− 1 = 4.20%
Answer
Remark
T
AF
These forward rates are very close to those obtained using continuous compounding.
This is because the time intervals involved are short (a quarter of a year), and the interest
rates are relatively low.
For small rates and short periods, the exponential function in continuous compounding
approximates the power function in discrete compounding. Therefore, both methods
yield nearly identical results in this context.
DR
Python Solution
Parameters:
R1: Spot rate at time t1 (e.g., 0.03)
t1: Time in years (e.g., 0.25)
R2: Spot rate at time t2 (e.g., 0.032)
t2: Later time in years (e.g., 0.5)
Returns:
Forward rate for the interval [t1, t2] with discrete compounding.
"""
numerator = (1 + R2) ** t2
denominator = (1 + R1) ** t1
forward_factor = numerator / denominator
forward_rate = forward_factor ** (1 / (t2 - t1)) - 1
return forward_rate
# Example: Quarter 2
T
AF
DR
Problem
Assume that risk-free zero interest rates with continuous compounding are as follows:
T
18 3.7%
What is the value of an FRA where the holder will pay SOFR and receive 4.5% quarterly-
compounded interest on a notional of $1,000,000 for a 3-month period starting in 1 year?
AF
(Adapted from Hull (2021), Practice Question 4.5)
Solution
We assume:
• Notional: N = 1,000,000
The formula expresses the net cash flow received by the FRA holder at settlement time
T.
• ∆ is the fraction of the year that the interest applies to (e.g., 0.25 for three months).
The difference RK −RF is the net interest rate benefit (or cost) to the holder. Multiplying
this by N · ∆ gives the dollar value of that benefit over the contract period.
This is the cash flow that will be settled at the end of the FRA term.
Discounted to present value using continuous compounding:
T
FRA Value = N · ∆ · (RK − RF ) · e−r·T
Where:
AF
• r: zero rate for 15 months (0.036)
R2 t2 − R1 t1
DR
f (t1 , t2 ) =
t2 − t1
Substitute:
0.036 · 1.25 − 0.035 · 1
f (1, 1.25) =
0.25
0.045 − 0.035
=
0.25
0.01
=
0.25
= 0.04
= 4.00%
Answer
Python Solution
import numpy as np
T
# Inputs
N = 1_000_000
delta = 0.25
rK = 0.045
r1 = 0.035
r2 = 0.036
t1 = 1
AF
t2 = 1.25
r_discount = 0.036
Problem
Assume that risk-free zero interest rates with quarterly compounding are as follows:
T
18 3.7%
What is the value of the same FRA — paying SOFR and receiving 4.5% quarterly-
AF
compounded interest — assuming the market uses discrete compounding instead of
continuous?
Solution
We use the same FRA structure, but calculate forward rates and discounting using quar-
terly compounding. The FRA covers the 3-month period from 12 to 15 months.
Step 2: Deriving the Discrete Forward Rate
The idea is to equate the future values of two investment strategies over the same period:
To ensure no arbitrage, both strategies must yield the same total future value. That
gives:
(1 + R2 )t2
(1 + RF )t2 −t1 =
(1 + R1 )t1
!1/(t2 −t1 )
(1 + R2 )t2
1 + RF =
(1 + R1 )t1
Subtract 1:
!1/(t2 −t1 )
(1 + R2 )t2
RF = −1
(1 + R1 )t1
T
Finally, since ∆ = t2 − t1 , we write:
!1/∆
(1 + R2 )t2
RF = −1
AF (1 + R1 )t1
Substitute: !4
(1 + 0.036)1.25
RF = −1
(1 + 0.035)1
1.0454 4
= −1
1.0350
= (1.0100)4 − 1
= 1.0406 − 1
DR
= 0.0406 = 4.06%
!1/0.25
(1 + 0.036)1.25
RF = −1
(1 + 0.035)1
1.04550 4
= −1
1.03500
= (1.009856)4 − 1
= 1.04 − 1
= 0.0400 = 4.00%
T
≈ 0.9566
Answer
The value of the FRA under discrete compounding is approximately 1,193.63, in favor
of the holder.
DR
Python Solution
# Inputs
N = 1_000_000
delta = 0.25
rK = 0.045
r1 = 0.035
r2 = 0.036
t1 = 1
t2 = 1.25
r_discount = 0.036
Hull, J. C. (2021). Options, Futures, and Other Derivatives. Pearson, 11th global ed.
edition.
T
AF
DR
47