Tagged with use cases

Use Me, Abuse Me.

Alright, so we have basic building blocks down.  I feel like I put the cart before the horse; I really should have sketched out these use cases before the building blocks, but c’est la vie.  Here is what, for v1, I would like the tool to do.

Use Case Description
Create Book Creates a new book.  A book requires a name and a currency.
Add trade Adds a trade to a position.  Every trade has a unique ID.
Add dividend Adds a dividend payout to a position. Every dividend has a unique ID.
List trades in position Lists all trades for a position
List trades in portfolio Lists all trades for a portfolio; this is the aggregate of all trades for all positions in the portfolio
Get YTD return for position  
Get YTD return for portfolio  
Get YTD return for book  
Get since inception return for position  
Get since inception return for portfolio  
Get since inception return for book  
Save book Saves a book and all information in the book: book metadata, portfolios, trades
Load book Loads a book and all information in the book: book metadata, portfolios, trades
Create portfolio Creates a new portfolio as part of a book.  A portfolio must have the same currency as the book that holds it.
Load equities Loads all of the known equities
Add position to portfolio Adds a position to a portfolio.  A position must be from a known entity.

For a first cut, I think this will do. I am trying to avoid from getting myself tangled up in the nitty-gritty of the CRUD for all of the use cases. For now, I’ll be using CSV (or XML?) files for a lot of the config stuff (e.g. the equities).

I’m getting a little excited about this now! With the basic use cases down, I have something to work towards. Next step will be to build out the basic command shell. I’ll be using a command pattern with the CLI to make things easier. This will also allow me to properly abstract the actual functionality from the UI. Provided my command objects all have proper output functions (i.e. toString() or similar), migrating to a UI at a later point will be much easier.

Tagged