This is one of the most exciting pieces of software I ever made.
The original plan was to release this extension a week after the finantic.News extension, but it took a few weeks of additional work on Dion's side and on my side to make this happen.
This extension leverages recent advances in a research field called "Natural Language Processing" (NLP).
Theses people develop "Large Language Models" (LLM) which are able to understand and answer questions posed in natural language.
This research led to products like ChatGPT, Microsoft's Bing Chat, Google's Bard, Facebook's Llama and so on.
The finantic.NLP extension connects WealthLab with many of these Large Language Models and allows for a completely new segment of trading strategies: Evidence Based News Trading. (aka. backtested trading strategies based on financial news)
How does it work?
The news articles available for a single symbol on a single day are sent to a server farm where a pretrained Large Language Model
evaluates the news article along with a carefully engineered prompt like
"Is this news good news for the company Adobe (ADBE)"
The Large Language Model answers with a sentiment score between -1 and +1.
These scores are combined and finally form an "News Indicator" which in turn can be used in a Wealth-Lab trading strategy
(no matter if Building Blocks or coded)
The extension contains a large set of help pages along with a verbose tutorial which expains everything step by step.
Give it a try and let me know how it works for you:
https://wealth-lab.com/extension/detail/finantic.NLP
The original plan was to release this extension a week after the finantic.News extension, but it took a few weeks of additional work on Dion's side and on my side to make this happen.
This extension leverages recent advances in a research field called "Natural Language Processing" (NLP).
Theses people develop "Large Language Models" (LLM) which are able to understand and answer questions posed in natural language.
This research led to products like ChatGPT, Microsoft's Bing Chat, Google's Bard, Facebook's Llama and so on.
The finantic.NLP extension connects WealthLab with many of these Large Language Models and allows for a completely new segment of trading strategies: Evidence Based News Trading. (aka. backtested trading strategies based on financial news)
How does it work?
The news articles available for a single symbol on a single day are sent to a server farm where a pretrained Large Language Model
evaluates the news article along with a carefully engineered prompt like
"Is this news good news for the company Adobe (ADBE)"
The Large Language Model answers with a sentiment score between -1 and +1.
These scores are combined and finally form an "News Indicator" which in turn can be used in a Wealth-Lab trading strategy
(no matter if Building Blocks or coded)
The extension contains a large set of help pages along with a verbose tutorial which expains everything step by step.
Give it a try and let me know how it works for you:
https://wealth-lab.com/extension/detail/finantic.NLP
Rename
The theory goes like this:
There are three different categories of news events:
1. News which reports about past stock performance or price movements. Because past price movements have usually no influence on future movements these news articles say nothing about future price movements and can be ignored/discarded.
2. News articles which are unrelated, irrelevant, too general or otherwise not significant for any future price movement. Can be ignored/discarded.
3. News articles which report significant developments or events which have the potential to make people buy or sell a given stock and thus will move stock prices in a certain direction.
So the task at hand is to develop a clever question (called a "Prompt") for the artificial intelligence to make it
a) distinguish between cases 1., 2. and 3. and
b) find a relevant sentiment value to estimate the direction and magnitude of the expected price movement.
There are three different categories of news events:
1. News which reports about past stock performance or price movements. Because past price movements have usually no influence on future movements these news articles say nothing about future price movements and can be ignored/discarded.
2. News articles which are unrelated, irrelevant, too general or otherwise not significant for any future price movement. Can be ignored/discarded.
3. News articles which report significant developments or events which have the potential to make people buy or sell a given stock and thus will move stock prices in a certain direction.
So the task at hand is to develop a clever question (called a "Prompt") for the artificial intelligence to make it
a) distinguish between cases 1., 2. and 3. and
b) find a relevant sentiment value to estimate the direction and magnitude of the expected price movement.
Hi @DrKoch
I think I just read the research article that spawned this and was just about to write in to see how much to develop this as a solution so its great to see that its already there.
Can you provide any more information how useful the news trading approach is in your trading either on its own or combined with other indicators?
Thanks Tim
- I just noticed I can get a free trial so I'll have a go myself!
I think I just read the research article that spawned this and was just about to write in to see how much to develop this as a solution so its great to see that its already there.
Can you provide any more information how useful the news trading approach is in your trading either on its own or combined with other indicators?
Thanks Tim
- I just noticed I can get a free trial so I'll have a go myself!
Hi tteather
could you please post this article here?
I am not sure its the same that sparked me to build these extensions.
QUOTE:
I just read the research article
could you please post this article here?
I am not sure its the same that sparked me to build these extensions.
QUOTE:
Can you provide any more information how useful the news trading approach is
I am convinced that it is super useful and helps more to a trading strategy than your average RSI indicator.
There are just some hurdles to master:
* you need a decent news source and the finantic.News extension to make all these news available in WealthLab
* you need a subscription for OpenAI and/or HuggingFace
* you must invent a clever prompt (the question posed to the artificial intelligence) to get useful answers
From my experience it is best to combine the News-Indicator with some other trading logic for best results.
Hello DrKoch,
In message #1 you say
So it is possible to filter news based on what is most relevant? How can this be done?
In message #4 you mention
Does the sentiment calculation take into account the title, content, image? Is it based on specific words?
Is it possible to change the sentiment calculation?
In message #1 you say
QUOTE:and
News which reports about past stock performance or price movements [...] can be ignored/discarded
QUOTE:.
News articles which are unrelated, irrelevant, too general or otherwise not significant for any future price movement. Can be ignored/discarded
So it is possible to filter news based on what is most relevant? How can this be done?
In message #4 you mention
QUOTE:. What other news sources besides Tiingo are compatible with WL?
you need a decent news source
Does the sentiment calculation take into account the title, content, image? Is it based on specific words?
Is it possible to change the sentiment calculation?
QUOTE:
So it is possible to filter news based on what is most relevant?
Yes of course. Modern AI algorithms like ChatGPT are extremely powerful. They are able to "understand" the content of a news article and tell important news from nonsense.
QUOTE:
How can this be done?
The key is "Prompt Engineering" you need to have a clever "prompt" (This is the question you pose the AI algorithm).
With a clever prompt it is possible to extract information about future price movements from news articles.
As usual there are many sources about "Prompt Engineering" on the internet, here is just one to get you started:
How To Write ChatGPT Prompts (https://www.coursera.org/articles/how-to-write-chatgpt-prompts)
A google search will show you much more.
The finantic.NLP extension comes with a prompt manager that already contains some interesting and useful prompts. See Screenshots of finantic.NLP:
https://www.wealth-lab.com/extension/detail/finantic.NLP#screenshots
QUOTE:
What other news sources besides Tiingo are compatible with WL?
The finantic.News extension (https://www.wealth-lab.com/extension/detail/finantic.News) connects Wealth-Lab with several news providers.
* eodhistoricaldata
* marketaux
* tiingo
* WorldNewsAPI
Please see the finantic.News extension for details.
A word of warning:
News trading with AI is both: A rather advanced task that comes with a steep learning curve
AND
extremely promising.
And the finantic.News and finantic.NLP extensions remove all the hard work (programming, connect to AI algorithms, import information into WL, connect to trading strategies, etc.) from that task.
News trading with AI is both: A rather advanced task that comes with a steep learning curve
AND
extremely promising.
And the finantic.News and finantic.NLP extensions remove all the hard work (programming, connect to AI algorithms, import information into WL, connect to trading strategies, etc.) from that task.
QUOTE:
Does the sentiment calculation take into account the title, content, image?
The finantic.NLP extension sends the title and the text body of a news article (embedded in a prompt designed by you) to the AI algorithm.
Images are currently ignored.
QUOTE:
Is it based on specific words?
The AI does much better than working on "specific words". The AI is able to "understand" the complete text of a news article (even if it is written in Chinese) in the context provided in the settings of the finantic.NLP extension and your prompt.
I think what's missing is a method to assess the LLM rules with the "recent" price action of the stock in question. And to adjust the weights (relevance) of each rule with the associated price action automatically.
But it's implementation is still a very impressive piece of work.
But it's implementation is still a very impressive piece of work.
QUOTE:
I think what's missing is a method to assess the LLM rules with the "recent" price action of the stock in question.
There are two very different kinds of AI:
1. Large Language Models. (aka ChatGPT and friends) These handle natural language like news articles.
2. Machine Learning algorithms (Neural Nets, Support Vector Machines, Decission Trees, Forests): These handle numerical data like prices and indicator values.
The first kind is accessible from WL through the finantic.NLP extension. It is able to analys news articles and finally produces a "News-Sentiment-Indicator" that is usable in a WL Trading Strategy.
The second kind will be accessible from WL through the upcoming finantic.Learning extension, a preview of this can be found in in the discussion thread "Is there a Machine Learning extension?"
(https://wealth-lab.com/Discussion/Is-there-a-Machine-Learning-extension-10835)
This extension also produces a "Combined-Machine-Learning-Indicator" that can be used in WL trading strategies.
The idea is to combine both indicators at the trading strategy level.
QUOTE:
The idea is to combine both indicators at the trading strategy level.
Agreed. The goal should be to allow the second type (the numerical evaluating type) to drive and direct the first type (language model type).
The other comment is that one needs to be a short-term trader to use such a news tool. Moreover, negative news drives prices much more than positive news, so short traders would benefit most from such a news tool. For example, it's long established (2017-2020) that when President Trump tweets about a company, it's stock price automatically falls. And it doesn't even matter whether the tweet is factual or not, the price will invariably fall. So traders looking to buy short will subscribe to Trump on twitter (or X).
But keep in mind, not everyone is a short-term trader, so this language tool is very focused.
Your Response
Post
Edit Post
Login is required