HELP: Weighted Average Share Price

HELP: Weighted Average Share Price

am 02.04.2008 16:03:01 von edmund_xue

Hello There,

I was just working on a project of creating a database for a relative that
have alots of clients. His company managed the shares portfolio of clients
and he requires the buy price of each stock in a particular client accounts
to be weighted averaged every time there is a purchase in stock, but use the
previous weighted average for a sold in stock.

say:

For Stock XYZ's, in A Portfolio
1. Buy 1000 shares of XYZ @ $2
2. Buy 1000 shares of XYZ @ $2.50
3. Sell 500 shares of XYZ @ $2
4. Buy 1000 shares of XYZ @ $1

Weighted Average Price:
1. 1000 shares $2
2. 2000 shares $2.25
3. 1500 shares $2.25
4. 2500 shares $1.75

I look forward for your help. thank you very much in advanced

Sincerely


Edmund

Below are the dummies that i have created:
http://downtown.vc/7DVFQULBUV39/Shares-Example.mdb.html

Re: HELP: Weighted Average Share Price

am 03.04.2008 21:51:03 von CDMAPoster

On Apr 2, 10:03=A0am, "edmund_xue" wrote:
> Hello There,
>
> I was just working on a project of creating a database for a relative that=

> have alots of clients. His company managed the shares portfolio of clients=

> and he requires the buy price of each stock in a particular client account=
s
> to be weighted averaged every time there is a purchase in stock, but use t=
he
> previous weighted average for a sold in stock.
>
> say:
>
> For Stock XYZ's, in A Portfolio
> 1. Buy 1000 shares of XYZ @ $2
> 2. Buy 1000 shares of XYZ @ $2.50
> 3. Sell 500 shares of XYZ @ $2
> 4. Buy 1000 shares of XYZ @ $1
>
> Weighted Average Price:
> 1. 1000 shares $2
> 2. 2000 shares $2.25
> 3. 1500 shares $2.25
> 4. 2500 shares $1.75
>
> I look forward for your help. thank you very much in advanced
>
> Sincerely
>
> Edmund
>
> Below are the dummies that i have created:http://downtown.vc/7DVFQULBUV39/=
Shares-Example.mdb.html

Since it's inconvenient for me, and perhaps others, to check out your
link, let me ask:

Do you have a field that records the date and time of the Buys and
Sells? I ask that because the calculation you are requesting relies
on "previous" records/rows so some criterion must be used to determine
the order of the records/rows. Also, is there a separate table
listing each stock once with a primary key that is used as a foreign
key in your table of Buys and Sells? Your Weighted AVerage Price does
not look like a difficult calculation, but seeing a little more
information about tblTrades would help someone responding to zero in
on something helpful faster.

James A. Fortune
CDMAPoster@FortuneJames.com