Excel Integration¶
Where this runs
Gateway runs on your PC, like any other program. Excel talks to it via localhost:2112, and it fetches its data from Lavender over an encrypted connection (HTTPS) (what it sends).
Lavender Greeks work in Excel through three approaches, from simplest to most powerful. Pick the one that fits your workflow.
1. Power Query (no code)¶
The fastest way to get Greeks into Excel — no VBA, no macros.
- Data → From Web
- Paste this URL:
- Click Load — the at-the-forward call and put for every AAPL expiry appears as a table
- Data → Refresh All to update
Filter before you fetch
Add parameters to limit the data:
The gateway returns only matching contracts — no need to filter in Excel.Multiple underlyings¶
Create one Power Query per underlying, or use comma-separated:
Term structure¶
One row per expiry — perfect for a term structure chart:
2. VBA Module (recommended for traders)¶
A ready-to-use VBA module that fetches Greeks into a worksheet table and lets you look up individual values with formulas.
Install¶
- Download
LavenderGreeks.bas - Open Excel → Alt+F11 (VBA Editor)
- File → Import File → select
LavenderGreeks.bas - Close the VBA Editor
Fetch Greeks¶
Press Alt+F8 and run RefreshLavenderGreeks, which asks for the tickers. From your own macro or a button, call RefreshGreeks:
RefreshGreeks "AAPL" ' single ticker
RefreshGreeks "AAPL,MSFT,GOOGL" ' multiple tickers
RefreshGreeks Range("A1:A10") ' from a range of cells
RefreshGreeks "AAPL", "all" ' extended Greeks too (vanna, charm, ...)
This creates a LavGreeks worksheet with the full chain, in one HTTP call per run. The status bar shows how many contracts loaded.
Look up values¶
Use formulas that reference the cached table:
| Formula | Result |
|---|---|
=GetGreek("AAPL","2027-01-15",340,"call","delta") |
0.5234 |
=LavDelta("AAPL","2027-01-15",340,"call") |
0.5234 |
=LavTheo("AAPL","2027-01-15",340,"put") |
8.45 |
=LavIV("AAPL","2027-01-15",340,"call") |
0.2781 |
Use an expiry and strike from your LavGreeks sheet; the results above are examples. The expiry can be text in the form 2027-01-15, or a cell holding a date.
Available shortcuts: LavUndPrice, LavDelta, LavGamma, LavVega, LavTheta, LavDecay, LavRho, LavTheo, LavIV.
For any field: =GetGreek(root, expiry, strike, right, field) where field is any column of your LavGreeks sheet (e.g., "vol"). RefreshGreeks fetches the core Greeks; for extended ones such as "vanna" or "charm", fetch with RefreshGreeks "AAPL", "all".
Refresh¶
- Re-run
RefreshLavenderGreeksto update: Alt+F8, or assign it to a button - Formulas recalculate automatically when the table updates
Don't call HTTP per cell
Excel freezes if every cell makes its own web request. The GetGreek function reads from the cached worksheet — no HTTP calls. Always use RefreshGreeks first to populate the cache, then GetGreek to look up values.
3. Browser (quick look)¶
Paste any Lavender URL with format=html into your browser for an instant Greeks table:
You can copy-paste from the browser table directly into Excel. Good for one-off checks, not for live feeds.
Tips¶
- Use
greeks=corefor most work — delta, gamma, vega, theta, rho, model price, IV. Addgreeks=allonly if you need extended Greeks. - Filter aggressively —
right=call&max_dte=60orcenter=atfto keep the dataset small. - One query per underlying —
RefreshGreeks "AAPL,MSFT"makes one HTTP call for both underlyings. - All Greeks are per-share — multiply by 100 for per-contract values.