**Nasdaq Data Link Excel Formula Guide**

**Intro**
You have full access to Nasdaq Data Link (formerly Quandl) through the native Excel Add-in, but you should only pull Nasdaq Data Link data **when the user explicitly tells you to**. Nasdaq Data Link provides access to premium financial, economic, and alternative datasets through a unified API. You can retrieve any data point by writing NASDAQ formulas directly in Excel cells.

**IMPORTANT:** Before completing a task involving Nasdaq Data Link, you must verify:
1. Your NASDAQ formulas do not return errors.
2. All values should seem reasonable and make intuitive sense based on your general knowledge of finance and economics.
3. Use cell references for tickers and parameters when possible as opposed to hardcoded values.
4. Be aware that API calls are rate-limited; free tier has stricter limits than premium.
5. Dataset codes are case-sensitive and must match exactly.

You should essentially gut check every value that shows up. If there are any errors or the values seem wrong, you likely wrote the formula syntax incorrectly or are using invalid dataset codes. Please correct the formula until it outputs the proper value.

---

**Nasdaq Data Link Excel Functions Overview**

Nasdaq Data Link provides these main Excel functions:

| Function | Purpose | Use Case |
|----------|---------|----------|
| NASDAQ.TABLE | Table data retrieval | Multi-column data with filters |
| NASDAQ.DATA | Single value retrieval | Point-in-time data |
| NASDAQ.SERIES | Time series data | Historical data arrays |

---

**1. NASDAQ.TABLE - Table Data Retrieval**

Returns filtered data from Nasdaq Data Link datatables. Results spill into adjacent cells.

**Syntax:** =NASDAQ.TABLE("Datatable_code", {"column1","column2",...}, "filter1", "value1", ...)

**Parameters:**
| Parameter | Description | Required |
|-----------|-------------|----------|
| Datatable_code | Dataset identifier (e.g., "WIKI/PRICES") | Yes |
| columns | Array of column names to return | Yes |
| filter | Filter field name | No |
| value | Filter value | No |

**Examples:**
=NASDAQ.TABLE("WIKI/PRICES",{"date","close"},"ticker","AAPL")
-> Apple closing prices with dates.

=NASDAQ.TABLE("NDAQ/RTAT10",{"date","ticker","sentiment"},"ticker","MSFT")
-> Microsoft retail sentiment data.

=NASDAQ.TABLE("SHARADAR/SF1",{"ticker","revenue","netincome"},"ticker","GOOG","dimension","ARY")
-> Google annual financials.

**Using Cell References:**
=NASDAQ.TABLE("WIKI/PRICES",{"date","close"},"ticker",A1)
-> Prices for ticker in cell A1.

---

**2. NASDAQ.DATA - Single Value Retrieval**

Returns a single data point.

**Syntax:** =NASDAQ.DATA("Dataset_code", "column")

**Examples:**
=NASDAQ.DATA("FRED/GDP", "value")
-> Latest US GDP value.

=NASDAQ.DATA("OPEC/ORB", "value")
-> Latest OPEC crude oil price.

---

**3. Filter Operators**

Filters support comparison operators for date and numeric filtering:

| Operator | Meaning | Example |
|----------|---------|---------|
| (none) | Equals | `"ticker","AAPL"` |
| `.gte` | Greater than or equal | `"date.gte","2024-01-01"` |
| `.lte` | Less than or equal | `"date.lte","2024-12-31"` |
| `.gt` | Greater than | `"marketcap.gt","1000000000"` |
| `.lt` | Less than | `"price.lt","100"` |

**Example with date range:**
=NASDAQ.TABLE("WIKI/PRICES",{"date","close"},"ticker","AAPL","date.gte","2024-01-01","date.lte","2024-06-30")
-> Apple prices for first half of 2024.

---

**4. Popular Datasets**

**Market Data:**
| Dataset | Description | Key Columns |
|---------|-------------|-------------|
| WIKI/PRICES | US stock prices (historical) | date, ticker, open, high, low, close, volume |
| EOD/[TICKER] | End-of-day prices | date, open, high, low, close, volume |
| EURONEXT/[TICKER] | European exchange prices | date, open, high, low, close, volume |

**Fundamentals:**
| Dataset | Description | Key Columns |
|---------|-------------|-------------|
| SHARADAR/SF1 | Core US fundamentals | ticker, dimension, revenue, netincome, assets |
| SHARADAR/SF3 | Institutional holdings | ticker, investorname, shares, value |
| SHARADAR/TICKERS | Ticker metadata | ticker, name, exchange, sector, industry |

**Economic Data:**
| Dataset | Description | Key Columns |
|---------|-------------|-------------|
| FRED/GDP | US GDP | date, value |
| FRED/UNRATE | US unemployment rate | date, value |
| FRED/CPIAUCSL | US CPI (inflation) | date, value |
| FRED/DFF | Fed funds rate | date, value |
| FRED/T10Y2Y | 10Y-2Y Treasury spread | date, value |

**Alternative Data:**
| Dataset | Description | Key Columns |
|---------|-------------|-------------|
| NDAQ/RTAT10 | Retail trading activity | date, ticker, sentiment, activity |
| BITFINEX/[PAIR] | Crypto prices | date, last, high, low, volume |
| LBMA/GOLD | London gold fixing | date, value |

**Futures:**
| Dataset | Description | Key Columns |
|---------|-------------|-------------|
| CHRIS/CME_CL1 | WTI Crude Oil front month | date, settle, open, high, low |
| CHRIS/CME_GC1 | Gold front month | date, settle, open, high, low |
| CHRIS/CME_ES1 | S&P 500 E-mini front month | date, settle, open, high, low |

---

**5. SHARADAR Fundamentals Reference**

The SHARADAR/SF1 dataset is one of the most comprehensive fundamental datasets.

**Dimension Codes:**
| Code | Description |
|------|-------------|
| ARY | As-reported annual |
| ARQ | As-reported quarterly |
| MRY | Most recent annual |
| MRQ | Most recent quarterly |
| ART | As-reported trailing twelve months |
| MRT | Most recent trailing twelve months |

**Key Metrics:**
| Column | Description |
|--------|-------------|
| revenue | Total revenue |
| cor | Cost of revenue |
| grossprofit | Gross profit (gp) |
| opex | Operating expenses |
| opinc | Operating income |
| intexp | Interest expense |
| taxexp | Tax expense |
| netinc | Net income |
| eps | Earnings per share |
| epsdil | Diluted EPS |
| assets | Total assets |
| liabilities | Total liabilities |
| equity | Shareholders' equity |
| cashneq | Cash and equivalents |
| debt | Total debt |
| fcf | Free cash flow |
| ncfo | Operating cash flow |
| ncfi | Investing cash flow |
| ncff | Financing cash flow |
| marketcap | Market capitalization |
| ev | Enterprise value |
| pe | Price/earnings ratio |
| ps | Price/sales ratio |
| pb | Price/book ratio |

---

**6. Example Formulas by Use Case**

**Stock Price History:**
=NASDAQ.TABLE("WIKI/PRICES",{"date","open","high","low","close","volume"},"ticker","AAPL","date.gte","2023-01-01")
-> Apple OHLCV data from 2023.

**Company Fundamentals:**
=NASDAQ.TABLE("SHARADAR/SF1",{"calendardate","revenue","netinc","eps"},"ticker","MSFT","dimension","ARY")
-> Microsoft annual revenue, net income, EPS.

=NASDAQ.TABLE("SHARADAR/SF1",{"ticker","revenue","netinc","marketcap"},"dimension","MRY","marketcap.gt","100000000000")
-> Large cap companies (>$100B) with recent annual data.

**Economic Indicators:**
=NASDAQ.TABLE("FRED/GDP",{"date","value"},"date.gte","2020-01-01")
-> US GDP since 2020.

=NASDAQ.DATA("FRED/UNRATE","value")
-> Current US unemployment rate.

**Commodities:**
=NASDAQ.TABLE("CHRIS/CME_CL1",{"date","settle"},"date.gte","2024-01-01")
-> WTI crude oil settlement prices.

=NASDAQ.DATA("LBMA/GOLD","value")
-> Latest London gold fixing.

**Crypto:**
=NASDAQ.TABLE("BITFINEX/BTCUSD",{"date","last","volume"},"date.gte","2024-01-01")
-> Bitcoin daily prices and volume.

**Sector Screening:**
=NASDAQ.TABLE("SHARADAR/TICKERS",{"ticker","name","sector","industry"},"sector","Technology")
-> All technology sector tickers.

---

**7. Error Handling**

**Common Errors:**
| Error | Cause | Solution |
|-------|-------|----------|
| #VALUE! | Invalid dataset code | Verify dataset exists and code is correct |
| #N/A | No data for filters | Broaden filter criteria |
| Rate limit | Too many API calls | Wait and retry, or upgrade subscription |
| Authentication | Invalid API key | Check API key in add-in settings |
| Column not found | Invalid column name | Check dataset schema for valid columns |

**Debugging Tips:**
1. Verify dataset code on data.nasdaq.com
2. Check column names in dataset documentation
3. Test with simple query first, then add filters
4. Ensure date format is YYYY-MM-DD
5. Check API usage limits in account settings

---

**Final Checklist:**
- What dataset is needed? (Stock prices, fundamentals, economic, alternative?)
- What columns are required?
- What filters are needed? (Ticker, date range, dimension)
- Is the dataset code spelled correctly? (Case-sensitive)
- Are dates in YYYY-MM-DD format?
- Is the API key configured?
- Are rate limits being respected?

---

**Additional Resources:**
- Nasdaq Data Link: https://data.nasdaq.com/
- Excel Add-in Guide: https://docs.data.nasdaq.com/docs/excel-tables
- API Documentation: https://docs.data.nasdaq.com/docs/getting-started
- Dataset Search: https://data.nasdaq.com/search
