Skip to content

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.

  1. Data → From Web
  2. Paste this URL:
    http://localhost:2112/l1/greeks?root=AAPL&center=atf&format=csv
    
  3. Click Load — the at-the-forward call and put for every AAPL expiry appears as a table
  4. Data → Refresh All to update

Filter before you fetch

Add parameters to limit the data:

http://localhost:2112/l1/greeks?root=AAPL&right=call&max_dte=60&format=csv
The gateway returns only matching contracts — no need to filter in Excel.

Multiple underlyings

Create one Power Query per underlying, or use comma-separated:

http://localhost:2112/l1/greeks?root=AAPL,MSFT,GOOGL&center=atf&format=csv

Term structure

One row per expiry — perfect for a term structure chart:

http://localhost:2112/l1/greeks?root=AAPL&center=atf&right=call&greeks=chain&format=csv


A ready-to-use VBA module that fetches Greeks into a worksheet table and lets you look up individual values with formulas.

Install

  1. Download LavenderGreeks.bas
  2. Open Excel → Alt+F11 (VBA Editor)
  3. File → Import File → select LavenderGreeks.bas
  4. 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 RefreshLavenderGreeks to 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:

http://localhost:2112/l1/greeks?root=AAPL&center=atf&format=html

You can copy-paste from the browser table directly into Excel. Good for one-off checks, not for live feeds.


Tips

  • Use greeks=core for most work — delta, gamma, vega, theta, rho, model price, IV. Add greeks=all only if you need extended Greeks.
  • Filter aggressively — right=call&max_dte=60 or center=atf to 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.