-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
RSI calculation #613
Comments
Probably has to do with it's definition in TA-Lib, using smoothing: https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_RSI.c#L341 |
@eugenpro how big is the difference for you? |
This is how RSI works (and any function designated to have an "unstable period" in TA-Lib). Because the smoothing is recursive, adding/removing to the length of the input will cause a slightly different output. This is the nature of how the RSI algo works. There is no fix needed to TA-Lib. If you want strict consistency, you have to make a choice how to handle it in your app. As an example, you can choose to always start your input on 1 jan 2022 for this time series even if later you have access to the 2021 data. TA-Lib also offer ways to enforce a minimum of inputs to reduce inconsistency (check for setting the unstable period for individual functions). |
@bttger the difference depends highly of the input variance and how many data you input to the function. I assume most apps just feed all the data they have, and that is an OK approach to it. |
Hello. During usage RSI function I've touched that with the same timeperiods e.g. 14 RSI still changes depending on data size. for instance if I calculate RSI from 1 Jan 2023 to 01 Aug 2023 or 1 Jan 2022 to 01 Aug 2023 RSI value on 01 Jun 2023 will be different in both cases that makes me crasy. How to reach RSI cosistensy across the time?
The text was updated successfully, but these errors were encountered: