You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if this behavior is intended. I called RSI n=14 and noticed that the first 14 rows were also filled in, even though I explicitly passed fillna=False. The values seem to be weird as well.
IIRC, the first 14 rows are "supposed" to be weird. This is due to RSI using the past 14 days to calculate the current RSI value, but what happens if it does not know what happened the last 14 days? This is probably why you are getting weird values for the 14 first days, you can even see that the values are getting less weird the more days RSI has.
One solution would be to just calculate the RSI and then remove the first 14 rows from your dataset.
I am not sure if this behavior is intended. I called RSI n=14 and noticed that the first 14 rows were also filled in, even though I explicitly passed fillna=False. The values seem to be weird as well.
536.5 | 542.0 | 535.6 | 536.2 | 152 | 100.000000
536.0 | 537.2 | 536.0 | 536.1 | 53 | 0.000000
537.0 | 538.5 | 537.0 | 538.5 | 75 | 96.275072
536.8 | 536.8 | 535.6 | 535.7 | 81 | 43.571072
536.5 | 542.0 | 536.5 | 541.0 | 109 | 73.331230
541.0 | 543.9 | 540.6 | 543.3 | 68 | 78.604622
544.2 | 545.5 | 542.6 | 543.4 | 320 | 78.800895
543.8 | 544.6 | 543.5 | 543.7 | 195 | 79.411107
541.0 | 541.0 | 534.5 | 535.5 | 176 | 42.987527
533.7 | 533.9 | 525.0 | 530.3 | 445 | 32.733976
532.0 | 533.4 | 530.8 | 531.0 | 254 | 34.982219
523.0 | 523.0 | 518.5 | 518.5 | 519 | 21.294872
514.0 | 519.1 | 514.0 | 518.0 | 133 | 20.941906
516.8 | 516.8 | 504.2 | 505.1 | 122 | 14.338522
505.0 | 507.5 | 502.0 | 507.0 | 194 | 18.418793
508.0 | 509.4 | 496.1 | 496.1 | 182 | 14.230916
493.0 | 493.0 | 487.6 | 488.4 | 352 | 12.132334
498.0 | 501.0 | 492.7 | 497.0 | 156 | 25.369679
498.4 | 499.5 | 493.0 | 497.1 | 79 | 25.510204
495.0 | 496.8 | 491.3 | 491.4 | 97 | 22.867122
I understand that ta calculates RSI as ema of average gain over ema of average loss; but the first 3-4 values still seem very off.
The text was updated successfully, but these errors were encountered: