Member-only story
Hey, ChatGPT! Explain FinRL Code To Me!
How to use ChatGPT as a private tutor for reading codes

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?

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

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?

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?