{ "info": { "author": "Ghislain Bourgeois", "author_email": "ghislain.bourgeois@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: End Users/Desktop", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Office/Business :: Financial", "Topic :: Office/Business :: Financial :: Accounting", "Topic :: Office/Business :: Financial :: Investment" ], "description": "beancount_portfolio_allocation\n==============================\n\nReports on portfolio asset allocations in beancount. Useful for risk analysis\nand for rebalancing purposes.\n\n[![Build Status](https://travis-ci.org/ghislainbourgeois/beancount_portfolio_allocation.svg?branch=master)](http://travis-ci.org/ghislainbourgeois/beancount_portfolio_allocation)\n[![Coverage Status](https://coveralls.io/repos/github/ghislainbourgeois/beancount_portfolio_allocation/badge.svg?branch=master)](https://coveralls.io/github/ghislainbourgeois/beancount_portfolio_allocation?branch=master)\n\nInstallation\n------------\n\n### From source\n\n```bash\n$ python3 setup.py install\n```\n\n### PIP\n\n```bash\n$ pip install beancount_portfolio_allocation\n```\n\nUsage\n-----\n\n```text\nusage: Report on portfolio asset classes allocation vs targets.\n [-h] --portfolio PORTFOLIO bean\n\npositional arguments:\n bean Path to the beancount file.\n\noptional arguments:\n -h, --help show this help message and exit\n --portfolio PORTFOLIO\n Name of portfolio to report on\n```\n\n### Example\n\n```bash\n$ bean-portfolio-allocation-report ledger.beancount --portfolio pension\nCASH\n====\nSubclass Market Value Percentage Target % Difference\n---------- -------------- ------------ ---------- ------------\ncash 380.00 19.00 0.00 -380.00\n\n\nEQUITY\n======\nSubclass Market Value Percentage Target % Difference\n---------- -------------- ------------ ---------- ------------\nca-stock 700.00 35.00 30.00 -100.00\nus-stock 600.00 30.00 30.00 0.00\n\n\nFIXED\n=====\nSubclass Market Value Percentage Target % Difference\n---------- -------------- ------------ ---------- ------------\nca-bond 320.00 16.00 40.00 480.00\n```\n\n\nPrerequisites\n-------------\n\nBefore running this tool, your beancount files will need some additional\nmetadata to help it do its job.\n\n### Commodities\n\nAll the commodities/currency you want to track will need to have the\n`asset-class` and `asset-subclass` metadata strings filled in. The actual\nvalues are up to you. Here are some examples:\n\n```beancount\n1867-01-01 commodity CAD\n asset-class: \"cash\"\n asset-subclass: \"cash\"\n\n1986-03-13 commodity MSFT\n asset-class: \"equity\"\n asset-subclass: \"us-stock\"\n\n1977-01-03 commodity AAPL\n asset-class: \"equity\"\n asset-subclass: \"us-stock\"\n\n2007-04-04 commodity VAB\n asset-class: \"fixed-income\"\n asset-subclass: \"ca-bond\"\n```\n\nYou will also need valid price directives for all commodities held at cost and\nat least one 'operating_currency' option defined. The values in the report will\nall be converted to the first 'operating_currency' defined. A future version\nwill offer a way to specify the currency to use for reporting.\n\n### Accounts\n\nAccounts need to be part of a specific portfolio to track. Only one portfolio\nis supported by account, but you can have multiple portfolios over multiple\naccounts:\n\n```beancount\n2000-01-01 open Assets:CA:Employer:PensionPlan\n portfolio: \"pension\"\n\n2000-01-01 open Assets:CA:Questrade:RRSP\n portfolio: \"pension\"\n\n2000-01-01 open Assets:CA:Questrade:Trading\n portfolio: \"day-trading\"\n```\n\n#### Cash Based Accounts\n\nIt is possible to specify `asset-class` and `asset-subclasse` or accounts that\nare reported as a cash-value, but are backed by specific asset classes.\n\nThis is use in particular for managed retirement accounts.\n\n```beancount\n2000-01-01 open Assets:CA:Employer:PensionPlan\n portfolio: \"pension\"\n asset-class: \"fixed-income\"\n asset-subclass: \"ca-bond\"\n```\n\n### Target allocations\n\nYou can currently define your target allocation percentages for different asset\nsubclasses in a portfolio using custom directives. There can currently be only\none directive for the same portfolio and asset subclass. Missing allocation\ntargets will be assumed to be 0%. An example 60/40 portfolio target might look\nlike this (*NOT* a financial advice):\n\n```beancount\n2018-06-14 custom \"allocation\" \"pension\" \"ca-stock\" 30\n2018-06-14 custom \"allocation\" \"pension\" \"us-stock\" 30\n2018-06-14 custom \"allocation\" \"pension\" \"ca-bond\" 40\n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ghislainbourgeois/beancount_portfolio_allocation/", "keywords": "beancount report portfolio allocation", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "beancount-portfolio-allocation", "package_url": "https://pypi.org/project/beancount-portfolio-allocation/", "platform": "", "project_url": "https://pypi.org/project/beancount-portfolio-allocation/", "project_urls": { "Homepage": "https://github.com/ghislainbourgeois/beancount_portfolio_allocation/" }, "release_url": "https://pypi.org/project/beancount-portfolio-allocation/0.3.0/", "requires_dist": [ "beancount (>=2.1.2)", "tabulate" ], "requires_python": "", "summary": "Beancount portfolio allocation report", "version": "0.3.0" }, "last_serial": 4314778, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f0908d3ba7ad97deca302894ccf8c08e", "sha256": "5327ceba6b7306feebbfd38e0961533b025ae2dce814b4253276b1884d920ba5" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f0908d3ba7ad97deca302894ccf8c08e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5749, "upload_time": "2018-06-17T03:03:01", "url": "https://files.pythonhosted.org/packages/cb/b2/d967ae5f4a1340fefed4d4029a71c435c4e168004d89d07aa61709612710/beancount_portfolio_allocation-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39097e5b6053a70cef8b0d079b7baaae", "sha256": "7eaf3e74a27efe9102e0b78fd2a1063da848683be88fa3dcb8703a488d70f09e" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.1.0.tar.gz", "has_sig": false, "md5_digest": "39097e5b6053a70cef8b0d079b7baaae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4425, "upload_time": "2018-06-17T03:03:02", "url": "https://files.pythonhosted.org/packages/51/ab/6009bcf2cab31277d0817c41f424debf33b264d302e5d9a2c5554905a188/beancount_portfolio_allocation-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8984b1e28d20237ae296b25234b2a033", "sha256": "ed2116786533e681e78855a81a086822bfd599cd0feab5acb67e06fce9384616" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8984b1e28d20237ae296b25234b2a033", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8765, "upload_time": "2018-06-18T18:52:52", "url": "https://files.pythonhosted.org/packages/05/1a/45facdf86092a47f5021cbfafef84eac6e679ac1d43c9260f822665983a3/beancount_portfolio_allocation-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a46b51abc0a3706552bc09898f5a7e62", "sha256": "e3cfcf5bdaa802ad8febb0b5d96da999d37476394199c482f2b744b5375c84de" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a46b51abc0a3706552bc09898f5a7e62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5593, "upload_time": "2018-06-18T18:52:54", "url": "https://files.pythonhosted.org/packages/a4/e8/67ca39f0273844b8194eccca967eca1d6694f8da6aebabc409a70c123cec/beancount_portfolio_allocation-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7a01ef69ce1f819ae37e298e7122510d", "sha256": "7172578db928fb4c35ce721fd53e4ad9273a9ed39d2df6fa7a207f2767874369" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7a01ef69ce1f819ae37e298e7122510d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10222, "upload_time": "2018-06-19T02:39:41", "url": "https://files.pythonhosted.org/packages/7b/6a/ed7475882ba573d18ecc358cbacb48fd0af455d458ba54b27e328b305cb3/beancount_portfolio_allocation-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02f76ab48ec163c128cdeb9573998b69", "sha256": "3a1feb31d5cc97e787582865ef73456754b3cbfd57b07937a8e3866382ba3a50" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.2.1.tar.gz", "has_sig": false, "md5_digest": "02f76ab48ec163c128cdeb9573998b69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5986, "upload_time": "2018-06-19T02:39:44", "url": "https://files.pythonhosted.org/packages/b1/19/4978cc19ded7c56c95b79f1a7a22d606a7c8006d25af0f7dd78215aa68fb/beancount_portfolio_allocation-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "095f7453f237081295d758d497d0a2ec", "sha256": "c66d8c3eb893ee43048e3ba1fa1b35cdb8a96130bf1e4024fc15ed1f17edbdf6" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "095f7453f237081295d758d497d0a2ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9570, "upload_time": "2018-09-27T02:53:23", "url": "https://files.pythonhosted.org/packages/1d/04/60f93ac9ea61a286421c3e81336e1c6f4720766cdaad84e7a0f4b86138a8/beancount_portfolio_allocation-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1ea0f81c1cd494508b85a322b1d3779", "sha256": "9336d8ff7e4407bb11b35d4539f214d27efa5620eb56e04102ba3e77ea979654" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d1ea0f81c1cd494508b85a322b1d3779", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6531, "upload_time": "2018-09-27T02:53:25", "url": "https://files.pythonhosted.org/packages/a6/55/3ce2a842480f554d41b1ca38a37d1d8df65d7a4e95e53ffdd41acda8d484/beancount_portfolio_allocation-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "095f7453f237081295d758d497d0a2ec", "sha256": "c66d8c3eb893ee43048e3ba1fa1b35cdb8a96130bf1e4024fc15ed1f17edbdf6" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "095f7453f237081295d758d497d0a2ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9570, "upload_time": "2018-09-27T02:53:23", "url": "https://files.pythonhosted.org/packages/1d/04/60f93ac9ea61a286421c3e81336e1c6f4720766cdaad84e7a0f4b86138a8/beancount_portfolio_allocation-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1ea0f81c1cd494508b85a322b1d3779", "sha256": "9336d8ff7e4407bb11b35d4539f214d27efa5620eb56e04102ba3e77ea979654" }, "downloads": -1, "filename": "beancount_portfolio_allocation-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d1ea0f81c1cd494508b85a322b1d3779", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6531, "upload_time": "2018-09-27T02:53:25", "url": "https://files.pythonhosted.org/packages/a6/55/3ce2a842480f554d41b1ca38a37d1d8df65d7a4e95e53ffdd41acda8d484/beancount_portfolio_allocation-0.3.0.tar.gz" } ] }