Skip to content

Analyzing Positions

Victor Kaiuki edited this page Jun 16, 2026 · 1 revision

Analyzing Positions

from cftc_cot import COTClient, COTAnalysis

client = COTClient()
df = client.legacy().market("Crude Oil").last_n_weeks(52).execute()

analysis = COTAnalysis(df, classification="legacy")

# 1. Net Positions
df_net = analysis.net_positions()

# 2. Z-Scores
df_z = analysis.z_scores(window=52)

# 3. Extremes
df_extremes = analysis.extremes(threshold=0.9)

Clone this wiki locally