Skip to main content

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

Project description


Finalynx 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


Finalynx is your "Finary Assistant", 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.8 and pip installed):

pip install finalynx  # 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). Finalynx 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 specified 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 finalynx import Portfolio, Assistant
portfolio = Portfolio()  # your config here
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.

👨‍💻 Feedback & 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

finalynx-1.0.1.tar.gz (42.2 kB view hashes)

Uploaded Source

Built Distribution

finalynx-1.0.1-py3-none-any.whl (57.6 kB view hashes)

Uploaded Python 3

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