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

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.

    pycharm64_2019-09-25_21-57-04.png


  • 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
 

});