TOE Engineering Presentation Series/Pricing Engine & Offers

Pricing Engine & Offer Generation

From borrower data to eligible offer: program matching, rate calculation, and fee assembly

How a loan offer is built
Supported product types
HELOAN
Fixed-rate home equity loan — lump-sum disbursement
HELOC
Variable-rate line of credit — draw as needed
ℹ️
Each product defines its own rate, fee, and eligibility schema

Four Subsystems, One Pipeline

The pricing engine is a standalone service

ℹ️
Standalone by design — the pricing engine takes a flat input and returns offers. It never reads the File or triggers reactor events.

Flat Input, Two Product Shapes

The engine takes borrower + property data and matches it against product-specific program schemas

Pricing Input Structure
lc/engines/pricing/input.py — PricingInput
@dataclass(frozen=True, slots=True, kw_only=True)
class PricingInput:
    property_value: int | None
    occupancy: Occupancy | None
    purpose: LoanPurpose | None
    state: State | None
    property_type: PropertyType | None
    credit_score: int | None
    cltv: Decimal | None
    loan_amount: Decimal | None
    lien_position: LienPosition | None
    lien_balance: Decimal | None
ℹ️
Every field is optional. The engine evaluates what it can with available data.
Product schemas
HELOAN
Closed-end amortizing loan, fixed term, single disbursement
RateFixed
Term30-year
DisbursementSingle draw
HELOANStructurepricing/schema/heloan.py:11
HELOC
Open-end revolving line with draw period then repayment period
RateVariable
PeriodsDraw + Repay
DrawsInterest-only during draw period
HELOCStructurepricing/schema/heloc.py:11

From Input to Offer

Each program runs through a sequential pipeline, every step is audited

Three Rule Systems Shape Every Offer

Three rule systems, one expression evaluator

ℹ️
Same tri-logic everywhere: all conditional expressions use True / False / Unknown evaluation. Unknown on a fee aborts pricing; unknown on an adjustment is silently skipped.

Four Outcomes, Always Audited

Every program evaluation produces one of four result types

Two API surfaces
Admin API
Accepts explicit input fields. Returns full audit trail for debugging
PricingOffersapp/views/pricing/offers.py:13
Borrower API
Pulls from borrower's file. Audit trail stripped for security
BorrowerPricingapp/borrower/views/pricing.py:19
Strip auditapp/borrower/views/pricing.py:92-93

Key Takeaways

Core design principles of the pricing engine

Navigation

Keyboard Shortcuts

→ / Space
Next slide / reveal fragment
Previous slide / hide fragment
Home / End
First / last slide
F
Toggle fullscreen
?
Toggle this help
Esc
Close help
Comments