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
SAS Super FREQ
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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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