i05nagai/mafipy

View on GitHub

Showing 207 of 1,119 total issues

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

    def test_black_swaption_implied_vol(self,
Severity: Minor
Found in mafipy/calibrator/tests/test_sabr.py - About 35 mins to fix

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

    def black_payers_swaption_value_third_by_strike(
    Severity: Minor
    Found in mafipy/function/black.py - About 35 mins to fix

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

          def test_make_put_wrt_strike(
      Severity: Minor
      Found in mafipy/function/tests/test_analytic_formula.py - About 35 mins to fix

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

            def test_func_d2(self, underlying, strike, rate, maturity, vol):
        Severity: Minor
        Found in mafipy/function/tests/test_black_scholes.py - About 35 mins to fix

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

              def test_black_payers_swaption_value_third_by_strike(self,
          Severity: Minor
          Found in mafipy/function/tests/test_black.py - About 35 mins to fix

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

            def black_payers_swaption_value(
            Severity: Minor
            Found in mafipy/function/black.py - About 35 mins to fix

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

              def black_payers_swaption_vega(
              Severity: Minor
              Found in mafipy/function/black.py - About 35 mins to fix

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

                    def test_make_call_wrt_strike(
                Severity: Minor
                Found in mafipy/function/tests/test_analytic_formula.py - About 35 mins to fix

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

                  def black_payers_swaption_value_fprime_by_strike(
                  Severity: Minor
                  Found in mafipy/function/black.py - About 35 mins to fix

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

                        def test_black_scholes_cdf(
                    Severity: Minor
                    Found in mafipy/function/tests/test_black_scholes.py - About 35 mins to fix

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

                      def func_d1(underlying, strike, rate, maturity, vol):
                      Severity: Minor
                      Found in mafipy/function/black_scholes.py - About 35 mins to fix

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

                        def black_scholes_put_formula(underlying, strike, rate, maturity, vol):
                        Severity: Minor
                        Found in mafipy/function/black_scholes.py - About 35 mins to fix

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

                              def make_put_wrt_strike(
                          Severity: Minor
                          Found in mafipy/function/analytic_formula.py - About 35 mins to fix

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

                            def implied_vol_brenner_subrahmanyam(
                            Severity: Minor
                            Found in mafipy/function/analytic_formula.py - About 35 mins to fix

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

                              def implied_vol_quadratic_approx(
                              Severity: Minor
                              Found in mafipy/function/analytic_formula.py - About 35 mins to fix

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

                                    def make_call_wrt_strike(
                                Severity: Minor
                                Found in mafipy/function/analytic_formula.py - About 35 mins to fix

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

                                  def get_var_name(var, symboltable, error=None):
                                      """getVarName
                                      Return a var's name as a string.
                                      This funciton require a
                                      symboltable(returned value of globals() or locals())
                                  Severity: Minor
                                  Found in mafipy/replication/util.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 get_var_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def get_var_name(var, symboltable, error=None):
                                      """getVarName
                                      Return a var's name as a string.
                                      This funciton require a
                                      symboltable(returned value of globals() or locals())
                                  Severity: Minor
                                  Found in mafipy/util/util.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 test_black_scholes_put_value has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def test_black_scholes_put_value(
                                              self, underlying, strike, rate, maturity, vol, today):
                                          time = maturity - today
                                          call_value = target.black_scholes_call_value(
                                              underlying, strike, rate, maturity, vol, today)
                                  Severity: Minor
                                  Found in mafipy/function/tests/test_black_scholes.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 test_black_payers_swaption_value_fhess_by_strike has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def test_black_payers_swaption_value_fhess_by_strike(self,
                                                                                           init_swap_rate,
                                                                                           option_strike,
                                                                                           swap_annuity,
                                                                                           option_maturity,
                                  Severity: Minor
                                  Found in mafipy/function/tests/test_black.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language