MCPcopy Create free account

hub / github.com/DemonDamon/FinnewsHunter / functions

Functions1,198 in github.com/DemonDamon/FinnewsHunter

↓ 486 callersMethodget
获取字符串数据
backend/app/core/redis_client.py:75
↓ 468 callersMethodinfo
返回 Provider 元信息
backend/app/financial/providers/base.py:192
↓ 117 callersMethodget
获取缓存
backend/app/tools/crawler_enhanced.py:538
↓ 62 callersFunctioncn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 46 callersMethodexecute
执行因子表达式 Args: formula: token 序列,如 [0, 1, 6] 表示 ADD(RET, VOL) features: 特征张量,形状 [batch, num_features,
backend/app/alpha_mining/vm/factor_vm.py:47
↓ 42 callersMethodexecute
同步执行方法(AgenticX Tool 协议要求) Args: **kwargs: 参数字典 - start_page: 起始页 - end_page: 结束
backend/app/tools/crawler_base.py:368
↓ 40 callersMethodget_collection
(self, database_name, collection_name)
legacy_v1/src/Kite/database.py:15
↓ 37 callersFunctionsse_event
格式化 SSE 事件
backend/app/api/v1/agents.py:499
↓ 27 callersMethod_fetch_page
获取网页内容(带重试机制,但503错误不重试) Args: url: 目标URL Returns: 响应对象
backend/app/tools/crawler_base.py:91
↓ 25 callersMethod_emit_event
触发事件
backend/app/agents/orchestrator.py:120
↓ 24 callersMethoddecode
将 token 序列解码为人类可读的表达式字符串 使用逆波兰表达式解析,转换为前缀表示法(函数调用形式) Args: formula: token 序列
backend/app/alpha_mining/vm/factor_vm.py:126
↓ 23 callersMethod_parse_html
解析HTML Args: html: HTML字符串 Returns: BeautifulSoup对象
backend/app/tools/crawler_base.py:162
↓ 22 callersMethodsearch
执行 Web 搜索 Args: query: 搜索查询字符串 freshness: 时间范围(noLimit, day, week, month) count: 返回结果数量(
backend/app/tools/bochaai_search.py:55
↓ 22 callersFunctionuseGlobalI18n
()
frontend/src/store/useLanguageStore.ts:1065
↓ 21 callersFunctiongetOperatorIcon
(name: string)
frontend/src/components/alpha-mining/OperatorGrid.tsx:61
↓ 20 callersMethod_safe_float
安全转换为浮点数
backend/app/services/stock_data_service.py:743
↓ 20 callersMethodget_data
(self, database_name, collection_name, max_data_request=None, query=None, keys=None)
legacy_v1/src/Kite/database.py:30
↓ 19 callersFunctionget_llm_provider
获取 LLM 提供者实例(用于 AgenticX Agent) Args: provider: 可选的提供商名称(如 openai, bailian, ollama) model: 可选的模型名称 Returns:
backend/app/services/llm_service.py:260
↓ 18 callersFunctionclean_text_for_db
清理文本中不适合存入数据库的字符 PostgreSQL 不允许在文本字段中存储 NUL 字符 (\x00) Args: text: 原始文本 Returns: 清理后的文本
backend/app/tasks/crawl_tasks.py:36
↓ 17 callersMethodevaluate
综合评估因子 Args: factor: 因子值 [batch, time_steps] 或 [time_steps] returns: 收益率 [batch, time_steps] 或 [time
backend/app/alpha_mining/backtest/evaluator.py:59
↓ 17 callersMethodname_to_token
将名称转换为 token ID Args: name: 特征或操作符名称 Returns: 对应的 token ID
backend/app/alpha_mining/dsl/vocab.py:98
↓ 17 callersMethodrun
(self)
legacy_v1/src/Killua/denull.py:23
↓ 16 callersMethod_clean_text
清理文本 Args: text: 原始文本 Returns: 清理后的文本
backend/app/tools/crawler_base.py:191
↓ 16 callersMethodbuild
从行情数据构建特征张量 Args: data: 行情数据,DataFrame 或张量字典 DataFrame 需包含: close, volume, (可选: turnover, shares
backend/app/alpha_mining/features/market.py:58
↓ 16 callersMethodexists
检查键是否存在
backend/app/core/redis_client.py:113
↓ 16 callersMethodrun
运行辩论流程
backend/app/agents/orchestrator.py:140
↓ 16 callersMethodset
存储字符串数据
backend/app/core/redis_client.py:86
↓ 15 callersMethodclose
关闭连接
backend/app/core/neo4j_client.py:57
↓ 15 callersMethodis_available
检查 Redis 是否可用
backend/app/core/redis_client.py:36
↓ 15 callersMethodload
加载模型
backend/app/alpha_mining/model/alpha_generator.py:266
↓ 14 callersMethoddelete
删除键
backend/app/core/redis_client.py:101
↓ 13 callersMethodget_url_info
(self, url)
legacy_v1/src/Gon/cnstockspyder.py:51
↓ 13 callersMethodsave
保存模型
backend/app/alpha_mining/model/alpha_generator.py:255
↓ 12 callersFunctiongenerate_mock_data
生成模拟行情数据用于测试 Args: num_samples: 样本数(股票数) num_features: 特征数 time_steps: 时间步数(交易日数) seed: 随机种子 dev
backend/app/alpha_mining/utils.py:17
↓ 12 callersMethodget_url_info
(self, url)
legacy_v1/src/Gon/nbdspyder.py:41
↓ 11 callersMethodcoroutine_run
Coroutines running.
legacy_v1/Crawler/crawler_nbd.py:283
↓ 11 callersMethodget_historical_news
(self, url)
legacy_v1/src/Gon/spyder.py:21
↓ 10 callersMethod_filter_stock_news
筛选股票相关新闻 组合URL路径和标题关键词两种策略 策略调整: - 如果过滤后没有新闻,返回所有新闻(避免过度过滤) - 对于财经类网站,放宽筛选条件 Args:
backend/app/tools/crawler_base.py:301
↓ 10 callersMethodexecute_write
执行写入操作 Args: query: Cypher 写入语句 parameters: 参数 Returns: 写入结果
backend/app/core/neo4j_client.py:95
↓ 10 callersMethodsearch
执行搜索请求 Args: query: 搜索查询 source: 数据源 (akshare, bochaai, browser, kb, all) stock_code: 股票
backend/app/agents/search_analyst.py:115
↓ 10 callersMethodtrain
完整训练循环 Args: features: 特征张量 [num_samples, num_features, time_steps] returns: 收益率张量 [num_samples, tim
backend/app/alpha_mining/model/trainer.py:202
↓ 10 callersFunctionts_delay
时序延迟:将序列向右移动 d 步 Args: x: [batch, time_steps] 输入张量 d: 延迟步数 Returns: 延迟后的张量,前 d 个位置填充 0
backend/app/alpha_mining/dsl/ops.py:22
↓ 9 callersMethod_extract_article_content
通用智能内容提取方法 Args: soup: BeautifulSoup对象 selectors: 可选的自定义选择器列表 Returns:
backend/app/tools/crawler_base.py:210
↓ 9 callersMethod_log_step
记录执行步骤
backend/app/agents/debate_agents.py:629
↓ 9 callersMethodextractData
Extract data from specific collection of specific database. # Arguments: dbName: Name of database. colName: Name of collection. tag_l
legacy_v1/Text_Analysis/text_mining.py:53
↓ 9 callersMethodfind_relevant_stock_codes_in_article
(self, article, stock_name_code_dict)
legacy_v1/src/Leorio/tokenization.py:70
↓ 9 callersFunctionformatRelativeTime
(date: string | Date, i18n?: TimeI18n)
frontend/src/lib/utils.ts:33
↓ 9 callersMethodget_fetcher
获取 Fetcher,支持自动降级 Args: data_type: 数据类型,如 'news', 'stock_price' provider: 可选的 Provider 名称,如果不指定则按优先级选择
backend/app/financial/registry.py:129
↓ 8 callersMethodcrawl
爬取 URL
backend/app/tools/crawler_enhanced.py:506
↓ 8 callersMethodgetUrlInfo
Analyze website and extract useful information.
legacy_v1/Crawler/crawler_stcn.py:59
↓ 8 callersMethodgetUrlInfo
Analyze website and extract useful information.
legacy_v1/Crawler/crawler_cnstock.py:64
↓ 8 callersMethodgetUrlInfo
Analyze website and extract useful information.
legacy_v1/Crawler/crawler_sina.py:57
↓ 8 callersMethodgetUrlInfo
Analyze website and extract useful information.
legacy_v1/Crawler/crawler_jrj.py:71
↓ 8 callersFunctionget_graph_service
获取知识图谱服务实例
backend/app/knowledge/graph_service.py:582
↓ 8 callersMethodget_url_info
(self, url, specific_date)
legacy_v1/src/Gon/jrjspyder.py:41
↓ 8 callersMethodinsert_data
(self, database_name, collection_name, data_dict)
legacy_v1/src/Kite/database.py:18
↓ 8 callersMethodlist_providers
列出所有已注册的 Provider (按优先级排序) Returns: Provider 名称列表
backend/app/financial/registry.py:184
↓ 8 callersFunctionreset_registry
重置全局 Registry (主要用于测试) Returns: 新的 ProviderRegistry 实例
backend/app/financial/registry.py:247
↓ 7 callersMethodgenerate
批量生成因子表达式 使用自回归采样生成 token 序列。 Args: batch_size: 生成数量 max_len: 最大长度,默认使用 config.max_
backend/app/alpha_mining/model/alpha_generator.py:143
↓ 7 callersMethodget_graph_stats
获取图谱统计信息
backend/app/knowledge/graph_service.py:520
↓ 7 callersFunctionget_registry
获取全局 Registry 实例 Returns: ProviderRegistry 单例
backend/app/financial/registry.py:234
↓ 7 callersMethodis_operator
判断 token 是否为操作符
backend/app/alpha_mining/dsl/vocab.py:119
↓ 7 callersMethodregister
注册 Provider Args: provider: Provider 实例 Note: - 如果 Provider 已存在,会被替换 - 按 priority 自动排序
backend/app/financial/registry.py:63
↓ 6 callersFunction_get_alpha_mining_components
获取 Alpha Mining 组件
backend/app/api/v1/alpha_mining.py:144
↓ 6 callersMethodgenerate
生成文本 Args: prompt: 用户提示 system_message: 系统消息 **kwargs: 额外参数 Returns
backend/app/services/llm_service.py:130
↓ 6 callersMethodget_all_news_about_specific_stock
(self, database_name, collection_name)
legacy_v1/src/Killua/buildstocknewsdb.py:39
↓ 6 callersMethodget_company_graph
获取完整的公司知识图谱 Args: stock_code: 股票代码 Returns: 公司知识图谱或None
backend/app/knowledge/graph_service.py:371
↓ 6 callersFunctionhandleCopyContent
(content: string, label: string)
frontend/src/pages/StockAnalysisPage.tsx:1082
↓ 6 callersFunctionhandleExportToFile
(content: string, filename: string)
frontend/src/pages/StockAnalysisPage.tsx:1091
↓ 6 callersMethodis_feature
判断 token 是否为特征
backend/app/alpha_mining/dsl/vocab.py:115
↓ 6 callersMethodto_dict
(self)
backend/app/agents/orchestrator.py:52
↓ 6 callersMethodtoken_to_name
将 token ID 转换为名称 Args: token: token ID Returns: token 对应的名称
backend/app/alpha_mining/dsl/vocab.py:81
↓ 5 callersMethod_get_cached
获取缓存数据
backend/app/services/stock_data_service.py:179
↓ 5 callersMethod_get_symbol
获取 akshare 使用的股票代码格式 akshare stock_zh_a_hist 需要纯数字代码
backend/app/services/stock_data_service.py:162
↓ 5 callersMethod_is_captcha_page
检测页面是否为验证码/人机验证页面 Args: html_content: HTML 原始内容 soup: 已解析的 BeautifulSoup 对象 Ret
backend/app/tools/interactive_crawler.py:70
↓ 5 callersMethod_set_cache
设置缓存
backend/app/services/stock_data_service.py:188
↓ 5 callersMethodaexecute
异步执行新闻获取 Args: keywords: 搜索关键词列表 stock_codes: 关联股票代码列表 limit: 返回条数 provider: 指定数据源
backend/app/financial/tools.py:53
↓ 5 callersMethodconnect
建立连接
backend/app/core/neo4j_client.py:39
↓ 5 callersFunctioncreate_knowledge_extractor
创建知识提取智能体
backend/app/knowledge/knowledge_extractor.py:702
↓ 5 callersFunctionget_analysis_service
获取分析服务实例(单例模式) Returns: AnalysisService 实例
backend/app/services/analysis_service.py:255
↓ 5 callersMethodget_realtime_quote
获取实时行情 Returns: 实时行情数据
backend/app/services/stock_data_service.py:430
↓ 5 callersFunctionget_sync_db_session
获取同步数据库会话(Celery任务中使用)
backend/app/tasks/crawl_tasks.py:86
↓ 5 callersFunctionload_debate_modes_config
加载辩论模式配置
backend/app/config/__init__.py:113
↓ 5 callersFunctionparse_models
解析逗号分隔的模型字符串 Args: models_str: 逗号分隔的模型字符串 provider_label: 厂商显示名称 Returns: 模型信息列表
backend/app/api/v1/llm_config.py:40
↓ 5 callersFunctionsetup_default_providers
注册默认的 Provider 在应用启动时调用,确保 Registry 中有可用的 Provider。 当前支持的数据源(按优先级排序): 1. sina - 新浪财经 2. tencent - 腾讯财经 3. nbd - 每日经济新闻
backend/app/financial/tools.py:255
↓ 5 callersMethodsupports
检查是否支持某种数据类型 Args: data_type: 数据类型 Returns: 是否支持
backend/app/financial/providers/base.py:223
↓ 5 callersMethodvalidate
验证因子表达式是否语法正确 使用模拟执行(不实际计算)来验证。 Args: formula: token 序列 Returns:
backend/app/alpha_mining/vm/factor_vm.py:184
↓ 4 callersMethod_format_debate_history
格式化辩论历史
backend/app/agents/orchestrator.py:783
↓ 4 callersMethod_get_from_cache
从缓存获取向量
backend/app/services/embedding_service.py:90
↓ 4 callersMethod_init_alpha_mining
延迟初始化 Alpha Mining 组件
backend/app/agents/quantitative_agent.py:63
↓ 4 callersMethod_save_to_cache
保存向量到缓存
backend/app/services/embedding_service.py:105
↓ 4 callersMethodanalyze_news
分析单条新闻 Args: news_title: 新闻标题 news_content: 新闻内容 news_url: 新闻URL stock_codes
backend/app/agents/news_analyst.py:89
↓ 4 callersMethodclassifyRealtimeStockNews
Continue crawling and classifying news(articles/documents) every 60s.
legacy_v1/Crawler/crawler_stcn.py:254
↓ 4 callersFunctioncleanMarkdown
(text: string)
frontend/src/components/NewsDetailDrawer.tsx:64
↓ 4 callersMethodclear
清空所有注册的 Provider
backend/app/financial/registry.py:220
↓ 4 callersMethodcombine_with_market
合并行情特征和情感特征 Args: market_features: [batch, 4, time_steps] (RET, VOL, VOLUME_CHG, TURNOVER) sentiment
backend/app/alpha_mining/features/sentiment.py:279
↓ 4 callersMethodexecute_query
执行 Cypher 查询 Args: query: Cypher 查询语句 parameters: 查询参数 Returns: 查询结
backend/app/core/neo4j_client.py:76
↓ 4 callersMethodextractStockCodeFromArticle
Extract the stocks mentioned by each news(articles/documents). # Arguments: dbName: Name of database. colName: Name of collection.
legacy_v1/Text_Analysis/text_mining.py:72
↓ 4 callersMethodextract_company_info
从 akshare 获取公司基础信息 Args: stock_code: 股票代码 Returns: 公司信息字典
backend/app/knowledge/knowledge_extractor.py:393
↓ 4 callersMethodfetch
完整的 TET 执行流程 Args: params: 标准查询参数 Returns: 标准模型列表 Raises: Exception: 任何阶段失败时抛出
backend/app/financial/providers/base.py:129
next →1–100 of 1,198, ranked by callers