How To: Add calculated variable that requires grouping information

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

gvsbdisco
Posts: 1
Joined: Tue Sep 13, 2016 2:49 pm

How To: Add calculated variable that requires grouping information

Postby gvsbdisco » Tue Sep 13, 2016 3:09 pm

Hi
I am working on a research project that uses stock info and has millions of cases. Each case represents trade information for a single firm for a single day and the dataset includes thousands of firms. I need to create a variable that shows changes in trading volume from the previous day to the current day. the dataset has date information as an existing variable.

Conceptually I know I need to group by firm name in doing the calculation of the volume differential.

So

For each Firm
<tab>For each Day at Time T
<tab><tab>Calculate Volume(T) - Volume (T-1)

I am afraid my experience in SPSS is fairly low and I don't know how to execute the grouping (looping).

Any help would be appreciated.

thanks so much.

Who is online

Users browsing this forum: No registered users and 1 guest

cron