finalynx.simulator.timeline
ο
Module Contentsο
Classesο
Configuration class to launch a Finalynx simulation. |
|
Main simulation engine to execute programmed actions on your portfolio. |
APIο
- class finalynx.simulator.timeline.Simulation[source]ο
Configuration class to launch a Finalynx simulation.
- events: Optional[List[finalynx.simulator.events.Event]]ο
None
- inflation: floatο
2.0
- end_date: Optional[datetime.date]ο
None
- default_events: boolο
True
- print_final: boolο
False
- step_years: intο
5
- class finalynx.simulator.timeline.Timeline(simulation: finalynx.simulator.timeline.Simulation, portfolio: finalynx.portfolio.folder.Portfolio, buckets: List[finalynx.portfolio.bucket.Bucket])[source]ο
Main simulation engine to execute programmed actions on your portfolio.
Initialization
The timeline is a list of programmed events. The user can set his own list of events with optional recurring settings. The timeline will automatically apply each event and generate the recurring events until
duration_years
is reached.- goto(target_date: datetime.date) None [source]ο
Step until the target date is reached (in the future or past).
- step_until(target_date: datetime.date) None [source]ο
Execute all events until the specified date is reached.
- step() bool [source]ο
Execute the next event. This may generate new events in the stack.
- Returns:
True if the simulation ended (no more events).
- abstract unstep_until(target_date: datetime.date) None [source]ο
Undo all events until the specified date is reached.
- property is_finished: boolο
The timeline is finished if there are no events left to step or the limit date is reached.
- _record_metrics() None [source]ο
Record the portfolioβs metrics at the current date to display later.