Rapid Quanting
By Ra Boe / Wikipedia, CC BY-SA 3.0 de, https://commons.wikimedia.org/w/index.php?curid=19219809

Rapid Quanting

Apparently, quanting is a word!

Just as car manufacturers use shared platforms for efficiency, stability, and speed in production, quants can benefit from pre-built templates. These templates act as a "skeleton" for projects, ensuring consistency and accelerating the development process by removing repetitive setup tasks.

Many developers and researchers maintain personal collections of code fragments or entire strategies, so the value of templates may not be immediately clear. However, when working with multiple researchers across various projects, a mix of build systems, test conventions, documentation standards, and programming languages quickly emerges, leading to inefficiencies and inconsistencies.

You may appreciate the variety of possibilities, or you may prefer to steer the growth in certain directions. The good news is, you have full control over this process by creating your own templates. Currently, I offer four templates out of the box, but these are primarily intended as inspiration for you to create your own blueprints.

These templates serve as blueprints for repositories, allowing you to create repos directly from the command line (following the CookieCutter idea). While not all repos are the same or aim to solve identical problems, the templates provide a common structure for efficiency.

I began with just four templates, each serving a specific purpose:

  • LaTeX Documents: Ready-made setup for academic or professional papers.
  • Complete Packages: Pre-configured skeleton for software projects.
  • Experiments/Strategies: Framework for quick & dirty experiments.
  • R Problems: Solutions tailored for statistical and data-driven challenges.

Each template includes reliable features out of the box:

  • Pre-configured CI/CD pipelines
  • Built-in testing environments
  • Pre-commit hooks for code quality and standardization
  • A custom Makefile for streamlined command-line navigation
  • Support for Dependabot and Renovate
  • ... and much more

All boilerplate code is taken care of. Projects based on the templates start in a fully functional state, passing all CI/CD checks. The tool also provides GitHub actions for testing projects before they’re ever promoted to templates. Behind the scenes, the templates utilize some of the most recent additions to the Python ecosystem, including uv for dependency management, hatch for build management, and Marimo.

Advantages:

  • Time Efficiency: Eliminate the need to set up common tools, allowing developers to focus on solving core problems.
  • Quality and Consistency: Ensure projects start with a stable, tested foundation.
  • Simplified Integration: Make it easier to maintain and test multiple projects with shared components.
  • Open Source Collaboration: Foster community contributions and evolution of templates.


As always, I like to finish with some code. Here’s an example to get you started:

$ uvx qcradle        

Keep in mind, you may not have uvx installed. Visit its installation guide for setup instructions. You'll also need the GitHub CLI tool and a working SSH connection to GitHub. For more technical details, check the PyPI page: qCradle.

While an individual working in isolation may not see immediate benefits beyond the time saved when creating a repo, a certain degree of technical harmony across projects will ultimately lead to production gains. It opens the door to smoother collaboration and an efficient assembly line for developing strategies which starts and ends with good engineering.


Thomas Schmelzer

Portfolio construction and technology @ ADIA | Commodities and LS Equities | Visiting Scholar at Stanford.

1 个月

Here’s a repo that has been created by qCradle and archived immediately to preserve the starting point: https://github.com/tschm/demo_qcradle

回复
Petr Vanek

Leading AI Implementation @ Go Autonomous┇MSc in Math

1 个月

Today, I used qCradle for my new Python package—highly recommended! ??

要查看或添加评论,请登录

Thomas Schmelzer的更多文章

  • Backtesting in the clouds

    Backtesting in the clouds

    Imagine a scenario where you want to facilitate backtesting for multiple strategies, written by various developers…

    28 条评论
  • When did Elvis die?

    When did Elvis die?

    After celebrating being on the 25 quants listed by EQDerivatives, Inc it's time to focus on important stuff again…

  • Hierarchical Methods in Portfolio Construction: Introducing pyhrp

    Hierarchical Methods in Portfolio Construction: Introducing pyhrp

    In the last part of my mini-series of hierarchical methods. We are diving again into hierarchical methods for portfolio…

    3 条评论
  • Hierarchical Methods in Portfolio Construction: Traversing trees

    Hierarchical Methods in Portfolio Construction: Traversing trees

    I shall start this 2nd and pre-ultimate part of my mini-series on hierarchical methods with a disclaimer: It is not my…

    9 条评论
  • Hierarchical Methods in Portfolio Construction: Understanding the Root Node

    Hierarchical Methods in Portfolio Construction: Understanding the Root Node

    Portfolio construction has long relied on grouping assets into sub-portfolios rather than treating all assets as a…

    13 条评论
  • Cornering Kelly

    Cornering Kelly

    Univariate Trading Systems: Simple & Practical Position Sizing In the world of trading, particularly within…

    9 条评论
  • Radical assembly lining

    Radical assembly lining

    The evolution of manufacturing and software development processes has always fascinated me. My early days as a mechanic…

    7 条评论
  • The Secret Shrinkage Sauce

    The Secret Shrinkage Sauce

    WARNING: By LinkedIn standards, this article leans heavily on mathematics. Statisticians have a reputation for poor…

    11 条评论
  • Is convexity really worth it?

    Is convexity really worth it?

    Ever since my early days in finance I have worked with convex functions and their optimization. Once in a while I still…

    26 条评论
  • How many is really a lot?

    How many is really a lot?

    Last weekend we celebrated reunion at Balliol. I had the pleasure to be placed across a young man running a shipping…

    14 条评论

社区洞察

其他会员也浏览了