sonntagsgesicht/dcf

View on GitHub

Showing 88 of 148 total issues

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

    def __init__(self, domain=(), data=(), interpolation=None, origin=None,
Severity: Minor
Found in dcf/curves/creditcurve.py - About 45 mins to fix

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

        def __init__(self, domain=(), data=(), interpolation=None, origin=None,
    Severity: Minor
    Found in dcf/curves/creditcurve.py - About 45 mins to fix

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

          def __init__(self, start, end, amount=DEFAULT_AMOUNT,
      Severity: Minor
      Found in dcf/cashflows/payoffs.py - About 45 mins to fix

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

        def get_bucketed_delta(cashflow_list, discount_curve, valuation_date=None,
        Severity: Minor
        Found in dcf/pricer.py - About 45 mins to fix

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

          def ax_plot_curve(ax, curve, func='get_zero_rate', grid=None, *args, **kwargs):
          Severity: Minor
          Found in dcf/curves/plot.py - About 45 mins to fix

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

            def plot(curve, func='get_zero_rate', step=None, nums=10, *args, **kwargs):
            Severity: Minor
            Found in dcf/curves/plot.py - About 45 mins to fix

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

                  def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
                               origin=None, day_count=None,
                               fixing_offset=None, pay_offset=None,
                               fixed_rate=0., cap_strike=None, floor_strike=None,
                               payoff_model=None):
              Severity: Minor
              Found in dcf/cashflows/contingent.py - About 45 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 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def __init__(self, payment_date_list, amount_list=DEFAULT_AMOUNT,
                               origin=None, day_count=None,
                               fixing_offset=None, pay_offset=None,
                               fixed_rate=0., forward_curve=None):
                      r""" list of interest rate cashflows
              Severity: Minor
              Found in dcf/cashflows/cashflow.py - About 45 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 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, domain=(), data=(), interpolation=None, origin=None,
              Severity: Minor
              Found in dcf/curves/curve.py - About 45 mins to fix

                Function details has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def details(self, model=None):
                        details = {
                            'cashflow': 0.0
                        }
                        cf = 0.0
                Severity: Minor
                Found in dcf/cashflows/payoffs.py - About 45 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 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(self, pricing_formula, strike_shift=None,
                Severity: Minor
                Found in dcf/models/optionpricing.py - About 45 mins to fix

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

                      def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                  Severity: Minor
                  Found in dcf/curves/interestratecurve.py - About 45 mins to fix

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

                        def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                    Severity: Minor
                    Found in dcf/curves/volatilitycurve.py - About 45 mins to fix

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

                          def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                      Severity: Minor
                      Found in dcf/curves/creditcurve.py - About 45 mins to fix

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

                            def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                        Severity: Minor
                        Found in dcf/curves/creditcurve.py - About 45 mins to fix

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

                              def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                          Severity: Minor
                          Found in dcf/curves/interestratecurve.py - About 45 mins to fix

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

                                def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                                             day_count=None, forward_tenor=None):
                                    r"""
                                    :param domain: either curve points $t_1 \dots t_n$
                                        or a curve object $C$
                            Severity: Minor
                            Found in dcf/curves/curve.py - About 45 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 get_curve_fit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def get_curve_fit(cashflow_list, discount_curve, valuation_date=None,
                                              fitting_curve=None, fitting_grid=None, present_value=0.0,
                                              precision=1e-7, bounds=(-0.1, .2)):
                                r"""fit curve to cashflow_list prices (bootstrapping)
                            
                            
                            Severity: Minor
                            Found in dcf/pricer.py - About 45 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 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(self, domain=(), data=(), interpolation=None, origin=None,
                            Severity: Minor
                            Found in dcf/curves/curve.py - About 45 mins to fix

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

                                  def __init__(self, valuation_date=None, forward_curve=None,
                              Severity: Minor
                              Found in dcf/models/displaced.py - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language