i05nagai/mafipy

View on GitHub
mafipy/function/tests/test_sabr.py

Summary

Maintainability
F
3 wks
Test Coverage

File test_sabr.py has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/bin/python
# -*- coding: utf-8 -*-

from __future__ import division, print_function, absolute_import
from pytest import approx
Severity: Minor
Found in mafipy/function/tests/test_sabr.py - About 7 hrs to fix

    TestSabr has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TestSabr(object):
    
        # before all tests starts
        @classmethod
        def setup_class(cls):
    Severity: Minor
    Found in mafipy/function/tests/test_sabr.py - About 3 hrs to fix

      Function test_sabr_implied_vol_hagan has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def test_sabr_implied_vol_hagan(
                  self, underlying, strike, maturity, alpha, beta, rho, nu):
              one_minus_beta = 1.0 - beta
              one_minus_beta2 = one_minus_beta ** 2
              one_minus_beta4 = one_minus_beta ** 4
      Severity: Minor
      Found in mafipy/function/tests/test_sabr.py - About 1 hr to fix

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

            def test_sabr_payers_swaption_value(
        Severity: Major
        Found in mafipy/function/tests/test_sabr.py - About 1 hr to fix

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

              def test_sabr_receivers_swaption_value(
          Severity: Major
          Found in mafipy/function/tests/test_sabr.py - About 1 hr to fix

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

                def test_model_sabr_payers_swaption_delta(
            Severity: Major
            Found in mafipy/function/tests/test_sabr.py - About 1 hr 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_model__sabr_implied_vol_hagan_A1_fprime_by_underlying has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

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

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

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

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

                                                                def test_sabr_atm_implied_vol_hagan(
                                                            Severity: Minor
                                                            Found in mafipy/function/tests/test_sabr.py - About 45 mins to fix

                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model_sabr_implied_vol_hagan_fhess_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 1 other location - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 237..254

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 142.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A1_fhess_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 1 other location - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 496..512

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 142.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A1_fhess_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 1 other location - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 534..550

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 142.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model_sabr_implied_vol_hagan_fhess_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 1 other location - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 197..214

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 142.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A2_fprime_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 437..454
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A2_fhess_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A1_fprime_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model_sabr_implied_vol_hagan_fprime_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A3_fhess_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 437..454
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A2_fhess_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 437..454
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A4_fprime_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A4_fhess_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A3_fhess_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A3_fprime_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 437..454
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A3_fprime_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 297..314
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A1_fprime_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 437..454
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A4_fhess_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 477..493

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 8 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model__sabr_implied_vol_hagan_A2_fprime_by_underlying(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 7 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 217..234
                                                              mafipy/function/tests/test_sabr.py on lines 317..334
                                                              mafipy/function/tests/test_sabr.py on lines 377..394
                                                              mafipy/function/tests/test_sabr.py on lines 397..414
                                                              mafipy/function/tests/test_sabr.py on lines 417..434
                                                              mafipy/function/tests/test_sabr.py on lines 457..474
                                                              mafipy/function/tests/test_sabr.py on lines 515..531

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 7 locations. Consider refactoring.
                                                              Open

                                                                  @pytest.mark.parametrize(
                                                                      "underlying, strike, maturity, alpha, beta, rho, nu", [
                                                                          (0.0357, 0.03, 2, 0.036, 0.5, -0.25, 0.35)
                                                                      ])
                                                                  def test_model_sabr_implied_vol_hagan_fprime_by_strike(
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 6 other locations - About 1 day to fix
                                                              mafipy/function/tests/test_sabr.py on lines 177..194
                                                              mafipy/function/tests/test_sabr.py on lines 257..274
                                                              mafipy/function/tests/test_sabr.py on lines 277..294
                                                              mafipy/function/tests/test_sabr.py on lines 337..354
                                                              mafipy/function/tests/test_sabr.py on lines 357..374
                                                              mafipy/function/tests/test_sabr.py on lines 437..454

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 138.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                      x_numerator = math.sqrt(1.0 - 2.0 * rho * z + z * z) + z - rho
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 1 other location - About 2 hrs to fix
                                                              mafipy/function/sabr.py on lines 199..199

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 53.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                              Open

                                                                      numerator33 = (2.0 - 3.0 * rho * rho) * nu * nu
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 2 other locations - About 45 mins to fix
                                                              mafipy/function/sabr.py on lines 214..214
                                                              mafipy/function/tests/test_sabr.py on lines 144..144

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 35.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                              Open

                                                                      numerator3 = (2.0 - 3.0 * rho * rho) * nu * nu
                                                              Severity: Major
                                                              Found in mafipy/function/tests/test_sabr.py and 2 other locations - About 45 mins to fix
                                                              mafipy/function/sabr.py on lines 214..214
                                                              mafipy/function/tests/test_sabr.py on lines 113..113

                                                              Duplicated Code

                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                              Tuning

                                                              This issue has a mass of 35.

                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                              Refactorings

                                                              Further Reading

                                                              There are no issues that match your filters.

                                                              Category
                                                              Status