Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing tuple, 'UTC has no key' errors and update alpaca_history to comply with the latest version of pandas in FinRL_PaperTrading_Demo.ipynb #82

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

kurone02
Copy link
Contributor

@kurone02 kurone02 commented Mar 15, 2024

An updated version of the gymnasium package changes the behavior of gymnasium.Env.reset. The return value of the reset method now returns a tuple of observation and info, which causes the tuple error mentioned in #78. Please refer to the gymasium's documentation for more details. This is fixed by ignoring the second value in the returned tuple.

The current version of the exchange-calendars package requires the dates to be timezone native, which causes the "UTC has no key" error mentioned in #81. This was resolved by erasing tz=pytz.UTC.

Also, the current version of pandas has deprecated DataFrame.append. For more details, please refer to the pandas' documentation. This is solved by simply changing the code from df.append to pd.concat in the alpaca_history function.

@kurone02 kurone02 changed the title Fixing tuple, 'UTC has no key' errors and update alpaca_history to comply with the latest version of pandas Fixing tuple, 'UTC has no key' errors and update alpaca_history to comply with the latest version of pandas in FinRL_PaperTrading_Demo.ipynb Mar 15, 2024
@zhumingpassional
Copy link
Collaborator

thanks for your codes.

@zhumingpassional zhumingpassional merged commit 7954a56 into AI4Finance-Foundation:master Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants