Advanced AI Query Guide for Trade Journaling Querying and Analysis
In our original blog post about the introduction to AI query in TradesViz, we explored basic queries which show charts that you can use to get summaries of your trading. But what if your needs are complex?
We are seeing more recent users preferring to interface with the AI query tab because it's easy and flexible to get answers to almost any type of question you have about your trading.
If you have used ChatGPT, Bard, or similar chat-based AI tools, this guide will feel like an extension of what you already know i.e. prompting. For everyone who does not have experience with such systems - don't worry, just think of the system as a very simple computer that shows results exactly as you ask it. Note the keyword "exact". We say this because there will not be a complete or 100% guide that covers every possibility of this feature as you see in our other blog posts. Why? Because the possibilities are endless. The insights you can get and the questions you can ask have no bounds or restrictions.
Let's explore some different types of queries below. These will be VERY useful in a feature that is coming soon - Infinite AI possibilities + Custom dashboard = ? ... Stay tuned!
To take full advantage of the AI system, you need to understand how to effectively query the system. Below are 5 unique examples each exploring a different type of query.
1. Grouping data example: Finding pnl grouped by calendar days
Yes, this already exists as a chart in the trades analysis charts. But this serves as an excellent example of how to group the data by particular criteria - in this case, by days of the week. Once you learn how grouping works, you can use it to create almost all of the charts you see in the pnl analytics section.
A simple query. Finding the pnl grouped by calendar day. So, the output should show 7 bars (MON-SUN), right?
It does not...
Instead, what are we seeing here?...
We are seeing the pnl grouped by *every* single week and the day of the week is just the grouped week's first day.
This is not what we wanted. How can we fix this?
We need to adjust the first line of the query:
Let's try this:
There we go! We got what we wanted!
The purpose of this mini-experiment is to make you understand that even a slight change in how you describe the data matters a lot. Now since the query shows only numbers, we can now add the second line to show the actual calendar day.
This is the final end result!
2. Multi-step queries: Step-by-step complex query construction using multiple data points
Sometimes, it might not be possible to get a result if you write everything in a single line - it's hard for the AI system to comprehend this.
A workaround is to break the complex query into parts. Here are some examples:
Here we are comparing the pnl of a symbol from different accounts. Note that this is just an example - your use case might be very different and you may trade very differently. However, the concepts we explore here apply to all types of trading data in your trading journal.
Finally, you can create your own custom formulas. Again, in this example, we're using the AI query to create the profit factor of the account. Recall that the profit factor formula is defined as the gross profit divided by the gross loss (source).
Imagine the possibilities of the analytics you can achieve with this type of queries!
If excel was your first thought, then yes, almost everything that you can do on excel, you can do here without all the learning curve. That's why we are calling this our newest most powerful analytics feature.
3. Combining different data sources: Combining stock data + trading data
You can not only combine tags, but the AI system can also understand the structure of our own data sources and intelligently query from them. Below are some examples.
What does this do? It gets the SPY return in the year 2021 and compares it to your account's return in the same year.
Now you can probably start to think about the various ideas and ways you can query the AI system.
This query's result cannot be achieved via any other chart/features in TradesViz. The only way is: Check the seasonality in one tab, check your returns via money transactions in another, and compare both. But AI query ties together all of this data for you to explore via a single tab.
Notice that this query has multiple parts. This is how you make the system understand that you are getting data from different systems as it would have been a complex query to write in a single coherent line/sentence for the AI system to understand.
4. Custom "Recent" analytics
You may have a requirement to check the statics of say, the 15 executions or trades only. It's hard to do this on normal charts because all charts except for our recent trend charts (which was actually an idea derived from the AI query) have date as X-axis and the filtering is also done primarily by date. This can be overcome by using the AI query's flexibility. Here are some examples.
This query shows the info of the last 20 trades only.
Why is this useful or how can AI query features help here? Note in the results that you are able to chart the chart however you want.
You can also try an aggregate-based query and see how that is charted for just the last few specific trades.
Also notice how we used a multi-step query to tell the system to show additional data (in this example, you could have typed in all the column names in the first line itself, but we wanted to show a demo of how queries can be simplified further to reduce error rate).
We are constantly thinking about how to *usefully* integrate AI into your everyday journaling and analytics. While there may be many tools and platforms in finance that utilize AI to simply query data sources, we want our system to be able to simplify trade journaling for users - this requires us to build very specific systems to understand trading data while keeping privacy in mind.
We are excited about building and using AI in the TradesViz journaling system and we hope you find it useful!
Do you have any other requests? Do you want us to write particular guides exploring specific anlaysis? Let us know at [email protected]. This guide was made based on popular user requests on how to effectively use the AI system and also as a precursor to the upcoming AI widgets feature.