dbTalk Databases Forums  

Investment Portfolio design question

comp.databases comp.databases


Discuss Investment Portfolio design question in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bullshark
 
Posts: n/a

Default Investment Portfolio design question - 01-08-2007 , 10:12 AM






At first blush this seems to be a straightforward inventory table. On
closer examination though, it appears that portfolio holdings (past and
present) are actually a residual of transaction analysis of the
investment account journal. An investor is not just interested in open
positions, but closed positions as well. I'm not interested in current
prices or historical analysis or comprehensive stock tables (the sorts
of things that are discussed to death).

Assume a journal has the following columns:

ID Date Type Symbol Description Quantity Price Amount

Type is in a separate table (Buy,Sell,Deposit,Withdraw,Dividend,Split,
Interest)
Symbol is in a table of company names

The idea then is to generate open positions (or closed, or whatever)
from the transaction journal.

This solution must have been reinvented about a million times by now,
but I can't seem to find much information on it. Surprisingly, I see
recent calls for papers on the topic, so maybe nobody has a good
solution yet...

Is this approach completely wrong headed? Should I instead be focusing
on the inventory approach? I have this prototyped and working in the
small, but being a noob I don't want to get too invested in a schema
that won't scale, or violates some DB design principle that will
eventually result in my regret ;-)

Thanks in advance for your thoughts,

bullshark


Reply With Quote
  #2  
Old   
David Segall
 
Posts: n/a

Default Re: Investment Portfolio design question - 01-10-2007 , 12:54 AM






"bullshark" <bullshark (AT) gmail (DOT) com> wrote:

Quote:
At first blush this seems to be a straightforward inventory table. On
closer examination though, it appears that portfolio holdings (past and
present) are actually a residual of transaction analysis of the
investment account journal. An investor is not just interested in open
positions, but closed positions as well. I'm not interested in current
prices or historical analysis or comprehensive stock tables (the sorts
of things that are discussed to death).

Assume a journal has the following columns:

ID Date Type Symbol Description Quantity Price Amount

Type is in a separate table (Buy,Sell,Deposit,Withdraw,Dividend,Split,
Interest)
Symbol is in a table of company names

The idea then is to generate open positions (or closed, or whatever)
from the transaction journal.

This solution must have been reinvented about a million times by now,
but I can't seem to find much information on it. Surprisingly, I see
recent calls for papers on the topic, so maybe nobody has a good
solution yet...

Is this approach completely wrong headed? Should I instead be focusing
on the inventory approach? I have this prototyped and working in the
small, but being a noob I don't want to get too invested in a schema
that won't scale, or violates some DB design principle that will
eventually result in my regret ;-)

Thanks in advance for your thoughts,

bullshark
I think that keeping the data at the transaction level is probably
ideal for this application provided we are not talking about a
portfolio the size of a retail investment fund.

I don't know about elsewhere but, in Australia, your transaction lacks
some vital information. Here, if you buy a stock at two or more
different prices, you can choose which shares you are selling for the
purpose of calculating the capital gains tax. A sale needs to refer to
a particular, or even several, buy transactions.


Reply With Quote
  #3  
Old   
bullshark
 
Posts: n/a

Default Re: Investment Portfolio design question - 01-11-2007 , 12:09 PM



David Segall wrote:
Quote:
"bullshark" <bullshark (AT) gmail (DOT) com> wrote:
ID Date Type Symbol Description Quantity Price Amount


I don't know about elsewhere but, in Australia, your transaction lacks
some vital information.
Yes, I left a field or two off the description for brevity sake (so I
wouldn't have to explain them).

I have "SellID" in the journal which can be linked to specific buys in
a number of ways. The most straightforward (obvious) is to enter the ID
of the matching buy, decomposing the the Sell into multiple
transactions when it applies to multiple Buys. A structured comment
provides a basis for re-consituting the sale transaction.

bullshark



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.