Closed emretezel closed 3 years ago
Since I'm currently refactoring this code it's my hope that this will be fixed when I commit what I'm doing in a couple of weeks or so.
Thanks Rob, what would you recommend as the stable most recent commit?
Sorry this took so long. Had a blog post to write. Can you try the last commit, see if it works?
Ta
I'm closing this, as the code where the error exists no longer exists...
Thank you Rob, it is working.
Best, Emre
On 16 Apr 2021, at 14:32, Robert Carver @.***> wrote:
Closed #323 https://github.com/robcarver17/pysystemtrade/issues/323.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robcarver17/pysystemtrade/issues/323#event-4604879775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEJUDINSZKASAQAKPRBCUTTJA4APANCNFSM42L2VHMQ.
Hi Rob, everyone,
After upgrading to latest head in master and updating pandas etc. I am trying to run a backtest with estimations. I believe I have updated arctic data for the latest version of the packages. Getting the following error, any pointers greatly appreciated.
`from systems.provided.futures_chapter15.estimatedsystem import futures_system from sysdata.sim.db_futures_sim_data import dbFuturesSimData from sysdata.config.configdata import Config
config = Config('private.strategy.config.yaml') data = dbFuturesSimData() system = futures_system(data=data, config=config) capital = system.accounts.get_actual_capital()`
Including my config file (changed yaml to txt so that I can add to GitHub. config.txt
Getting the following error
`Calculating pandl for portfolio Calculating instrument div. multiplier Calculating instrument correlations /Users/batman/opt/anaconda3/envs/pysystemtrade/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1113: RuntimeWarning: All-NaN slice encountered r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out, Calculating raw forecast weights for BOBL FIXME / WARNING: get_default_config_key_value SHOULD NOT BE USED! FIXME / WARNING: get_default_config_key_value SHOULD NOT BE USED! FIXME / WARNING: get_default_config_key_value SHOULD NOT BE USED! FIXME / WARNING: get_default_config_key_value SHOULD NOT BE USED! Calculating pandl for instrument rules for BOBL Calculating pandl for instrument rules for COPPER Calculating pandl for instrument rules for CRUDE_W Calculating pandl for instrument rules for EDOLLAR Calculating pandl for instrument rules for EUR Calculating pandl for instrument rules for EUROSTX Calculating pandl for instrument rules for GAS_US Calculating pandl for instrument rules for GBP Calculating pandl for instrument rules for GOLD Calculating pandl for instrument rules for JPY Calculating pandl for instrument rules for LEANHOG Calculating pandl for instrument rules for LIVECOW Calculating pandl for instrument rules for NIKKEI Calculating pandl for instrument rules for SILVER Calculating pandl for instrument rules for SOYBEAN Calculating pandl for instrument rules for SP500 Calculating pandl for instrument rules for US10 Calculating pandl for instrument rules for WHEAT Using cost multiplier on optimisation of 0.00 * USE METHOD IN SYSQUANT INSTEAD [===----------------------------------------------------------------------------] 4.5% OptimisinggNatural top level grouping used /Users/batman/opt/pysystemtrade/syscore/handcrafting.py:438: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy instrument_returns[instrument_returns == 0.0] = np.nan /Users/batman/opt/anaconda3/envs/pysystemtrade/lib/python3.8/site-packages/pandas/core/frame.py:2986: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy self._where(-key, value, inplace=True) /Users/batman/opt/pysystemtrade/syscore/correlations.py:367: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray m = np.array(m)
ValueError Traceback (most recent call last)