Files
20250920-e194e889/config.py
2026-04-25 19:21:28 +08:00

35 lines
947 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
美股低价值公司分析系统配置文件
"""
import os
from dotenv import load_dotenv
load_dotenv()
# API配置
YAHOO_FINANCE_API = "https://query1.finance.yahoo.com/v8/finance/chart/"
ALPHA_VANTAGE_API_KEY = os.getenv('ALPHA_VANTAGE_API_KEY', '')
# 数据库配置
DATABASE_PATH = "stock_analysis.db"
# 分析参数配置
LOW_VALUE_CRITERIA = {
'max_pe_ratio': 15, # 最大市盈率
'max_pb_ratio': 1.5, # 最大市净率
'max_ps_ratio': 2.0, # 最大市销率
'min_market_cap': 100_000_000, # 最小市值1亿美元
'max_debt_ratio': 0.6, # 最大债务比率
'min_current_ratio': 1.2, # 最小流动比率
'min_roe': 0.05, # 最小ROE5%
}
# 报告配置
REPORT_OUTPUT_DIR = "reports"
CHART_OUTPUT_DIR = "charts"
# 数据更新频率(小时)
DATA_UPDATE_INTERVAL = 24
# 支持的股票市场
SUPPORTED_MARKETS = ['NASDAQ', 'NYSE', 'AMEX']