"""Formulas from sheet 'Inputs' of 'pricing_calculator.xlsx'. Generated by Power Migrate 0.1.0a1 (no-AI mode). One function per logic block, in the order they appear on the sheet; ``model.compute`` runs them in dependency order. """ from .. import xl from ..xl import Book def financed_amount_north(book: Book) -> None: r"""Financed amount North Inputs!B16 (one cell). Excel (B16): =B3*(1-B4)-B8*0 Reads: Inputs!B3, Inputs!B4, Inputs!B8 """ inputs = book['Inputs'] inputs["B16"] = inputs["B3"] * (1 - inputs["B4"]) - inputs["B8"] * 0 def balloon_gbp_north(book: Book) -> None: r"""Balloon (GBP) North Inputs!B17 (one cell). Excel (B17): =ROUND(B3*B6,2) Reads: Inputs!B3, Inputs!B6 """ inputs = book['Inputs'] inputs["B17"] = xl.ROUND(inputs["B3"] * inputs["B6"], 2) def days_to_first_payment(book: Book) -> None: r"""Days to first payment Inputs!B18 (one cell). Excel (B18): =NETWORKDAYS(B14,B7) Reads: Inputs!B7, Inputs!B14 """ inputs = book['Inputs'] inputs["B18"] = xl.NETWORKDAYS(inputs["B14"], inputs["B7"]) def first_payment_date(book: Book) -> None: r"""First payment date Inputs!B19 (one cell). Excel (B19): =WORKDAY(EDATE(B7,1),0) Reads: Inputs!B7 """ inputs = book['Inputs'] inputs["B19"] = xl.WORKDAY(xl.EDATE(inputs["B7"], 1), 0) def term_years_30_360(book: Book) -> None: r"""Term years (30/360) Inputs!B20 (one cell). Excel (B20): =DATEDIF(B7,EDATE(B7,B5),"m")/12 Reads: Inputs!B5, Inputs!B7 """ inputs = book['Inputs'] inputs["B20"] = xl.DATEDIF(inputs["B7"], xl.EDATE(inputs["B7"], inputs["B5"]), 'm') / 12 def term_years_actual(book: Book) -> None: r"""Term years (actual) Inputs!B21 (one cell). Excel (B21): =YEARFRAC(B7,EDATE(B7,B5),1) Reads: Inputs!B5, Inputs!B7 """ inputs = book['Inputs'] inputs["B21"] = xl.YEARFRAC(inputs["B7"], xl.EDATE(inputs["B7"], inputs["B5"]), 1)