Skip to content

R4GoodPersonalFinances 1.1.0

Choose a tag to compare

@kalimu kalimu released this 29 Jul 10:23
1d7f52a

This version improve the performance of portfolio optimization algorithms, ability to parallelize the Monte Carlo simulations, and simulation caching. It brings also new useful functions as render_scenario_snapshot(), plot_future_saving_rates(), and get_default_gompertz_parameters(). With render_scenario_snapshot() function, it is possible to get a table with cash flow and net worth statements for a given year in a simulated scenario. The result of new features in this version can be seen in the blog post: Can Juliet manage without Romeo? How much she should spend, save, and invest to achieve that?.

Minor changes

  • Changed default portfolio optimization algorithm to NLOPT_LD_SLSQP
    (Sequential Least-Squares Quadratic Programming). The optimization is now more robust and faster.
  • Added ability to pass opts list to simulate_scenario() function with optimization parameters nloptr optimization function and thus changing algorithm or its options. The list of possible options and their default values can be obtain with nloptr::nloptr.print.options().
  • Added ability to pass a single seed value or vector of seeds simulate_scenario() function to reproduce the same results for the same scenario, also for Monte Carlo samples.
  • Added auto_parallel argument to simulate_scenario() function to automatically parallelize the Monte Carlo simulations.
  • Changed behavior of use_cache argument in simulate_scenarios() function
    to caching also all data of all Monte Carlo samples for a scenario (not only each sample separately).
  • Changed the reordering behavior in the plot_scenarios() which does not reorder scenarios anymore.
  • Changed optimal allocation for the last year of a simulation.
    It is now overwritten with the optimal allocation from the previous year,
    to avoid the edge case when net-worth is going to zero.
  • Added render_scenario_snapshot() function to render a table with cash flow and net worth statements for a given year (first by default) in a simulated scenario.
  • Added plot_future_saving_rates() for plotting the future saving rates.
  • Added print methods for Household and HouseholdMember objects.
  • Added ability to plot expected allocations based on the aggregated results from Monte Carlo samples with plot_expected_allocation().
  • Added age() function as convenient wrapper for getting age of a household member when defining triggers for expected income or spending streams.
  • Added get_default_gompertz_parameters() function to get default parameters for the Gompertz model for a given country, sex, and age.
  • Added, changed, or fixed multiple minor details in plots.
  • Updated default capital market assumptions.