Giter Club home page Giter Club logo

portfolio_rs's Introduction

portfolio_rs logo
build status badge clippy analyze status badge

A command line tool for managing financial investment portfolios written in Rust.

This project is the modern successor of finance.

Installation

Install/run via pkgx:

pkgx portfolio_rs

You can install portfolio_rs directly from cargo (via crates.io):

cargo install portfolio_rs

Usage

1. Create your portfolio file

Create a JSON file with your portfolio positions.

Look at the example data for the format and data scheme.

2. Use the subcommands to gain insight on your portfolio:

Show the current balances of your portfolio:

portfolio_rs balances <JSON_FILE>

Show the current allocation of your portfolio:

portfolio_rs allocation <JSON_FILE>

Show the performance of your portfolio:

portfolio_rs performance <JSON_FILE>

If you need help, try portfolio_rs help [SUBCOMMAND] for usage information.

Demo

demo

Configuration

Upon first run, portfolio_rs will create a default config.yml file. The location of the config file depends on the operating system. Use portfolio_rs config to print the config directory.

Probably the most useful entry in the config is portfolio_file where you can set the absolute path to a data file that will be used when no data file is passed as an argument.

Bonus: GPG Encryption

This tool supports (gpg) encrypted json files. Decrypted values are never written to disk.

# you will need a valid gpg key in ~/.gnupg/
portfolio_rs [COMMAND] data.json.gpg

Pro Tip: Use a plugin like vim-gnupg for editing your data file.

portfolio_rs's People

Contributors

dependabot[bot] avatar markuszoppelt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

johanneskutning

portfolio_rs's Issues

Add support for age encrypted files

Allow users to keep an encrypted data file (e.g. positions.json.age) that gets decrypted and read during runtime.

Users should be able to set the identity/age key in the config.yml.

Ideally, this should be easier to use and set up than the existing pgp/gpg support.

update DB to store individual positions instead of total value only

Currently, the db only stores the previous total prices and not the individual stocks.

Example:

Adding a new position (that has performed poorly this YTD) will change the historical performance of the portfolio, even though it's a new position.

Todo:

keep track of all individual stocks (that way buying and selling stocks would become new db entries). This would help tracking the performance better.

Thanks to u/fynnsu for bringing up that issue.

configuration via yaml file

Allow for configuration via a config.yaml

This would allow using the tool with specifying a convoluted list of arguments every time.

For example, users could just call portfolio_rs balances and the location of the datafile can be specified in the config.

Proposed location:

  • $XDG_CONFIG_HOME/portfolio_rs/config.yaml if set
  • $HOME/.config/portfolio_rs/config.yaml on macOS
  • %APPDATA%\portfolio_rs\config.yaml on Windows

Tasks:

  • add a config subcommand to create/print a default config
  • check if config exists and parse when running a subcommand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.