I am working with a big dataset and as it stands, due to my recent introduction to sas as a language, I've been working by row as I'm unsure how to work across rows. I have seen a lot of people advising me to work by group, I hope that someone could give me some guidance on how I would do this with an example - That way I can mould and apply the result to all my work in this project: Supplement: The big data set looks like: Segment 2017 Payment 1 Payment 2 Payment 3
1 90 30 30 30
2 60 20 30 10
3 15 5 5 5
4 etc.
5
6
7
8 The segments may be the same but then are sorted by asset class, fixed or floating and then performing or non-performing The below table is contructed by Segment 1 Initial Volume (2017) = 90
Payment1 (2018) = 30
Payment2 (2019) = 30
Payment3 (2020) = 30
My table looks as follows:
*********************Table 1 ***************************
Payments are made on a (0.33,0.33,0.33) basis
17/17 is the initial amount outstanding.
***********************************************************
Year 17 18 19 20
Vintage
17 90 30 30 30
18 0 0 10 10
19 0 0 0 13.3
20 0 0 0 0
**************************Assumption*******************
When the above instrument matures, it must be replaced so new issuance is equal to (Vintage/Year) (essentially summing down the rows into the diagonals)
18/18 19/19 20/20
30 , 40 53.3
**************************Table 2************************
Total volume is equal to the maturing + new Issuance
************************************************************
Year 17 18 19 20
Vintage
17 90 60 30 0
18 0 30 20 10
19 0 0 40 26.67
20 0 0 0 53.33
My issue is that the next row depends on the previous row, how do I work with big data in order to create these tables without binning the segments into individual asset classes and then by row creating the vintages 17--20
in this sense by group functions probably cannot complete this work?
I'm looking into arrays to do this as this would make sense but people keep telling me by group work is the best way computationally.
... View more