HELP: Weighted Average Share Price

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 [at] $2
2. Buy 1000 shares of XYZ [at] $2.50
3. Sell 500 shares of XYZ [at] $2
4. Buy 1000 shares of XYZ [at] $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
edmund_xue [ Mi, 02 April 2008 16:03 ] [ ID #1933850 ]

Re: HELP: Weighted Average Share Price

On Apr 2, 10:03=A0am, "edmund_xue" <u42628 [at] uwe> 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 [at] $2
> 2. Buy 1000 shares of XYZ [at] $2.50
> 3. Sell 500 shares of XYZ [at] $2
> 4. Buy 1000 shares of XYZ [at] $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 [at] FortuneJames.com
CDMAPoster [ Do, 03 April 2008 21:51 ] [ ID #1934795 ]
Datenbanken » comp.databases.ms-access » HELP: Weighted Average Share Price

Vorheriges Thema: Tick box
Nächstes Thema: Help with Sum/Counting a column in a Query