Strike Price: Disintermediating the Mortgage Market with Go and Gemini Live
The mortgage market is notoriously opaque. For jumbo loans, the complexity doubles: you aren't just fighting for a rate; you're managing cash-to-close deltas and strict liquidity seasoning rules. Historically, borrowers are at a massive information disadvantage, relying on commission-driven brokers who might withhold critical underwriting details until the last minute.
With Refinancier, I wanted to move from "checking the news" to having a protocol-aware command center that knows exactly when my "Strike Price" is hit.
Replacing the traditional dynamic with a custom AI agent flips the power structure. My Gemini Live analyst isn't trying to close a deal by Friday. It has infinite patience, complete knowledge of my specific financial goals, and an unwavering directive to protect my assets. Instead of waiting for a broker to call me with a "good rate," I have a proactive strategist monitoring the exact variables that matter to me, providing complete explanations without a sales pitch. It’s a profound shift from relying on opaque human processes to leveraging aligned, agentic intelligence - one that anyone in my family can talk to and understand.

The Math: Spreads, Sentiment, and Seasoning
The most difficult part of mortgage strategy is that the rates you see on consumer websites are often lagging indicators. Real market movement happens in the 10-Year Treasury Yield (^TNX).
Refinancier implements a correlation engine that tracks the delta between the 10Y yield and estimated Jumbo rates. Historically, my target Jumbo rate sits at a 1.8% (180 bps) spread above the 10Y Treasury. By tracking this spread in real-time via the Yahoo Finance API, the system can predict rate drops before they hit a lender's portal.
The Sentiment Analyzer
It's not enough to just look at today's rate. Refinancier tracks a trailing 3-day moving average. If the current rate drops more than 2 basis points below that average, it flags the market as "Improving"; if it jumps, it's "Worsening." This prevents reacting to daily noise and focuses on micro-trends.
Volatility Watch: Decoding the "Big Three"
Mortgage rates don't move in a vacuum; they react violently to macroeconomic data. Initially, the acronyms thrown around by financial pundits - CPI, FOMC, Non-Farm Payrolls - were completely opaque to me. I used Gemini to break down exactly which reports actually move the 10-Year Treasury Yield and why.
Once I understood the mechanics, I codified this into the app's "Volatility Watch" engine - then I immediately forgot about all of that. Refinancier specifically monitors the calendar for "The Big Three": the Jobs Report (usually the first Friday of the month), the Consumer Price Index (mid-month), and Federal Reserve (FOMC, Federal Open Market Committee) meetings. By tracking these dates, the AI system warns me when the market is about to get choppy, preventing me from locking a rate blindly the day before a major Fed announcement. And, most crucially, it can patiently re-explain why these metrics matter when I inevitably forget them again.

The "Seasoning" State Machine
Jumbo underwriting often requires funds to be "seasoned" (sitting in a specific account) for 60-90 days. A previous refinance attempt failed - an event affectionately known in the codebase as "The Debacle" - because a broker failed to explain that we needed 6 months of Post-Closing Reserves (PITI × 6), pushing our liquidity requirements to nearly double our estimated closing costs. Moving those funds late in the game triggered "Asset Sourcing Hell," where underwriters demand statements for every transfer.
To prevent this, I built a state machine to track liquidity targets and lock down fund movement until the window opens:
// From pkg/mortgage/calculator.go
func (c *Calculator) IsSeasoned(funds float64, targetDate time.Time) bool {
if time.Now().After(targetDate) && funds >= c.RequiredReserves {
return true
}
return false
}
Voice-Enabled Strategy: The Gemini Live Analyst
Integrating Gemini Live turned this from a calculator into a strategist. In a niche financial world where brokers might hide fees or downplay reserve requirements, having a knowledgeable sounding board is instrumental.
I fed the agent a specific persona defined in YAML, assigning it the "Puck" voice and giving it a direct, data-driven, and protective personality.
Creating the Analyst's Context
The magic happens by combining a static System Instruction with dynamic market context. The persona is briefed on:
- The Goal: Hit a 5.25% strike price.
- The Trauma: Avoid "Asset Sourcing Hell." Do not move funds until two clean statements are generated.
- The Math: Calculate liquid assets as
(Down Payment + Closing Costs) + (Monthly PITI × 6). - The Vetting Process: Prompt me to ask brokers about "Float Down policies" and "Portfolio vs Secondary Market pricing."
Before the WebSocket connects the browser audio to the Gemini Live API, the Go server injects today's yield, the calculated jumbo rate, and the current 3-day sentiment into the prompt.
Because the agent is grounded with Google Search (has_search: true), it can pull up real-time news. If the Jobs Report comes in hot, I can literally ask the analyst: "How does this affect our April window?" and get an audio response that factors in my current reserve balances, previous historical refinance attempts, and the 10Y yield trajectory.
The Agent Architecture
Refinancier is a multi-modal Go application designed for portability:
- Go 1.24: The core engine, functioning as both the HTTP Web Server and the backend orchestrator.
- Bubble Tea: Handles the Terminal UI for quick "glanceable" market checks from the CLI.
- Gemini Live API: Powers the voice analyst over a streaming WebSocket connection.
- Yahoo Finance API: The source of truth for the 10-Year Treasury Yield ($TNX).
Architecture Flow: The browser UI fetches market data from the Go server, which calculates the mortgage math. When the user initiates a voice session, the browser opens a WebSocket to the Go server, which establishes a bidirectional audio stream with the Gemini Live API, injecting the custom persona and live market math as the system instruction.

Conclusion
Tools like Refinancier represent the shift from static financial planning to agentic financial intelligence. By combining hard math, real-time market signals, and an AI strategist, I'm no longer just waiting for a broker's phone call. I'm arriving at the negotiating table armed with high-fidelity, agent-backed intelligence.