okama.PortfolioDCF.survival_period
- property PortfolioDCF.survival_period
Calculate the period when the portfolio has positive balance considering withdrawals on the historical data.
The portfolio survival period (longevity period) depends on the investment strategy: asset allocation, rebalancing, withdrawals rate etc.
The withdrawals are defined by the cashflow parameter of the portfolio.
- Returns:
- float
The portfolio survival period (longevity period) in years.
Examples
>>> pf = ok.Portfolio( ... ['SPY.US', 'AGG.US'], ... ccy='USD', ... first_date='2010-01', ... initial_amount=100_000, ... cashflow=-1_000 ...) >>> pf.dcf.survival_period 11.6