SP-500IndexPythonForecast icon indicating copy to clipboard operation
SP-500IndexPythonForecast copied to clipboard

TypeError: unsupported operand type(s) for /: 'str' and 'float'

Open akshat-21 opened this issue 8 years ago • 0 comments

I have converted the programs to be compatible with python 3.5 and am getting the following error: Traceback (most recent call last): File "markets.py", line 40, in pystocks.performFeatureSelection(maxdeltas, maxlags, fout, cut, start_test, path_datasets, savemodel, method, folds, parameters) File "C:\Users\student\Desktop\stock\pystocks.py", line 321, in performFeatureSelection datasets = applyRollMeanDelayedReturns(datasets, delta) File "C:\Users\student\Desktop\stock\pystocks.py", line 144, in applyRollMeanDelayedReturns addFeatures(dataset, adjclose, returns, n) File "C:\Users\student\Desktop\stock\pystocks.py", line 128, in addFeatures dataframe[return_n] = dataframe[adjclose].pct_change(n) TypeError: unsupported operand type(s) for /: 'str' and 'float'

akshat-21 avatar Jul 04 '17 09:07 akshat-21