FinPlanStage

class FinPlanStage(portfolio, period, cashflow_parameters=None, name=None, distribution='norm', distribution_parameters=None)

Bases: object

One stage of a financial plan: a portfolio held for a number of years.

A stage owns everything that can differ from one leg of a plan to another — the portfolio, how long it is held, the cash flow strategy in force, and the distribution used to simulate its returns. Everything shared by the whole horizon (the initial investment, the discount rate, the number of scenarios and the seed) belongs to FinPlan instead.

Parameters:
portfolioPortfolio

Portfolio held during the stage.

periodint

Stage length in whole years.

cashflow_parametersCashFlow or None, default None

Cash flow strategy in force during the stage. Its parent must be portfolio. When None an IndexationStrategy on portfolio is created, matching what PortfolioDCF does.

namestr or None, default None

Label used in FinPlan.__repr__, FinPlan.balance_percentiles and on plots.

distribution{‘norm’, ‘lognorm’, ‘t’}, default ‘norm’

Distribution used to draw the stage’s monthly returns.

distribution_parameterstuple or None, default None

Parameters for the distribution; any element left as None is estimated from the portfolio’s own history. Same semantics as MonteCarlo.

Examples

>>> pf = ok.Portfolio(["SPY.US", "AGG.US"], weights=[0.8, 0.2], ccy="USD")
>>> stage = ok.FinPlanStage(pf, period=20, name="accumulation")
>>> stage.period_months
240

Methods & Attributes

cashflow_parameters

Cash flow strategy in force during the stage.

distribution

Distribution used to draw the stage's monthly returns.

distribution_parameters

Distribution parameters; None elements are estimated from history.

name

Stage label used in reports and on plots.

period

Stage length in whole years.

period_months

Stage length in months.

portfolio

Portfolio held during the stage.

property portfolio

Portfolio held during the stage.

property period

Stage length in whole years.

property period_months

Stage length in months.

property cashflow_parameters

Cash flow strategy in force during the stage.

property name

Stage label used in reports and on plots.

property distribution

Distribution used to draw the stage’s monthly returns.

property distribution_parameters

Distribution parameters; None elements are estimated from history.