Skip to main content

techr

techr exposes technical indicators as Polars expression plugins.

Installation

uv add techr

Supported indicators

  • Price/trend: sma, wma, ema, disparity, mom, roc, rsi, rsi_line, rsi_signal, psl
  • Bands/channels: bband_middle, bband_lower, bband_upper, env_upper, env_middle, env_lower, pchan_upper, pchan_middle, pchan_lower
  • Momentum/oscillators: macd, macd_line, macd_signal, macd_hist, macd_histogram, ppo_line, ppo_signal, ppo_histogram, pvo_line, pvo_signal, pvo_histogram, sonar_line, sonar_signal, trix_line, trix_signal, stochf_percent_k, stochf_percent_d, stoch_percent_k, stoch_percent_d, stochrsi_percent_k, stochrsi_percent_d
  • High/low/volume indicators: ad, adx, adxr, aroon_up, aroon_down, aroonosc, atr, cci, cci_line, cci_signal, cmf, co, cv, dmi_plus, dmi_minus, efi, eom_line, eom_signal, erbear, erbull, massi_line, massi_signal, mfi, nvi_line, nvi_signal, obv_line, obv_signal, psar, pvi_line, pvi_signal, ultosc, vr, willr
  • Ichimoku: ichimoku_base_line, ichimoku_conversion_line, ichimoku_leading_span_a, ichimoku_leading_span_b, ichimoku_lagging_span

Usage

import polars as pl
import techr as ta

df = pl.DataFrame(
    {
        "high": [11.0, 12.0, 13.0],
        "low": [9.0, 10.0, 11.0],
        "close": [10.0, 11.0, 12.0],
    }
)

result = df.select(
    ta.sma(pl.col("close"), period=2).alias("sma_2"),
    ta.macd(pl.col("close"), fast_period=12, slow_period=26).alias("macd"),
    ta.stochf_percent_k(
        pl.col("high"),
        pl.col("low"),
        pl.col("close"),
        fastk_period=14,
        fastd_period=3,
    ).alias("stochf_k"),
)

Null input values are accepted. Indicators preserve row alignment and emit nulls according to the core rolling-window and seed recovery rules.

Ichimoku Notes

  • Standalone Ichimoku rolling-window lines such as ichimoku_base_line and ichimoku_conversion_line use period.
  • ichimoku_leading_span_a uses base_line_period and conversion_line_period because it combines two lines.
  • ichimoku_leading_span_b uses period for the rolling window and base_line_period for the forward displacement. The Python wrapper defaults base_line_period to 26.
  • ichimoku_lagging_span uses base_line_period for its backward displacement.
  • Polars plugins keep the output row-aligned with the input, so ichimoku_leading_span_a and ichimoku_leading_span_b truncate the forward-projected tail from the core result.

Development

cd polars
uv sync --group dev
uv run maturin develop --uv
uv run pytest

Build distributable artifacts locally with:

cd polars
uv run maturin build --release --sdist --out dist
uv run python scripts/check_artifacts.py dist

Release

  1. Update the version in Cargo.toml.
  2. Merge the version bump to main.
  3. Polars Release builds the artifacts and publishes them to PyPI.
  4. After the PyPI publish succeeds, the workflow creates the matching polars-vX.Y.Z GitHub Release.

If the matching GitHub Release already exists, the workflow exits without publishing a duplicate release.

Before the first release, configure a Trusted Publisher for PyPI on alphaprime-dev/techr.

Metadata

Release files for techr 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for techr 0.1.6
File Size Uploaded
techr-0.1.6.tar.gz 56.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for techr 0.1.6
File
techr-0.1.6-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
techr-0.1.6-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
techr-0.1.6-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
techr-0.1.6-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.12+ x86-64 Details

Total release size: 16.8 MB

Release files / techr-0.1.6.tar.gz

Download URL techr-0.1.6.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cd3b7c748bc7db2ae802ad51363069db3ddf4b883a2ba8c37288edc8df68562
BLAKE2b-256 checksum
How to use checksums
a151aee15d428cae5480ce829dd4eeff9a08a8ed577b0e7528ea0cb446c182b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / techr-0.1.6-cp311-abi3-win_amd64.whl

Download URL techr-0.1.6-cp311-abi3-win_amd64.whl
Size 3.8 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fca3c567f0b8e160c1eb6f7c46387bb6859746087c44b67a4807012053652618
BLAKE2b-256 checksum
How to use checksums
6901ce275d398eef23f95667d74ca8e8fb10aa1859ff53042e26fa016e21b590
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / techr-0.1.6-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL techr-0.1.6-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0729047b1d67a63b322c6925e36fd2be5738279615b0f85af459d27dc58f5170
BLAKE2b-256 checksum
How to use checksums
68641495c48c717d32abd5a969d2575d33065dca5b13e48a635faf7a9060d1ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / techr-0.1.6-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL techr-0.1.6-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.1 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1176e6b254119ce667004b939f33d2ad3d8b9d56a775c7cde6c13dd3efd8a80d
BLAKE2b-256 checksum
How to use checksums
8f98985e40bc8e59a8f2241db62cb2399ef23ebdc6b6fea8d0d3ffd1e9a21f30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / techr-0.1.6-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL techr-0.1.6-cp311-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 6.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0fc624646202515a8cf6b5c70c5fd0d304b9a751c25c12d05256d78d437f4dca
BLAKE2b-256 checksum
How to use checksums
ef1da7e5a12aeecadc250a4e2e1fe2d402d61474a5e1cee9c8b5773fad35573b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

5 release files

0.1.5

5 release files

0.1.4

5 release files

0.1.3

5 release files

0.1.2

5 release files

0.1.1

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page