|
楼主 |
发表于 2024-11-25 19:22:09
|
显示全部楼层
[32m2024-11-25 15:56:58.519[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/000300.SH.csv不存在[0m
[32m2024-11-25 15:56:58.521[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/000905.SH.csv不存在[0m
[32m2024-11-25 15:56:58.539[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/N225.csv不存在[0m
[32m2024-11-25 15:56:58.541[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/HSI.csv不存在[0m
[32m2024-11-25 15:56:58.542[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/GDAXI.csv不存在[0m
[32m2024-11-25 15:56:58.542[0m | [33m[1mWARNING [0m | [36mdatafeed.dataloader[0m:[36mread_csv[0m:[36m31[0m - [33m[1m/Users/huwenyao/Desktop/quantlab5 2/data/quotes/^NDX.csv不存在[0m
[32m2024-11-25 15:56:58.558[0m | [1mINFO [0m | [36malpha.deap_factor.deap_mgr[0m:[36m__init__[0m:[36m78[0m - [1m开始Deap因子挖掘...[0m
[32m2024-11-25 15:56:58.560[0m | [1mINFO [0m | [36malpha.deap_factor.deap_mgr[0m:[36mstart[0m:[36m290[0m - [1m完成初代种群初始化:30个[0m
0it [00:00, ?it/s]Traceback (most recent call last):
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/dataloader.py", line 77, in calc_expr
se = calc_expr(df, field)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr.py", line 21, in calc_expr
se = eval(expr)
File "<string>", line 1, in <module>
TypeError: rolling_window() takes 2 positional arguments but 3 were given
ts_argmax(rank(rolling_window(open, volume, 20)), 10)
ts_argmax(rank(rolling_window(open, volume, 20)), 10)错误
None
ts_cov(abs(volume), rank(close), 20)
2it [00:00, 4.26it/s]ta_ma(log(close/5), 10)
ta_ema(rank(high+volume), 60)
4it [00:00, 4.38it/s]Traceback (most recent call last):
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/dataloader.py", line 77, in calc_expr
se = calc_expr(df, field)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr.py", line 21, in calc_expr
se = eval(expr)
File "<string>", line 1, in <module>
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/ops/common.py", line 76, in new_method
return method(self, other)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/arraylike.py", line 198, in __rsub__
return self._arith_method(other, roperator.rsub)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/frame.py", line 7913, in _arith_method
new_data = self._dispatch_frame_op(other, op, axis=axis)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/frame.py", line 7945, in _dispatch_frame_op
bm = self._mgr.apply(array_op, right=right)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 361, in apply
applied = b.apply(f, **kwargs)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 393, in apply
result = func(self.values, **kwargs)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/ops/array_ops.py", line 283, in arithmetic_op
res_values = _na_arithmetic_op(left, right, op) # type: ignore[arg-type]
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/ops/array_ops.py", line 218, in _na_arithmetic_op
result = func(left, right)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/computation/expressions.py", line 242, in evaluate
return _evaluate(op, op_str, a, b) # type: ignore[misc]
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/computation/expressions.py", line 73, in _evaluate_standard
return op(a, b)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/roperator.py", line 15, in rsub
return right - left
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
bbands_down(60)
errors: 0
ts_pct_change(ts_min(inv(ts_delay(open, 10)), 20)+10, 60)
ta_linearreg_slope(ts_argmax(ts_max(bbands_down(60)-numpy_rolling_regress(volume, close, 20), 60), 40), 5)
errors: 0
ta_linearreg_slope(ts_argmax(ts_max(bbands_down(60)-numpy_rolling_regress(volume, close, 20), 60), 40), 5)错误
None
ta_ema(ts_kurt(ts_argmaxmin(low/high*ts_pct_change(close, 5), 120), 10), 20)
8it [00:01, 6.49it/s]Traceback (most recent call last):
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/dataloader.py", line 77, in calc_expr
se = calc_expr(df, field)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr.py", line 21, in calc_expr
se = eval(expr)
File "<string>", line 1, in <module>
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr_functions/expr_utils.py", line 53, in wrapper
ret = se_args[0].groupby(level=1, group_keys=False).apply(lambda x: func(x, *other_args, **kwargs))
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 230, in apply
return super().apply(func, *args, **kwargs)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py", line 1824, in apply
result = self._python_apply_general(f, self._selected_obj)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py", line 1885, in _python_apply_general
values, mutated = self._grouper.apply_groupwise(f, data, self.axis)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/ops.py", line 919, in apply_groupwise
res = f(group)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr_functions/expr_utils.py", line 53, in <lambda>
ret = se_args[0].groupby(level=1, group_keys=False).apply(lambda x: func(x, *other_args, **kwargs))
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr_functions/expr_binary_rolling.py", line 14, in ts_corr
np.isclose(left.rolling(periods, min_periods=1).std(), 0, atol=2e-05)
ValueError: operands could not be broadcast together with shapes (3099,) (5807,2)
slope(40)
errors: 0
rolling_window(ts_delay(volume*high, 20), ts_corr(numpy_rolling_regress(volume, low, 120), ta_linearreg_slope(volume, 10), 120), 5)
rolling_window(ts_delay(volume*high, 20), ts_corr(numpy_rolling_regress(volume, low, 120), ta_linearreg_slope(volume, 10), 120), 5)错误
None
sqrt(ts_cov(ts_delay(volume, 40), ts_rank(close, 10), 20))
ts_delta(ts_argmin(ts_argmin(ts_maxmin(close, 60), 60), 10), 10)
13it [00:02, 6.91it/s]Traceback (most recent call last):
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/dataloader.py", line 77, in calc_expr
se = calc_expr(df, field)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr.py", line 21, in calc_expr
se = eval(expr)
File "<string>", line 1, in <module>
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/numpy/lib/_stride_tricks_impl.py", line 109, in as_strided
interface['strides'] = tuple(strides)
TypeError: 'int' object is not iterable
ts_cov(ta_ma(ts_min(low, 60), 10), ts_argmax(high, 10)-close*120, 10)
abs(ts_median(strided(ta_kama(ta_dema(high, 10), 120), bbands_up(5), 10), 10))
errors: 0
abs(ts_median(strided(ta_kama(ta_dema(high, 10), 120), bbands_up(5), 10), 10))错误
None
ta_linearreg_angle(ta_ma(ta_dema(ts_delay(ts_delay(close, 20), 10), 40), 120), 10)
Traceback (most recent call last):
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/dataloader.py", line 77, in calc_expr
se = calc_expr(df, field)
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr.py", line 21, in calc_expr
se = eval(expr)
File "<string>", line 1, in <module>
File "/Users/huwenyao/Desktop/quantlab5 2/策略集/../datafeed/expr_functions/expr_utils.py", line 53, in wrapper
ret = se_args[0].groupby(level=1, group_keys=False).apply(lambda x: func(x, *other_args, **kwargs))
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 230, in apply
return super().apply(func, *args, **kwargs)
File "/Users/huwenyao/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/pandas/core/groupby/groupby.py", line 1824, in apply
result = self._python_apply_general(f, self._selected_obj)
|
|