Exam Information
Exam Logistics
-
The exam will be held on WEDNESDAY, MARCH 5, 2025, 9:25am-10:40am (75 minutes) as an in-class-only exam in HAR 210 (our usual classroom).
-
This will be a paper exam, and you will write all answers on the exam paper only.
-
You may not use any electronic devices during the exam.
-
The exam will include the following question types:
-
conceptual/short answer questions, which refer to the concepts or intuition behind the finance ideas discussed in class.
-
questions similar the simpler problems from the assignments, where you will write a small section of code (on paper) to implement an algorithm. These might be financial or non-financial in nature, but will test the same Python constructs and skills that we have used in the assignments to-date.
-
-
Any financial formulas required in the exam will be provided.
-
All work must be done on the paper exam provided. The use of a Python development environment (e.g. Spyder) is not allowed.
-
Outside resources are strictly not allowed. This includes all previous examples, assignments, tutorials, web pages, or AI tools (e.g. Chat GPT).
-
You may not communicate with anyone during the exam except the course staff.
We reserve the right to conduct a separate one-on-one oral examination with any student to verify the student’s understanding of the material.
Material covered
The exam will focus on the material that we have discussed in class during the first half of the course. The exam will cover both finance and programming topics, in approximately equal proportion.
Conceptual finance topics include:
- The time value of money (pv/fv/annuities/payments) and the life-cycle model
- Bond characteristics, pricing and risk metrics (duration/convexity)
- Using descriptive statistics to evaluate asset returns (e.g., standard deviation, covariances among assets)
- Bisection algorithm (e.g., solving for YTM) for iterative programming
- Matrix operations for bond pricing, portfolio return
- Options (general concepts) and the binomial option pricing model
Programming topics include:
- Variables and arithmetic
- Functions with parameters and return values
- Decision logic
- List operations and list comprehensions
- Iterative programming with definite loop (for) and indefinite loop (while), accumulator variables
- Lists and 2d lists, matrix operations on 2d lists
- User defined classes with data attributes and methods
Preparing for the exam
- One way to prepare is to review the lecture notes, lecture videos, and assignments, and to make a summary of the key points in your own words. “Summarizing” the material in this way is a great way to ensure that you really understand the key concepts.
Sample Conceptual Questions
Note: this is a sampling only, and NOT a study guide.
-
Explain the concept of an annuity, and how we calculate the present value of an annuity.
-
How is the standard deviation of an asset’s rate of return a useful metric, and why would investors be interested in it?
-
Explain the concept of a stock’s beta. Make an argument about why would investors care about a stock’s beta.
-
What does the yield-to-maturity of a bond measure? What does it mean for the yield-to-maturity on a bond to be more/less than the coupon rate?
-
What is the duration of a bond, and what does it measure? Why is this a useful metric for a bond investor? Explain the duration conceptually; you do not need to write out any formulas.
-
Explain in general terms how the binomial option pricing model helps to compute the value of an European put option. Identify and explain all of the main steps in the correct order, but you do not need to write any specific formulas.
Sample Programming Problems
Note: this is a sampling only, and NOT a study guide.
-
Write a Python function
print_stars(n)
wheren
is a positive integer. It should printn
lines of stars with 1 star on first line, 2 stars on second line, and so forth. For example,print_stars(4)
should print* ** *** ****
-
Write a function
fv_factors(r, n, m)
that returns a list ofn
future value factors calculated at the annual rate ofr
withm
compounding periods per year. Use a list comprehension.For example:
>>> fv_factors(0.05, 1, 1) [1.05] >>> fv_factors(0.04, 2, 2) [1.02, 1.0404, 1.0612080000000002, 1.08243216] >>> fv_factors(0.04, 2, 4) [1.01, 1.0201, 1.0303010000000001, 1.04060401, 1.0510100501000001, 1.0615201506010001, 1.07213535210701, 1.0828567056280802]
The future value factor (a.k.a. future value of $1) at time
t
for rater
withm
compounding periods per year is given by:fvf = (1+r/m) ** t
,
wheret
is a period number (not necessarily a year). -
Write a Python function
years_needed
that takes three inputs:principal
, which is the initial amount of money deposited in an interest-bearing accountrate
, which is the annual interest rate in decimal formtarget
, which is the final value that the investor wants to reach
The function should use a loop to determine the (minimum) number of years of compounded annual interest that are needed for the investment to reach or exceed the specified
target
.Note: After each year, the new principal is computed as
principal = principal * (1 + rate)
-
Write a function
num_divisors(n)
that returns the number of integers from 1 ton
(inclusive) that dividen
evenly. For example,num_divisors(42)
should return8
, because 1, 2, 3, 6, 7, 14, 21, and 42 are all divisors of 42.- Use a list comprehension.
- Use a definite loop with the accumulator pattern.
-
Write a function
square_root(x, err)
to calculate and return an estimate of the positive square root ofx
such that the square of this result is withinerr
of the value ofx
.Here are some examples:
>>> # An estimate of the square root of 2, within 0.1. >>> square_root(2, 0.1) # returns a a good enough estimate 1.4375 >>> # Yes, 25 is a perfect square. This is a very close estimate. >>> square_root(25, 0.01) 4.9990234375
Your solution must use an indefinite loop (while). The loop should iterate to test values for the square root, adjusting the upper or lower bounds of the values to test at each iteration. You may not use the built-in
math.sqrt
function or the operator**
. -
Write a function
variance(values)
that calculates and returns the population variance of a list of numeric values.For example: >>> variance([1,2,3,4,5]) 2.0 >>> variance([99,99,99]) 0.0
The population variance σ^2 of a sequence of values is given by:
σ^2=1/n ∑_(i=1)^n▒〖(x-μ)〗^2 , where x represents each value in the list, and μ is the mean (arithmetic average) of all values. Helper functions are not required, but if you use any, write them out. -
Write a function
create_2d
that takes as input two integersheight
andwidth
, and that creates and returns a 2D list (i.e., a list of lists) with values that are the row number multiplied by the column number. For example:>>> create_2d(3, 5) [[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]]
-
Write a function
add_one
that takes an inputgrid
that is a 2D list (a list of lists). Your function should add 1 to each element ofgrid
, but it should not return anything. For example:>>> my_grid = create_2d(3, 5) >>> add_one(my_grid) >>> my_grid [[1, 1, 1, 1, 1], [1, 2, 3, 4, 5], [1, 3, 5, 7, 9]]
-
Write a function
only_positives(values)
that takes a parameter which is a 2-dimension list of numbers and returns a new 2-d list of numbers which contains only the positive elements of values; all other elements are set to 0.
We assume that values is rectangular. For example:>>> matrix = [[4, -2], [-3, 5]] >>> only_positives(matrix) [[4, 0], [0, 5]]
-
Write a Python class called
Vector
, which encapsulates the idea of a vector (of any length) of numbers. The following lines demonstrate creating and printing such an object:>>> v1 = Vector([3, 4, 5, 6, 7]) >>> v2 = Vector([3, 1, 2]) >>> v2.mult_scalar(3) >>> print(v2) >>> v3 = v1 * 4 Vector([9,3,6]) >> print(v3) Vector([12, 16, 20, 24, 28])