Skip to content

ctalearn

A cross-sectional / time-series alpha research toolkit for CTA strategies, built around a Polars-backed DataFrame abstraction.

Install

pip install ctalearn

With uv:

uv add ctalearn        # into a project
uv pip install ctalearn  # into the active environment

Quick start

import polars as pl
from ctalearn import DataFrame
from ctalearn.operator import cs_rank, ts_mean

df = DataFrame(pl.read_csv("prices.csv"), time_col="timestamp")
signal = cs_rank(ts_mean(df, 20))

See the API Reference for the full operator catalog, the DSL Guide for writing alpha expressions as text, and Data for Glassnode ingestion.