Winter 2019
Meeting agenda
20190419
 Quant Interview Questions
 I guessed $3$ natural numbers  $x,y,z$. You can ask me $2$ sums of these numbers with any integer coefficients  $(a,b,c)$. That is, you give me $a, b, \textrm{and } c$ and I tell you the result of the expression $ax+by+cz$. Seeing the answer, you then give me the $2$nd triplet of $(a,b,c)$ and I will tell you $ax+by+cz$. Give me an algorithm to find $x,y$ and $z$.
 Jane Street Puzzle April 2019:
 What is Sudoku? Let’s walk through a brief Intro
 Check out the Jane Street puzzle
 Download the python file for Sudoku solver sudoku.py, Solution
 Below you can find a good explanation of this algorithm!
20190405
 Quant Interview Questions
 Let $X$ and $Y$ be two standard independent normal variables, i.e., $X \sim N(0,1)$, $Y \sim N(0,1)$ and $\rho(X,Y)=0.72$. Calculate $E[3X+Y \vert XY=1]$
 Suppose the current price of a stock 100. The price has probability 70% of increasing to 110 and probability 30% of declining to 90 in one year. Assume the riskfree rate is 5%. Calculate the value of a call option struck at 100 that matures in one year to four decimal places.
 There are $3$ random variables $X, Y$ and $Z$. The correlation between $X$ and $Y$ is $0.8$ and correlation between $X$ and $Z$ is $0.5$. Calculate the minimum correlation between $Y$ and $Z$, to four decimal places.
 Data Incubator Questions (Section 2):
 Download the jupyter notebook Data Incubator 2 and answer the questions accordingly. Solution 2
20190329
 Quant Interview Questions
 What is the probability of a flush in Poker (i.e. All $5$ cards have the same suit)?
 A company hosts a dinner for mothers with at least one son. If Mrs. Tang has two children, what is the probability that she has two boys?
 There are 20 balls numbered 120. Suppose we draw 5 of them (with replacement). 1. What is the probability that all $5$ balls are in strictly increasing order (i.e. $5, 7, 14, 16, 19$)? 2. What about the probability that all $5$ balls are in nondecreasing order? Note: This problem is more difficult. For a hint, consider the sequences with $2$ balls that are the same and count how many ways this can happen. Then proceed to calculate the number of ways you can have $3$ balls all the same and so on.
 Data Incubator Questions (Section 1):
 Download the jupyter notebook Data Incubator 1 and answer the questions accordingly. Solution 1
20190322
 Quant Interview Questions
 Assume BlackScholes model. Suppose the stock price $S_0 = 100$. The interest rate is $5$% per year. Consider a oneyear European call option struck atthemoney. If the volatility is $\sigma = 0$, what is the call worth? What is its replicating strategy?
 Assume a BlackScholes with no dividends. Consider a standard European call struck atthemoney with one year to maturity. If the interest rate is $r = 0.06$, is the option’s delta greater or less than $0.5$? What does it depend on?
 Two standard options have exactly the same features, except that one has long maturity, and the other has short maturity. Which one has the higher gamma?
 Finish SQL exercises from last week:
 SQL lecture presentation from Stats 506
 SQL Exercises, Solutions
20190315
 Brainteaser
 How can I get the answer $24$ by only using the numbers $8, 8, 3$ and $3$. You can use add, subtract, multiply, divide, and parentheses.
 Quant Interview Questions
 Compute $E[e^{W_t}]$ for Brownian Motion $W_t$ when $t = 2$
 Compute $Var[(W_t  W_s)^2]$ for Brownian Motion $W_t$.
 Let $X_t$ be the price of a share of IBM stock, $t$ years from the present. Assume that $X_t$ follows a geometric Brownian motion with parameters, $r = 0.05$, $\sigma = 0.3$, and $X_0 = 100$. Find $P(X_t < 50)$ one year from now?
 Introduction to SQL
 SQL lecture from Stats 506
 SQL Exercises, Solutions
20190222
 Warmup problem(s):
A drunk man is at the $36$th meter of a $100$ meter long bridge. He has equal chance of staggering forward or backward $1$ meter each step.
 What is the probability that he will make it to the end of the bridge ($100$th meter) before the beginning ($0$th meter)?
 What is the expected number of steps he takes to either the beginning or the end of the bridge?
 Pick up our discussion of the max subarray problem. Also look at other variates. Download the notebook here.
20190215
 Warmup problem(s):
 Chocolate Bars : There is a $6$x$8$ rectangular chocolate bar made up of small $1$x$1$ bits. We want to break it into the $48$ bits. We can break one piece of chocolate horizontally or vertically, but cannot break two pieces together! What is the minimum number of breaks required?
 Square Infection : An infection spreads among the squares of an $n\times n$ checkerboard in the following manner. If a square has two or more infected neighbors, it becomes infected itself. (Each square has at most $4$ neighbors only!). Prove that you cannot infect the whole board if you begin with fewer than $n$ infected squares.
 Revisit basic data structures in Python and take a look at algorithm problems:
 Two Sum problem : see how selecting a good data structure help with efficiency;
 Maximum Sum Subarray : develop an algo to model maximum drawdown for AAPL.
20190208
 Warmup questions:
 A & B are alternately picking balls from a bag without replacement. The bag has $k$ black balls and 1 red ball. Winner is the one who picks the red ball. Who is more likely to win, the on who starts first, or second?
 Given $X, Y, Z$ are $i.i.d.$, which is expected to be larger, $X*Y$ or $Z^2$? What is the case when they can be equal?

Market Report. Is dollar ‘Best of a bad bunch’?
 Pick up where we left with Red & Black Marble problem.
 Recursion with cache
 Tree node as a class object
 With $n$ red/black balls, how will the initial payoff of the game grow? Any good approximation? Think about why.
20190125
 Warmup problem(s):
 You can roll a die up to 3 times. After each roll, you can either keep the number facing up or forgo the number and keep rolling. At the end of the 3rd roll, you will have to take the number facing up. What is it worth to play the game?
 Python problem: There are 4 red and 4 black marbles in a bag. Draw one at time. If you have drawn more black than red, winnings are the number of black marbles in excess of red. Otherwise, you get nothing. Quit at any time.
 Solve by hand. What is your optimal strategy?
 Implement in Python. Verify if it matches your calculation by hand. Download the jupyter notebook here.
 Solve with 20 red and 20 black marbles. Does your program work? If not, what can you do about it? What is the computational complexity of your solution?
 What if there are 1000 red and 1000 black marbles?
 What if there are 1 million red and 1 million black marbles?
20190111
 Warmup problem(s):
 Solve a simple pair of equations efficiently…
 Can you cover a 10x10 board with 1x4 tiles?

MSCI Internship discussion with Patrick (Di) Lu
 Good luck to the Bloomberg Trading Challenge teams:
 Prerna, Xinye, Yutian, Hui
 Rick, Israel, Jiayi, Jack, Yifei
 IAQF competition (team entry due Friday, Jan 11th, 2019). Problem will be announced Jan 14th, 2019.
 Competition description
 2016 Problem: Impact of changing oil prices
 2017 Problem: Impact of rising interest rates
 2018 Problem: Momentum vs option strategies
 2019 Problem: What do you think it could be? Thinkpairshare.
 Winning papers
 There is a Quantopian contest starting Jan 31st.
 There are 4 red and 4 black marbles in a bag. Draw one at time. If you have drawn more black than red, winnings are the number of black marbles in excess of red. Otherwise, you get nothing. Quit at any time. What is your optimal strategy?