- ago
Fellow Users,
Most of you have probably heard of ChatGPT, an innovative and disruptive AI (Artificial Intelligence)-based chatbot designed to give natural responses to queries. The AI gives it the ability to understand context and detail. Released barely 2 months ago it has already taken the world by storm.
https://chat.openai.com/auth/login

I am not an AI expert. I was simply curious to see in which ways it may be able to help me in my Wealth-Lab usage, if at all, as no one has posted their experience yet.
Keep in mind AI is evolving fast and what is a "wow" today will be commonplace tomorrow.
It's a long post, you can skip to the summary at the end if you wish.


What is ChatGPT? In its own words:



When asked to write a simple trading strategy it came up with a Moving Average Crossover (50, 200) system and the code was pretty accurate.
Next, I gave it a tougher task: A fixed % 6-asset allocation strategy (it's David Swensen's Yale Model Portfolio):



It did a decent job of analyzing a complex Rotation strategy:




I chatted with it on a number of investing topics:
a) Portfolio risk-adjusted performance metrics:



b) Sharpe vs Sortino Ratios in more detail:



c) Risk Parity:




Lastly, some fun:




TL;DR
My takeaways (as of Jan-2023):
1. Coding (I only tested simple to moderately complex systems): It can code from scratch if you give it specific rules; however, it often uses a mix of WL6 and WL8 (and even plain English) - not a big deal as its fairly easy to convert WL6 to WL8 language. The code may be incomplete - it can't be expected to know all of Wealthscript as its a custom language + the website froze a few times while I was testing. However, there may still be enough material to build upon; sometimes that's all one needs when stuck. You can always regenerate a response (though you'll lose the previous one).
2. Conversing/Concepts: It can summarize and explain complex concepts in simple terms. The better and more specific the question so will be the answer.
3. Misc.: If you get bored and ask for, say, a cooking recipe not only will it give you one but even draw up a shopping list (if you ask it to)! Or write an exercise schedule. Or tell a joke. LOL
---------------


Pros:
1. It does an OK job of writing code for Wealth-Lab but is better at explaining concepts. But don't accept everything blindly, do your own due diligence.
2. It's fully functional and free (currently).

Cons:
1. The website can be slow, even freeze up - a direct result of its huge success. This should improve, though, as the parent company OpenAI gets more funding and more servers.
2. It may never fully grasp all of Wealthscript language as a lot of it is custom even though based on C#.
3. It may not remain free forever, atleast in its fully functional state.
---------------


ChatGPT is rapidly evolving (and other AI technologies will also likely emerge). Be sure to check it out yourself. And do share your experience.
6
1,890
29 Replies

Reply

Bookmark

Sort
- ago
#1
If we could copy the compiling errors into Chat I think we could train it better. Perhaps Dion would fix that?
0
- ago
#2
Worth a shot.
Remember: The more specific or detailed you are, the better the outcome/learning.
0
- ago
#3
Found a good use for Chat. Dataset building made easy
1
- ago
#4
2
- ago
#5
If there is something that really deserves all the hype that it's getting, it's definitely ChatGPT. We are just starting to grasp how disruptive this technology will be, with just a bit more polishing. This will eliminate millions of white collar jobs.

As is, it is already a fantastic tool for developers, as this great video showcases:
https://www.youtube.com/watch?v=sTeoEFzVNSc
(it's a bit long, but definitely worth it)

Unfortunately, it was only trained with data up to 2021. Therefore, it is missing a lot of what happened with WL7/WL8. Still, as Sammy_G showed, it is already very useful, even with these limitations.

I suppose that if you setup Visual Studio Code to work with WL8's C# code; and then get one of the VSCode's ChatGPT extensions, you can already leverage this tool to scaffold some code bits that are less specific to WL, but that your strategy requires nebertheless.
1
- ago
#6
@Darcy,
The uses to which it can be put to is only limited by our imagination.
People have put it to all sorts of uses e.g. they have created entire websites using code created by ChatGPT!

@alkimist,
QUOTE:
...if you setup Visual Studio Code to work with WL8's C# code; and then get one of the VSCode's ChatGPT extensions, you can already leverage this tool to scaffold some code bits that are less specific to WL that your strategy requires...

Excellent point.
0
- ago
#7
I asked it to generate a "Stock" class in C# that encapsulates the information for one period. It generated it with properties you'd expect:

CODE:
class Stock { public string Symbol { get; set; } public DateTime Date { get; set; } public decimal Open { get; set; } public decimal High { get; set; } public decimal Low { get; set; } public decimal Close { get; set; } public long Volume { get; set; } public Stock(string symbol, DateTime date, decimal open, decimal high, decimal low, decimal close, long volume) { Symbol = symbol; Date = date; Open = open; High = high; Low = low; Close = close; Volume = volume; } }


I then asked it to generate a Fibonacci retracement class in C# and it did, quickly, including the various retracement levels.

CODE:
class FibonacciRetracement { private double _start; private double _end; public FibonacciRetracement(double start, double end) { _start = start; _end = end; } public double RetracementLevel(double level) { return _start + (_end - _start) * level; } public double[] Levels() { return new double[] { 0, 0.236, 0.382, 0.5, 0.618, 0.786, 1 }; } }


I then asked it to incorporate an array of Stock class objects into the FibonacciRetracement class that it generated. I was purposefully vague. Well, that caused it to apparently timeout a couple of times, but it did eventually come up with an answer. After a few simple corrective suggestions it came up with this... (amazing)

CODE:
class FibonacciRetracement { private Stock[] _stocks; public FibonacciRetracement(Stock[] stocks) { _stocks = stocks; } public double[] CalculateRetracementLevels(int startIndex, int endIndex) { double high = _stocks[startIndex].High; double low = _stocks[startIndex].Low; // Find the highest high and lowest low between the two indices for (int i = startIndex + 1; i <= endIndex; i++) { high = Math.Max(high, _stocks[i].High); low = Math.Min(low, _stocks[i].Low); } double retracementDiff = high - low; double[] retracementLevels = new double[3]; retracementLevels[0] = high - retracementDiff * 0.618; retracementLevels[1] = high - retracementDiff * 0.382; retracementLevels[2] = high - retracementDiff * 0.236; return retracementLevels; } }


It didn't incorporate the Levels of the original FibonacciRetracement class, but nevertheless it is amazing what it can do.
2
- ago
#8
That's amazing - thanks for sharing!
It hadn't occurred to me but its probably smarter to ask it to code in C# and then port it over to WL8.

I have also found that sometimes one has to be persistent/re-state the question in order to get a better response.
0
- ago
#9
Amazing stuff! Thanks for sharing.

That's the type of code scaffolding that I meant.
I'm going to see if I can come find some time this weekend to setup a workflow for:
Wealth-Lab <-> VSCode (+ChatGPT extension).

Hopefully, when they finish training it with more fresh data from 2022 onwards, it will get better at coding directly for Wealth-Lab. In the meantime, as shown above, it is already pretty great at C# in general, for it to be very useful to integrate in the development of Wealth-Lab specific strategies.
0
Glitch8
 ( 9.89% )
- ago
#10
I'm waiting for OpenAI to go public so I can buy some shares.
3
- ago
#11
I don't think it plans to go public, too many interested parties waiting to fund it or gobble it up.

Incidentally - and you probably know this - Elon Musk was one of the co-founders of OpenAI.
1
Glitch8
 ( 9.89% )
- ago
#12
I think MSFT owns nearly half of it now, and I’d be surprised if it didn’t eventually go public and become a monster stock of a new AI era.
1
- ago
#13
I also believe so: with the already demonstrated capability and the hype around it, I would expect this to be the biggest IPO in history (so far) and easily dethrone Saudi Aramco's $25 billion.
0
- ago
#14
(Musing) The ticker symbol "CGPT" is currently available... maybe Nasdaq should block it from anybody else using it (if they haven't already)!!
1
- ago
#15
@Glitch,
Isn't NeuroLab a form of AI (machine learning)?
0
- ago
#16
With the success, and hype, around ChatGPT (CGPT) a plethora of tools have been created to enhance it, or even as alternatives. Here are just two (of many) such lists:

Browser extensions (mostly for Chrome): https://beebom.com/best-chatgpt-chrome-extensions/
Alternatives to CGPT: https://www.makeuseof.com/best-alternatives-chatgpt/
-------------------------------

One of the limitations of CGPT is that it often states its algos were trained till 2021 so it doesn't have anything more recent (remember that it doesn't have internet access):



Using the WebChatGPT extension one can enhance the query with more recent info:


I highlighted the extension at the bottom of the pic to show it was being used. It searches the web automatically and re-submits the query with appropriate modifications.

I suppose one could search across multiple sites oneself but using the extension makes it seamless, fast and time-saving, leaving the task of aggregating the info to CGPT.
As one would expect, results vary with the complexity and specificity of the query.
1
Glitch8
 ( 9.89% )
- ago
#17
I was actually thinking OAI, and ChatGPT agrees!!

“A good stock symbol for OpenAI could be something that relates to the company's mission and technology. For example, the symbol could incorporate a letter "O" for OpenAI, and an "A.I." for Artificial Intelligence. Some possibilities could be OAI, AIO, or OPNAI. However, ultimately the decision would be up to the company and the stock exchange.”
0
- ago
#18
I've tried numerous times to translate from other languages like Tradestation EL and NinjaTrader script to Wealth-Lab 8 wealth script but ChatGtp was not able to do it as of yet.
It can do basic coding languages translation like from Java to C# pretty good though.
0
Cone8
 ( 24.80% )
- ago
#19
Chat GPT's corpus only covers text up to the year 2021, which was the year WealthLab 7 was released (in March as I recall).
0
- ago
#21
I use it as a virtual coworker, the only thing I miss from corporative life, and like the real ones it makes mistakes so be careful.
1
- ago
#22
It can break the monotony of a boring day by telling a joke - or two. Or create a recipe if you give it some ingredients. Human coworkers don't do that! ;)
1
- ago
#23
Here is an interesting application of these Large Language Models:

On 2/1/2023 the news provider marketaux has this news about Adobe (ADBE):



I am not fluent in chinese so I asked the OpenAI model gpt-3.5:



The next question is about "Sentiment of this Article". Answer:

QUOTE:
Sentiment: Positive
Score: 0.8


2
- ago
#24
Thanks for sharing, DrK - quite literally a 'Language' model !
0
- ago
#25
ChatGPT is indeed amazing and it seems to give correct formulas easily.
But it doesn't work for WL8. I tried many times. You can copy/paste the errors but at the end you get stuck if you can't program yourself.

This is because WL is always changing some basic concepts with each built?

I'll have to wait until CGPT is updated with more recent information or ask in C sharp. But what than?
Can this just be pasted into WL?
Or another conversion necessary?
0
- ago
#26
WealthScript (WS) is a custom/proprietary language built upon C# so don't expect CGPT to know all of it (but it has learnt/inferred some of it). Even if you ask it to respond in C# its fairly easy to translate it to WS. Read some of the earliest posts...
If you get stuck in code somewhere post it in the forums, people are ready to help.

Incidentally, WL8 has Building Blocks which can assist in creating a strategy - and if gaps remain in it just convert the Blocks to C# and flesh out the code wherever needed.

Good luck!
1
- ago
#27
There is now a new extension which leverages (the technology behind) ChatGPT and friends: finantic.NLP (see https://www.wealth-lab.com/extension/detail/finantic.NLP)

It works by "reading" news articles and assigning a sentiment score to each article which can in turn be used as an indicator in a trading strategy.

It turns out that the latest Large Language Models (the engines behind ChatGPT, Microsoft's Bing chat etc.) are way better in "understanding" a news article then former techniques.
0
- ago
#28
Hi all,
I only found a couple of threads in the discussion on ChatGPT.
I know that ChatGPT officially was trained in the era of WL6. If you ask it to write some code, it currently gives you non-turnkey coding (mostly WL6-appropriate code). My understanding is that you can "tune" ChatGPT to outputs, essentially training it on custom data inputs.
Has anyone here been able to do that for more "turnkey" output? (Or has anyone had any success with queries like requesting code in any other C# based trading script?)

Thanks
-bd
0
ww58
- ago
#29
QUOTE:
I know that ChatGPT officially was trained in the era of WL6. If you ask it to write some code, it currently gives you non-turnkey coding (mostly WL6-appropriate code)

gpt-4-1106-preview was trained up to Apr 2023, give it a try.

In general, this is an idea for wealth-lab developers to additionally train some local model, however, this does not make much sense as long as it is possible to make most strategies from blocks in 3 minutes.
1

Reply

Bookmark

Sort