For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

ZeroDivisionError while calculating Standard Score

  • As title suggests im running into an error while trying to calculate a Z-Score.

    any help would be appreciated.


  • administrators

    It's difficult to quote an image ... it seems posting images it's the new black these days.

    In any case I didn't know that ta-lib had safediv parameters and in any case the exception catcher you have is non-relevant. Things are lazily evaluated and you get to the evaluated result in next

    I suggest you look at the RSI code to see how to handle potential div by zero.

    Although your real problem is data variability which no code can fix.

Log in to reply