1234%matplotlib inlineimport matplotlib.pyplot as pltplt.style.use('ggplot')%config InlineBackend.figure_format = 'svg'
Motivation
News articles love citing the crude inventory as reasons for movements in oil prices. Quo

1234%matplotlib inlineimport matplotlib.pyplot as pltplt.style.use('ggplot')%config InlineBackend.figure_format = 'svg'
Overview
Students under the F-1 visa usually apply for Optional Practical Training (OPT) to get work

Word embedding (very bad explanation follows) is translating each word in a corpus into a D dimension vector. These vectors are supposed to preserve semantic properties and are commonly used in NLP. For example, in a lar

This oil thing is getting pretty crazy, especially with Saudi and Iran going bonkers over each other. Futures curves are a great way to speculate, and it’d be great to visualize the movement of the futures curve over dif

This conversation happened on Piazza today, two weeks after class ended.
A student posted: Hi all, I was wondering if it’s possible to get the cutoffs for the course grades?
Me: No, and it won’t be productive in any w

A student asked this in class today: What’s the difference between Recursion, Memoization and Dynamic Programming.
I was quite surprised that said student couldn’t find a good answer online, so I made one. Here’s the ans

In partial satisfaction of the project requirement for the class Statistical Methods in Finance STAT W4290 Fall 2015.
Abstract
This project applies Principal Component Analysis (PCA) to interest rate swaps and shows th

The code for this is available at linanqiu/binomial-european-option-r.
This post by Intel https://software.intel.com/en-us/articles/binomial-options-pricing-model-code-for-intel-xeon-phi-coprocessor is a surprisingly goo

For one of my Statistical Finance homeworks, I had to solve this question.
Given a density function \(f(x)\), where
\[f(x) = \int_{-\infty}^{\infty} \frac{1}{Z} \frac{|x+1|}{(x^2+1)^2} = 1\]
Find the quantile \(y\) that

Running Python on EC2 is a pain, and installing packages can be more of a pain (version clashes, permissions etc). Turns out the easiest way was just to use virtualenv. Here’s a helper script I created:
12345678910111213