Dear Statlisters,
I am working on the following data to calculate the missing variables and need your help. The missing variables are defined as follows:
revision_5: Number of Revisions (of recommendation) in the past 5 days.
bts_5: Number of Revision (of recommendation) from BUY to SELL in the past 5 days.
stb_5: Number of Revision (of recommendation) from SELL to BUY in the past 5 days.
Required:
Please guide me how can I count the revisions (as explained in the definitions of the variables) by the analysts in the past 5 days.
Your help will be highly appreciated.
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input str18 id int date str4 recom byte(revision_5 bts_5 stb_5)
"153497582541357056" 21186 "BUY" . . .
"153497582541357056" 21187 "BUY" . . .
"153497582541357056" 21188 "SELL" . . .
"153497582541357056" 21189 "BUY" . . .
"154004513710276609" 21190 "SELL" . . .
"154004513710276609" 21191 "BUY" . . .
"154004513710276609" 21192 "BUY" . . .
"154004513710276609" 21193 "BUY" . . .
"154188116649984000" 21194 "BUY" . . .
"154188116649984000" 21195 "SELL" . . .
"154188116649984000" 21196 "BUY" . . .
"154188116649984000" 21197 "SELL" . . .
"154206859409108992" 21198 "BUY" . . .
"154206859409108992" 21199 "BUY" . . .
"154206859409108992" 21200 "SELL" . . .
"154206859409108992" 21201 "SELL" . . .
"154676532508508160" 21202 "SELL" . . .
"154676532508508160" 21203 "BUY" . . .
"154676532508508160" 21204 "BUY" . . .
"154728793330814976" 21205 "BUY" . . .
"154728793330814976" 21206 "SELL" . . .
"154728793330814976" 21207 "SELL" . . .
"154933705763340288" 21208 "SELL" . . .
"154933705763340288" 21209 "BUY" . . .
"154933705763340288" 21210 "SELL" . . .
end
format %tddd-Mon-YY date
I am working on the following data to calculate the missing variables and need your help. The missing variables are defined as follows:
revision_5: Number of Revisions (of recommendation) in the past 5 days.
bts_5: Number of Revision (of recommendation) from BUY to SELL in the past 5 days.
stb_5: Number of Revision (of recommendation) from SELL to BUY in the past 5 days.
Required:
Please guide me how can I count the revisions (as explained in the definitions of the variables) by the analysts in the past 5 days.
Your help will be highly appreciated.
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input str18 id int date str4 recom byte(revision_5 bts_5 stb_5)
"153497582541357056" 21186 "BUY" . . .
"153497582541357056" 21187 "BUY" . . .
"153497582541357056" 21188 "SELL" . . .
"153497582541357056" 21189 "BUY" . . .
"154004513710276609" 21190 "SELL" . . .
"154004513710276609" 21191 "BUY" . . .
"154004513710276609" 21192 "BUY" . . .
"154004513710276609" 21193 "BUY" . . .
"154188116649984000" 21194 "BUY" . . .
"154188116649984000" 21195 "SELL" . . .
"154188116649984000" 21196 "BUY" . . .
"154188116649984000" 21197 "SELL" . . .
"154206859409108992" 21198 "BUY" . . .
"154206859409108992" 21199 "BUY" . . .
"154206859409108992" 21200 "SELL" . . .
"154206859409108992" 21201 "SELL" . . .
"154676532508508160" 21202 "SELL" . . .
"154676532508508160" 21203 "BUY" . . .
"154676532508508160" 21204 "BUY" . . .
"154728793330814976" 21205 "BUY" . . .
"154728793330814976" 21206 "SELL" . . .
"154728793330814976" 21207 "SELL" . . .
"154933705763340288" 21208 "SELL" . . .
"154933705763340288" 21209 "BUY" . . .
"154933705763340288" 21210 "SELL" . . .
end
format %tddd-Mon-YY date
Comment