Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FIFO Accounting in SAS

Status
Not open for further replies.

deronwilliams

Technical User
Aug 22, 2008
1
US
Hello:

I would like to do FIFO (first-in-first-out) accounting in SAS. Since I have at most 4 sells and 4 buys, I can go through a decision tree for each transaction, but does anyone have any idea how to code a generic version?

FIFO Example:
 
why not use the datetime stamp and then use the PROC sort with either ascending or descending options. So in order to get a complete set of 'BUY' orders in FIFO order. You would sort by stock (equity) name and descending date. I would then assign a sequence number to the record for later use.

Of course you would have to work out the specifics like you only need the transactions that occured today. Or, you only want trans that are still not settled etc..

Does this help you?
Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top