||BeanCounter portfolio performance toolkit|
beancounter addportfolio IBM:100:USD:joe:401k:90.25:20000320 \ SPY:50:USD:joe:ira:142.25:20000620This adds IBM to the 401k portfolio of Joe, as well as SP500 'Spiders' to his IRA portfolio. The stocks are also added to the general stock info tables.
beancounter addstock LNUX RHAT COR.TOThis adds these three Linux companies to the database without adding them to any specific portfolios.
beancounter backpopulate --prevdate '1 year ago' \ --date 'friday 1 week ago' IBM SUNW HWPThis backpopulates the database with historic prices for three hardware companies. Note how the date specification is very general.
beancounter plreport --prevdate '1 month ago' --date 'today' \ --restriction "owner='joe'"This calculates portfolio profits or losses over the last year. It also imposes the database restriction that only stocks owned by 'joe' are to be included.
beancounter status --restriction "type='401k'"This shows a portfolio status report with the restriction that only stocks from the '401k' account are to be included.
beancounter riskThis runs a Value-at-Risk (VaR) report with parametric VaR (the standard Delta method), non-parametric VaR (the return quintile) as well as marginal VaR based on returns of the (default time frame of the) last six months. Other time periods can be specified via the --date and --prevdate option arguments.
Also see the howto page with a
full example of