Key-Error on update_stragey_orders #1533
Replies: 1 comment
-
I solved the problem by deleting some ether-micro parquet files. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I updated manually using update_strategy_orders and got a Key-Error, which I have never encountered before.
Does anyone know how to fix this? I couldn't find any relevant information in the config files.
/pysystemtrade/sysquant/estimators/correlations.py:252: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
both_rows = pd.concat([top_row, bottom_row], axis=0)
2025-06-13 17:47:12 DEBUG run_strategy_order_generator {'strategy_name': 'rob_system'} Shadow cost 50.000000 multiply by cost multiplier 1.000000) = 50.000000
2025-06-13 17:47:12 DEBUG run_strategy_order_generator {'strategy_name': 'rob_system'} Tracking error buffer 0.012500
Traceback (most recent call last):
File "/home/rob/pysystemtrade/sysproduction/linux/scripts/run.py", line 66, in
func(*args, **kwargs)
File "/home/rob/pysystemtrade/sysproduction/update_strategy_orders.py", line 30, in update_strategy_orders
strategy_order_generator.run_strategy_method()
File "/home/rob/pysystemtrade/syscontrol/strategy_tools.py", line 41, in run_strategy_method
method()
File "/home/rob/pysystemtrade/sysexecution/strategies/strategy_order_handling.py", line 58, in get_and_place_orders
order_list = self.get_required_orders()
File "/home/rob/pyrobsystemtrade/sysexecution/strategies/dynamic_optimised_positions.py", line 69, in get_required_orders
self.calculate_write_and_return_optimised_positions_data()
File "/home/rob/pysystemtrade/sysexecution/strategies/dynamic_optimised_positions.py", line 90, in calculate_write_and_return_optimised_positions_data
optimised_positions_data = calculate_optimised_positions_data(
File "/home/rob/pysystemtrade/sysexecution/strategies/dynamic_optimised_positions.py", line 156, in calculate_optimised_positions_data
objective_function = get_objective_instance(
File "/home/rob/pysystemtrade/sysexecution/strategies/dynamic_optimised_positions.py", line 532, in get_objective_instance
objective_function = objectiveFunctionForGreedy(
File "/home/rob/pysystemtrade/systems/provided/dynamic_small_system_optimise/optimisation.py", line 63, in init
weights_prior = previous_positions * per_contract_value
File "/home/rob/pysystemtrade/sysquant/optimisation/weights.py", line 137, in mul
return self._operate_on_other(other, "mul")
File "/home/rob/pysystemtrade/sysquant/optimisation/weights.py", line 145, in _operate_on_other
np_other = np.array(other.as_list_given_keys(asset_list))
File "/home/rob/pysystemtrade/sysquant/optimisation/weights.py", line 78, in as_list_given_keys
return [self[key] for key in list_of_keys]
File "/home/rob/pysystemtrade/sysquant/optimisation/weights.py", line 78, in
return [self[key] for key in list_of_keys]
KeyError: 'ETHER-micro'
Beta Was this translation helpful? Give feedback.
All reactions