Skip to content

RetirementAnalytics

Brian G. Peterson edited this page Feb 17, 2024 · 31 revisions

Background

Retirement planning is a task that is highly quantitative in nature but is dominated by a small number of large commercial software packages, and is opaque to the open science analyst. The code and tequniques for effective retirement portfolio planning should be open source.

Related work

This project should make use of existing work in the R ecosystem such as PortfolioAnalytics and PerformanceAnalytics, and the proposed RetirementAnalytics package should focus on new functionality.

We can see how this book fits into the plan during the literature review: Retirement Income Recipes in R with extras and code here

Details of your coding project

Our goal is to create a new package for retirement planning analytics including analysis of things such as:

  • safe withdrawal rates
  • different strategies for withdrawal plans
  • different portfolio plans
  • Monte Carlo analysis with reasonable block samples and randomization

There are a few main pieces which could be accomplished in a GSoC:

  • literature review (before coding starts, in collaboration with the mentors)
  • framework for the package:
    • taking in deposits and withdrawals
    • asset returns for Monte Carlo and hypothetical portfolios
    • different account types
    • different tax assumptions/regimes
  • Monte Carlo simulation for asset returns and inflation and yields (not the same as returns, and very important to retirement planning)
  • portfolio construction
  • support for various withdrawal strategies

What exactly do you want your contributor to code in the coding period? What functions? What do they do? Docs? Tests? Vignettes?

Expected impact

The internet is full of good and bad advice about retirement planning, but there are no

Mentors

Tests

Contributors, please do one or more of the following tests before contacting the mentors above.

Monte Carlo Test:

A key portion of this project will be constructing Monte Carlo simulations for asset returns as well as interest rates (on cash) and yields (on bonds or other fixed income assets, as well as dividends). Demonstrate a multi-variable block bootstrap function with randomized block size and random noise parameters for the input time series. Use xts time series and assume 'wide' data construction.

Portfolio Construction Test:

Easy:

Use PortfolioAnalytics to construct and evaluate a multi-asset portfolio using a minimum variance and Markowitz portfolio. Demonstrate comparing the outcome of the two portfolios using PortfolioAnalytics functions.

Hard:

Propose additional model portfolio objectives and constraints tailored to a retirement portfolio. What risk metrics are appropriate? why? what return metrics should be used? why? compare your proposed retirement objective portfolio to the easy portfolios above

References:

Blanchett, David, Maciej Kowara, and Peng Chen. "Optimal withdrawal strategy for retirement income portfolios." Retirement Management Journal 2, no. 3 (2012): 7-20.

Klinger, William J. "Guardrails to prevent potential retirement portfolio failure." Journal of Financial Planning 29, no. 10 (2016): 46.

Milevsky, Moshe Arye. "Retirement income recipes. In R: From Ruin Probabilities To Intelligent Drawdown." Springer-Nature New York, 2020.

Clone this wiki locally