DataDrivenInvestor

empowerment through data, knowledge, and expertise. subscribe to DDIntel at https://ddintel.datadriveninvestor.com

Follow publication

Member-only story

Hey, ChatGPT! Explain FinRL Code To Me!

ByFintech @ AI4Finance Foundation
DataDrivenInvestor
Published in
6 min readFeb 11, 2023

Image by jupp on Unsplash

ChatGPT can write simple codes, but it is still pretty challenging to make it write complex customized codes.

In this blog, I will simply ask ChatGPT to help us read some codes.

Although ChatGPT has performed brilliantly in multiple rounds of conversations using Reinforcement Learning from Human Feedback (RLHF), it still has a big gap from real human beings.

We have to ask ChatGPT the right question for it to help us.

I chose the Multiple Stock Trading tutorial, a commonly used financial reinforcement learning environment in the FinRL open-source project, to see how far I can go with the help of ChatGPT.

For the convenience of copying, all my questions below are in text form in this blog.

Let’s open the conversation politely.

Me: Hey ChatGPT, how are you today?

Copyright by AI4Finance-Education

Me: Hey ChatGPT, what do you know about the FinRL library?

Copyright by AI4Finance-Education

Let’s read the code from the Stock_NeurIPS2018_SB3.ipynb notebook.

Part 1: Install Python Packages

## install finrl library
!pip install wrds
!pip install swig

Me: What is the use of the library installed by the above code?

Copyright by AI4Finance-Education

Note that we need to use the markdown for code blocks such as ‘pip install finrl’, it’s easier for ChatGPT to read.

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

Me: isn’t the pip intallation comand for Python ‘pip install finrl’? How is the above line of code different?

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Write a response