{"repo":"tschm/cs","free":true,"listed":false,"github":"https://github.com/tschm/cs","clone":"git clone https://github.com/tschm/cs.git","description":"The 10-line CTA — a trend-following strategy in ten lines of code, and what convex programming reveals about its Sharpe ratio, kurtosis and trading costs","language":"Python","stars":45,"topics":["convex-optimization","cta","quantitative-finance","sharpe-ratio","trend-following"],"license":"MIT","category":"trading","readme_excerpt":"📈 The 10-line CTA 🚀 About 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. ✨ Features - 💰 Implement a hedge fund strategy in just 10 lines of code - 📊 Boost the Sharpe Ratio through optimization techniques - 📉 Control both Kurtosis and trading costs 🛠️ Getting Started 📋 Prerequisites - Python 3.11+ - A POSIX shell. macOS and Linux have one by default. 🪟 Windows users: The make targets are written for a POSIX shell and rely on tools like mkdir -p , printf , curl , and [ … ] . They will not run under cmd.exe or PowerShell — you'll see errors such as process 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. 🔧 Installation 📖 Documentation Developer notes live under docs/development/ : - Parameter optimization — how the Optuna search in optimize.py reuses the notebook signals (the notebooks-are-the-source-of-truth contract). - Sharpe-ratio pins — the pinned regression baselines and how to update them. - Test-layout parity — why tests mirror the notebooks (not a src/ tree) and the repo-local gate that enforces it. - Releasing — how a release is cut, and why version bumping and tagging are not make targets. 🔬 Running the Exper","default_branch":null,"files":null,"tree":[],"storefront":"/r/tschm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tschm/cs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}