Calculation of Share Gains/Losses
$100-500 USD
Paid on delivery
I have a database of stock transactions covering a 60 day period.
The file contains:
account
type of stock (common vs. preferred)
number of shares bot/sold (+/-)
trade date
share price
Allocating shares on a first in/first out basis. For each purchase, I need to calculate:
how many shares were sold on Days 1-15 and at what aggregate value (so # of shares and and total amount received)
how many were sold on Day 16 and at what aggregate value
how many were sold on Day 17 and at what aggregate value
how many were sold on Day 18-60 and at what aggregate value
how many shares were held by the account at the end of the period.
There are multiple accounts in the file - and the calculations need to be done separately for each class of stock.
Should be noted that there isn't always a 1:1 matchup between trades. Purchases can be allocated amoong several sales - and sales can be allocated among several purchases.
This needs to be done in T-SQL to run on a MS SQL Server 2000 installation.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done (SQL Commands/Scripts - including sample tabales).<BR>
2) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Sql Server 2000
Project ID: #3327632