Tooling for the Quantitative Researcher

Ferret Labs
4 min readApr 26, 2021

Whether you are a data scientist, ml engineer or quant, strong tooling not only makes your process more efficient, it makes it more fun to drive.

Grind it.

The most understudied topic I have encountered in my career is tooling. Not to be confused with a toolchain (linux, python, snowflake) and often an afterthought, the tools you use to move ideas into code have a dramatic impact on your happiness. Strong tooling takes time to develop, but in the medium / long term will pay dividends. This article covers three areas:

  1. Keystrokes.
  2. Infrastructure.
  3. Quality of Life.

Keystrokes

The mouse was designed such that non-experts could interact with computers. Sit on that for awhile. Aiming a cursor to a point on a screen and clicking is a great way to get a head shot in Counter Strike but a shit way to move to another block of code. To do this you must lift your hand off the keyboard, take hold of the mouse, move the cursor, and click. I accomplish the same thing by using my left pinky to press shift and my right ring finger to press }. Now since we’re all quantitative people I won’t offend anyone pointing out the inefficiencies the mouse creates in aggregate.

Two screens: one web browser one code editor; if you have a paper open put it on one or the other. Get off Slack, Teams, etc. (if you think you can’t because so and so will be mad, look up, that’s your career ceiling). Your IDE should have strong keybindings like vim. alt-tab to your web browser to look stuff up; again use your keyboard to navigate with your preferred keybinding extension. Easy enough to alt-tab to your paper and keyboard navigate from there.

It will take time to find what you like, get the extensions / plugins that work for you, etc. Put succinctly in “Complete Conditioning for TENNIS” by E. Paul Roetert and Todd S. Ellenbecker on maintaining a competitive body composition: “The two ways to affect body fat are fat-loss dieting and aerobic exercise.”. No shortcuts. Reduce the time it takes to reference APIs / literature and create code and enjoy the ride.

Infrastructure

As it turns out, computers suck. We’ve had to commandeer our graphics cards… Our GRAPHICS CARDS just to feature learn and fit a function with a non-linear basis. Not only does this make it impossible to play PUBG on monitor 1, it also implies that using cloud resources is an essential part of everyday research.

Whatever your cloud (in house, AWS, GCP, etc.) load a system image with Docker installed or install it yourself with https://get.docker.com/. Pick an image (for example, rayproject/ray-ml:latest-gpu) or write a custom Dockerfile to specify your environment. Use this image on your laptop on small bits of data and update the Dockerfile with your dependencies such that running your code on the cloud is seamless. Commit this Dockerfile to your repo and put your data on S3 (if not otherwise accessible). Now you have code that will run anywhere which is not only convenient but also ensures your research is reproducible.

There are two types of quantitative researchers: those with folders stuffed with jupyter notebooks and csv’s and those with Dockerfiles and run scripts.

Quality of Life

Quantitative research is hard. A strong researcher should have graduate level expertise in mathematics (in particular, probability), statistics, machine learning, reinforcement learning and algorithms. We’ve all studied hard to get here. Enjoy it; this field is insanely fun. There’s nothing like banging out some code after spending a few days coming up with ideas and reviewing literature. We get to turn our ideas into living, breathing systems and it’s magic. We solve problems domain experts have been writing rules to solve poorly for decades well in weeks.

Top Shelf Books

Get yourself some nice hardware so you can really flow. Buy a mechanical keyboard, a gaming mouse and pad, a 27 inch primary monitor, a standing (adjustable) desk, some nasty headphones / speakers, and a nice chair. Build your computer and over clock your RAM. You need your whiteboard, you need your books, you need your art, you need your monitor stands. If you commute short buy an awesome commuter and slap on some panniers. If you commute far buy a luxurious sports car; one day you’ll be dead, today you’re not.

I used to tell my students that math, sports, and art were the same. They all require constant practice, they all require creativity, and they all take us into flow; a state during which we do for the sake of doing. Spending time in each of these areas will make the others a dance and offer perspective impossible to obtain otherwise. Optimize your tooling and you’ll soar.

glhf

--

--