Quant Trading Project Structure¶
The Quant Trading Project Structure is a logical and reasonably simple project structure for developing quantitative trading work like strategies and research works.
Welcome to Quant Trading Project Structure!¶
Below we expose a simple project structure for quantitative traders who want to develop new strategies or make research and development works. It is based in the the following works and we use either of them, depending on the works aim:
Why use this simple project structure?¶
When we think about quantitative trading research, we often think just about the resulting strategies, reports, or graph visualizations. While these final products are generally the main objects, it’s easy to focus on making the products look nice and convincing to third party, even for ourself and forgetting the quality of the code that generates them. Trading research science code quality is about correctness, standardization and reproducibility.
It is not a secret that good analysis is often the result of very scattered and random explorations. Tentative experiments and rapid testing approaches that may not work are part of the process to get good trading strategies.
Having said that, once it is started, it is not a process that lends itself to thinking carefully about the structure of your code or project design, so it is best to start with a logical and clean structure and stick to it at all times.
If you ever tried to reproduce an analysis you or your team did a few months ago or even a few years ago you know what I mean. You may have written the code, but now it is impossible to decrypt whether you should use first_test.py, first_test_01.py or new_first_test.py to get things done.
Getting started¶
We’ve created a data science like bash script for linux to start the template for projects in Python. This script contains the three above template types. Your analysis doesn’t have to be in Python, but the templates do provide some Python boilerplates.
- Getting started
- Requirements
- The Script
- Starting a new project
- Example of Directory structure (Data Science type project)
- Data is immutable
- Notebooks are for exploration and communication
- Build from a Conda environment
- Secrets and configuration should be kept out of version control
- Default folder structure cuasi-inmutability