Initial extraction from monorepo
This commit is contained in:
commit
f7ef7ca4ab
56 changed files with 6163 additions and 0 deletions
24
fire_planner/strategies/trinity.py
Normal file
24
fire_planner/strategies/trinity.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
"""Trinity 4% Safe Withdrawal Rate.
|
||||
|
||||
Bengen's seminal 1994 paper + the Trinity Study (Cooley/Hubbard/Walz,
|
||||
1998) — withdraw 4% of the starting balance in year 1, then keep the
|
||||
real withdrawal constant for the rest of retirement. In our real-GBP
|
||||
internal frame this is just "the same number every year".
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from fire_planner.strategies.base import StrategyState, WithdrawalStrategy
|
||||
|
||||
DEFAULT_INITIAL_RATE = 0.04
|
||||
|
||||
|
||||
class TrinityStrategy(WithdrawalStrategy):
|
||||
name = "trinity"
|
||||
|
||||
def __init__(self, initial_rate: float = DEFAULT_INITIAL_RATE) -> None:
|
||||
self.initial_rate = initial_rate
|
||||
|
||||
def propose_withdrawal(self, state: StrategyState) -> float:
|
||||
if state.year_idx == 0:
|
||||
return state.initial_portfolio * self.initial_rate
|
||||
return state.last_withdrawal
|
||||
Loading…
Add table
Add a link
Reference in a new issue