Calculation Average True Range

0

I have the following problem: I performed the calculation of ATR (Average True Range) using the numpy library, there was no code problem (exception, etc ...) however, the result shows a small decimal difference when compared to software that also performs this calculation. Is there any other library that calculates also calculate the ATR? Or any other library that is geared toward the financial market? Thanks.

    
asked by anonymous 11.05.2017 / 14:58

1 answer

1

Without telling you how much the difference is, it is impossible to answer that question with certainty - but most likely the difference is due to the natural error arising from how we represent numbers on computing platforms. Understanding this article is critical: link

Now, in general the numpy library will give you correct results - even if a person would find a real miscalculation - like what you fear you have found, to open a , since it is open on the internet, and thing to be either resolved or well documented in a short time. (With commercial programs, this cycle is much more complicated - even if there is a way for the seller to contact a defect, they are not visible either to the pub- lic or other subscribers of the software.)

So, no, I do not think it's a "mistake" in numpy, but above all, in a collaborative world that is made possible by direct access to software developers, a fundamental change we need to have is of "this does not work, let me use another" - the numpy is more than a library - is a platform for numerical computations that evolved about 20 years ago for Python, and based on numerical bibitoecas in native code that exist and are used by millions of people there maybe twice this time. Even if it was a numpy error, the attitude of "this project is broken, let me use another", would not be the best solution: we can help to fix it here. (Of course, everything with common sense - it may be that there is a library specialized in financial calculations, that evolves faster than the numpy just because it is more focused, etc ...)     
11.05.2017 / 15:46