Column used while calculating the daily sentiment score

Course Name: Natural Language Processing in Trading, Section No: 4, Unit No: 5, Unit type: Notebook



Hi Team,



This is just a small problem.



While calculating the daily sentiment score, the quantra has used 'sentiment_class' column:

apple_daily_sentiment = data.groupby('trading_time').sentiment_class.agg('mean').to_frame('score')



But rather we should use the 'sentiment_score' column, like this:

apple_daily_sentiment = data.groupby('trading_time').sentiment_scores.agg('mean').to_frame('score')



could you please confirm this?

Hi Harshvardhan,



There are different approaches to calculate the daily sentiment score. One of which is to take the mean of all the sentiment class (as done in the notebook). It can also be done on sentiment score either by taking the sum or by taking the mean. Now based on the approach you choose, you will define the rules to generate the signal.



I hope this helps.



Thanks!