How to Use Artificial Intelligence with Excel Data to find the Best Algorithmic Trading Systems Portfolio and Sharpe Ratios
- Capstone Trading
 - 4 minutes ago
 - 2 min read
 
In this video, we show how to use artificial intelligence to process the data in the Portfolio Calculator, by importing it into Chat GPT and asking in the query below. (I've modified this query from the video and made the data file in the video available for download.)
Chat GPT Query:
Here is a CSV file with the date on the left column and name of the trading strategy on the top row. Each column represents the daily profit and loss for each strategy. Going back to 1/1/2020, tell me the best Two Strategy, Three Strategy, Four Strategy, and Five Strategy Combination for a portfolio and rank them by Sharpe Ratio, Total Profit divided by Drawdown, and Total Profit.
This query can be modified in many different ways. Finding the Average Drawdown Duration or Time between equity peaks is also an important data point.
It is important to understand that this is based on end of day Profit and Loss data and not individual trade data. Numbers such as average trade profit cannot be determined using this data series.
It is also important to download the Portfolio Calculator and verify any custom combination that Chat GPT finds by simply "zeroing" out all existing "1s" and typing a 1 next to the strategies that are included in a custom portfolio.
The links to this Chat GPT query can be downloaded here.
The original Chat GPT query that I started with and had some "mistakes" in the data file that included additional non-strategy indicators can be downloaded here.
While the adoption of AI is unproven on many levels, using Chat GPT as an engine for these types of questions is very useful, as long as the data is double checked by double checking the results in the Portfolio Calculator. From a portfolio development perspective, examining this type of data is useful in understanding expectations for trading system portfolios.
For comparison, the Diversified Portfolio 57 Combination has the following metrics back to 2017:
Total Net Profit Over Drawdown = 122.83 or 12,283%
Sharpe Ratio = 1.81
Average Drawdown Duration = 11.50
Past Performance is not Indicative of Future Results
