Skip to content

Conversation

kuds
Copy link
Contributor

@kuds kuds commented Aug 30, 2025

Design

alpaca_trade_api (Github Repo) has been deprecated and is no longer compatible with Google Colab due to it referencing libraries that are now out of date. This change is to replace the old library with the newer version alpaca(Github Repo). This Pull Request is related to Issue #1376.

A separate pull request will be open for the FinRL Tutorial repository to handle this update.

Google Colab Error

image

Copy link

@joe10833 joe10833 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joe1083

@kuds
Copy link
Contributor Author

kuds commented Sep 7, 2025

I've been digging through the code some more, it looks like the FinRL_PaperTrading_Demo.ipynb will need to be updated as well. I am looking into this.

Copy link

@joe10833 joe10833 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuds
Copy link
Contributor Author

kuds commented Sep 11, 2025

@joe10833 @zhumingpassional

Sorry for all the commits on this pull request. There was a lot more areas of the code that needed updated to the new alpaca-py SDK. I am done make changes on this Pull Request; it is now ready for review.

A couple of things to note:

  • WBA tickers does not appears to be listed any more, and that was causing issues with AlpacaProccesor class. So I added a check to see if only one column was returned. If so, it ignores it and move on. Let me know if you would like it to throw an error instead. (The DOW_30_TICKER might need to be updated).
  • The ProtfolioHistory object appears to be a different structure compared the original version, and I had to manually convert to it a data frame for the alpaca_history method in the common.py file.
  • The FinRL_PaperTrading_Demo.ipynb now runs end to end without any issue. Could you please review the results and see if they make sense to you?
  • I removed all references to the old OpenAI gym library and replaced it with the new Farama Foundation Gymnasium

Thank you for your patience on this! Let me know if you have any questions about the changes made!

@joe10833
Copy link

@joe10833

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.

2 participants