Usage

How do I get historical stock data?

How do I get historical data?

MarketXLS provides several functions for retrieving historical stock data:

Historical Price Functions

Daily Historical Prices

=qm_history("AAPL", "2024-01-01", "2024-12-31")

This returns daily OHLCV (Open, High, Low, Close, Volume) data for the specified date range.

Specific Historical Values

=HF_Close("AAPL", "2024-06-15")
=HF_Open("MSFT", "2024-01-01")
=HF_High("GOOGL", "2024-03-01")
=HF_Low("TSLA", "2024-12-01")
=HF_Volume("AMZN", "2024-06-01")

Historical Fundamental Data

Get historical financial metrics:

=Historical_PE("AAPL", "2024-01-01")
=Historical_MarketCap("MSFT", "2023-12-31")
=Historical_Revenue("GOOGL", "2023-06-30")

Data Depth

Historical data availability depends on your subscription plan:

  • Basic: Up to 1 year of daily data
  • Advanced: Up to 5 years of daily data
  • Business: Extended historical access

Tips for Historical Data

  1. Date format: Use "YYYY-MM-DD" format for best results
  2. Weekends/holidays: Stock data only exists for trading days
  3. Large ranges: For extensive date ranges, consider using multiple queries
  4. Performance: Historical queries may take a moment to load

Function Reference

For a complete list of historical data functions, visit:

Need More Historical Data?

For extensive historical data needs beyond your current plan, contact support@marketxls.com to discuss options.