{ "info": { "author": "Justin Spahr-Summers", "author_email": "justin@jspahrsummers.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Framework :: Jupyter", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Office/Business :: Financial :: Investment", "Typing :: Typed" ], "description": "# bankroll [![PyPI version](https://badge.fury.io/py/bankroll.svg)](https://badge.fury.io/py/bankroll) [![CircleCI](https://circleci.com/gh/bankroll-py/bankroll.svg?style=svg&circle-token=c2eceb857210b420215d7fdba4aa480e72c57fc3)](https://circleci.com/gh/bankroll-py/bankroll)\n\nCommand line interface and notebook utilities to **ingest portfolio and other data from multiple brokerages, and analyze it**.\n\nThis is the frontend to the [bankroll](https://github.com/bankroll-py) project, which is comprised of several libraries that can also be used on their own.\n\n**Table of contents:**\n\n1. [Installation](#installation)\n1. [Connecting to brokers](#connecting-to-brokers)\n 1. [Interactive Brokers](#interactive-brokers)\n 1. [Charles Schwab](#charles-schwab)\n 1. [Fidelity](#fidelity)\n 1. [Vanguard](#vanguard)\n 1. [(your broker here)](#your-broker-here)\n1. [Saving configuration](#saving-configuration)\n1. [Extending `bankroll`](#extending-bankroll)\n\n# Installation\n\nTo install the `bankroll` command line utility, select from [the list of available brokerage plugins](https://github.com/bankroll-py?q=bankroll-broker-), and run `pip install` with those brokerages listed as [extras](https://packaging.python.org/tutorials/installing-packages/#installing-setuptools-extras).\n\nFor example, to install `bankroll` with support for [Interactive Brokers](#interactive-brokers) and [Charles Schwab](#charles-schwab):\n\n```\npip3 install bankroll[ibkr,schwab]\n```\n\nOr from the repository root, if you have cloned the code:\n\n```\npip3 install .[ibkr,schwab,fidelity]\n```\n\nOnce installed (and presuming your Python path is set up correctly), the command line tool can be invoked directly:\n\n```\nbankroll --help\n```\n\n# Connecting to brokers\n\nAfter being set up, `bankroll` can be used from the command line to bring together data from multiple brokerages.\n\nFor example, to show all positions held in both Interactive Brokers and Charles Schwab:\n\n```\nbankroll \\\n --ibkr-tws-port 7496 \\\n --schwab-positions ~/Positions-2019-01-01.CSV \\\n --schwab-transactions ~/Transactions_20190101.CSV \\\n positions\n```\n\nRun with `--help` to see all options:\n\n```\nbankroll --help\n```\n\n## Interactive Brokers\n\n[Interactive Brokers](http://interactivebrokers.com) (sometimes abbreviated as IB or IBKR) offers a well-supported [API](https://interactivebrokers.github.io/), which\u00e2\u20ac\u201dalong with [ib_insync](https://github.com/erdewit/ib_insync)\u00e2\u20ac\u201dmakes it possible to load up-to-date portfolio data and request real-time information about particular securities.\n\nFor `bankroll`, this functionality is implemented via the [bankroll-broker-ibkr](https://github.com/bankroll-py/bankroll-broker-ibkr) plugin:\n```\npip3 install bankroll[ibkr]\n```\n\nTo load data from Interactive Brokers, [one of IB's trading applications](https://interactivebrokers.github.io/tws-api/initial_setup.html)\u00e2\u20ac\u201dTrader Workstation or IB Gateway\u00e2\u20ac\u201dmust be running and logged-in to accept API connections. You may wish to use [IBC](https://github.com/IbcAlpha/IBC) to automate the startup and login of these applications.\n\nOnce Trader Workstation or IB Gateway is running, and [API connections are enabled](https://interactivebrokers.github.io/tws-api/initial_setup.html#enable_api), provide the local port number to `bankroll` like so:\n\n```\nbankroll \\\n --ibkr-tws-port 7496 \\\n [command]\n```\n\n### Querying trade history\n\nIB's [Trader Workstation API](https://interactivebrokers.github.io/tws-api/) does not support retrieving information about an account's historical trades, so `bankroll` must use their [Flex Web Service](https://www.interactivebrokers.com/en/software/am/am/reports/flex_web_service_version_3.htm).\n\nTo set this up, log in to [Account Management](https://www.interactivebrokers.com/portal), then browse to _Settings_ \u00e2\u2020\u2019 _Account Settings_ in the sidebar:\n\n\"Account\n\nIn the _Reporting_ section of this page, click the gear to configure _Flex Web Service_:\n\n\"Flex\n\n**Once configured, copy the _Current Token_ for use on the command line.**\n\nThen, you must save a query for `bankroll` to use. Back in the sidebar, browse to _Reports_ \u00e2\u2020\u2019 _Flex Queries_:\n\n\"Flex\n\nClick the gear to configure _Custom Flex Queries_:\n\n\"Custom\n\nCreate a new Trade Confirmation Flex Query Template:\n\n\"Trade\n\nPick a name of your choosing, then make sure the _Date Period_ reflects the historical period you care about (e.g., _Last 365 Calendar Days_):\n\n\"Trade\n\nUnder _Sections_, click _Trade Confirmations_ and enable everything in the dialog which appears:\n\n\"Trade\n\"Trade\n\n**After saving your query, expand it in the list to view and copy the _Query ID_ for use on the command line.**\n\nWith the token and the query ID from your account, historical trades can be downloaded:\n\n```\nbankroll \\\n --ibkr-flex-token [token] \\\n --ibkr-trades [query ID] \\\n activity\n```\n\n### Querying dividend history\n\n_This workflow [will be simplified](https://github.com/bankroll-py/bankroll/issues/36) in the future._\n\nTo incorporate the history of dividend payments in your portfolio, follow the same steps for the [Trade Confirmation Flex Query](#querying-trade-history), but create an Activity Flex Query instead.\n\nThe only section which needs to be enabled is _Change in Dividend Accruals_:\n\n\"Activity\n\nPass your existing token, and the new query's ID, on the command line:\n\n```\nbankroll \\\n --ibkr-flex-token [token] \\\n --ibkr-activity [query ID] \\\n activity\n```\n\n## Charles Schwab\n\n[Charles Schwab](https://www.schwab.com) does not offer an API, but it does provide [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) files for export, which `bankroll` can then import.\n\nThis functionality is implemented via the [bankroll-broker-schwab](https://github.com/bankroll-py/bankroll-broker-schwab) plugin:\n```\npip3 install bankroll[schwab]\n```\n\nBrowse to the \"Positions\" and/or \"Transactions\" screen:\n\n\"Positions\n\nClick the \"Export\" link in the top-right:\n\n\"Export\"\n\nThen provide the paths of either or both these downloaded files to `bankroll`:\n\n```\nbankroll \\\n --schwab-positions ~/path/to/Positions.CSV \\\n --schwab-transactions ~/path/to/Transactions.CSV \\\n [command]\n```\n\n## Fidelity\n\n[Fidelity](https://www.fidelity.com) is supported through a similar facility as [Schwab](#charles-schwab).\n\nThis functionality is implemented via the [bankroll-broker-fidelity](https://github.com/bankroll-py/bankroll-broker-fidelity) plugin:\n```\npip3 install bankroll[fidelity]\n```\n\n* To export position data, [download from the Portfolio Positions page](https://www.fidelity.com/webcontent/ap002390-mlo-content/18.09/help/learn_portfolio_positions.shtml#canidownload).\n* To export transactions data, [download from the History page](https://www.fidelity.com/customer-service/faqs-exporting-account-information#).\n\nMore detailed instructions have yet to be written\u00e2\u20ac\u201d[contributions welcome](CONTRIBUTING.md)!\n\n## Vanguard\n\n[Vanguard](https://investor.vanguard.com) is a **work in progress**, and may not be as fully-featured as the other brokerages listed here. Support is being developed in the [bankroll-broker-vanguard](https://github.com/bankroll-py/bankroll-broker-vanguard) plugin:\n\n## (your broker here)\n\n`bankroll` intends to abstract away broker-specific details as much as possible, to minimize the work required to support each one, so if your broker isn't listed above, please consider [building a new brokerage plugin](https://github.com/bankroll-py/bankroll-broker)! We want the list to grow over time, because it's extremely useful to be able to aggregate and analyze data across multiple brokers at once.\n\nTo add a new brokerage, create a new subclass of [`AccountData`](https://github.com/bankroll-py/bankroll-broker/blob/v0.4.0/bankroll/broker/account.py), then implement the methods as required by the interface. As long as the new subclass is loaded at runtime, it will be automatically included in functionality like [data aggregation](https://github.com/bankroll-py/bankroll-broker/blob/v0.4.0/bankroll/broker/aggregator.py).\n\nIf the brokerage offers a facility to load market data, consider extending the [bankroll-marketdata](https://github.com/bankroll-py/bankroll-marketdata) interfaces as well (though this is optional).\n\n# Saving configuration\n\nTo preserve settings across runs, all of the command-line arguments demonstrated above can also be saved into an [INI file](https://docs.python.org/3/library/configparser.html#supported-ini-file-structure). The configuration file is especially useful to store default values, because when a setting is specified in a configuration file _as well as_ on the command line, the command-line argument will take precedence.\n\nTo create a configuration, copy [`bankroll.default.ini`](bankroll/interface/bankroll.default.ini) to `~/.bankroll.ini`, or leave it in your working directory as `bankroll.ini`, then edit the file to apply your desired settings.\n\nIf you would like to store the configuration somewhere else, you can also provide custom paths via the `--config` argument on the command line.\n\n# Extending `bankroll`\n\nAlthough the command-line interface exposes a basic set of functionality, it will never be able to capture the full set of possible use cases. For much greater flexibility, you can write Python code to use `bankroll` directly, and build on top of its APIs for your own purposes.\n\nFor some examples, [see the included notebooks](notebooks/).\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/bankroll-py/bankroll", "keywords": "trading investing finance portfolio", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bankroll", "package_url": "https://pypi.org/project/bankroll/", "platform": "", "project_url": "https://pypi.org/project/bankroll/", "project_urls": { "Homepage": "https://github.com/bankroll-py/bankroll" }, "release_url": "https://pypi.org/project/bankroll/0.4.1/", "requires_dist": [ "bankroll-marketdata (~=0.4.0)", "bankroll-model (~=0.4.0)", "bankroll-broker (~=0.4.1)", "numpy (~=1.17.0)", "progress (~=1.5)", "pyfolio (>=0.9.2)", "bankroll-broker-fidelity (~=0.4.0) ; extra == 'fidelity'", "bankroll-broker-ibkr (~=0.4.0) ; extra == 'ibkr'", "bankroll-broker-schwab (~=0.4.0) ; extra == 'schwab'", "bankroll-broker-vanguard (~=0.4.0) ; extra == 'vanguard'" ], "requires_python": "", "summary": "Ingest portfolio and other data from multiple brokerages, and analyze it", "version": "0.4.1" }, "last_serial": 5797491, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "07447e5a111fd09b77851fe36aa434e6", "sha256": "4d05169472a8794c318290ca7bb6a2af4f7e63f1624ba1549144d1893eb7ec31" }, "downloads": -1, "filename": "bankroll-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "07447e5a111fd09b77851fe36aa434e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29646, "upload_time": "2019-05-08T19:34:33", "url": "https://files.pythonhosted.org/packages/36/cb/144b28826a6727b712548d2b0b8d6c33f329e4a033a8eb044914f98e79d0/bankroll-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11dbdb67a793a75a318beaf5762f0c45", "sha256": "d5977cb5850d84f2b567a8564bc44f86bec619bce9f8e675684ac47eb722f6c1" }, "downloads": -1, "filename": "bankroll-0.1.0.tar.gz", "has_sig": false, "md5_digest": "11dbdb67a793a75a318beaf5762f0c45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24961, "upload_time": "2019-05-08T19:34:36", "url": "https://files.pythonhosted.org/packages/e2/6b/04287c1f56e81a4e7d87b166e08b27baf72dc9ebc7d1e9a13d6f92a04585/bankroll-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "28706fa0effc0e8a2f0b36071117c4d9", "sha256": "b48370b2142a1ac58810f93c8bdb3f7d39f6ca45da566a0e0572e64ced70cb6a" }, "downloads": -1, "filename": "bankroll-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "28706fa0effc0e8a2f0b36071117c4d9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29683, "upload_time": "2019-05-10T21:19:22", "url": "https://files.pythonhosted.org/packages/bd/b3/c7cc654d0fc684caac937a2ade5ed54dd6aea4fee497d2db4096701f156a/bankroll-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "117a65c9ddf8a63c852002f1468be2dc", "sha256": "0233a6ba8bbf56308a91c4499f23249044fdd639b493548f502f0d91141f41ac" }, "downloads": -1, "filename": "bankroll-0.1.2.tar.gz", "has_sig": false, "md5_digest": "117a65c9ddf8a63c852002f1468be2dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24977, "upload_time": "2019-05-10T21:19:23", "url": "https://files.pythonhosted.org/packages/b9/ac/b20b67526f7fa8fe7b3346b3e4b66647bf12981dd74e965116907e006199/bankroll-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3780ef8f016866ce3798c7c003edb3bd", "sha256": "3a9aa940c16849441dad8e54e165cc12215d010a794c048e59c291e6a7ac9fa6" }, "downloads": -1, "filename": "bankroll-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3780ef8f016866ce3798c7c003edb3bd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38914, "upload_time": "2019-05-15T22:21:55", "url": "https://files.pythonhosted.org/packages/e6/e6/31f99672afa5bf14dbafabff6d076b05b748d631256baa621ba0579faf06/bankroll-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1144017fe4c4eec897a40a84759316b3", "sha256": "0470cfd84ce1905a89cb9893cd2634c25f7e5f347ae37860519cd6e37c300b2a" }, "downloads": -1, "filename": "bankroll-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1144017fe4c4eec897a40a84759316b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32365, "upload_time": "2019-05-15T22:21:57", "url": "https://files.pythonhosted.org/packages/3e/18/1e7b1631dcb70ae364986994b912a74aa03c7d994e62acd68376041c1f7d/bankroll-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "de999adf729556023bb6bece0459c218", "sha256": "cd1b5cdf0eeee42cab66055204e8c35000c5dae0db772790fc6bb8a8f5bdac12" }, "downloads": -1, "filename": "bankroll-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "de999adf729556023bb6bece0459c218", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39030, "upload_time": "2019-05-21T22:27:54", "url": "https://files.pythonhosted.org/packages/ab/8e/dfc1a4c7915d064e6f433a7050db0f97c8b8cccf1a11eea31f298d3eb069/bankroll-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "05186c01f52522862d5625a8259b43f4", "sha256": "e6be6ac8b0cc8c066fc0b62288fac465cd733bba931512709612b41eed8b8e4e" }, "downloads": -1, "filename": "bankroll-0.2.1.tar.gz", "has_sig": false, "md5_digest": "05186c01f52522862d5625a8259b43f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32681, "upload_time": "2019-05-21T22:27:56", "url": "https://files.pythonhosted.org/packages/16/3e/465b378712ed936745ffcfd9432e874c62621686f13cefcecb2e88201582/bankroll-0.2.1.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0ff3e9bee4dd8a818e91a79d16b7f4d5", "sha256": "0247715b7dae1bb8862ac3070f9fa1a70393836aaaf5110335f8209dc7b51fa1" }, "downloads": -1, "filename": "bankroll-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ff3e9bee4dd8a818e91a79d16b7f4d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 65742, "upload_time": "2019-06-16T22:53:12", "url": "https://files.pythonhosted.org/packages/ae/b7/a93a031605e89266eaf40e64ca67848c3da49a7a263cd62a435b702d4966/bankroll-0.3.1-py3-none-any.whl" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "093c06675d53638e79d0dd8d44215634", "sha256": "7bf275f775bb492252afc2ef01cf36295f7abfc7f089242fac96111327f11cd9" }, "downloads": -1, "filename": "bankroll-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "093c06675d53638e79d0dd8d44215634", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 67731, "upload_time": "2019-08-10T20:33:31", "url": "https://files.pythonhosted.org/packages/02/93/54fe6f2c646fa86f158f7972e66b8855f147e32d37f5bd3b5d80a82b6dd5/bankroll-0.3.2-py3-none-any.whl" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "5dcad270745c1c6ccb0c32a789c80c3d", "sha256": "d691968d15342fb3d90c96b4d08fe7464f4c71b3652fcb1e3f5cb4cf68c75721" }, "downloads": -1, "filename": "bankroll-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5dcad270745c1c6ccb0c32a789c80c3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 67811, "upload_time": "2019-08-19T20:54:11", "url": "https://files.pythonhosted.org/packages/d1/50/4cecbe3c45adf06c4510444b28616f9534879156f2dd167a354ef3730852/bankroll-0.3.3-py3-none-any.whl" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "20b74d31ae6aff8156fdc9c784a9e183", "sha256": "e5c8808775d6292871122fdfde5f2c6769214c4181323a8727bd248af98bc662" }, "downloads": -1, "filename": "bankroll-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "20b74d31ae6aff8156fdc9c784a9e183", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17879, "upload_time": "2019-08-29T22:57:52", "url": "https://files.pythonhosted.org/packages/81/0d/4b9e364c6d09214afaee9c5200d054d7991bf3af5bac6d51fc3879ec2554/bankroll-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66feae7048dbbe9a872036992cdbbce6", "sha256": "2e5380552e1a444ce1af07b125435b44f3cfe25f017f64d9b722c6b8cd897a18" }, "downloads": -1, "filename": "bankroll-0.4.0.tar.gz", "has_sig": false, "md5_digest": "66feae7048dbbe9a872036992cdbbce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18795, "upload_time": "2019-08-29T22:57:54", "url": "https://files.pythonhosted.org/packages/9c/60/8fe53045cdc3e446df891257a916797cbc4b4131754812aa12d6ae1437f9/bankroll-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "e53229d99d92d2c5a8a7b7d2a3da72d5", "sha256": "53275c831000d8d725edbe353c7e0fdd3c70795edba649e8e0be110ccd56f120" }, "downloads": -1, "filename": "bankroll-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e53229d99d92d2c5a8a7b7d2a3da72d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17904, "upload_time": "2019-09-07T21:24:47", "url": "https://files.pythonhosted.org/packages/42/19/effcfaab380798971e78884846ac93e73c0b7da929e41f02b1d89c13a75e/bankroll-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1ec47206f74bc7aa124d6770692ab3c", "sha256": "1a7f21ced4b198600f421cac78f6a46ee10bfb179b512d71744318a722c878bc" }, "downloads": -1, "filename": "bankroll-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c1ec47206f74bc7aa124d6770692ab3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18827, "upload_time": "2019-09-07T21:24:49", "url": "https://files.pythonhosted.org/packages/e0/39/6fb571ac9ab5270ddf50257534efdf03b6fb1840a3ad67fb8c5685cf1dd5/bankroll-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e53229d99d92d2c5a8a7b7d2a3da72d5", "sha256": "53275c831000d8d725edbe353c7e0fdd3c70795edba649e8e0be110ccd56f120" }, "downloads": -1, "filename": "bankroll-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e53229d99d92d2c5a8a7b7d2a3da72d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17904, "upload_time": "2019-09-07T21:24:47", "url": "https://files.pythonhosted.org/packages/42/19/effcfaab380798971e78884846ac93e73c0b7da929e41f02b1d89c13a75e/bankroll-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1ec47206f74bc7aa124d6770692ab3c", "sha256": "1a7f21ced4b198600f421cac78f6a46ee10bfb179b512d71744318a722c878bc" }, "downloads": -1, "filename": "bankroll-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c1ec47206f74bc7aa124d6770692ab3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18827, "upload_time": "2019-09-07T21:24:49", "url": "https://files.pythonhosted.org/packages/e0/39/6fb571ac9ab5270ddf50257534efdf03b6fb1840a3ad67fb8c5685cf1dd5/bankroll-0.4.1.tar.gz" } ] }