KEYERROR Exception running the "How do I....Create a futures backtest which estimates parameters" example from backtesting.md #1300
Unanswered
davideasmith
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Not going to reading your error stack to diagnose but likely due to EDOLLAR no longer being traded. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've just started learning how pysystemtrade works and was puzzled by this KEYERROR Exception when running the 3-line code example from backtesting.md for "How do I....Create a futures backtest which estimates parameters":
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 282, in _turnover_for_asset_and_column
return turnovers[column_name][asset_name]
KeyError: 'EDOLLAR'
I'd be very grateful for any suggestions about the root cause and how I might fix the problem.
My complete console output ending with the traceback follows, if that's helpful. My apologies for the length of the output:
Configuring sim logging
2023-12-05 16:57:19 DEBUG asyncio Using selector: EpollSelector
2023-12-05 16:57:19 DEBUG base_system {'stage': 'config'} Adding config defaults
2023-12-05 16:57:19 DEBUG base_system Following instruments are 'duplicate_markets' ['Another_thing', 'bad_thing']
2023-12-05 16:57:19 DEBUG base_system Following instruments are marked as 'ignore_instruments': not included: ['EXAMPLE']
2023-12-05 16:57:19 DEBUG base_system Following instruments removed entirely from sim: ['Another_thing', 'EXAMPLE', 'bad_thing']
2023-12-05 16:57:19 DEBUG base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Calculating notional position for EDOLLAR
2023-12-05 16:57:19 INFO base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Calculating instrument weights
2023-12-05 16:57:19 DEBUG base_system Following instruments are 'duplicate_markets' ['Another_thing', 'bad_thing']
2023-12-05 16:57:19 DEBUG base_system Following instruments are marked as 'ignore_instruments': not included: ['EXAMPLE']
2023-12-05 16:57:19 DEBUG base_system Following instruments are marked as 'bad_markets': ['BAD_EXAMPLE']
2023-12-05 16:57:19 DEBUG base_system Following instruments have restricted trading: ['RESTRICTED_EXAMPLE']
2023-12-05 16:57:19 DEBUG base_system Following instruments marked as not trading []
2023-12-05 16:57:19 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating subsystem position for CORN
2023-12-05 16:57:19 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating volatility scalar for CORN
2023-12-05 16:57:19 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating instrument value vol for CORN
2023-12-05 16:57:19 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating instrument currency vol for CORN
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'CORN'} Calculating daily volatility for CORN
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'CORN'} Calculating daily prices for CORN
2023-12-05 16:57:20 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Calculating combined forecast for CORN
2023-12-05 16:57:20 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Calculating capped forecast for CORN carry
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rules', 'instrument_code': 'CORN'} Calculating raw forecast CORN for carry
2023-12-05 16:57:20 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Getting cross sectional forecasts for scalar calculation for carry over CORN, EUROSTX, MXP, SOFR, US10, V2X
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EUROSTX'} Calculating raw forecast EUROSTX for carry
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EUROSTX'} Calculating daily volatility for EUROSTX
2023-12-05 16:57:20 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EUROSTX'} Calculating daily prices for EUROSTX
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rules', 'instrument_code': 'MXP'} Calculating raw forecast MXP for carry
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'MXP'} Calculating daily volatility for MXP
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'MXP'} Calculating daily prices for MXP
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rules', 'instrument_code': 'SOFR'} Calculating raw forecast SOFR for carry
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'SOFR'} Calculating daily volatility for SOFR
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'SOFR'} Calculating daily prices for SOFR
2023-12-05 16:57:21 DEBUG base_system {'stage': 'rules', 'instrument_code': 'US10'} Calculating raw forecast US10 for carry
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'US10'} Calculating daily volatility for US10
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'US10'} Calculating daily prices for US10
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rules', 'instrument_code': 'V2X'} Calculating raw forecast V2X for carry
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'V2X'} Calculating daily volatility for V2X
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'V2X'} Calculating daily prices for V2X
/home/david/Desktop/pysystemtrade/venv/3.8.16/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1217: RuntimeWarning: All-NaN slice encountered
r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out,
2023-12-05 16:57:22 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Calculating capped forecast for CORN ewmac16_64
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rules', 'instrument_code': 'CORN'} Calculating raw forecast CORN for ewmac16_64
2023-12-05 16:57:22 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'CORN'} Calculating daily prices for CORN
2023-12-05 16:57:23 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Getting cross sectional forecasts for scalar calculation for ewmac16_64 over CORN, EUROSTX, MXP, SOFR, US10, V2X
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EUROSTX'} Calculating raw forecast EUROSTX for ewmac16_64
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EUROSTX'} Calculating daily prices for EUROSTX
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'MXP'} Calculating raw forecast MXP for ewmac16_64
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'MXP'} Calculating daily prices for MXP
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'SOFR'} Calculating raw forecast SOFR for ewmac16_64
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'SOFR'} Calculating daily prices for SOFR
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'US10'} Calculating raw forecast US10 for ewmac16_64
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'US10'} Calculating daily prices for US10
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'V2X'} Calculating raw forecast V2X for ewmac16_64
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'V2X'} Calculating daily prices for V2X
2023-12-05 16:57:23 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Calculating capped forecast for CORN ewmac32_128
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'CORN'} Calculating raw forecast CORN for ewmac32_128
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'CORN'} Calculating daily prices for CORN
2023-12-05 16:57:23 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Getting cross sectional forecasts for scalar calculation for ewmac32_128 over CORN, EUROSTX, MXP, SOFR, US10, V2X
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EUROSTX'} Calculating raw forecast EUROSTX for ewmac32_128
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EUROSTX'} Calculating daily prices for EUROSTX
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rules', 'instrument_code': 'MXP'} Calculating raw forecast MXP for ewmac32_128
2023-12-05 16:57:23 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'MXP'} Calculating daily prices for MXP
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'SOFR'} Calculating raw forecast SOFR for ewmac32_128
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'SOFR'} Calculating daily prices for SOFR
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'US10'} Calculating raw forecast US10 for ewmac32_128
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'US10'} Calculating daily prices for US10
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'V2X'} Calculating raw forecast V2X for ewmac32_128
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'V2X'} Calculating daily prices for V2X
2023-12-05 16:57:24 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Calculating capped forecast for CORN ewmac64_256
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'CORN'} Calculating raw forecast CORN for ewmac64_256
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'CORN'} Calculating daily prices for CORN
2023-12-05 16:57:24 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'CORN'} Getting cross sectional forecasts for scalar calculation for ewmac64_256 over CORN, EUROSTX, MXP, SOFR, US10, V2X
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EUROSTX'} Calculating raw forecast EUROSTX for ewmac64_256
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EUROSTX'} Calculating daily prices for EUROSTX
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'MXP'} Calculating raw forecast MXP for ewmac64_256
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'MXP'} Calculating daily prices for MXP
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rules', 'instrument_code': 'SOFR'} Calculating raw forecast SOFR for ewmac64_256
2023-12-05 16:57:24 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'SOFR'} Calculating daily prices for SOFR
2023-12-05 16:57:25 DEBUG base_system {'stage': 'rules', 'instrument_code': 'US10'} Calculating raw forecast US10 for ewmac64_256
2023-12-05 16:57:25 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'US10'} Calculating daily prices for US10
2023-12-05 16:57:25 DEBUG base_system {'stage': 'rules', 'instrument_code': 'V2X'} Calculating raw forecast V2X for ewmac64_256
2023-12-05 16:57:25 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'V2X'} Calculating daily prices for V2X
2023-12-05 16:57:25 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Calculating forecast weights for CORN
2023-12-05 16:57:25 INFO base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Calculating raw forecast weights for CORN
2023-12-05 16:57:25 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EUROSTX'} Calculating capped forecast for EUROSTX carry
2023-12-05 16:57:25 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'MXP'} Calculating capped forecast for MXP carry
2023-12-05 16:57:25 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'SOFR'} Calculating capped forecast for SOFR carry
2023-12-05 16:57:25 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'US10'} Calculating capped forecast for US10 carry
2023-12-05 16:57:25 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'V2X'} Calculating capped forecast for V2X carry
2023-12-05 16:57:26 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EUROSTX'} Calculating capped forecast for EUROSTX ewmac16_64
2023-12-05 16:57:26 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'MXP'} Calculating capped forecast for MXP ewmac16_64
2023-12-05 16:57:26 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'SOFR'} Calculating capped forecast for SOFR ewmac16_64
2023-12-05 16:57:26 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'US10'} Calculating capped forecast for US10 ewmac16_64
2023-12-05 16:57:26 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'V2X'} Calculating capped forecast for V2X ewmac16_64
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EUROSTX'} Calculating capped forecast for EUROSTX ewmac32_128
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'MXP'} Calculating capped forecast for MXP ewmac32_128
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'SOFR'} Calculating capped forecast for SOFR ewmac32_128
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'US10'} Calculating capped forecast for US10 ewmac32_128
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'V2X'} Calculating capped forecast for V2X ewmac32_128
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EUROSTX'} Calculating capped forecast for EUROSTX ewmac64_256
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'MXP'} Calculating capped forecast for MXP ewmac64_256
2023-12-05 16:57:27 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'SOFR'} Calculating capped forecast for SOFR ewmac64_256
2023-12-05 16:57:28 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'US10'} Calculating capped forecast for US10 ewmac64_256
2023-12-05 16:57:28 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'V2X'} Calculating capped forecast for V2X ewmac64_256
2023-12-05 16:57:28 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for CORN
2023-12-05 16:57:28 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for EUROSTX
2023-12-05 16:57:28 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for MXP
2023-12-05 16:57:28 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for SOFR
2023-12-05 16:57:29 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for US10
2023-12-05 16:57:29 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for V2X
2023-12-05 16:57:29 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating pandl for instrument forecast for CORN carry
2023-12-05 16:57:29 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Getting vol target
2023-12-05 16:57:29 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating pandl for instrument forecast for CORN ewmac16_64
2023-12-05 16:57:30 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating pandl for instrument forecast for CORN ewmac32_128
2023-12-05 16:57:30 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating pandl for instrument forecast for CORN ewmac64_256
2023-12-05 16:57:33 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating pandl for instrument forecast for EUROSTX carry
2023-12-05 16:57:33 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating pandl for instrument forecast for EUROSTX ewmac16_64
2023-12-05 16:57:34 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating pandl for instrument forecast for EUROSTX ewmac32_128
2023-12-05 16:57:34 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating pandl for instrument forecast for EUROSTX ewmac64_256
2023-12-05 16:57:34 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating pandl for instrument forecast for MXP carry
2023-12-05 16:57:35 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating pandl for instrument forecast for MXP ewmac16_64
2023-12-05 16:57:35 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating pandl for instrument forecast for MXP ewmac32_128
2023-12-05 16:57:35 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating pandl for instrument forecast for MXP ewmac64_256
2023-12-05 16:57:37 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating pandl for instrument forecast for SOFR carry
2023-12-05 16:57:37 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating pandl for instrument forecast for SOFR ewmac16_64
2023-12-05 16:57:38 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating pandl for instrument forecast for SOFR ewmac32_128
2023-12-05 16:57:38 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating pandl for instrument forecast for SOFR ewmac64_256
2023-12-05 16:57:40 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating pandl for instrument forecast for US10 carry
2023-12-05 16:57:41 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating pandl for instrument forecast for US10 ewmac16_64
2023-12-05 16:57:41 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating pandl for instrument forecast for US10 ewmac32_128
2023-12-05 16:57:41 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating pandl for instrument forecast for US10 ewmac64_256
2023-12-05 16:57:44 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating pandl for instrument forecast for V2X carry
2023-12-05 16:57:44 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating pandl for instrument forecast for V2X ewmac16_64
2023-12-05 16:57:44 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating pandl for instrument forecast for V2X ewmac32_128
2023-12-05 16:57:44 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating pandl for instrument forecast for V2X ewmac64_256
2023-12-05 16:57:45 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Using pooled gross returns
2023-12-05 16:57:45 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Using pooled turnover cost SR for CORN
2023-12-05 16:57:45 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.4/2.4 secs left/elapsed/total)
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for CORN
2023-12-05 16:57:48 INFO base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Calculating forecast div multiplier for CORN
2023-12-05 16:57:48 INFO base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} Calculating forecast correlations over CORN, EUROSTX, MXP, SOFR, US10, V2X
[================================================================================] 100.0% Estimating correlations (0.0/0.1/0.1 secs left/elapsed/total)
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'CORN'} No mapping applied for CORN
2023-12-05 16:57:48 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating subsystem position for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating volatility scalar for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating instrument value vol for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating instrument currency vol for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Calculating combined forecast for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Calculating forecast weights for EUROSTX
2023-12-05 16:57:48 INFO base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Calculating raw forecast weights for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Using pooled gross returns
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Using pooled turnover cost SR for EUROSTX
2023-12-05 16:57:48 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.4/2.4 secs left/elapsed/total)
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for EUROSTX
2023-12-05 16:57:51 INFO base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} Calculating forecast div multiplier for EUROSTX
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EUROSTX'} No mapping applied for EUROSTX
2023-12-05 16:57:51 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating subsystem position for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating volatility scalar for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating instrument value vol for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating instrument currency vol for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Calculating combined forecast for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Calculating forecast weights for MXP
2023-12-05 16:57:51 INFO base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Calculating raw forecast weights for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Using pooled gross returns
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Using pooled turnover cost SR for MXP
2023-12-05 16:57:51 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.4/2.4 secs left/elapsed/total)
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for MXP
2023-12-05 16:57:54 INFO base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} Calculating forecast div multiplier for MXP
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'MXP'} No mapping applied for MXP
2023-12-05 16:57:54 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating subsystem position for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating volatility scalar for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating instrument value vol for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating instrument currency vol for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Calculating combined forecast for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Calculating forecast weights for SOFR
2023-12-05 16:57:54 INFO base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Calculating raw forecast weights for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Using pooled gross returns
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Using pooled turnover cost SR for SOFR
2023-12-05 16:57:54 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.3/2.3 secs left/elapsed/total)
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for SOFR
2023-12-05 16:57:57 INFO base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} Calculating forecast div multiplier for SOFR
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'SOFR'} No mapping applied for SOFR
2023-12-05 16:57:57 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating subsystem position for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating volatility scalar for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating instrument value vol for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating instrument currency vol for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Calculating combined forecast for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Calculating forecast weights for US10
2023-12-05 16:57:57 INFO base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Calculating raw forecast weights for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Using pooled gross returns
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Using pooled turnover cost SR for US10
2023-12-05 16:57:57 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.4/2.4 secs left/elapsed/total)
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for US10
2023-12-05 16:58:00 INFO base_system {'stage': 'combForecast', 'instrument_code': 'US10'} Calculating forecast div multiplier for US10
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'US10'} No mapping applied for US10
2023-12-05 16:58:00 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating subsystem position for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating volatility scalar for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating instrument value vol for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating instrument currency vol for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Calculating combined forecast for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Calculating forecast weights for V2X
2023-12-05 16:58:00 INFO base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Calculating raw forecast weights for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Using pooled gross returns
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Using pooled turnover cost SR for V2X
2023-12-05 16:58:00 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Applying cost multiplier of 2.000000
[================================================================================] 100.0% Optimising weights (0.0/2.4/2.4 secs left/elapsed/total)
2023-12-05 16:58:03 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for V2X
2023-12-05 16:58:03 INFO base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} Calculating forecast div multiplier for V2X
2023-12-05 16:58:03 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'V2X'} No mapping applied for V2X
2023-12-05 16:58:03 DEBUG base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Following instruments will have zero weight in optimisation of instrument weights as they have no positions (possibly too expensive?) []
2023-12-05 16:58:03 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating pandl for subsystem for instrument CORN
2023-12-05 16:58:03 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating buffers for CORN
2023-12-05 16:58:03 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'CORN'} Calculating forecast method buffers for CORN
2023-12-05 16:58:03 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'CORN'} Calculating buffered subsystem positions
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating pandl for subsystem for instrument EUROSTX
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating buffers for EUROSTX
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EUROSTX'} Calculating forecast method buffers for EUROSTX
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'EUROSTX'} Calculating buffered subsystem positions
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating pandl for subsystem for instrument MXP
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating buffers for MXP
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'MXP'} Calculating forecast method buffers for MXP
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'MXP'} Calculating buffered subsystem positions
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating pandl for subsystem for instrument SOFR
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating buffers for SOFR
2023-12-05 16:58:04 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'SOFR'} Calculating forecast method buffers for SOFR
2023-12-05 16:58:04 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'SOFR'} Calculating buffered subsystem positions
2023-12-05 16:58:05 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating pandl for subsystem for instrument US10
2023-12-05 16:58:05 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating buffers for US10
2023-12-05 16:58:05 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'US10'} Calculating forecast method buffers for US10
2023-12-05 16:58:05 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'US10'} Calculating buffered subsystem positions
2023-12-05 16:58:06 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating pandl for subsystem for instrument V2X
2023-12-05 16:58:06 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating buffers for V2X
2023-12-05 16:58:06 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'V2X'} Calculating forecast method buffers for V2X
2023-12-05 16:58:06 DEBUG base_system {'stage': 'accounts', 'instrument_code': 'V2X'} Calculating buffered subsystem positions
2023-12-05 16:58:09 INFO base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Calculating raw instrument weights
2023-12-05 16:58:09 DEBUG base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Using only returns of asset for gross returns
2023-12-05 16:58:09 DEBUG base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Using unpooled cost SR for asset
[================================================================================] 100.0% Optimising weights (0.0/0.6/0.6 secs left/elapsed/total)
2023-12-05 16:58:10 DEBUG base_system {'stage': 'portfolio', 'instrument_code': 'EDOLLAR'} Following instruments will have zero weight in optimisation of instrument weights as they have no positions (possibly too expensive?) []
2023-12-05 16:58:10 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EDOLLAR'} Calculating subsystem position for EDOLLAR
2023-12-05 16:58:10 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EDOLLAR'} Calculating volatility scalar for EDOLLAR
2023-12-05 16:58:10 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EDOLLAR'} Calculating instrument value vol for EDOLLAR
2023-12-05 16:58:10 DEBUG base_system {'stage': 'positionSize', 'instrument_code': 'EDOLLAR'} Calculating instrument currency vol for EDOLLAR
2023-12-05 16:58:10 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EDOLLAR'} Calculating daily volatility for EDOLLAR
2023-12-05 16:58:10 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EDOLLAR'} Calculating daily prices for EDOLLAR
2023-12-05 16:58:11 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Calculating combined forecast for EDOLLAR
2023-12-05 16:58:11 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EDOLLAR'} Calculating capped forecast for EDOLLAR carry
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EDOLLAR'} Calculating raw forecast EDOLLAR for carry
2023-12-05 16:58:11 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EDOLLAR'} Calculating capped forecast for EDOLLAR ewmac16_64
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EDOLLAR'} Calculating raw forecast EDOLLAR for ewmac16_64
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EDOLLAR'} Calculating daily prices for EDOLLAR
2023-12-05 16:58:11 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EDOLLAR'} Calculating capped forecast for EDOLLAR ewmac32_128
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EDOLLAR'} Calculating raw forecast EDOLLAR for ewmac32_128
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EDOLLAR'} Calculating daily prices for EDOLLAR
2023-12-05 16:58:11 DEBUG base_system {'stage': 'forecastScaleCap', 'instrument_code': 'EDOLLAR'} Calculating capped forecast for EDOLLAR ewmac64_256
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rules', 'instrument_code': 'EDOLLAR'} Calculating raw forecast EDOLLAR for ewmac64_256
2023-12-05 16:58:11 DEBUG base_system {'stage': 'rawdata', 'instrument_code': 'EDOLLAR'} Calculating daily prices for EDOLLAR
2023-12-05 16:58:11 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Calculating forecast weights for EDOLLAR
2023-12-05 16:58:11 INFO base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Calculating raw forecast weights for EDOLLAR
2023-12-05 16:58:12 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Only this set of rules ['carry', 'ewmac16_64', 'ewmac32_128', 'ewmac64_256'] is cheap enough to trade for EDOLLAR
2023-12-05 16:58:12 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Using pooled gross returns
2023-12-05 16:58:12 DEBUG base_system {'stage': 'combForecast', 'instrument_code': 'EDOLLAR'} Using pooled turnover cost SR for EDOLLAR
Traceback (most recent call last):
File "/home/david/Desktop/pysystemtrade/private/futures_backtest_estimates_parameters.py", line 3, in
system.portfolio.get_notional_position("EDOLLAR")
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/portfolio.py", line 212, in get_notional_position
self.get_notional_position_before_risk_scaling(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/portfolio.py", line 236, in get_notional_position_before_risk_scaling
notional_position_without_idm = self.get_notional_position_without_idm(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/portfolio.py", line 254, in get_notional_position_without_idm
subsys_position = self.get_subsystem_position(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 705, in wrapper
return func(*args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/portfolio.py", line 863, in get_subsystem_position
return self.position_size_stage.get_subsystem_position(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/positionsizing.py", line 127, in get_subsystem_position
forecast = self.get_combined_forecast(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 705, in wrapper
return func(*args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/positionsizing.py", line 566, in get_combined_forecast
return self.comb_forecast_stage.get_combined_forecast(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 93, in get_combined_forecast
self.get_raw_combined_forecast_before_mapping(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 115, in get_raw_combined_forecast_before_mapping
raw_combined_forecast = self.get_combined_forecast_without_multiplier(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 142, in get_combined_forecast_without_multiplier
weighted_forecasts = self.get_weighted_forecasts_without_multiplier(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 160, in get_weighted_forecasts_without_multiplier
smoothed_daily_forecast_weights = self.get_forecast_weights(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 175, in get_forecast_weights
self.get_unsmoothed_forecast_weights(instrument_code)
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 245, in get_unsmoothed_forecast_weights
monthly_forecast_weights = self.get_raw_monthly_forecast_weights(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 705, in wrapper
return func(*args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 509, in get_raw_monthly_forecast_weights
forecast_weights = self.get_monthly_raw_forecast_weights_estimated(
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 586, in get_monthly_raw_forecast_weights_estimated
optimiser = self.calculation_of_raw_estimated_monthly_forecast_weights(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 728, in wrapper
ans = system.cache.calc_or_cache(
File "/home/david/Desktop/pysystemtrade/systems/system_cache.py", line 575, in calc_or_cache
value = func(this_stage, *args, **kwargs)
File "/home/david/Desktop/pysystemtrade/systems/forecast_combine.py", line 622, in calculation_of_raw_estimated_monthly_forecast_weights
weight_func = weighting_func(
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/generic_optimiser.py", line 18, in init
net_returns = returns_pre_processor.get_net_returns(asset_name)
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 98, in get_net_returns
net_returns_dict = self.get_dict_of_net_returns(asset_name)
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 108, in get_dict_of_net_returns
dict_of_SR_costs = self.get_dict_of_multiplied_cost_SR_for_asset_name(
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 160, in get_dict_of_multiplied_cost_SR_for_asset_name
dict_of_cost_SR = self.get_dict_of_unadjusted_cost_SR_for_asset_name(asset_name)
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 177, in get_dict_of_unadjusted_cost_SR_for_asset_name
return self.get_pooled_SR_costs_using_turnover(asset_name)
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 198, in get_pooled_SR_costs_using_turnover
costs = _calculate_pooled_turnover_costs(
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 225, in _calculate_pooled_turnover_costs
[
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 228, in
_calculate_pooled_turnover_cost_for_column(
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 248, in _calculate_pooled_turnover_cost_for_column
cost_per_turnover_this_asset = _calculate_cost_per_turnover(
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 269, in _calculate_cost_per_turnover
turnover = _turnover_for_asset_and_column(asset_name, column_name, turnovers)
File "/home/david/Desktop/pysystemtrade/sysquant/optimisation/pre_processing.py", line 282, in _turnover_for_asset_and_column
return turnovers[column_name][asset_name]
KeyError: 'EDOLLAR'
Beta Was this translation helpful? Give feedback.
All reactions