Wedding Seat Optimization

Wedding Seat Optimization using Simulated Annealing Or what I do when I go back to Singapore for one friend’s wedding (congratulations Crystalbel and Kenneth!) and find that all but three of my friends are married / enga

Disposable Background Tasks in C#

I wanted a clean way to spin up a looping task in C# and do things while the task is running. Conceptually, I want Start the “service” Run procedure Stop the “service” This would be simple if the “service” had a start

Crude Oil Inventory and Intraday Oil Price Movements

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

OPT I-765 Processing Time

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

Running Word Embedding on Piazza Posts

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

Oil Futures Curve Visualization

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

Memoization Recursion Dynamic Programming

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

Principal Component Analysis on Interest Rate Swaps

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

Binomial European Option Pricing in R

The code for this is available at linanqiu/binomial-european-option-r. This post by Intel is a surprisingly goo