BookmarkSubscribeRSS Feed
ahmadauh
Calcite | Level 5

Hello All,

I am working with a huge financial dataset (TAQ with 5 minutes intervals) and wanted to perform the following two steps but having hard time trying to:

1- My earlier program extracted transaction data for each stock then aggregated over five minutes interval, where each 5 minute interval is referenced by a number: 12:00-12:05 = 1 , 12:05-12:10 = 2 ..... etc. Now, if a 5-minute period doesn't have transactions it is skipped. I need to replace missing obs and put zeros, and that is to be performed during a certain period (period 115-170). Note that I have many stocks and dates. I tried the usual PROC EXPAND , method=none but I think the key thing is that my reference number that indicates the 5-minute periods is not datetime variable. Any suggestion?

2- I need to calculate cumulative return for 5 days for all stocks each stock has a column that describes the day by a number from 1-5 on a rolling basis.

Thanks

1 REPLY 1
snoopy369
Barite | Level 11

For 1, just pretend your variable is a date variable.  Dates are integer numbers of days, anyway, so SAS won't know you don't have a date.  Or convert the periods to actual time variables - that wouldn't be terribly difficult, anyway.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 646 views
  • 0 likes
  • 2 in conversation