Recommended Books for building trading algorithms

Notice I didn’t write 10 books you have to read to make millions of dollars in the market. That just seems a little click-bait/Buzz Feedy. Unfortunately, from a data scientist/ SEO perspective that would have been the more profitable. 

As we all suffer through covid-lockdown I just put together a list of books that I have read that I believe have shaped my understanding of markets and have molded my investment philosophy. I think bigger-picture books such a The Big Short and Black Swan are far more important than technical books.

Creating algorithms and or trading strategies is something that I believe starts with the creative process, maybe just staring at charts for hours or losing a lot of money. I’m lucky, I’m a self-taught coder and I can implement my strategies without getting caught up in whether my code is object-oriented and if I have the correct classes etc. I always say that the code is the easy part, it’s finding a good strategy that is hard part.

So these are some books that I have enjoyed and maybe you will too as well. If you have any recommendation, please leave them in the comments as I’m always looking for something to read / listen to. 

Books that shaped my investment philosophy or possible continue to shape my philosophy strategy.

The Creature from Jekyll Island: A Second Look at the Federal Reserve by G. Edward Griffin
The Warren Buffet Way by Robert G. Hagstrom, jr.
How Technical Analysis Works by Bruce m. Kamich
The Black Swan By Nassim Nicholas Taleb
Beating The Street By Peter Lynch
The Big Short by Micheal Lewis
Flash Boys by Micheal Lewis
Confession of an Economic Hit Man by John Perkins
A mathematician plays the stock market by John Allen Paulos

Here are some other books, that I have read that but am not giving an a full endorsement. I especially disliked “Random Walk”, but that seems to be Wall Street favorite.



Malcolm Gladwell and Freaknomics books are good audio books and generally pretty easy to consume quickly:
The Tipping Point by Malcolm Gladwell
Blink by Malcolm Gladwell
Outliers by Malcolm Gladwell
What the Dog Saw: and Other Adventures by Malcolm Gladwell
Boomerang by Micheal Lewis
Freakonomics by Steven D. Leviit and Stephan J Dubner

The Intelligent Investor: The Definitive Book on Value Investing by Benjamin Graham

Academic / Text Books
Option Volatility & pricing by Sheldon Natenberg
The Complete Guide to Option Pricing Formulas By Espen Gaarden Haug (This book is great for the formulas)

High-Frequency Trading by Irene Aldridge (Probably outdated and really that good.)

Music Books

Simple guide to build TWS API on AWS EC2 instance

Currently, I’m running 2 different Interactive Brokers Trader Work Station (TWS), my own propriety python trading algorithm on an AWS EC2 instance. This is very simple instructions to get you one started, it is not the cure all.

  1. Build an AWS EC2 instance / 18.04 Ubuntu
  2. SSH into the instance
  3. Insert the following code as required

Cover the basics:

Sudo mkdir code && 
cd code && 
sudo apt-get update -y &&
sudo apt-get clean -y &&
sudo apt-get autoremove -y && 
sudo apt-get install mysql-server -y && 
sudo apt-get update -y &&
sudo apt install python3-pip -y && pip3 install pandas matplotlib seaborn plotly pymysql sklearn 

The are two ways to VNC into your EC2 instance. The RealVNC method is little more complicated and it is an enterprise solution.

  1. https://help.realvnc.com/hc/en-us/articles/360003474572-How-do-I-get-started-with-VNC-Connect-on-Linux-
  2. xhost +local:Name_of_your_computer
  3. sudo apt install ./VNC-Server-6.6.0-Linux-x64.deb
  4. tar -xzf vncsetup-helper.tar.gz
  5. sudo ./vncsetup.sh
  6. sudo reboot

If you want a simple VNC method follow this bloggers instructions.

Interactive Brokers

  1. follow instructions: http://interactivebrokers.github.io/
  2. sudu unzip twsapi_macunix.979.01.zip -d /home/user/
  3. cd IBJts/source/pythonclient/
  4. sudo apt-get install python3-setuptools && sudo python3 setup.py install
  5. Download TWS https://www.interactivebrokers.com/en/index.php?f=16040 follow instructions on the screen. (if you want to use IB gateway, which is not as sexy but works fine you can get it here)
  6. git clone your repo

The Best and Worst Stock and Option Trading APIs

Update: 2020 The Best and Worst Stock, Futures and Option Trading APIs

In my quest to program and build my own trading system, I have discovered a lot of conflicting information on the “Internets” about trading APIs and stock and option price quotes.  In the past, I posted on HN news about some of my findings, only to get some great new insights. One thing I can’t find is a simple location for all trading APIs and I have stumble along some rabbit holes when dealing with the APIs, trying to see what works and what is no longer supported. With that said, I will will be launching a General information Git Repository, to hopefully provide links to SDK for trading API and price quote APIs, Etc. I will obviously do pull requests, but my opinions and finding on certain trading systems will be detailed below and on this site.

Continue reading “The Best and Worst Stock and Option Trading APIs”

How to Scrape and Parse Stock Earnings Reports

For years I looked for a simple way to get earnings reports from Wall St. It seems they would change their earning reports on a regular basis and the dates would be inconsistent. Then one day when I wasn’t paying attention, BAM. Earnings report and the stock would take off or crash on the numbers and I would be left holding the bag or missed the boat. You get the point.

Continue reading “How to Scrape and Parse Stock Earnings Reports”

A Thank You Letter to My Drill Instructor, (22 years later)

On August 1st, 2013,  I retired from the Marine Corps (reserve) after 20 years. Being a Marine was one of the best, most challenging, difficult, awesome, rewarding, dangerous, selfless, crazy, fun, dirtiest, humbling, toughest, exhausting jobs I will ever have. I thought it might be appropriate to thank one of my Drill Instructors.

Continue reading “A Thank You Letter to My Drill Instructor, (22 years later)”