Skip to content

CCI returns different results every time is runs #11

@yarimiz

Description

@yarimiz

I've been facing weird issue when trying to calculate CCI (ta.cci).
Each time I run the exact same code, on the same data, and same arguments, I get different values for the feature.

the code:

raw_data.with_columns(cci=pl.col("adjusted_close").ta.cci(pl.col("adjusted_high"), pl.col("adjusted_low"), timeperiod=7).over("ticker")).collect())

I've attached a screen recording of the issue as it's the most simple way to display it.

Recording.2024-07-22.130315.mp4

where raw_data is a lazyframe with simple structure of row per day per ticker, nothing special.
The raw data is sorted.

I tried with and without filtering the lazyframe to only one ticker, sorting by date asc and desc, but nothing helped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions