i05nagai/mafipy

View on GitHub

Showing 207 of 1,119 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 _replicate_denominator has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _replicate_denominator(init_swap_rate,
Severity: Major
Found in mafipy/replication/pricer_quanto_cms.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_A3_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def test_model__sabr_implied_vol_hagan_A3_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_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 test_model__sabr_implied_vol_hagan_A1_fhess_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def test_model__sabr_implied_vol_hagan_A1_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_A3_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def test_model__sabr_implied_vol_hagan_A3_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_A1_fhess_by_strike has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def test_model__sabr_implied_vol_hagan_A1_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 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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self,
                      Severity: Major
                      Found in mafipy/replication/_quanto_cms_forward_fx.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_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 sabr_implied_vol_hagan has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

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

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

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

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

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

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

                                      def test_model__sabr_implied_vol_hagan_A3_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_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
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language