The following are example scenarios for isolating non-conforming loans based on loan type, ownership structure, and origination characteristics. Each scenario includes a sample Cortex Code input and the corresponding SQL example.
Scenario: Non-QM Loans by Origination Date
Use this scenario to identify non-QM loans originated within a specific time period, particularly for alternative lending, refinance analysis, or investor-focused outreach.
Cortex Code input:
Write an SQL query that returns loans in Washington where the lien1 loan type does not contain “CONVENTIONAL,” the lien contract date falls within a specific date range, and the loan amount exceeds $200,000.
SQL example:
SELECT
address,
city,
zipcode,
lien1_loan_type,
lien1_amount,
lien1_interest_rate_used,
lien1_contract_date,
lien1_lender_name
FROM
XXXXX
WHERE STATE = 'WA'
AND LIEN1_LOAN_TYPE NOT ILIKE '%CONVENTIONAL%'
AND LIEN1_CONTRACT_DATE BETWEEN '2023-10-01' AND '2023-10-31'
AND LIEN1_AMOUNT > 200000;
Scenario: Non-QM Loans Held by Business Entities (LLC)
Use this scenario to identify non-QM loans associated with business-owned properties, such as those held by LLCs, where the property is likely not owner-occupied.
Cortex Code input:
Write an SQL query that returns properties in [insert state here] where the lien1 loan type does not contain “CONVENTIONAL,” lien1 data is present, the owner is a business entity (LLC), and the property is not marked as owner-occupied.
SQL example:
SELECT
address,
city,
county,
last_close_buyer1,
lien1_amount,
lien1_lender_name,
lien1_loan_type,
owner_occupied_yn,
last_close_price,
year_built
FROM
XXXXX
WHERE
AND LIEN1_LOAN_TYPE NOT ILIKE '%CONVENTIONAL%'
owner_occupied_yn IS NULL
AND last_close_buyer1 ILIKE '%LLC%'
AND NOT lien1_amount IS NULL;
