Exam Information
Exam details
-
The exam will be held on WEDNESDAY 5/7 9-11am at HAR 210.
-
You may not use any electronic devices during the exam.
-
The exam will include the following question types:
-
conceptual 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.
-
In addition, there will be questions that ask you to write explain the output of a function or section of code, or to trace a function, similar to the problems from the homework.
-
-
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.
**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 be comprehensive on the content ofFE459.
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.
Approximately 25% of the exam will focus on material from weeks 1-7 of the course.
You should review all of the material from the practice problems for the midterm exam.
The remainder of the exam (approximately 75%) will be focused on material from the last 6 weeks of the course, including:
Conceptual finance topics include:
- Time Value of Money
- Bond Pricing
- Descriptive Statistics
- Bisection Method
- Option pricing with Binomial Model, Black-Scholes, Monte Carlo Simulation
- Mean-variance efficient portfolios and the efficient frontier
- Backtesting an investment strategy
- Measures of risk: drawdown, Value at Risk
Programming topics include:
- User Defined Classes
- Inheritance and Polymorphism
- Numpy arrays and matrices
- Pandas Series and DataFrames
- SQL queries
Preparing for the exam
-
An imporant way to prepare is to review the powerpoint 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 finance concepts, as well as the programming.
-
Review all of the problems from the midterm exam. Practice writing answers to these on paper and without any outside aids.
-
Review/practice using the
numpy
andpandas
libraries. In particular, you must be confident about indexing, slicing, row/column operations, using labels and indexes, iteration with loops, accumulation, etc.
Sample Conceptual Questions
Note: this is a sampling only, and NOT a study guide.
-
Explain how the binomial option pricing model simulates the future stock price. Make and argument for why this is a reasonable strategy.
-
With regards to the Black-Scholes option pricing formula:
Identify and briefly explain the parameters (inputs) to this formula, and the effect of each on the resulting option price. (i.e., how does the option price change with an increase in each of the inputs?)
-
With regards to the Black-Scholes option pricing formula:
Most of the parameters are observable, expect for the volatility of returns. Explain the concept of implied volatility, and how to calculate it.
-
In one assignment, we used Monte Carlo simulation to value several kinds of stock options.
a. Explain the fundamental ideas/methods of Monte Carlo methods to find the price path of a stock.
b. How can we use the simulated stock price path to compute the value of a
lookback call option, where the payoff is the maximum stock price minus the strike price? -
In one assignment, we created mean-variance efficient portfolios, and created the efficient frontier for a set of assets.
a. Explain: what is a mean-variance efficient portfolio? How do we represent such a portfolio?
b. Explain the process/algorithm by which you created the efficient frontier. (no formulas are required, but you must explain the process)
-
With regards to the value at risk (VaR):
a. Explain: what does VaR measure, and why is it useful?
b. One method that we discussed to compute VaR involved using a statistical model-based approach to quantifying the value at risk. Briefly explain how the model-based approach works, and identify the main shortcomings of this approach. (no formulas are required, but you must explain the process)
c. One method that we used to compute VaR involved historical data. Explain how this worked, and why is this an reasonable approach. (no formulas are required, but you must explain the process)
-
Our last assignment used databases and SQL.
a. Explain, giving an example, the purpose of the SQL JOIN clause, and how it is used.
b. Explain, giving an example, the purpose of the SQL GROUP BY clause, and how it is used.
Sample Programming Problems
Review/solve all practice problems from the midterm exam
Note: this is a sampling only, and NOT a study guide.
-
Assume the class definition for the class
Vector
has already been provided. Write adot_product
method that will compute the dot product of twoVectors
. The method should return a scalar result, or else print out an error message and returnNone
. You may not use the numpy library. Here is a usage example:>>> v1 = Vector([3, 4, 5]) >>> v2 = Vector([1, 2]) >>> v3 = Vector([3, 4]) >>> v2.dot_product(v3) # 1*3 + 2*4 = 11 11 >>> v1.dot_product(v2) Error: lengths do not match for dot product. >>> v1.dot_product(42) # integer parameter Unspecified error.
-
Assume a class called
Price
, which contains a data attributevalue
.a. Create a subclass called
StockPrice
, which inherits fromPrice
, and defines a new data attributesymbol
.b. Write a constructor for this class, and be sure to initialize the superclass with the data attribute
value
.c. Define a
__repr__
method to return a string representation of this object.d. Write an
__eq__
method that makes it possible to compare aPrice
with aStockPrice
. -
Given the following statement:
a = np.array([[1,2,3],[4,5,6]]) b = np.array([[1,2],[3,4],[5,6]]) c = np.array([[1,2,3,4],[5,6,7,8]])
Write a one-line expression to produce each of the following:
a. The element of a with value of 5 b. A slice of the row of a containing: [4, 5, 6] c. A slice of the sub-array of c containing the values [[2, 3], [6, 7]] d. The column vector containing the sum of elements from the first two columns of a e. The dot-product of b and c
-
Assuming a pandas DataFrame
df
has been created. Use the correct syntax to retrieve:a. a slice containing the 2nd row
b. a slice containing the 2nd column
c. a slice containing the column identified by the label ‘price’
d. the value of the column ‘price’ in the 2nd row
e. a slice containing the last row
f. insert a new column of 0s
g. create a plot of the column ‘price’
h. Use the values in the column ‘price’ to create a pandas series of returns.
-
Assuming a pandas DataFrame
df
of daily stock prices for two stocksA
andB
. Write a function to calculate the daily returns of an equal-weighted portfolio of these two stocks.Your function should return a
pd.Series
of daily portfolio returns. -
Recall that drawdown is a measure of the maximum loss on an asset since its previous maximum price. Given a
pd.Series
of stock prices, write the functioncompute_drawdown(prices)
that returns apd.DataFrame
object containing the columns['price', 'prev_max', 'dd_dollars', and 'dd_pct']
.Here is an example of calling this function:
>>> dd = compute_drawdown(prices) >>> dd price prev_max dd_dollars dd_pct 0 16 16 0 0.000000 1 14 16 2 0.142857 2 13 16 3 0.230769 3 17 17 0 0.000000 4 14 17 3 0.214286