原创内容第1008篇,专注AGI+,AI量化投资、个人成长与财富自由。
今日策略:年化436%,回撤7%,夏普比5.28

策略地址:
http://www.ailabx.com/strategy/68c8d246fd408079e03bcf63
今天开始,我们在重构的因子表达式的基础上,重构咱们的因子挖掘系统,还是基于deap。
对于gplearn,deap天然支持多支标的,支持常数项。
def _random_int_(): import random return random.choice([1, 5, 10, 20, 25,30, 40, 60, 120])
def add_unary_ops(pset): unary_funcs = ['ts_log','ts_abs','cs_rank','cs_std','cs_mean'] for func in unary_funcs: pset.addPrimitive(dummy, [EXPR], EXPR, name=func)
但自定义函数里,需要把函数及参数告诉它。
把函数注册到deap里,这里后续实现自动表达式生成:
def add_ops(pset): from datafeed import factor_extends from typing import get_type_hints for method_name in dir(factor_extends): if not method_name.startswith('_'): method = getattr(factor_extends, method_name) if callable(method): type_hints = get_type_hints(method) print(method_name,type_hints) inputs = [] for p_name,p_type in type_hints.items():
if p_type is pd.Series: inputs.append(EXPR) else: inputs.append(int) print(inputs) pset.addPrimitive(dummy, inputs, EXPR, name=method_name)

明天继续因子挖掘。
吾日三省吾身
就事论事,其实就简单。
还能怎么着呢,想回应就回应一下,不想回应就直接无视。
如此而已。
话不投机半句多。
做好自己的事情。
不必理会,更不必介入别人的因果。
眼里有自己的诗和远方,星辰大海。
再进一步,最好是建议两个智能体团队,完成大部分的事情,比如文章,视频等,既是内容,也是流量。
每天"不管"一点点,每天就变强一天天。