feat: 新增因子装饰器系统和完整因子文档
- 添加因子表达式文档,收录180+个因子及数学表达式 - 添加因子实现分析报告,明确ts_*与cs_*算子分类 - 实现装饰器系统:@time_series/@cross_section/@element_wise - 优化API和翻译器以支持新架构
This commit is contained in:
@@ -347,6 +347,30 @@ def sign(x: Union[Node, str]) -> FunctionNode:
|
||||
return FunctionNode("sign", x)
|
||||
|
||||
|
||||
def cos(x: Union[Node, str]) -> FunctionNode:
|
||||
"""余弦函数。
|
||||
|
||||
Args:
|
||||
x: 输入因子表达式或字段名字符串
|
||||
|
||||
Returns:
|
||||
FunctionNode: 函数调用节点
|
||||
"""
|
||||
return FunctionNode("cos", x)
|
||||
|
||||
|
||||
def sin(x: Union[Node, str]) -> FunctionNode:
|
||||
"""正弦函数。
|
||||
|
||||
Args:
|
||||
x: 输入因子表达式或字段名字符串
|
||||
|
||||
Returns:
|
||||
FunctionNode: 函数调用节点
|
||||
"""
|
||||
return FunctionNode("sin", x)
|
||||
|
||||
|
||||
def abs(x: Union[Node, str]) -> FunctionNode:
|
||||
"""绝对值。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user