I’ve been meaning to learn the math behind stock trading for a while, but I’ve found it’s hard to find quality information. Most of the stuff online is (1) non-technical, (2) trying to sell you something, or (3) both. So I decided to collect my own notes on modern portfolio theory (MPT). Here’s the pdf: Notes on Itô calculus and quantitative trading.
The information comes from various lecture slides and articles. I didn’t put specific references in there, since it’s standard, textbook stuff. Just search for any piece you’d like more information about.
Here is a rough outline:
How to select stocks, given their risk and return statistics
How to model risk and return in the first place
The first part takes the “Minimum Variance” approach due to Markowitz. To model stock prices, I give an overview of Itô calculus (one form of stochastic calculus) and geometric Brownian motion (GBM). This is the model used by the Black-Scholes formula for pricing derivatives.
I suspect that a simple index fund might beat a portfolio selected with this recipe. In the future, I’d like to test on historical data and find out if there really is an advantage to picking your own stocks.
There is no excuse for Ron Larson‘s Calculus, the textbook I used in high school. It’s over 1,000 pages long and it’s printed on paper. This may have been acceptable in 1998 when it was first printed, but today I am amazed that it remains in print. That’s because textbooks should be electronic and interactive.
You have to be suspicious of exisitng “interactive” math content, because it may be interactive in a very shallow sense. For example, if you get a hard question wrong then it shows you an easier question. What I’d like to see are interactible examples and figures: Move a point around on the figure and see how things change in real-time.
Strom et al. have done a very good job of this with Immersive Math, an interactive linear algebra textbook. (A paper textbook cannot update its figures in real-time.) They also have hover-tips for referenced theorems and definitions, which is a nice touch. (In a paper textbook you’d have to flip back.)
I made my own demo for solids of revolution, a difficult topic for many students. You can move a slider to see the differential volume element change. But you can also hover over a term, like , in the equations to highlight the geometrical interpretation corresponding to the term. Click the animation to be redirected to the demo and try it yourself.