MERGE() command Techniques

Dr. Ballings,

When Merging articles in the big assignment, what kind of merging should we be doing? what are some techniques that will allow us to capture
the relevant headline information we need to predict tomorrow's stocks. I am having trouble whether to use 'left joint merge' or 'right
joint merge' or 'joint all'. Please advise on how you would approach this.



Answers and follow-up questions

Answer or follow-up question 1

Dear Jian,

You want to have a left outer join if your stock data is the left argument and the story data is the right argument.
This way, if there are no stories about a given company on a given day, the stock data will still be retained in the output.
Of course, this will result in NAs, which you can subsequently replace by 0s.

Michel Ballings

Sign in to be able to add an answer or mark this question as resolved.