Research

  • [X] I have searched the [pandas] tag on StackOverflow for similar questions.

  • [X] I have asked my usage related question on StackOverflow.

Link to question on StackOverflow

https://stackoverflow.com/questions/55910760/how-do-i-correctly-calculate-ema-for-a-stock-using-ta-lib-or-pandas

Question about pandas

Pandas' EMA not matching the stock's EMA?QST:

Comment From: phofl

Hi, please provide a reproducible example and more context. See https://matthewrocklin.com/minimal-bug-reports

Comment From: AlexKirko

If it's a persistent issue, showing us a stock with three dividend payments and then showing the discrepancy between the pandas calculation and the explicit formula should be sufficient for us to be able to reproduce the problem.

Comment From: ZRT-1998

Hi, please provide a reproducible example and more context. See https://matthewrocklin.com/minimal-bug-reports

When choosing limit = 20 is not accurate, when selecting limit = 100 is accurate .I don't know what the underlying principle is, but hopefully the documentation will illustrate that. my test code: https://stackoverflow.com/a/75540362/7482878

Comment From: ZRT-1998

If it's a persistent issue, showing us a stock with three dividend payments and then showing the discrepancy between the pandas calculation and the explicit formula should be sufficient for us to be able to reproduce the problem.

After the test, cycle index is calculated in the data set less than or equal to 2 times,the calculation error.May be in operation to some requirements in the face of data in the document.

Comment From: ZRT-1998

Hi, please provide a reproducible example and more context. See https://matthewrocklin.com/minimal-bug-reports

When choosing limit = 20 is not accurate, when selecting limit = 100 is accurate .I don't know what the underlying principle is, but hopefully the documentation will illustrate that. my test code: https://stackoverflow.com/a/75540362/7482878

OKX CHART:https://www.okx.com/trade-swap/eth-usdt-swap