i05nagai/mafipy

View on GitHub

Showing 207 of 448 total issues

Function test_black_receivers_swaption_value has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def test_black_receivers_swaption_value(self,
                                            init_swap_rate,
                                            option_strike,
                                            swap_annuity,
                                            option_maturity,
Severity: Minor
Found in mafipy/function/tests/test_black.py - About 55 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 black_scholes_call_value has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def black_scholes_call_value(
        underlying,
        strike,
        rate,
        maturity,
Severity: Minor
Found in mafipy/function/black_scholes.py - About 55 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_model__sabr_implied_vol_hagan_A2_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def test_model__sabr_implied_vol_hagan_A2_fhess_by_strike(
Severity: Major
Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

    Function test_model__sabr_implied_vol_hagan_A4_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def test_model__sabr_implied_vol_hagan_A4_fprime_by_underlying(
    Severity: Major
    Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

      Function test_model_sabr_implied_vol_hagan_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def test_model_sabr_implied_vol_hagan_fhess_by_strike(
      Severity: Major
      Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

        Function test_model_sabr_implied_vol_hagan_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def test_model_sabr_implied_vol_hagan_fprime_by_underlying(
        Severity: Major
        Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

          Function _sabr_implied_vol_hagan_A11_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _sabr_implied_vol_hagan_A11_fhess_by_underlying(
          Severity: Major
          Found in mafipy/function/sabr.py - About 50 mins to fix

            Function test_model__sabr_implied_vol_hagan_A4_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def test_model__sabr_implied_vol_hagan_A4_fhess_by_underlying(
            Severity: Major
            Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

              Function _sabr_implied_vol_hagan_A1_fprime_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def _sabr_implied_vol_hagan_A1_fprime_by_strike(
              Severity: Major
              Found in mafipy/function/sabr.py - About 50 mins to fix

                Function test_model__sabr_implied_vol_hagan_A2_fprime_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def test_model__sabr_implied_vol_hagan_A2_fprime_by_strike(
                Severity: Major
                Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                  Function test_model__sabr_implied_vol_hagan_A2_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def test_model__sabr_implied_vol_hagan_A2_fhess_by_underlying(
                  Severity: Major
                  Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                    Function test_model_sabr_implied_vol_hagan_fprime_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def test_model_sabr_implied_vol_hagan_fprime_by_strike(
                    Severity: Major
                    Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                      Function test_model_sabr_implied_vol_hagan_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def test_model_sabr_implied_vol_hagan_fhess_by_underlying(
                      Severity: Major
                      Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                        Function _sabr_implied_vol_hagan_A11 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def _sabr_implied_vol_hagan_A11(
                        Severity: Major
                        Found in mafipy/function/sabr.py - About 50 mins to fix

                          Function test_model__sabr_implied_vol_hagan_A3_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def test_model__sabr_implied_vol_hagan_A3_fhess_by_underlying(
                          Severity: Major
                          Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                            Function test_model__sabr_implied_vol_hagan_A4_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def test_model__sabr_implied_vol_hagan_A4_fhess_by_strike(
                            Severity: Major
                            Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                              Function _sabr_implied_vol_hagan_A11_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def _sabr_implied_vol_hagan_A11_fprime_by_underlying(
                              Severity: Major
                              Found in mafipy/function/sabr.py - About 50 mins to fix

                                Function _sabr_implied_vol_hagan_A12_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def _sabr_implied_vol_hagan_A12_fhess_by_underlying(
                                Severity: Major
                                Found in mafipy/function/sabr.py - About 50 mins to fix

                                  Function test_model__sabr_implied_vol_hagan_A2_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def test_model__sabr_implied_vol_hagan_A2_fprime_by_underlying(
                                  Severity: Major
                                  Found in mafipy/function/tests/test_sabr.py - About 50 mins to fix

                                    Function _sabr_implied_vol_hagan_A2_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def _sabr_implied_vol_hagan_A2_fhess_by_strike(
                                    Severity: Major
                                    Found in mafipy/function/sabr.py - About 50 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language