Close Price X Months Ago
Returns the closing price from a specified number of months in the past. Useful for calculating returns and comparing performance over monthly periods.
Supported Symbol Formats
| Type | Format | Example |
|---|---|---|
| US Stocks | SYMBOL | AAPL, MSFT |
| ETFs | SYMBOL | SPY, QQQ |
Parameters
| Parameter | Description | Example |
|---|---|---|
| Symbol | Stock ticker | AAPL |
| Months | Number of months ago | 3, 6, 12 |
Examples
=close_historical_x_months_ago("AAPL", 3)=close_historical_x_months_ago("MSFT", 6)=close_historical_x_months_ago("SPY", 12)=(Last("AAPL")-close_historical_x_months_ago("AAPL",3))/close_historical_x_months_ago("AAPL",3)When to Use
- Calculating month-based returns
- Comparing prices across monthly periods
- Building performance tables
- Historical analysis by month
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Need specific date | Close_Historical() |
| Need YTD return | ChangePercentYTD() |
| Need 52-week change | FiftyTwoWeekChange() |
Common Issues & FAQ
Q: What date does it use for X months ago? A: It typically uses the same day of month from X months prior, or the nearest trading day.
Q: What if the market was closed on that day? A: It returns the closest previous trading day's closing price.
