DZsoul's picture
Upload 9 files
5a50d7c verified
raw
history blame
1.71 kB
# Configuration settings for the stock forecasting app
# Rate limiting settings
RATE_LIMIT_DELAY = 0.5 # Minimum delay between API calls (seconds)
MAX_RETRIES = 3 # Maximum number of retries for failed requests
BASE_RETRY_DELAY = 3 # Base delay for exponential backoff (seconds)
# Cache settings
DEFAULT_CACHE_TTL = 300 # Default cache time-to-live (seconds) - 5 minutes
MODEL_CACHE_TTL = 600 # Cache TTL for model data (seconds) - 10 minutes
# API settings
YAHOO_FINANCE_TIMEOUT = 10 # Timeout for yfinance requests (seconds)
# UI settings
DEFAULT_TICKERS = ['NVDA', 'AAPL', 'GOOGL', 'MSFT', 'AMZN']
PERIOD_MAP = {
'all': 'max',
'1m': '1mo',
'6m': '6mo',
'1y': '1y'
}
# Error messages
ERROR_MESSAGES = {
'rate_limit': """
🚫 **Rate Limit Exceeded**
Yahoo Finance has temporarily limited your requests. This happens when too many requests are made in a short time.
**What you can do:**
- Wait 5-10 minutes before trying again
- Use the cached data if available
- Try a different stock ticker
The app will automatically retry with delays between requests.
""",
'network': """
🌐 **Network Error**
There seems to be a connectivity issue.
**What you can do:**
- Check your internet connection
- Try refreshing the page
- Wait a moment and try again
""",
'no_data': """
πŸ“Š **No Data Available**
No stock data was found for the selected ticker and time period.
**What you can do:**
- Try a different time period
- Check if the ticker symbol is correct
- Try a different stock ticker
"""
}