Compare portfolios side by side
compare_portfoliosRuns the same monthly-investing plan through 2 to 4 portfolios (the same simulation as simulate_portfolio) and returns each one's final outcome range, deepest fall, past return and volatility, and url, for questions like 'S&P 500 or all-country stocks?'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | Years of investing. | |
| history | No | The span of past monthly returns the model is fitted to: the last 5, 10 or 20 years, or all the data. An asset with less data than the span asked for uses all of its own. | all |
| initial | No | Starting sum invested at once. | |
| monthly | Yes | Amount invested at the end of every month. | |
| currency | No | Currency of every amount, in and out. In a currency other than USD the paths carry its exchange-rate swings against the dollar (trend removed). Defaults to the language's currency. | |
| language | No | Language of the page the returned url opens; match the user's language. | en |
| history_to | No | Last calendar year of a custom span. | |
| portfolios | Yes | The portfolios to compare. | |
| history_from | No | First calendar year of a custom span (with history_to); replaces history. | |
| inflation_percent | No | Annual inflation. When given, every amount out is in today's money at this rate; omitted, amounts are nominal. |