BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have data for different traders (i.e) their ID's and whether the trade is buyer initiated or seller initiated.
I need to find the total number of trade packages which comprise of the set of trades which have been executed buy the same trader continuously in the same direction (i.e either selling or buying) without a gap of a single trading day. If any of these conditions is not satisfied, the package is completed till the previous record. could someone please assist me with the code?

the definition of a trade package is as follows:
Sequences of individual trades for each contract are classified as
packages if they are executed (i) from the same account, (ii) in the same
direction (e.g., buy trades), and (iii) successively without 1-day trading
break. an institution’s order execution is complete when it (i) begins
trading in the opposite direction, or (ii) stays out of the market in that
contract for more than one trading day.

I need do to calculate the number of such trade packages and the mean, median and std deviation of the volume of trades. Please help me asap. its very urgent.
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
Hi:
Urgent questions should be directed to SAS Technical Support.
cynthia
deleted_user
Not applicable
I have already submited this querry to the technical support, but I'm having a problem in accessing the track. "No Technical Support Tracking Entries found " message is displayed everytime I am trying to check the status, though I am getting a mail saying that my querry has been answered, with the track number.
Cynthia_sas
Diamond | Level 26
Hi:
Well, googling around, it seems that this is a topic in at least one university course.

You might check out these NYU links and course notes.
http://pages.stern.nyu.edu/~jhasbrou/EMM%20Book/SAS%20Programs%20and%20Data/Description.html

http://pages.stern.nyu.edu/~jhasbrou/EMM%20Book/EMM%20Roll%20Gibbs%20v0100.pdf
They mention a "Gibbs simulation of trade direction variables" and lecture notes seem to be posted on the web along with some programs that are referenced in the notes. Of course, I don't know whether the trade direction analysis covered in this course is relevant to your question, but it might contain some useful information and techniques.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Discussion stats
  • 3 replies
  • 1106 views
  • 0 likes
  • 2 in conversation