Lakshmi
(Screenshot of the lak
command. See the section below for more details)
Background
This project is inspired by Bogleheads forum. Bogleheads focus on a simple but powerful philosophy that allows investors to achieve above-average returns after costs. This tool is build around the same principles to help an average investor manage their investing portfolio.
Lakshmi (meaning "She who leads to one's goal") is one of the principal goddesses in Hinduism. She is the goddess of wealth, fortune, power, health, love, beauty, joy and prosperity.
Introduction
This project consists of a library module (lakshmi
) and a command-line tool (lak
) that exposes some of the functionality of the library. The library provides useful abstractions and tools to manage your investing portfolio.
Bogleheads wiki is a great resource for introduction to basic investing concepts like asset-allocation, asset-location, etc.
The following features are currently available:
- Specify and track asset allocation across accounts.
- Ability to add/edit/delete accounts and assets (funds, stocks, etc.) inside those accounts.
- Supports manual assets, assets with ticker, Vanguard funds (that don't have associated ticker symbols), EE Bonds and I Bonds.
- Automatic fetching of market value of various types of assets.
- Listing current values of assets, printing detailed information, printing asset allocation, asset location, etc.
- Tracking of tax-lot information for assets.
- Support for running what-if scenarios to see how it impacts the asset allocation, etc.
- Analysis of portfolio to identify if there is need to rebalance or if there are losses that can be harvested.
Installation
This project can be installed via pip. To install the library and the lak command line tool, run:
pip install lakshmi
Command-line interface
(For detailed help, please see lak user guide)
The simplest way to use this project is via the lak
command. To access the up to date help, run:
$ lak --help
Usage: lak [OPTIONS] COMMAND [ARGS]...
lak is a simple command line tool inspired by Bogleheads philosophy.
Detailed user guide is available at:
https://sarvjeets.github.io/lakshmi/docs/lak.html
Options:
--version Show the version and exit.
-r, --refresh Re-fetch all data instead of using previously cached data.
For large portfolios, this would be extremely slow.
--help Show this message and exit.
Commands:
add Add new accounts or assets to the portfolio.
analyze Analyze the portfolio.
delete Delete an account or asset.
edit Edit parts of the portfolio.
info Print detailed information about an asset or account.
init Initializes a new portfolio by adding asset classes.
list Command to list various parts of the portfolio.
whatif Run hypothetical what if scenarios by modifying the total...
A new portfolio can be created by either:
- Copying an existing portfolio file to ~/portfolio.yaml and editing it.
-- OR --
- Using the
lak
commands to create a new portfolio. The following command will open up an editor to input the desired asset allocation:
$ lak init
Accounts (His/Her 401(k), Roth IRAs, Taxable, etc.) can be added via the lak add account
command:
$ lak add account
# Use the above command multiple times to add more accounts.
Assets can be added to an account via the lak add asset
command. Different kinds of assets can be added to a portfolio. For a complete list, pull up the help for the command:
$ lak add asset --help
Usage: lak add asset [OPTIONS]
Edit assets in the portfolio.
Options:
-p, --asset-type [ManualAsset|TickerAsset|VanguardFund|IBonds|EEBonds]
Add this type of asset. [required]
-t, --account substr Add asset to this account (a sub-string that
matches the account name). [required]
--help Show this message and exit.
TickerAsset represents an asset with a ticker symbol. The value of these assets is pulled and updated automatically. To add a TickerAsset:
lak add asset -p TickerAsset -t account_str
where account_str is a sub-string that uniquely matches an account added previously.
That's it. To view all the assets, asset allocation and asset location, run:
lak list assets total aa al
For more detailed information about the tool, please see lak user guide.
Library
(TODO: Add details about the lakshmi module)
Contributing
I'm looking for contributors for this project. If you are interested, please contact me over email.
License
Distributed under the MIT License. See LICENSE
for more information.