Skip to content

Instantly share code, notes, and snippets.

@joosti
Last active August 29, 2015 14:13
Show Gist options
  • Save joosti/00a9de7b01d12b831c63 to your computer and use it in GitHub Desktop.
Save joosti/00a9de7b01d12b831c63 to your computer and use it in GitHub Desktop.
SAS assignment week 2 - most recent year
data returns;
input @01 id
@03 date MMDDYY10.
@14 return;
format date date9.;
datalines;
1 10/31/2013 0.01
1 11/30/2013 0.02
1 12/31/2013 0.03
1 01/31/2014 -0.01
1 02/28/2014 0.01
2 10/31/2013 -0.01
2 11/30/2013 0.02
2 12/31/2013 0.01
2 01/31/2014 -0.02
2 02/28/2014 -0.03
2 03/31/2014 0.02
run;
data yearly;
input @01 id
@03 date MMDDYY10.
@14 equity;
format date date9.;
datalines;
1 12/31/2011 8
1 12/31/2012 10
1 12/31/2013 11
2 12/31/2012 30
2 12/31/2013 28
run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment