Blogging about ChatGPT, Algorithmic Trading and Machine Learning

Blogging about ChatGPT & AI, Algorithmic Trading, Machine Learning

I Created My Own Custom GPT Trading Bot Advisor

Table of Contents

In the following, you’ll discover gow to create a GPT Trading Bot Advisor, step-by-step.

As you may know, OpenAI announced during their DevDay event held on November 06th, that they have released a new feature: Create your own GPT.

If you missed the announcements, I’ve written an article summarizing the most important key features and improvements announced that day:

GPTs in OpenAI: The new feature

In the ChatGPT (for Plus subscribers), you now have the explore menu.

By clicking on it, it will lead you to 2 things:

1- My GPTs

Where you can create your own GPT.

Or you can go directly to

2- Exposed GPTs already made by OpenAI:

You can use them directly.

Now that you visualize what GPTs are in OpenAI, I will explain how I made my own trading one.

What I asked for in my GPT Trading Bot Advisor

▪ Connect to an 𝐞𝐱𝐭𝐞𝐫𝐧𝐚𝐥 𝐀𝐏𝐈, by specifying the schema in Actions tab, to fetch historical prices

▪ Statistical analysis and plots. Give Python code examples…

▪ Modify the source of the data to an 𝐮𝐩𝐥𝐨𝐚𝐝𝐞𝐝 𝐟𝐢𝐥𝐞

▪ Implement a Donchian Channel 𝐚𝐥𝐠𝐨𝐫𝐢𝐭𝐡𝐦, apply it to the uploaded data (Ask whatever algo you need).

▪ Calculate buy and sell 𝐬𝐢𝐠𝐧𝐚𝐥𝐬…𝐁𝐚𝐜𝐤𝐭𝐞𝐬𝐭…Plot the results

▪ Modify the Python formulas and run analysis again…

▪ Read a 𝐧𝐨𝐭𝐞𝐛𝐨𝐨𝐤 with the implemented algos in it

▪ Apply them to the uploaded file, compute and plot….


How To Build your GPT Trading Bot Advisor?

You need ChatGPT Plus and this link to start:

Here, you can get the link of my custom GPT:

You get this window; You are now able to start creating:

“Create” tab

1- You can put:

Make an algorithmic crypto trader who is expert in algorithmic trading, data analysis, and Python programming.

2- Choose a name: It will propose a name, but you can request alternative suggestions.

3- It’ll propose a logo. For example:

4- It asks you for other instructions. You need to refine your request, and what you need the bot to do. For example:

  • You are a helpful assistant. You give educational and informative insights into cryptocurrency trading.
  • You are using a friendly and factual tone.
  • You give correct Python code examples to fetch data and calculate different trading strategies.
  • You give accurate data.
  • You are capable of plotting data and giving analytics insights into your responses.
  • You do that only for educational purposes. You do not give any financial or investment advice.

“Configure” tab

You can still modify the instructions in “Configure” tab: Example

This tab is what makes GPTs powerful!

Upload files:

You can upload your files there, to be used by the bot. For example:

  • Csv file with historical prices and volume
  • Notebook with your own implementation of some strategies
  • PDF file: research paper…

How to use these files in your bot?

Ask GPT:

  • To read the csv file, analyze the data in it, plot prices and volume, calculate strategies using this data…
  • To read the notebook and apply the strategies on it to the csv file uploaded.
  • Read the pdf, summarize it and use any relevant formulas on it

I’m hearing you, you are telling me, but these files are static, especially the one containing the prices and volume….

Yes, I’m aware. So here is the solution if you want up-to-date data, without the need for manual price uploads…

“Actions” part:

Click on “Add actions”.

In this part, you can add an API to fetch data.

I created an API Key in CryptoCompare. I used a schema to specify the json object and put the API Key.

In the scrolling menu “Examples”, I choose” blank template” and paste the schema.

I will put the schema at the end of the article.

“Capabilities” tab:

Important thing to know:

  • You need Web Browsing to fetch data from your API.
  • You need Code Interpreter, in this way the GPT can design scripts and use them to perform the calculations you request. It will generate, at each time it uses Python, a script that you can visualize. You can ask GPT to modify it and run it again.

Here is it!!!

Watch the full video of my GPT Trading Bot in action:

To watch the video have a look on my linkedin profile, in the featured posts, or click on the link hereafter.
Watch the video until the end, to see the interactive part where the GPT is fetching data, analyzing it, plotting it, computing strategies, specifying buy and sell signals…


So, in summary:


▪ Makes you run your thoughts/ideas FAST

▪ Gives you analysis and insights FAST: statistical analyses, plots, final calculation in a dataframe…

▪ Gives a Python code implementation with very valuable information. Especially about algos. Code is sometimes better than formulas.

🫷Area of concern:

▪ It does NOT give investment/financial advice. It’s for educational purposes.

▪ Don’t take the Python code as absolute knowledge; you should still question it. However, there is still valuable information within it.

▪ You still need to know which questions to ask…(algos to use, how to trigger signals, backtest…?)

▪ In the actions part, to connect to some APIs, you need to 𝐬𝐩𝐞𝐜𝐢𝐟𝐲 𝐲𝐨𝐮𝐫 𝐀𝐏𝐈 𝐊𝐞𝐲…

What differs from a standard ChatGPT?

✅𝐀𝐜𝐭𝐢𝐨𝐧𝐬 (in configure part):

▪ You can connect to an External API to fetch data automatically.

▪ GPT gives insights on these data using a natural language, directly.

(You need to allow the GPT to connect)

▶ It generates dataframes/plots/analyses based on this external data.

▪ 𝘖𝘵𝘩𝘦𝘳 𝘱𝘰𝘴𝘴𝘪𝘣𝘪𝘭𝘪𝘵𝘪𝘦𝘴, 𝘭𝘪𝘬𝘦 𝘤𝘰𝘯𝘯𝘦𝘤𝘵𝘪𝘯𝘨 𝘵𝘰 𝘡𝘢𝘱𝘪𝘦𝘳….

✅𝐔𝐩𝐥𝐨𝐚𝐝 𝐟𝐢𝐥𝐞𝐬:

▪ You can give it your own dataset.

▪ You can give it your own notebooks with the different algos you want to implement.

▶ Ask it to run the python code you just gave with the files you just uploaded…

➡ The GPT is persistent. You will find at each time, all files/actions already added.

➡You can share this GPT with others…

To be able to test on your own, I’m excited to share with you here the link to my custom GPT Trading bot:

Related Articles



Leave a Reply

Your email address will not be published. Required fields are marked *