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.

@copilot

@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 making 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

@georgia-max
Copy link

@kuds I ran FinRL_PaperTrading_Demo.ipynb, however, it still getting this error (see below) after installing the package.

Cna you help?

Screenshot 2025-10-26 at 9 49 28 PM

@kuds
Copy link
Contributor Author

kuds commented Oct 27, 2025

@georgia-max This fix has not been merged into the main branch yet. If you are looking to start playing with the FinRL Paper Trading Demo in the meantime, please the use this version from the PR: FinRL_PaperTrading_Demo.ipynb

The only change you will need to make is to update the git install url from the main branch to the PR's branch:
image

Before

## install finrl library
!pip install git+https://github.com/AI4Finance-Foundation/FinRL.git

After

## install finrl library
!pip install git+https://github.com/kuds/FinRL.git

@BruceYanghy @zhumingpassional Who should I work with to get this PR approved, or let me know if you need any additional changes (testing, documentation, etc.)!

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.

3 participants