Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    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

    General Code/Help
    2
    2
    49
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pucal last edited by

      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

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        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.

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
        $(document).ready(function () { app.coldLoad(); }); }