From Raw Data to Rich Predictions: Machine Learning Strategies With COT Reports in Finance

Creating a Forecasting Algorithm on the COT Report

Sofien Kaabar, CFA
5 min readDec 1, 2023


In this article, we delve into the realm of predictive analytics, exploring how the rich insights provided by the COT report can be harnessed to enhance the capabilities of machine learning models. By deciphering the patterns within trader positions, we unlock the potential for more informed and data-driven decision-making in the complex world of finance.

Introduction to the KNN Algorithm and the COT Report

K-Nearest Neighbors (KNN) is a simple and intuitive machine learning algorithm used for both classification and regression tasks. But first, what does classification and regression mean?

  • Classification is a type of supervised learning where the goal is to categorize data points into predefined classes or labels. In classification, the model learns to assign a class or category to an input based on its features. The output in classification is discrete and represents a category or class label. For example, classifying emails as spam or not spam.
  • Regression, on the other hand, is a type of supervised learning where the goal is to predict a continuous numeric value. In…