Skip to main content

A command line investment assistant to organize your portfolio and simulate its future to reach your life goals.

Project description


Finary Assistant

Minimalistic command-line tool to help you manage your investments

Built with ❤︎ by Pierre Laclau and contributors. Logo generated by Midjourney.


PyPI GitHub Workflow Status (main) License GitHub milestones


Finary Assistant is a command-line tool to organize your investments portfolio and get automated monthly investment recommendations based on your future life goals. This tool synchronizes with your Finary account to show real-time investment values.

Don't have Finary yet? You can sign up using my referral link 🌹 (or through the default page).

🇫🇷🥖 Vous pouvez traduire cette page en Français avec votre navigateur (clic droit > traduire).

✨ Features

  1. ✅ Portfolio: Organize your assets, set targets, and sync with your Finary account.
  2. ⏳ Analyzer: Generate global statistics and graphs to understand each line and folder.
  3. ⏳ Simulator: Define your life goals and events, simulate your portfolio's future.
  4. ⏳ Assistant: Get monthly recommendations on where to invest next to meet your goals.
  5. 🙏 Extensions: Make this tool work for other people's situations. Contributions needed!
  6. 🙏 Optional: Nice but out-of-my-skills or time-consuming features. Any volunteers?

You can check the current development status. Contributions are warmly welcome!

🚀 Installation

If you don't plan on touching the code, simply run (with python >=3.6 and pip installed):

pip install finary_assistant  # run again with --upgrade to update

And you're done! Now create your own copy of the demo.py example anywhere and run it to make sure everything works. You can now customize it for your own needs 🚀

Pro Tip 💡: Why not setup a script to autorun your config in a new terminal at startup? Could be a nice view 🤭

⚙️ Usage

The goal is to declare a tree structure of your entire portfolio independently from their host envelopes (e.g. PEA, AV, CTO, etc). Once your entire portfolio strategy is defined here, find the best envelope for each line and add them to your Finary account (manual or automatic sync). Assistant will fetch each line and display your full portfolio with real-time amounts.

Step 1: Portfolio

To create your portfolio, start with a Portfolio object which holds a nested list of Line, Folder, and SharedFolder objects:

  • Line represents each individual investment. Set the key parameter as the name shown in your Finary account if different from the display name.
  • Folder holds a group of lines or subfolders to create a structure.
  • SharedFolder accepts a Bucket object which groups multiple lines as a single object. You can reference the same bucket multiple times in the tree and set different bucket_amount for each shared folder. Each folder will only take the provided amount and let the others below use the rest.

Here is an example of a portfolio structure:

# Create a list of Lines that will be considered as a single Line.
my_bucket = Bucket([
  Line('name_in_finary'),
  Line('My Asset 2', key='name_in_finary'),  # change the display name
  # ...
])

# Define your entire portfolio structure
portfolio = Portfolio('My Portfolio', children=[
  # Add a list of `Line`, `Folder`, and `SharedFolder` objects
  Folder('Short term', children=[
    Line('My Asset 3', key='name_in_finary'),
    SharedFolder('My Folder', bucket=my_bucket, bucket_amount=1000),
    # ...
  ]),
  Folder('Long term', children=[
    # `(Shared)Folders` can be displayed as Expanded (default), Collapsed, or as a Line
    Folder('Stocks', display=FolderDisplay.COLLAPSED, children=[
      SharedFolder('My Folder', bucket=my_bucket),  # display what's left in the bucket
      # ...
    ]),
    # ...
  ])
])

Step 2: Targets

Any node in the tree accepts an optional target parameter. See the full list of available targets here:

Folder('Stocks', target=TargetMin(2000, tolerance=500), children=[
  Line('ETF World', key='Amundi ETF ...', target=TargetRatio(80, tolerance=5)),
  # ... Add other lines with the remaining 20% of the Stocks folder.
])

Step 3: Run the Assistant

Here is the bare minimum code accepted:

from finary_assistant import Portfolio, Assistant
portfolio = Portfolio()  # optional children
Assistant(portfolio).run()

The Assistant class accepts a few options (which can also be set from the command line, see python your_config.py --help):

Assistant(
    portfolio,
    ignore_orphans=False,  # Ignore fetched lines that you didn't reference in your portfolio.
    force_signin=False,    # Delete your saved credentials and/or cookies session.
    hide_amount=False,     # Hide your portfolio amounts with dots (easier to share).
    hide_root=False,       # Display your portfolio without the root (cosmetic preference).
).run()

There are other small options here and there, let me know if you're interested (I should write a full documentation). However, you should be good to go with some inspiration taken from demo.py.

👨‍💻 Contributions

This repository is at a very early stage. Unfortunately, I won't have time to make this tool work for everyone by default, but you are welcome to extend this project (or hire me if you can't develop it yourself). Pull requests, issues (🇬🇧 preferably) and open discussions (🇬🇧/🇫🇷) are warmly welcome!

If you would like to contribute to this project, welcome on board and thanks for your interest! 🎉 Please read the contribution guidelines to setup the project on your machine and agree on common conventions.

📄 License

This project is under the GPLv3 License meaning anyone can use, share, extend, and contribute to this project as long as their changes are integrated to this repo or also published using GPLv3. Please contact me for any specific licensing requests.

💌 Donations

This is a personal project I have fun with on my free time. If you found it useful and wish to support my work, you can buy me a coffee! It would give me the motivation to keep improving it further :smile: Thank you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finary_assistant-0.2.1.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

finary_assistant-0.2.1-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file finary_assistant-0.2.1.tar.gz.

File metadata

  • Download URL: finary_assistant-0.2.1.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10

File hashes

Hashes for finary_assistant-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a806a7ee5f7fb2c91dae0a80669c50e8d32505fb6e72da38b3bccae6491ea51f
MD5 87d8c23df34720ea39af518fc2025195
BLAKE2b-256 c05005a81d811339d8c8c548d13c1aa6e761ce0104c5a205304e97555dcb7990

See more details on using hashes here.

File details

Details for the file finary_assistant-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: finary_assistant-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.10

File hashes

Hashes for finary_assistant-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ae53d5a4ee3ca129dafd2bb41650d602ae4843e5c63e1410ba833f23dbdb150
MD5 708abdc99565a7fc7428621357764ed3
BLAKE2b-256 2b1d2ec57d70b899c3a53577a0971c5d2fb5d97be48421eb0f1353dfec40d6ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page