"""Formulas from sheet 'Inputs' of 'pricing_calculator.xlsx' (pandas target). Generated by Power Migrate 0.1.0a1. Copied formulas are column, row or table operations on the sheet's DataFrame; other blocks run cell by cell over the same frame. ``model.compute`` runs them in dependency order. """ from .. import xl from ..frames import FrameBook, abs_, across, and_, average, averageif, averageifs, ceiling, cells, choose, col, concat, concatenate, count, counta, countblank, countif, countifs, date, datedif, day, div, edate, eomonth, eq, exact, exp, find, floor, fv, ge, gt, hlookup, iferror, ifna, ifs, index, int_, ipmt, irr, isblank, iserr, iserror, islogical, isna, isnumber, istext, le, left, len_, ln, log, log10, lower, lt, match, max_, maxifs, mid, min_, minifs, mod, month, n, ne, networkdays, not_, nper, npv, num, or_, pi, pmt, power, ppmt, product, proper, pv, rate, rept, right, round_, rounddown, roundup, search, shifted, sign, sqrt, substitute, sum_, sumif, sumifs, sumproduct, switch, text, textjoin, trim, trunc, upper, value, vlookup, weekday, where, workday, xlookup, xor, year, yearfrac def financed_amount_north(book: FrameBook) -> 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: FrameBook) -> 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: FrameBook) -> 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: FrameBook) -> 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: FrameBook) -> 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: FrameBook) -> 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)