alpacahq / Momentum-Trading-Example

An example algorithm for a momentum-based day trading strategy.
642 stars 218 forks source link

Issues Running Momentum-Trading-Example-v2 #43

Closed teamexcellar closed 2 years ago

teamexcellar commented 2 years ago

When running the newer v2 python script, I receive the following error that I haven't been able to resolve.

df.index = df.index.tz_convert(pytz.timezone('America/New_York')) AttributeError: 'Index' object has no attribute 'tz_convert'

The script exits after this error appears. I've commented out lines 87 & 88 and the script will run, but I am sure that it is missing data it needs to properly run. Any ideas on resolution?

teamexcellar commented 2 years ago

This seemed to be an issue with my Alpaca account, which has resolved itself.