Ask Historical
Returns the ask (offer) price for a symbol on a specific historical date. This function is useful for backtesting and historical analysis.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | string | Yes | Stock or option symbol |
| OnDate | date | Yes | Historical date |
Date Formats
- Excel DATE function:
DATE(2024,1,15) - String format:
"2024-01-15"
Notes
- For options, use the OCC option symbol or
OptionSymbol()function - Data availability depends on historical data coverage
Examples
=Ask_Historical("AAPL", DATE(2024,1,15))=Ask_Historical("MSFT", "2024-03-01")=Ask_Historical(OptionSymbol("AAPL",DATE(2024,3,15),"Call",170), DATE(2024,1,10))=Ask_Historical(A1, B1)When to Use
- Backtesting trading strategies
- Historical spread analysis
- Options historical analysis
- Transaction cost analysis
- Price slippage research
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Current ask price | Ask() |
| Historical bid price | Bid_Historical() |
| Historical mid price | Mid_Historical() |
| Historical close price | Close_Historical() |
Common Issues & FAQ
Q: What date format should I use? A: Either Excel DATE(year,month,day) or string "YYYY-MM-DD".
Q: Why am I getting NA? A: Check that the date is a valid trading day and within data coverage period.
Q: Does this work for options?
A: Yes, use the OCC option symbol or generate it with OptionSymbol() function.
