h2integrate.finances.test.test_numpy_financial_npv#
Functions
|
_compute_wacc weights equity/debt rates and applies the Fisher conversion (pre-tax). |
Adding cheaper debt lowers the WACC and raises NPV vs equity-only. |
|
Real and inflation rates should combine via the Fisher equation: (1 + r_nominal) = (1 + r_real) * (1 + inflation), matching ProFAST. |
|
Omitting inflation_rate should reproduce the baseline NPV (nominal-rate behavior). |
|
inflation_rate must be in [0, 1]. |
|
|
_real_to_nominal_rate applies the Fisher equation, and is a no-op at zero inflation. |
|
|
|
|
debt_rate and debt_equity_ratio must respect their valid ranges. |
|
NPV computed from WACC inputs should match a single-rate config equal to that WACC. |
- h2integrate.finances.test.test_numpy_financial_npv.npv_finance_inputs()#
- h2integrate.finances.test.test_numpy_financial_npv.fake_filtered_tech_config()#
- h2integrate.finances.test.test_numpy_financial_npv.fake_cost_dict()#
- h2integrate.finances.test.test_numpy_financial_npv.test_simple_npv(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
- h2integrate.finances.test.test_numpy_financial_npv.test_simple_npv_positive(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
- h2integrate.finances.test.test_numpy_financial_npv._build_npv_problem(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict)#
Build and run an NPV problem with the given finance inputs.
- h2integrate.finances.test.test_numpy_financial_npv.test_inflation_rate_defaults_to_zero(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
Omitting inflation_rate should reproduce the baseline NPV (nominal-rate behavior).
- h2integrate.finances.test.test_numpy_financial_npv.test_inflation_rate_combines_via_fisher_equation(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
Real and inflation rates should combine via the Fisher equation: (1 + r_nominal) = (1 + r_real) * (1 + inflation), matching ProFAST.
- h2integrate.finances.test.test_numpy_financial_npv.test_inflation_rate_validator_rejects_out_of_range()#
inflation_rate must be in [0, 1].
- h2integrate.finances.test.test_numpy_financial_npv._make_component(**overrides)#
Build a NumpyFinancialNPV component with a config from the given overrides.
The component is not run through OpenMDAO setup; only
configis populated so that the_real_to_nominal_rateand_compute_wacchelper methods can be exercised in isolation.
- h2integrate.finances.test.test_numpy_financial_npv.test_real_to_nominal_rate(subtests)#
_real_to_nominal_rate applies the Fisher equation, and is a no-op at zero inflation.
- h2integrate.finances.test.test_numpy_financial_npv.test_compute_wacc(subtests)#
_compute_wacc weights equity/debt rates and applies the Fisher conversion (pre-tax).
- h2integrate.finances.test.test_numpy_financial_npv.test_wacc_discount_matches_equivalent_single_rate(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
NPV computed from WACC inputs should match a single-rate config equal to that WACC.
- h2integrate.finances.test.test_numpy_financial_npv.test_debt_financing_shifts_npv(npv_finance_inputs, fake_filtered_tech_config, fake_cost_dict, subtests)#
Adding cheaper debt lowers the WACC and raises NPV vs equity-only.
- h2integrate.finances.test.test_numpy_financial_npv.test_wacc_config_validators_reject_out_of_range(subtests)#
debt_rate and debt_equity_ratio must respect their valid ranges.