Using ChatGPT 4 "Code Interpreter" to write ranking systems

I wanted to share that for those who have access to the ChatGPT 4 “Code Interpreter”, I was able to “teach” GPT4 the raw text syntax for ranking systems and then have it output new systems for me that it “invented”.

I did this with the following prompt:

The attached excel file (excel file I used is attached to the post - I believe it is from the “list of factors” xlsx that has been floating around on these boards for a while and could certainly be added to and augmented) is a list of factors/formulas for use in creating ranking systems for stock picking strategies.

Ignore column FactNum

column Category gives a category for each factor/formula

Factor/Formula is the proper markup for the software that is used to execute these ranking systems

VsIndustry allows you to specify whether the factor/formula applies to the universe of stocks or its industy

HigherorLower allows you to specify whether your Factor/Formula is ranking by higher or lower values

Description is a description of the FactorFormula

Here is an example of a ranking system in the correct markup format:

Paste in a detailed text format ranking system from somewhere so that GPT can see the format

Using the excel file as a resource, create your own ranking system in the correct markup format. Draw on academic and expert research in your training set to develop your system.

End prompt

It will then spit out a ranking system in a code block. I have gotten a very wide variety of systems out of it which I have then tested and/or built upon. And it is interesting to do follow-up “conversations” with GPT about its methodology for developing a given ranking system. No reason to think it will come up with a silver bullet system but interesting for generating fresh ideas and lines of thinking. And I’m curious how far I could take it - would love to have it ingest all of the different P123 parameters and come up with its own formulas.

Note: sometimes the ranking system won’t run due to an error. In that case, find the erroneous section of the system and fix it your self or paste it into ChatGPT and ask for a fix.

FactorListGPT.xlsx (76.0 KB)

You can license the chatgpt 4 API. I thought about doing this to analyze earnings reports to evaluate management teams. I figured it would cost about $15K to analyze every SP500 earnings report for the last 20 years if each report averaged 7000 words.

I except P123 (or one of us) could do the same thing with the P123 formula syntax as you mentioned. That would be quit interesting to have it create and then test new formulas.

I am sure you can if I understand. A start to a full answer: https://platform.openai.com/docs/api-reference