Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMA producing NaNs #601

Open
Jark5455 opened this issue Jun 27, 2023 · 2 comments
Open

SMA producing NaNs #601

Jark5455 opened this issue Jun 27, 2023 · 2 comments

Comments

@Jark5455
Copy link

Hello, it appears that with SMA, even if only a few input values are NaNs, ta-libs entire output comes out as NaN. I don't believe this is intended behavior, because even where there is a valid series of values where the SMA can be calculated, NaN values are being returned.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jun 27, 2023 via email

@Jark5455
Copy link
Author

Is it possible to have TA-Lib just ignore NaNs in calculations? For example, if a period was [Nan, 0, 1, 2, 3] it would just remove Nan from the calculation and return 6 / 5. Or is there some sort of SIMD / Vectorization limitation that is preventing this?

@Jark5455 Jark5455 reopened this Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants