percentile_distribution_cagr
- MonteCarlo.percentile_distribution_cagr(percentiles=[10, 50, 90])
Calculate percentiles for the simulated CAGR distribution.
CAGR (Compound Annual Growth Rate) is calculated for each Monte Carlo return path.
- Parameters:
- percentileslist[int], default [10, 50, 90]
Percentiles to compute (0-100).
- Returns:
- dict[int, float]
Mapping {percentile: value}.
Examples
>>> pf = ok.Portfolio( ... ["SPY.US", "AGG.US", "GLD.US"], ... weights=[0.60, 0.35, 0.05], ... rebalancing_strategy=ok.Rebalance(period="year"), ... ) >>> pf.dcf.set_mc_parameters(distribution="norm", period=1) >>> pf.dcf.mc.percentile_distribution_cagr() {10: ..., 50: ..., 90: ...} >>> pf.dcf.set_mc_parameters(period=5) >>> pf.dcf.mc.percentile_distribution_cagr([5, 10, 20]) {5: ..., 10: ..., 20: ...}