Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
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?: