MikePiper / open-social-security

Open-source calculator for determining best Social Security claiming age(s)

Home Page:https://opensocialsecurity.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inaccurate probabilityAlive calculations for some couples

brian-courts opened this issue · comments

When spouses are not the same age, the current probabilityAlive calculation can produce inaccurate results. If both spouses are under 62 and not disabled when beginning the calculations, each spouse's denominatorAge is taken as 62, and the base counts for mortality calculations are taken at that age. If they are born in 1958 and 1963, their base counts come from 2020 and 2025.

I do not believe an actuary would calculate joint probabilities for a couple taking data from different starting points. It can also create spurious results, such as a person's probabilityAlive calculated as greater than one and their probabilityDeceased less than zero, as shown in the attached spreadsheet. I have submitted a pullRequest with revisions to address this issue.

ProbabilityAliveCouple.pdf

Thanks, Brian!

My busy period with my "normal" work is winding down, so I should have more time to look at this project again going forward. (Though this very next week is a week of travel.)

Also, I'm now "watching" this repository. I had assumed that because it was a repository I started, I would automatically be emailed when somebody created an "issue." Apparently not. Lesson learned.

Hi Brian.

I've been looking this over today.

Great idea with the baseFactor concept to reduce the number of operations necessary.

You're absolutely right that the existing logic results in problems when the couple differs significantly in age.

After looking through it all, my primary thought is: maybe when implementing your suggestion we should also completely drop the assumption that a person lives to 62, rather than just dropping that assumption in some cases. It seems that would simplify the logic -- as well as make it more internally consistent.

It feels like I made a mistake in including that assumption in the first place. (I've obviously been away from deep work on this project for a while and am just ramping back up. So it's possible that that assumption was necessary for some reason that I cannot remember offhand. I'll poke around for a bit before actually making any changes.)

Thanks again.

Hi Brian.

I just pushed out an update that addresses the issue you raised here (and which incorporates your idea of a base factor, to eliminate some unnecessary repeat calculations).

I also did just completely eliminate the assumption that anybody automatically lives to 62.

After going over some old notes, I realized that I had two reasons for originally including that assumption, and neither applies anymore. (The larger reason was that I was thinking that tests would break as "today" changes each month. I hadn't realized yet that I can hardcode a fake "today" for the sake of tests.)

Thanks again for pointing out the issue and for contributing the solution!

(I'll leave the issue open for now so that discussion can continue, in case you have any questions/concerns/suggestions.)

Hi Brian.

Your contribution did not cause any problems. Thank you again for taking the time.