-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Hi Philip
am trying to use your code and try to modify the code (new learner Python), please help to understand the below error am getting
"C:\Program Files\Python311\python.exe" C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\main.py
C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\manip_data.py:80: FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
series = pd.read_csv(directory
C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\manip_data.py:80: FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
series = pd.read_csv(directory
C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\manip_data.py:80: FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
series = pd.read_csv(directory
C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\manip_data.py:80: FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
series = pd.read_csv(directory
Traceback (most recent call last):
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\main.py", line 33, in
main = Main()
^^^^^^
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\main.py", line 14, in init
super().call()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\optimize.py", line 25, in call
self.walk_foward()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\optimize.py", line 69, in walk_foward
self.pnl_dict,self.params = ga(self).call()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\optimize\genetic_algorithm.py", line 67, in call
self.create_chromosome()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\optimize\genetic_algorithm.py", line 88, in wrapper
self.pnl_()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\pnl.py", line 15, in pnl_
super().call()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\trading_rules\r_square_tr.py", line 24, in call
self.trig_signal()
File "C:\Users\Vmadh\Downloads\Compressed\PyBacktesting-1\trading_rules\r_square_tr.py", line 69, in trig_signal
self.trades_track = self.trades_track.append(trades_track,ignore_index = True)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pandas\core\generic.py", line 5989, in getattr
return object.getattribute(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?
Process finished with exit code 1