I have daily stock price data for many different companies.
For each company, there is at least one "event" date that I am interested in.
I would like to create a line plot for a given company (group_id), that has a marker only on the event date(s).
So far the only solutions I found were:
Please let me know if this is feasible.
Thank you so much!
For each company, there is at least one "event" date that I am interested in.
I would like to create a line plot for a given company (group_id), that has a marker only on the event date(s).
So far the only solutions I found were:
- I defined a binary event variable (equal to 1 for an event, and 0 otherwise) and used it as a weight, which leads to a huge circle around the event datapoint. It is almost impossible to identify the exact point it is circling.
Code:scatter price date [w=event] if group_id == 1, msymbol(Oh) connect(l)
- I defined the event variable to equal "event" for an event, and "" otherwise, and used it as a label, which is also hard to pinpoint when looking at over a year of data.
Code:scatter price date if group_id == 1, mlabel(event) msymbol(none) connect(l)
Please let me know if this is feasible.
Thank you so much!