sonntagsgesicht/shortrate

View on GitHub

Showing 10 of 31 total issues

Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, domain=(), data=(), interpolation=None,
Severity: Major
Found in shortrate/hullwhite_multicurrency_model.py - About 1 hr to fix

    Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, value=1.0, origin=None, day_count=None,
    Severity: Major
    Found in shortrate/hullwhite_multicurrency_model.py - About 1 hr to fix

      Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self, domain=(), data=(), interpolation=None,
      Severity: Major
      Found in shortrate/hullwhite_model.py - About 1 hr to fix

        Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, domain=None, data=None, interpolation=None,
        Severity: Major
        Found in shortrate/market_risk_factor.py - About 1 hr to fix

          Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, inner_factor, domestic_hw_curve, foreign_hw_curve, volatility=0.0,
          Severity: Major
          Found in shortrate/hullwhite_multicurrency_model.py - About 1 hr to fix

            Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self, value=1.0, origin=None, day_count=None, domestic_curve=None, foreign_curve=None, volatility=0.0):
            Severity: Minor
            Found in shortrate/market_risk_factor.py - About 45 mins to fix

              Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, value=0.0, origin=None, day_count=None, drift=0.0, volatility=0.0):
              Severity: Minor
              Found in shortrate/market_risk_factor.py - About 35 mins to fix

                Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, inner_factor, mu=0.0, sigma=0.0, time=.0027378507871321013, start=0.0):
                Severity: Minor
                Found in shortrate/market_risk_factor.py - About 35 mins to fix

                  Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __init__(self, inner_factor, domestic_hw_curve, foreign_hw_curve, volatility=0.0,
                                   domestic_correlation=0., foreign_correlation=0., rate_correlation=0., correlation=None):
                          """
                  
                          :param GeometricBrownianMotionFxRateFactorModel or FxRate inner_factor: if FxRate, volatility is used
                  Severity: Minor
                  Found in shortrate/hullwhite_multicurrency_model.py - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __init__(self, inner_factor, mean_reversion=0.0, volatility=0.0, terminal_date=None):
                          """
                          :param list(float) domain:
                          :param list(float) data:
                          :param list(interpolation) interpolation:
                  Severity: Minor
                  Found in shortrate/hullwhite_model.py - About 25 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Severity
                  Category
                  Status
                  Source
                  Language