Open yarimiz opened 1 month ago
I use this example Polars TA Extension - Basic Example
Here is the code snippet I am working with:
p.filter(
pl.col("Symbol") == "TSLA"
).with_columns(
plta.cci(pl.col("high"), pl.col("low"), pl.col("close"), 7).over("Symbol").alias("cci_plta"),
pl.col("close").ta.cci(pl.col("high"), pl.col("low"), 7).over("Symbol").alias("cci_ta"),
).collect()
the result is always same
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:
I've attached a screen recording of the issue as it's the most simple way to display it.
https://github.com/user-attachments/assets/e5ff5e7d-c29e-4ff5-bf5a-e449a90d5b04
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.