{"id":16572226,"url":"https://github.com/eddelbuettel/beancounter","last_synced_at":"2025-10-29T01:31:57.318Z","repository":{"id":142504999,"uuid":"45984113","full_name":"eddelbuettel/beancounter","owner":"eddelbuettel","description":"Stock Portfolio Performance Tool","archived":false,"fork":false,"pushed_at":"2024-01-24T13:02:35.000Z","size":204,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-01T21:05:27.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddelbuettel.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-11T13:43:11.000Z","updated_at":"2024-01-23T22:00:20.000Z","dependencies_parsed_at":"2024-01-23T23:21:51.991Z","dependency_job_id":"7f4cb824-a53b-4ba6-9eec-3599e2b7cd27","html_url":"https://github.com/eddelbuettel/beancounter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Fbeancounter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Fbeancounter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Fbeancounter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Fbeancounter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddelbuettel","download_url":"https://codeload.github.com/eddelbuettel/beancounter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238758172,"owners_count":19525721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T21:26:50.078Z","updated_at":"2025-10-29T01:31:52.009Z","avatar_url":"https://github.com/eddelbuettel.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\tBeanCounter -- A stock portfolio performance monitoring tool\n\n\n1. Introduction\n\n   Ever wondered what happened to your portfolio on a day the market moved\n   500 points?  Ever wondered what your portfolio returned over the last\n   (odd) period?  Ever wondered if there was a simple cron job to report\n   portfolio changes on a daily basis?  Ever wondered if you could database\n   the (public) price, volume, ... info on dozens of stocks for further \n   analysis?\n\n   BeanCounter does all this, and provides a convenient command-line tool as\n   well as a Perl library that can be used by other applications.\n\n   Beancounter support stocks from exchanges in the US, Canada, Britain,\n   France, Germany, Italy, Singapore, Taiwan, Thailand, HongKong... as well\n   as Australia and New Zealand. Tested patches for other markets are always\n   welcome. US mutual funds are supported, as are foreign exchange rates and\n   some precious metals.\n\n   This is still somewhat beta in the sense that the command-line options and\n   function interfaces might change. The (initial) release number is kept low\n   intenionally. However, similar code has been working here since the fall\n   of 1998. \n\n\n2. How to get started\n\n   You need Perl and PostgreSQL, or MySQL (as of version 0.4.0). Plus a host\n   of Perl modules such as DBI (Database independent interface) with either\n   the DBD ODBC or the DBD Postgres driver (i.e. DBD-Pg) or the DBD Mysql \n   driver, LWP networking as well as Date::Manip and Statistics::Descriptive.\n   All of this is readily available for Debian; or else in source code at\n   www.postgresql.org and www.cpan.org. \n\n   Upon opening the .tar.gz archive, run \n\n\t$ perl Makefile.PL\n\t$ make install\n\n   and everything should be fine. Run\n\n   \t$ beancounter --help\n\n   for a quick check.\n\n   Run 'setup_beancounter' to create the new database and tables, and to have\n   them filled with example data. This even runs a first portfolio report on\n   the (example) portfolio. The 'setup_beancounter' script has a few sanity\n   checks to ensure that Postgres (or MySQL) is running, that the current\n   user is a valid database user, that it is not called by root, and that the\n   database hasn't already been created. \n\n\n3. How to use it\n\n   Beancounter's --help options shows the main functionality. This currently\n   comprised the following operations:\n\n   o \"addindex index sym1 sym2 ...\" fills the indices table with info on \n     stocks comprising a market index.\n   \n   o \"addportfolio sym1:nb1:fx sym2:nb:fx ...\" fills the portfolio table with\n     the specified quantities (eg 'nb1' or 'nb2' in the example above) of the\n     specified stocks. Additional attributes of the holding can be specified\n     as well. These are 'type' in which one could store the tax\n     classification of a retirement account, eg 'rrsp' in Canada or '401k' in\n     the USA, 'holder' which can carry the name of the account holder so that\n     one could e.g. differentiate between spousal accounts, 'cost' which \n     stores the purchase price and 'purchasedate' for the time of the purchase.\n   \n   o \"addstock sym1 sym2 ...\" to  add one (or several) stock(s) to the\n     database by filling both the 'stockinfo' table with general company and \n     stock info, as well as the `stockprices' table with the most recent\n     price data. Its purpose is to initialise the database for new stocks.\n\n   o \"backpopulate sym1 sym2 ...\" backpopulates the database for one (or \n     several) stock(s). It can be used to extend the database with historic \n     prices. Limiting dates can be supplied via the --fromdate and --todate\n     arguments. \n\n   o \"dailyjob\" which combines 'update' and 'dayendreport'\n\n   o \"dayendreport\" runs a report summarising day-over-day changes\n\n   o \"destroydb\" removes the database entirely with not further warning.\n\n   o \"plreport\" runs an end-of-day profit/loss report on the portfolio.\n      It can be run automatically by cron(8) via an entry in crontab(5) \n      such as \n\t 15 17 * * 1-5\t  beancounter update \u0026\u0026 beancounter plreport\n     It can be run from cron(8) just after 'daily_update.pl'.\n\n   o \"risk\" runs an risk analysis with parametric Value-at-Risk (VaR) \n     calculated via the standard Delta method (a.k.a. RiskMetric (TM)),\n     a non-parametric VaR (using the 1% quantile) as well as marginal VaR\n     analysis.\n\n   o \"quote sym1 sym2 ...\" retrieves price info from the Web and displays\n     it without touching the database. This is useful for verifying a stock\n     symbol as well the network status.\n\n   o \"status\" computes a holdings value and (annualized) return summary \n     which also shows how long a stock has been held.\n \n   o \"update\" updates the database with day-end information. It can be run\n     automatically by cron(8) via an entry in crontab(5) such as \n\t\t 15 17 * * 1-5\t  beancounter update \n     (but also see about combining this with a call to beacounter plreport')\n\n   o \"warranty\" shows a brief statement about the GNU General Public License\n\n   The shell script 'setup_beancounter' initialises the database, creates the\n   tables and fills them with initial data.\n\n   The shell script 'update_beancounter' changes, if necessary, the database\n   table to bring an older (0.1.*) installation up to speed.\n\n\n5. To Do\n\n   More error checking. More performance analytics. More markets. More\n   documentation. Maybe a GUI.\n\n   See the TODO file.\n\n\n6. Disclaimer (taken straight from the GPL)\n\n\t\t\t\t NO WARRANTY\n\n     11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n   FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\n   OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n   PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n   OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\n   TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\n   PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n   REPAIR OR CORRECTION.\n\n     12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n   WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n   REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n   INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n   OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n   TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n   YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n   PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n   POSSIBILITY OF SUCH DAMAGES.\n\n\n   In short: if it breaks, you can keep the pieces.  This is Free Software,\n   use it as you see fit, but don't come running or screaming if it doesn't\n   work as intended. \n\n\n\nDirk Eddelbuettel \u003cedd@debian.org\u003e\n\n$Id: README,v 1.6 2001/10/12 01:47:53 edd Exp edd $\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Fbeancounter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddelbuettel%2Fbeancounter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Fbeancounter/lists"}