We meet on Fridays,10:10am-12pm, in Weiser, room 269.

- Fermi Question: what is the weight of a bowling ball, measured in drops of water?
- Introduction to Java and Eclipse.
- You may need to install the JDK (Java Development Kit).
- Install the latest version Eclipse.
- Workflow for beginning of any project: Create Java Project, create package, create first class (e.g. HelloWorld).

- HackerRank Java Intro reading via Scanner.
- We implement the Alex and Beth Coin flipping problem from last week in both Python and Java, and compare the implementations.
- Market Review

- A question from Fermi Questions.
- Alex and Beth are flipping coins. See problem 3.20 from Quant interview book.
- Counting rectangles: Project Euler problem 85.
- Market Review

- A question from Fermi Questions.
- Imagine it's snowing...see problem 13 from the Quant interview book.
- Coding warmup: Sometimes, you just need more precision. Try Project Euler problem 80. But before you code it, put on your Fermi hat, and estimate the answer.
- A wrap-up on what we wrote last week for tranched credit indices.
- Market Report. How did Tesla raise money this past week?

- Brainteasers: How many footballs are needed to fill Michigan Stadium? How many cows are in Mexico? How much of the water from Archimedes' famous bath is in my coffee? Practice using Fermi Questions.
- Coding warmup: Project Euler problem 81. Does this look familiar?
- We've spent a couple of weeks talking about modeling a set of variables that are jointly normal with identical pairwise correlation, and we built a simulation of it. Let's use it to build a simple tranched credit index. For more depth on tranched credit indices, see this BIS article or this more entertaining FT report (requires free signup with Alphaville). And here is the code we wrote for tranched credit indices
- Market Report. What did Mnuchin and Trump say about the dollar? And is it time to sell stock?

- Warmup: Project Euler problem 50. Solution is here.
- Recall the problem from last time: We built a simulation of
*n*correlated assets, and via Monte Carlo simulation in Python, we found an empirical distribution of the number of assets that had negative return. Why is the number of assets that have positive return uniformly distributed? Try to figure it out on your own. But if you must, solution is here, starting on page 3. - Market Report.

- Wrap up Python implementation of the bag with 3 red, and 3 black marbles (see previous week). How big can you scale up your solver?
- Student presentation: Solution to the minmax correlation problem from Jane Street? Solutions presented by Patrick Lu and Jiahua Gu.
- Consider problem 5.2 from the Quant Technical Interview Questions. We built a simulation of n correlated assets, and via Monte Carlo simulation in Python, we found an empirical distribution of the number of assets that had negative return. Challenge for next time: explain the distribution for the case where pairwise asset correlation is 0.5.
- Market Report: Bitcoin continues to be in the news.

- Show that 1 is the only number in the sequence {1, 11, 111, 1111, ....} that is a perfect square.
- Have you seen the minmax correlation problem from Jane Street? Looking for someone to present a solution in first January meeting.
- Recall the problem of the bag with 3 red, and 3 black marbles (see previous week). Implement in Python. What's the strategy if there are 26 red, and 26 black (e.g. like a deck of cards)? What is there are 10,000 red?
- Market Report: Bitcoin history, Bitcoin bubble. Is Blockchain the real story? Ongoing transformation of retail to online—where will the warehouse space come from? The US may not be able to produce as much oil as we thought. Why?

- Complete Running Median problem.
- There is a bag with 3 red, and 3 black marbles. You draw marbles without replacement, winning a dollar if it is red, paying a dollar if black. What's your strategy?
- Market Report: Bitcoin volatility, Bitcoin as crisis currency, Bitcoin for Square. Norway divesting oil equities.

- Continue implementation of heap in Python, and apply it to the Running Median problem.

- Getting the right data structure: Review problem (6.14) from Quant interview book.
- What's a heap, and why do we care? We implement one in Python, and apply it to the Running Median problem.
- Market Report: What went on at the Fed this week ? Search Yellen and Powell. What does Blankfein think about tax cuts, and why?

- Market Report: What happened with Alphabet, Amazon, and Microsoft on Thursday? What are stress tests, who cares about them, and what did a US Treasury report just recommend?
- Two bags of marbles: Problem (8.20) from Quant interview book.
- What would be the price of 9 year US Treasury bond with 9% coupons? We'll figure it out using zero coupon data from Quandl. Bonus: what's a perpetuity, and how would you price one?

- Market Report: Where’s the the Dow? What’s been happening to it over the past week, month, year? SP500? NASDAQ? FTSE 100? Nikkei 225? What happened to ToysRUs CDS spreads last month?
- Discuss airplane boarding problem (8.18) from Quant interview book.
- Monte Carlo Simulation: clone the latest code. Discuss the summability of IES (incremental expected shortfall).
- Coherent risk measures, subadditivity, and an example of the failure of VaR to be subadditive.

- Warmup: Project Euler problems 46 and 47.
- What's a heap?
- Monte Carlo Simulation: clone the latest code. Calculating VaR at various quantiles shouldn't require re-sorting the PnL. We learn about lazy initialization. We apply the same thing to ES. Time permitting, we compute portfolio risk.

- Review last week's brainteaser on checkerboards, dominoes, and trominoes.
- Coding exercise: Project Euler problems 30 and 35.
- We will continue studying portfolio risk next week. At 9:50am, we will head over to the Tozzi Lab (Ross, room R0400) for Kai Petainen's Intro to FactSet and Bloomberg workshop, from 10am to noon. This is part of Kai's Fall series of workshops.

- Warmup: Project Euler problems 20 and 25.
- Given the order statistics of a sample of size 10, what are the quantiles associated with each statistic? In particular, the first, and the last? We discuss some approaches to this.
- Monte Carlo Simulation: clone the latest code. Calculating VaR at various quantiles shouldn't require re-sorting the PnL. We learn about lazy initialization. We compute expected shortfall, aka AVaR (average VaR), aka CVaR (conditional VaR).
- Brainteaser: Checkerboards, dominoes, and trominoes.

- Monte Carlo Simulation: clone the latest code. We altered the Position object in a Portfolio keep track of its PnL, and we can calculate VaR of the position.

- Update as needed from GitHub. We will create a method called
`writeSimulation`

that can dump any number of market price simulations into a file. - Question 3.11 from Quant interview book.
- We'll finish with practice problems from Project Euler.

- Spent some time getting everybody's code base synced up via umich-quant on GitHub.
- We added the Market class. A market consists of the risk factors to be simulated, with weighted returns from a specified period. A simulation of the market is generated by taking the inner product of each risk factor's returns with a market noise vector.

- We will complete HackerRank's Cracking the Coding Interview: Heaps: Find the Running Median, by implementing BaseHeap and MaxHeap, then MedianHeap. Source to date is available on GitHub.
- Update
*your fork*of Python implementation of multi-factor Monte Carlo. If necessary, download historical S&P data from QuantQuote, on the Free Data tab. - Questions 3.10 from Quant interview book.

- An easy warmup from HackerRank: Array Left Rotation
- Began HackerRank's Cracking the Coding Interview: Heaps: Find the Running Median. This is a very nice coding exercise: not only do you learn/review heap data structures, but it is an excellent example of polymorphism via both composition and inheritance. We got the MinHeap up and running. Next week will write BaseHeap and MaxHeap, then MedianHeap.

- Via GitHub, get the latest version of our Python implementation of multi-factor Monte Carlo. If necessary, download historical S&P data from QuantQuote, on the Free Data tab.
- We will add MarketUniverse and Market classes, implement simulation.
- From HackerRank's Cracking the Coding Interview: Trees, Ransom Notes, and Contacts. If you want to better understand hash tables, watch the video that accompanies Random Notes.
- Questions 1.10, 8.1, and 8.2 from Quant interview book.

- Continue implementation of Multifactor Monte Carlo in Python.
- Any questions about technical interview book?

To prepare:

- Review updates to technical interview book.
- Install pandas in PyCharm if necessary.
- Download historical S&P data from QuantQuote, on the Free Data tab. Discovered via Caltech Quantitative Finance Group, which has some interesting information.
- Begin implementation of Multifactor Monte Carlo in Python.
- One-on-one discussions to determine what you want to get from your time in the Michigan Quant Lab.

To prepare:

- Install PyCharm Community Edition. We’ll be doing some Python in an IDE that has better debugging support than Jupyter.
- Solve the BinaryTree problem from the technical interview book. You may use C++ or Python or both.
- Do LeetCode problems 2 and 20 (some of you have already done #20).
- Be able to explain why the sum of IES is equal to ES.
- We discovered that our C++ code for Monte Carlo does not react gracefully to an invalid name for a MarketFactor ("APL" is unknown). A better way to deal with this is through exceptions. Note that we threw a string. Which of these standard exceptions would have been better to throw? Can you add exception handling to these PortfolioSimResult methods? double var(double quantile) const; double expectedShortfall(double quantile) const; If you do this problem, do a pull request from GitHub Desktop. If I like your code, I will add it to the codebase, and list you as a contributor!.
- Recall the Jane Street min max correlation problem? An equivalent statement is problem 2.7 in the technical interview book. Try to solve it.
- The mission of the
**Michigan Quant Lab**is to prepare ourselves for employment through practice, and by demonstrating we are involved in something beyond the classroom. Think about the role(s) that need to be handled in the Michigan Quant Lab. Do you want to be developing the website? Implementing pricing algorithms? Building the backtesting framework? Writing a paper that explains and documents parts of our codebase? Creating test cases to verify our algorithms are working correctly? Organizing a Friday afternoon pizza-fueled meeting? Or something else?

Carlo Acerbi of MSCI presented on Backtesting expected shortfall.

Students in the quant program have the opportunity to develop projects inspired by real-world applications. This involves reading research, designing solutions, and implementing them in a relevant development environment, such as C++ or Python.