v1.22.0
v1.22.0 (2023-07-31)
Tutorial to use the new simulator
The simulator can apply Actions
wrapped around an Event
instance. Events define when to perform the action, and can define an optional Recurrence
to perform the action regularly (e.g. every month, at the end of each year, ...).
There are currently three supported actions for now:
- ApplyPerformance: Change the amounts of each
Line
depending on the specifiedLinePerf
expected investment performance. By default, this action is already added in the list of events in the configuration and executes on each December 31st. - AutoBalance: For folders and lines that use
TargetRatio
targets, Finalynx will automatically apply the ideal amounts for eachLine
. This corresponds to following the Finalynx recommendations. By default, this event is automatically added and executed every 3 months. - Salary: Specify which
Line
in the portfolio should receive a specific amount each month. This class is simply a shortcut to:
Event(AddLineAmount(your_account, 2500), recurrence=MonthlyRecurrence(day_of_the_month, until=end_date))
To activate the simulator with the default events, add the following to your config :
from finalynx import Portfolio, Assistant, Simulation
portfolio = Portfolio()
Assistant(portfolio, ..., simulation=Simulation()).run() # activate the simulation (with default behavior)
Some other parameters can be set:
livreta = Line("Livret A", ...)
portfolio = Portfolio(children=[..., livreta, ...])
buckets = [...] # Create a list with the references to your buckets (if any)
envelopes = [...] # Create a list with the references to your envelopes (if any)
assistant = Assistant(
portfolio,
buckets,
envelopes,
..., # Other options
simulation=Simulation(
events=[ # Your personal config of events (salaries for now, more coming soon!)
Salary(livreta, income=2300, expenses=1400, end_date=date(2024, 11, 30)),
Event(AddLineAmount(livreta, 3500), planned_date=date(2024, 4, 10), name="Prime"),
Event(AddLineAmount(livreta, 3500), planned_date=date(2025, 4, 10), name="Prime"),
Salary(livreta, income=3000, expenses=2000, start_date=date(2025, 1, 1), name="Futur Job"),
],
inflation=3.0, # Percentage of inflation, will reduce each line's performance by this much
end_date=date(2063, 4, 5), # Defaults to 100 years after today
step_years=5, # Show a summary of the portfolio's total worth every X years in the console
default_events=True, # Add default events to the ones specified above, defaults to True
),
).run()
Please open a discussion topic if you're interested for more information!
Build
- build: bump finary_uapi to 0.1.4 (
dc4bab6
)
Documentation
- docs: add readme french (#137) by @Strawbang