Challenged by a young CEO, I wrote a terse CTA (Commodity Trading Advisor) investment strategy in just 10 lines of code. This project discusses the somewhat quirky background of this code fragment and explores how Convex Programming opens the door to deeper insights into the strategy.
- 💰 Implement a hedge fund strategy in just 10 lines of code
- 📊 Boost the Sharpe Ratio through optimization techniques
- 📉 Control both Kurtosis and trading costs
- Python 3.12+
- A POSIX shell. macOS and Linux have one by default.
🪟 Windows users: The
maketargets are written for a POSIX shell and rely on tools likemkdir -p,printf,curl, and[ … ]. They will not run undercmd.exeor PowerShell — you'll see errors such asprocess_begin: CreateProcess(NULL, # Ensure the … folder exists, …) failed.Run the commands below from WSL (recommended) or Git Bash, both of which provide a POSIX shell.
# Clone the repository
git clone https://github.com/tschm/cs.git
cd cs
# Install dependencies
make install# Build the Jupyter Book
make book# Start Marimo
make marimoWe do not guarantee or take responsibility for the accuracy, completeness, reliability and usefulness of any information.
Dr. Thomas Schmelzer created all material in his personal capacity. The views stated are his own and do not necessarily represent the views of neither ADIA nor Stanford University. The opinion expressed is based on the prevailing market trends and is subject to change.
This project relies on the Rhiza system for its underlying infrastructure and tooling.
This project is licensed under the MIT License - see the LICENSE file for details.