The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Matching stock return dates (Mo-Fr) with sentiment (daily) - join two datasets
Dear community,
I am doing a sentiment analysis on stock returns on the example of a specific company.
Now I am looking for the easiest way to match my sentiment measures with the firm-specific stock prices.
As Xetra is only open Monday through Friday with exception of national holidays, I want to average my sentiment measure on non-consecutive market days.
In essence I count the number of positive and negative words for firm-specific news and normalize them by the total number of words. I do that for all consecutive trading days but on non-consecutive market days I want to average all articles published from close to open.
Can a join operator do something like this automatically, meaning just pasting the measure when a stock price is available and averaging it and writing it to the next opening day when no matching date is available?
Thanks a lot for your help!
I am doing a sentiment analysis on stock returns on the example of a specific company.
Now I am looking for the easiest way to match my sentiment measures with the firm-specific stock prices.
As Xetra is only open Monday through Friday with exception of national holidays, I want to average my sentiment measure on non-consecutive market days.
In essence I count the number of positive and negative words for firm-specific news and normalize them by the total number of words. I do that for all consecutive trading days but on non-consecutive market days I want to average all articles published from close to open.
Can a join operator do something like this automatically, meaning just pasting the measure when a stock price is available and averaging it and writing it to the next opening day when no matching date is available?
Thanks a lot for your help!
Tagged:
0
Answers
It sounds to me like the best approach would be to create a time index for your sentiment scores that mirrors your stock data. This can be done using the Windowing operator in both time series and picking a common unit (although the settings used to generate this might be different in the two series).
Once you have that, you should then be able to join the two series together using that as the join key.
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
thanks a lot for your help!
However I do not quite understand the windowing operator...can you maybe help me with the settings which would suit my needs with my code?: