Backtest S&P 500 stocks and ETFs on real prices, plus loan, savings, FIRE and retirement tools.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
How long savings take to reach a home down payment, from what is saved so far plus the same amount each month growing at a fixed yearly rate, and, with reach_within_months, the monthly amount that reaches it by then, the way SmartFin's down payment calculator does. Returns the down payment, the loan amount it leaves, the months to reach it (within 50 years), the modeled savings split into saved so far, deposits and growth, and the monthly amount (rounded up to a whole currency unit) that reaches it within the chosen time. Use when someone asks how long it takes to save for a down payment, how much a month reaches one by a date, or what a percentage down is on a price. Do not use for how much to put down (it does not say), mortgage approval, closing costs (not included) or the mortgage payment (use smartfin_calculate_loan_payment). The growth rate is held constant, deposits are made at the end of each month and the home price stays the same. Amounts can be in any one currency; none is converted.
Price of the home. 1000 to 100000000
Currency for the amounts in the summary and the link. Default USD; amounts are never converted
Amount saved toward it today. Default 0. 0 to 100000000
Yearly rate the savings grow at, with compounding included (a savings account's APY in the US, AER in the UK), held the same every year. Default 3, an example, not a current rate. 0 to 20
Down payment as % of the price. Give this or down_payment_amount. Default 20. 0 to 100
Optional: the mortgage rate, % a year, with mortgage_term_years, to suggest the follow-up call for the payment on the loan amount
Amount added at the end of every month. Default 0. 0 to 10000000
Down payment as an amount instead of a %; at most the home price. Give this or down_payment_pct
Optional: the mortgage term in years, with mortgage_rate_pct
A time to reach it by, in months, for the monthly amount that does: 48 is 4 years. 0 or omitted for none. 0 to 600
Tool list last changed Oct 23, 2026.
How long savings take to reach a home down payment, from what is saved so far plus the same amount each month growing at a fixed yearly rate, and, with reach_within_months, the monthly amount that reaches it by then, the way SmartFin's down payment calculator does. Returns the down payment, the loan amount it leaves, the months to reach it (within 50 years), the modeled savings split into saved so far, deposits and growth, and the monthly amount (rounded up to a whole currency unit) that reaches it within the chosen time. Use when someone asks how long it takes to save for a down payment, how much a month reaches one by a date, or what a percentage down is on a price. Do not use for how much to put down (it does not say), mortgage approval, closing costs (not included) or the mortgage payment (use smartfin_calculate_loan_payment). The growth rate is held constant, deposits are made at the end of each month and the home price stays the same. Amounts can be in any one currency; none is converted.
| Argument | Type | Description |
|---|---|---|
| currency | string | Currency for the amounts in the summary and the link. Default USD; amounts are never converted |
| home_price* | number | Price of the home. 1000 to 100000000 |
| saved_so_far | number | Amount saved toward it today. Default 0. 0 to 100000000 |
| growth_rate_pct | number | Yearly rate the savings grow at, with compounding included (a savings account's APY in the US, AER in the UK), held the same every year. Default 3, an example, not a current rate. 0 to 20 |
| down_payment_pct | number | Down payment as % of the price. Give this or down_payment_amount. Default 20. 0 to 100 |
| mortgage_rate_pct | number | Optional: the mortgage rate, % a year, with mortgage_term_years, to suggest the follow-up call for the payment on the loan amount |
| saving_each_month | number | Amount added at the end of every month. Default 0. 0 to 10000000 |
| down_payment_amount | number | Down payment as an amount instead of a %; at most the home price. Give this or down_payment_pct |
| mortgage_term_years | number | Optional: the mortgage term in years, with mortgage_rate_pct |
| reach_within_months | number | A time to reach it by, in months, for the monthly amount that does: 48 is 4 years. 0 or omitted for none. 0 to 600 |
{
"type": "object",
"required": [
"home_price"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency for the amounts in the summary and the link. Default USD; amounts are never converted"
},
"home_price": {
"type": "number",
"maximum": 100000000,
"minimum": 1000,
"description": "Price of the home. 1000 to 100000000"
},
"saved_so_far": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Amount saved toward it today. Default 0. 0 to 100000000"
},
"growth_rate_pct": {
"type": "number",
"maximum": 20,
"minimum": 0,
"description": "Yearly rate the savings grow at, with compounding included (a savings account's APY in the US, AER in the UK), held the same every year. Default 3, an example, not a current rate. 0 to 20"
},
"down_payment_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Down payment as % of the price. Give this or down_payment_amount. Default 20. 0 to 100"
},
"mortgage_rate_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Optional: the mortgage rate, % a year, with mortgage_term_years, to suggest the follow-up call for the payment on the loan amount"
},
"saving_each_month": {
"type": "number",
"maximum": 10000000,
"minimum": 0,
"description": "Amount added at the end of every month. Default 0. 0 to 10000000"
},
"down_payment_amount": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Down payment as an amount instead of a %; at most the home price. Give this or down_payment_pct"
},
"mortgage_term_years": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "Optional: the mortgage term in years, with mortgage_rate_pct"
},
"reach_within_months": {
"type": "number",
"maximum": 600,
"minimum": 0,
"description": "A time to reach it by, in months, for the monthly amount that does: 48 is 4 years. 0 or omitted for none. 0 to 600"
}
},
"additionalProperties": false
}Works the way SmartFin's FIRE calculator does. The FIRE number today is yearly expenses divided by a withdrawal-rate assumption. Each year savings grow at an assumed return with the yearly savings added, while expenses (and so the FIRE number) rise with inflation; FIRE is the first year savings reach that year's FIRE number, searched up to 60 years. Also gives the savings rate and, with a traditional retirement age, the Coast FIRE number. Use for early retirement / FIRE questions: "how much do I need to retire", "when can I retire", "what's my coast FIRE number". Do not use to test how long an existing balance lasts (use smartfin_calculate_retirement_withdrawal). Returns and inflation are assumptions; excludes taxes.
| Argument | Type | Description |
|---|---|---|
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| current_age | number | For the age at FIRE and Coast FIRE. Default 30 |
| inflation_pct | number | Yearly inflation in %, applied to expenses. Default 3 |
| annual_savings | number | Added each year, in the currency chosen (12 x a monthly amount). Default 0 |
| retirement_age | number | Optional: a traditional retirement age, for the Coast FIRE number |
| annual_expenses |
What a single present amount grows to at a fixed yearly rate with interest added to the balance at a chosen frequency, and the growth over the starting amount (FV = PV x (1 + r/n)^(n x t)). Use for questions about what a lump sum becomes after some years at an assumed rate, or the effect of compounding more often. Do not use for regular contributions (use smartfin_project_savings_growth), for what a real stock did (use smartfin_calculate_investment_return), or for a forecast: one fixed rate is an assumption. To find the starting amount, rate or time instead of the future value, use smartfin_calculate_missing_variable.
| Argument | Type | Description |
|---|---|---|
| years* | number | Time in years; a part of a year is a decimal |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| present_value* | number | Amount today in the currency chosen |
| annual_rate_pct* | number | Yearly rate in %, above -100, e.g. 6 |
| compounding_frequency* | number | Times a year interest is added: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily |
What an amount will be worth in today's money after years of inflation at a fixed yearly rate, and what something costing that amount today will cost then. Use for questions about buying power or future prices at an assumed inflation rate. Do not use for historical CPI lookups: this uses one fixed rate, not official index data.
| Argument | Type | Description |
|---|---|---|
| years* | number | Number of years |
| amount* | number | Amount in the currency chosen |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| annual_inflation_pct* | number | Yearly inflation rate in %, e.g. 3 |
{
"type": "object",
"required": [
"amount",
"annual_inflation_pct",
"years"
],
"properties": {
"years": {
"type": "number",
"maximum": 200,
"minimum": 1,
"description": "Number of years"
},
"amount": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Amount in the currency chosen"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"annual_inflation_pct": {
"type": "number",
"maximum": 1000,
"minimum": -99,
"description": "Yearly inflation rate in %, e.g. 3"
}
},
"additionalProperties": false
}What an amount invested in a US stock or index ETF became over a past period under one strategy: lump_sum (all on the first trading day), monthly (spread on the trading day nearest the 1st of each month) or buy_the_dip (bought after falls of a set % from the latest high), on real daily closing prices (adjusted for splits and reinvested dividends). Returns final value, total and yearly return, worst fall and Sharpe ratio. Use when the user asks about one specific approach, e.g. "what would $5,000 in Microsoft since 2015 be worth" (lump_sum) or "if I'd put money into SPY every month since 2010" (monthly). Do not use to compare strategies (use smartfin_compare_investment_strategies) or for future projections (use smartfin_project_savings_growth). Limits: US-listed S&P 500 companies and major index ETFs only, US dollars, month-level periods.
| Argument | Type | Description |
|---|---|---|
| amount* | number | Total dollars invested over the period |
| ticker* | string | Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. |
| strategy* | string | Which way of investing |
| end_month | string | Last month to include, YYYY-MM. Omit for the latest available month |
| start_month* | string |
Monthly payment, total interest and total paid for a fixed-rate loan with monthly payments: mortgage, car, student or personal loan. Give either loan_amount, or home_price with down_payment_pct for a mortgage. Use when the user asks what a loan costs per month or in total, or how the rate or term changes the cost. Do not use for variable-rate loans, interest-only loans, or credit cards. Excludes taxes, insurance and fees.
| Argument | Type | Description |
|---|---|---|
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| loan_type | string | Type of loan; chooses the SmartFin calculator link. Default mortgage |
| home_price | number | Mortgage only: home price, in the currency chosen, with down_payment_pct |
| term_years* | number | Loan term in years, e.g. 30 for a mortgage, 5 for a car loan |
| loan_amount | number | Amount borrowed, in the currency chosen. Give this or home_price |
| annual_rate_pct* | number | Annual interest rate in %, e.g. 6.5 |
Finds the one missing number among four that sit in the same equation, a single amount earning one fixed yearly rate with interest added at a chosen frequency (FV = PV x (1 + r/n)^(n x t)): the future value, the starting amount, the annual rate, or the time in years. Use when the user knows three of the four and wants the fourth, e.g. "what rate turns $10,000 into $20,000 in 10 years", "how many years until $10,000 reaches $20,000 at 6%", or "what do I need to start with to reach $50,000". Do not use for regular contributions (use smartfin_project_savings_growth), for what a real investment did (use smartfin_calculate_investment_return), or for a forecast: one fixed rate is an assumption, and a required rate is the arithmetic, not a return to expect. To only grow an amount forward use smartfin_calculate_future_value.
| Argument | Type | Description |
|---|---|---|
| years | number | Time in years; a part of a year is a decimal. Leave out when solving for years |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| solve_for* | string | Which number to find: future_value, present_value (the starting amount), annual_rate_pct or years |
| future_value | number | Amount at the end in the currency chosen. Leave out when solving for future_value |
| present_value | number |
How much sooner a fixed-rate mortgage (or other fixed-rate loan paid monthly) ends with an extra amount every month, a one-off payment, or both, from today's balance, the way SmartFin's mortgage payoff calculator does. Give the time left (years_left) or the monthly payment from the statement (monthly_payment), not both. Returns the months on each schedule, how many sooner, the interest on the rest of the loan with and without the extra, the difference, the extra paid, the last payment, the smallest whole extra a month that ends the loan 5 years sooner (1 year sooner when 2 to 10 years are left), and what the loan without extra would still owe when the loan with extra is paid off. Use when someone asks how much sooner or with how much less interest extra payments or a lump sum pay off a mortgage, or how much extra a month ends it some years early. Do not use for the payment on a new loan (use smartfin_calculate_loan_payment), refinancing, adjustable-rate or interest-only loans, or whether to pay off early or invest: it does not compare the two. Principal and interest only; taxes, insurance, escrow and prepayment penalties are not included. Each extra payment is applied to principal on its payment date. Amounts can be in any one currency; none is converted.
| Argument | Type | Description |
|---|---|---|
| currency | string | Currency for the amounts in the summary and the link. Default USD; amounts are never converted |
| lump_sum | number | A one-off extra payment, in the same currency. Default 0. 0 to 100000000 |
| years_left | number | Time left on the loan in years (to the nearest month: 2.5 is 2 years 6 months). Give this or monthly_payment. 1 month to 40 |
What an amount due in the future is worth today at a fixed yearly discount rate, and the discount between the two (PV = FV / (1 + r/n)^(n x t)). Use for questions about the value today of money received later, at a discount rate the user supplies. Do not use to pick a discount rate (the tool has none of its own), for several payments over time, or for a market price: it discounts one amount at one fixed rate. For growth going forward use smartfin_calculate_future_value.
| Argument | Type | Description |
|---|---|---|
| years* | number | Years until the amount is due; a part of a year is a decimal |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| future_value* | number | Amount due later, in the currency chosen |
| annual_rate_pct* | number | Yearly discount rate in %, above -100, e.g. 6 |
| compounding_frequency* | number | Times a year the rate compounds: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily |
{
"type": "object",
"required": [
"future_value",
"annual_rate_pct",
"compounding_frequency",
"years"
],
"properties": {
"years": {
"type": "number",
"maximum": 1000,
"minimum": 0,
"description": "Years until the amount is due; a part of a year is a decimal"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"future_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Amount due later, in the currency chosen"
},
"annual_rate_pct": {
"type": "number",
"maximum": 1000,
"minimum": -99.9999,
"description": "Yearly discount rate in %, above -100, e.g. 6"
},
"compounding_frequency": {
"enum": [
1,
2,
4,
12,
52,
365
],
"type": "number",
"description": "Times a year the rate compounds: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily"
}
},
"additionalProperties": false
}The profit and the profit margin percentage from revenue and total costs (margin = (revenue - costs) / revenue x 100). A negative margin is a valid result. Use for questions about profit as a share of sales, from two figures for the same period. Do not use for return on money invested (use smartfin_calculate_roi), for taxes, or to say whether a margin is good: the tool reports the figure only. The cost figure is whatever the user supplies, so it says nothing about gross versus net unless they define it.
| Argument | Type | Description |
|---|---|---|
| revenue* | number | Revenue for the period in the currency chosen, above 0 |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| total_costs* | number | Total costs for the same period in the currency chosen; it can be above revenue |
{
"type": "object",
"required": [
"revenue",
"total_costs"
],
"properties": {
"revenue": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0.01,
"description": "Revenue for the period in the currency chosen, above 0"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"total_costs": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Total costs for the same period in the currency chosen; it can be above revenue"
}
},
"additionalProperties": false
}Works the way SmartFin's withdrawal calculator does, with withdrawals monthly, quarterly or annually and the balance earning a yearly return between them. how_long: how many years a balance lasts at a set withdrawal, optionally rising each year with inflation. how_much: the withdrawal that lasts a given number of years, or that never touches the principal (lasts_forever). Use for "how long will my savings last" or "how much can I withdraw". Do not use to find a savings target (use smartfin_calculate_fire_number). Returns are an assumption; excludes taxes and fees.
| Argument | Type | Description |
|---|---|---|
| years | number | For how_much: how many years the money should last |
| balance* | number | Starting balance, in the currency chosen |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| question* | string | how_long needs withdrawal_amount; how_much needs years or lasts_forever |
| frequency | string | How often money is withdrawn. Default monthly |
| inflation_pct | number | For how_long, optional: the withdrawal rises by this % each year |
The profit or loss and the ROI percentage from an initial investment and a final value (ROI = (final - initial) / initial x 100). Negative results are valid. It is not annualized. Use for questions about the total percentage return on money put in, from two values. Do not use for a return per year (use the CAGR calculator at smartfin.fyi/cagr-calculator.html), for what a real stock returned (use smartfin_calculate_investment_return), or for fees and taxes: include them in the final value yourself.
| Argument | Type | Description |
|---|---|---|
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| final_value* | number | Final value in the currency chosen; it can be below the initial amount |
| initial_value* | number | Initial investment in the currency chosen, above 0 |
{
"type": "object",
"required": [
"initial_value",
"final_value"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"final_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Final value in the currency chosen; it can be below the initial amount"
},
"initial_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0.01,
"description": "Initial investment in the currency chosen, above 0"
}
},
"additionalProperties": false
}Compares the modeled balances of a savings account and of an investment after 1 to 50 years, from the same starting amount and the same monthly contribution, the way SmartFin's savings vs investing calculator does. You give the savings rate and the investment return; each is held the same every year. Optional: a yearly increase in the monthly contribution (or one that follows inflation), a yearly fee on investments, and tax on savings interest or investment gains. Returns both modeled balances, money put in, interest, growth, fees and taxes, the difference, the same figures in today's money, the investment return at which both end the same (when a fee or tax is given), and a fixed falling-returns case at −2% a year. Use for questions like "how do 10,000 in savings at 4% and the same amount invested at 7% compare after 20 years" or "how far apart do saving and investing end after 20 years". It reports two modeled balances and does not say which option to choose. Do not use it for historical stock or index returns (use smartfin_compare_investment_strategies) or for account types and their tax rules, which it does not model. Amounts can be in any one currency; none is converted.
| Argument | Type | Description |
|---|---|---|
| years | number | Years to compare, 1 to 50. A decimal is rounded to the nearest whole year. Default 10 |
| currency | string | Currency for the amounts in the summary and the link. Default USD; amounts are never converted |
| inflation_pct | number | Inflation, % a year. Used to show balances in today's money, and to set the yearly increase when step_up_matches_inflation is true. Default 3 |
| starting_amount |
The interest earned and the final amount on a principal at a fixed yearly rate over a number of years, when interest is not compounded (interest = principal x rate x time). Use for questions about simple interest on a loan or deposit, such as a short-term note or a bond coupon at a flat rate. Do not use when interest is added back to the balance (use smartfin_calculate_future_value or smartfin_project_savings_growth), for loan payments (use smartfin_calculate_loan_payment), or for taxes and fees: it applies none.
| Argument | Type | Description |
|---|---|---|
| years* | number | Time in years; a part of a year is a decimal, e.g. 0.5 |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| principal* | number | Starting amount in the currency chosen, above 0 |
| annual_rate_pct* | number | Yearly interest rate in %, from 0 to 100, e.g. 5 |
{
"type": "object",
"required": [
"principal",
"annual_rate_pct",
"years"
],
"properties": {
"years": {
"type": "number",
"maximum": 1000,
"minimum": 0,
"description": "Time in years; a part of a year is a decimal, e.g. 0.5"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"principal": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0.01,
"description": "Starting amount in the currency chosen, above 0"
},
"annual_rate_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Yearly interest rate in %, from 0 to 100, e.g. 5"
}
},
"additionalProperties": false
}Runs one amount through three ways of buying the same US stock or index ETF over a chosen period, on real daily closing prices (adjusted for splits and reinvested dividends): all at once on the first trading day (lump sum), spread evenly on the trading day nearest the 1st of each month, or bought after the price falls a set % from its latest high. Returns each strategy's final value, total and yearly return, worst fall and Sharpe ratio. Use when the user asks which way of investing would have done better for a specific stock or index over a past period, or what an amount would be worth under each approach. Do not use for one strategy only (use smartfin_calculate_investment_return), for several reference periods at once (use smartfin_compare_time_periods), or for future projections. Limits: US-listed S&P 500 companies and major index ETFs only, prices in US dollars, month-level start and end; results depend on the period and are not a prediction.
| Argument | Type | Description |
|---|---|---|
| amount* | number | Total dollars to invest across the whole period |
| ticker* | string | Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. |
| end_month | string | Last month to include, YYYY-MM. Omit for the latest available month |
| start_month* | string | First month, YYYY-MM, e.g. 2016-01 |
Compares buying a home with a fixed-rate mortgage against renting a similar home and investing the money not spent on the home, over the years someone plans to stay, the way SmartFin's rent vs buy calculator does. Both start with the same cash and spend the same each month; whichever costs less that month invests the difference. Returns the modeled money each choice leaves (home sold and loan paid, or kept as equity, against the investments), the difference, the first year-end at which buying leaves at least as much as renting, the starting rent at which both leave the same, the monthly payment, month-one costs and totals. Use when someone asks how renting and buying compare, how long they would need to stay for the two to cross, or what rent matches buying a home. Do not use for rental-property investing, for how much someone can borrow, for tax planning or for adjustable-rate loans. Rates are held constant; income-tax effects of owning and tax on the home sale are not modeled. It reports modeled money only and does not say whether to rent or buy. Amounts can be in any one currency; none is converted.
| Argument | Type | Description |
|---|---|---|
| pmi_pct | number | Mortgage insurance (PMI), % of loan a year, 0 to 3. Default 0 |
| currency | string | Currency for the amounts in the summary and the link. Default USD; amounts are never converted |
| keep_home | boolean | True: the home is kept at the end of the stay and counted as equity, not cash; false: it is sold. Default false |
| home_price* | number | Home price, in the currency chosen, 1000 to 100000000. Default 400000 |
What a fixed amount in a US stock or index ETF became across reference periods ending today (or on as_of_date): since 2000, since the dot-com peak (24 Mar 2000), since the dot-com crash low (9 Oct 2002), since the 2007 peak (9 Oct 2007), since the 2008 crash low (9 Mar 2009), since 2010, since the COVID low (23 Mar 2020), since the 2022 low (12 Oct 2022), and the last 10, 5 and 1 years. Each row gives lump sum and monthly investing results on daily closing prices adjusted for splits and reinvested dividends. Event dates are S&P 500 closing highs and lows. Use when the user asks how a stock did over several time frames, or names one of these moments ("from the COVID low", "since 2000"). Do not use for a custom start month (use smartfin_compare_investment_strategies). Limits: periods that start before the ticker's price history are skipped and listed with the reason; US dollars; not a prediction.
| Argument | Type | Description |
|---|---|---|
| amount | number | Dollars invested in each period. Default 1000 |
| ticker* | string | Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. |
| periods | array | Which periods to include. Omit for all |
| as_of_date | string | End date, YYYY-MM-DD. Omit for the latest available price |
{
"type": "object",
"required": [
"ticker"
],
"properties": {
"amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 1,
"description": "Dollars invested in each period. Default 1000"
},
"ticker": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z.\\-]{0,9}$",
"description": "Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI."
},
"periods": {
"type": "array",
"items": {
"enum": [
"dotcom_peak",
"since_2000",
"dotcom_low",
"peak_2007",
"crash_2009_low",
"since_2010",
"covid_low",
"low_2022",
"last_10y",
"last_5y",
"last_1y"
],
"type": "string"
},
"description": "Which periods to include. Omit for all"
},
"as_of_date": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"description": "End date, YYYY-MM-DD. Omit for the latest available price"
}
},
"additionalProperties": false
}Compares two US-listed stocks or index ETFs on identical dates with the same money, on daily closing prices adjusted for stock splits with dividends reinvested, the way SmartFin's Compare Two Stocks page does. Returns, for each, the value of the starting amount and its total and yearly return, the worst fall with its dates and the months back to the high before it (or that it hasn't recovered), and, with monthly_amount, the whole holding (with_monthly: purchases made, money put in, value, and total return on the money put in) with that amount added once for each 1st of a month after the start date and on or before the end date, on the trading day nearest that 1st. Use when someone asks how two stocks or funds did against each other, e.g. "apple vs microsoft stock over 10 years" or "voo vs qqq since 2015". Do not use for one stock (use smartfin_calculate_investment_return), for ways of buying one stock (use smartfin_compare_investment_strategies), for future returns, or to say which to buy: it states both figures and never picks one. Limits: today's S&P 500 companies and major index ETFs only, prices in US dollars; both start on the same trading day, and when one stock's history starts later, both start then and the summary says so.
| Argument | Type | Description |
|---|---|---|
| amount | number | Starting amount invested once in each, in US dollars. Default 1000 |
| end_date | string | End date, YYYY-MM-DD; a weekend or holiday uses the nearest trading day. Omit for the latest close |
| start_date | string | Start date, YYYY-MM-DD; a weekend or holiday uses the nearest trading day (the earlier on a tie). Omit for 10 years before the latest close |
| first_ticker |
The HTML to put one of SmartFin's free calculators on a website the user runs: a blog post, a class or library page, a client resources page. One iframe line, free, no sign-up, no cookies or tracking; the widget fills the width it's given and follows the reader's light or dark mode. Calculators: compare_two_stocks (Compare Two Stocks), simulator (Stock Returns Over Time), investment (Investment growth calculator), compound_interest (Compound interest calculator), mortgage (Mortgage calculator), car_loan (Car loan calculator), student_loan (Student loan calculator), refinance (Refinance calculator), mortgage_payoff (Mortgage payoff calculator), down_payment (Down payment calculator), cagr (CAGR calculator), rule_of_72 (Rule of 72 calculator), inflation (Inflation calculator), fire (FIRE calculator), withdrawal (Withdrawal planner), savings_vs_investing (Savings vs investing calculator), rent_vs_buy (Rent vs buy calculator), simple_interest (Simple interest calculator), future_value (Future value calculator), present_value (Present value calculator), roi (ROI calculator), profit_margin (Profit margin calculator). Use when the user wants a calculator on their own site or asks how to add one. Do not use to calculate anything (use the other smartfin_ tools).
| Argument | Type | Description |
|---|---|---|
| currency | string | Show this currency to every reader. Omit to let each reader choose |
| calculator* | string | Which calculator to embed |
{
"type": "object",
"required": [
"calculator"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Show this currency to every reader. Omit to let each reader choose"
},
"calculator": {
"enum": [
"compare_two_stocks",
"simulator",
"investment",
"compound_interest",
"mortgage",
"car_loan",
"student_loan",
"refinance",
"mortgage_payoff",
"down_payment",
"cagr",
"rule_of_72",
"inflation",
"fire",
"withdrawal",
"savings_vs_investing",
"rent_vs_buy",
"simple_interest",
"future_value",
"present_value",
"roi",
"profit_margin"
],
"type": "string",
"description": "Which calculator to embed"
}
},
"additionalProperties": false
}Future balance of savings or an investment growing at a fixed yearly rate, with optional monthly contributions and a chosen compounding frequency. Returns the balance, total paid in and interest earned. Use for forward-looking "how much will I have" questions at an assumed rate. Do not use for what a real stock did in the past (use smartfin_calculate_investment_return). A fixed rate is an assumption, not a forecast.
| Argument | Type | Description |
|---|---|---|
| years* | number | Number of years |
| currency | string | Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD |
| principal* | number | Starting amount in the currency chosen |
| annual_rate_pct* | number | Assumed yearly rate in %, e.g. 7 |
| compounds_per_year | number | 1 yearly, 2 twice a year, 4 quarterly, 12 monthly, 365 daily. Default 12 |
| monthly_contribution | number | Added each month, in the currency chosen. Default 0 |
| number |
| Yearly spending today, in the currency chosen |
| current_savings | number | Invested today, in the currency chosen. Default 0 |
| expected_return_pct | number | Assumed yearly return in %. Default 7 |
| withdrawal_rate_pct | number | Withdrawal-rate assumption in %. Default 4 |
{
"type": "object",
"required": [
"annual_expenses"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"current_age": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "For the age at FIRE and Coast FIRE. Default 30"
},
"inflation_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Yearly inflation in %, applied to expenses. Default 3"
},
"annual_savings": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Added each year, in the currency chosen (12 x a monthly amount). Default 0"
},
"retirement_age": {
"type": "number",
"maximum": 120,
"minimum": 0,
"description": "Optional: a traditional retirement age, for the Coast FIRE number"
},
"annual_expenses": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Yearly spending today, in the currency chosen"
},
"current_savings": {
"type": "number",
"maximum": 10000000000,
"minimum": 0,
"description": "Invested today, in the currency chosen. Default 0"
},
"expected_return_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Assumed yearly return in %. Default 7"
},
"withdrawal_rate_pct": {
"enum": [
3,
4,
5
],
"type": "number",
"description": "Withdrawal-rate assumption in %. Default 4"
}
},
"additionalProperties": false
}{
"type": "object",
"required": [
"present_value",
"annual_rate_pct",
"compounding_frequency",
"years"
],
"properties": {
"years": {
"type": "number",
"maximum": 1000,
"minimum": 0,
"description": "Time in years; a part of a year is a decimal"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"present_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Amount today in the currency chosen"
},
"annual_rate_pct": {
"type": "number",
"maximum": 1000,
"minimum": -99.9999,
"description": "Yearly rate in %, above -100, e.g. 6"
},
"compounding_frequency": {
"enum": [
1,
2,
4,
12,
52,
365
],
"type": "number",
"description": "Times a year interest is added: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily"
}
},
"additionalProperties": false
}| First month, YYYY-MM |
| dip_threshold_pct | number | For buy_the_dip: trigger fall in %. Default 10 |
| dip_percent_per_buy | number | For buy_the_dip: % of the amount per buy. Default 10 |
{
"type": "object",
"required": [
"ticker",
"strategy",
"amount",
"start_month"
],
"properties": {
"amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 1,
"description": "Total dollars invested over the period"
},
"ticker": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z.\\-]{0,9}$",
"description": "Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI."
},
"strategy": {
"enum": [
"lump_sum",
"monthly",
"buy_the_dip"
],
"type": "string",
"description": "Which way of investing"
},
"end_month": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
"description": "Last month to include, YYYY-MM. Omit for the latest available month"
},
"start_month": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
"description": "First month, YYYY-MM"
},
"dip_threshold_pct": {
"enum": [
5,
10,
15,
20
],
"type": "number",
"description": "For buy_the_dip: trigger fall in %. Default 10"
},
"dip_percent_per_buy": {
"enum": [
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
],
"type": "number",
"description": "For buy_the_dip: % of the amount per buy. Default 10"
}
},
"additionalProperties": false
}| down_payment_pct |
| number |
| Mortgage only: down payment as % of home_price. Default 20 |
{
"type": "object",
"required": [
"annual_rate_pct",
"term_years"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"loan_type": {
"enum": [
"mortgage",
"car",
"student",
"personal"
],
"type": "string",
"description": "Type of loan; chooses the SmartFin calculator link. Default mortgage"
},
"home_price": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Mortgage only: home price, in the currency chosen, with down_payment_pct"
},
"term_years": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "Loan term in years, e.g. 30 for a mortgage, 5 for a car loan"
},
"loan_amount": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "Amount borrowed, in the currency chosen. Give this or home_price"
},
"annual_rate_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Annual interest rate in %, e.g. 6.5"
},
"down_payment_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Mortgage only: down payment as % of home_price. Default 20"
}
},
"additionalProperties": false
}| Starting amount in the currency chosen. Leave out when solving for present_value |
| annual_rate_pct | number | Yearly rate in %, above -100, e.g. 6. Leave out when solving for annual_rate_pct |
| compounding_frequency* | number | Times a year interest is added: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily |
{
"type": "object",
"required": [
"solve_for",
"compounding_frequency"
],
"properties": {
"years": {
"type": "number",
"maximum": 1000,
"minimum": 0,
"description": "Time in years; a part of a year is a decimal. Leave out when solving for years"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"solve_for": {
"enum": [
"future_value",
"present_value",
"annual_rate_pct",
"years"
],
"type": "string",
"description": "Which number to find: future_value, present_value (the starting amount), annual_rate_pct or years"
},
"future_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Amount at the end in the currency chosen. Leave out when solving for future_value"
},
"present_value": {
"type": "number",
"maximum": 1000000000000,
"minimum": 0,
"description": "Starting amount in the currency chosen. Leave out when solving for present_value"
},
"annual_rate_pct": {
"type": "number",
"maximum": 1000,
"minimum": -99.9999,
"description": "Yearly rate in %, above -100, e.g. 6. Leave out when solving for annual_rate_pct"
},
"compounding_frequency": {
"enum": [
1,
2,
4,
12,
52,
365
],
"type": "number",
"description": "Times a year interest is added: 1 annually, 2 semiannually, 4 quarterly, 12 monthly, 52 weekly, 365 daily"
}
},
"additionalProperties": false
}| extra_monthly |
| number |
| Extra paid with every monthly payment from the next one, in the same currency. Default 0. 0 to 1000000 |
| lump_sum_month | number | Which payment the one-off amount is paid with: 1 = the next payment. Default 1. 1 to 480 |
| annual_rate_pct* | number | Yearly interest rate, % a year, fixed for the rest of the loan. 0 to 25 |
| current_balance* | number | What is still owed today, from the statement. 1 to 100000000 |
| monthly_payment | number | The monthly payment from the statement, principal and interest only (no escrow). Give this or years_left. 0 to 100000000 |
{
"type": "object",
"required": [
"current_balance",
"annual_rate_pct"
],
"properties": {
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency for the amounts in the summary and the link. Default USD; amounts are never converted"
},
"lump_sum": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "A one-off extra payment, in the same currency. Default 0. 0 to 100000000"
},
"years_left": {
"type": "number",
"maximum": 40,
"minimum": 0.0417,
"description": "Time left on the loan in years (to the nearest month: 2.5 is 2 years 6 months). Give this or monthly_payment. 1 month to 40"
},
"extra_monthly": {
"type": "number",
"maximum": 1000000,
"minimum": 0,
"description": "Extra paid with every monthly payment from the next one, in the same currency. Default 0. 0 to 1000000"
},
"lump_sum_month": {
"type": "number",
"maximum": 480,
"minimum": 1,
"description": "Which payment the one-off amount is paid with: 1 = the next payment. Default 1. 1 to 480"
},
"annual_rate_pct": {
"type": "number",
"maximum": 25,
"minimum": 0,
"description": "Yearly interest rate, % a year, fixed for the rest of the loan. 0 to 25"
},
"current_balance": {
"type": "number",
"maximum": 100000000,
"minimum": 1,
"description": "What is still owed today, from the statement. 1 to 100000000"
},
"monthly_payment": {
"type": "number",
"maximum": 100000000,
"minimum": 0,
"description": "The monthly payment from the statement, principal and interest only (no escrow). Give this or years_left. 0 to 100000000"
}
},
"additionalProperties": false
}| lasts_forever | boolean | For how_much: the withdrawal that never touches the principal. At a return of 0% or below no amount qualifies, and withdrawal_per_period is 0 |
| withdrawal_amount | number | For how_long: each withdrawal, in the currency chosen, at the chosen frequency |
| expected_return_pct* | number | Assumed yearly return in % |
{
"type": "object",
"required": [
"question",
"balance",
"expected_return_pct"
],
"properties": {
"years": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "For how_much: how many years the money should last"
},
"balance": {
"type": "number",
"maximum": 10000000000,
"minimum": 0,
"description": "Starting balance, in the currency chosen"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"question": {
"enum": [
"how_long",
"how_much"
],
"type": "string",
"description": "how_long needs withdrawal_amount; how_much needs years or lasts_forever"
},
"frequency": {
"enum": [
"monthly",
"quarterly",
"annually"
],
"type": "string",
"description": "How often money is withdrawn. Default monthly"
},
"inflation_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "For how_long, optional: the withdrawal rises by this % each year"
},
"lasts_forever": {
"type": "boolean",
"description": "For how_much: the withdrawal that never touches the principal. At a return of 0% or below no amount qualifies, and withdrawal_per_period is 0"
},
"withdrawal_amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 0,
"description": "For how_long: each withdrawal, in the currency chosen, at the chosen frequency"
},
"expected_return_pct": {
"type": "number",
"maximum": 100,
"minimum": -99,
"description": "Assumed yearly return in %"
}
},
"additionalProperties": false
}| number |
| Amount in the account at the start, in the currency chosen below; the same for both paths. Default 10000 |
| savings_rate_pct | number | Savings account rate, % a year, with compounding included (APY in the US, AER in the UK). Held the same every year. Default 3 |
| investment_fee_pct | number | Yearly fee on investments, % a year, subtracted from the return (6% with a 1% fee grows at 5%). Default 0 |
| monthly_contribution | number | Amount added to both paths at the end of every month, in the same currency. Default 500 |
| investment_return_pct | number | Investment return before any fee, % a year; may be negative. Held the same every year. Default 6 |
| contribution_step_up_pct | number | Yearly increase in the monthly contribution, % a year. Year 1 is the amount given; each later year rises by this. Ignored when step_up_matches_inflation is true. Default 0 |
| investment_gains_tax_pct | number | Tax on investment gains, % of the gains, taken once as if the investments were sold at the end of the years. A simplified assumption, not tax advice. Default 0 |
| savings_interest_tax_pct | number | Tax on savings interest, % of the interest, taken as the interest is credited. A simplified assumption, not tax advice. Default 0 |
| step_up_matches_inflation | boolean | True: each later year's monthly contribution changes by inflation_pct instead of contribution_step_up_pct. Default false |
{
"type": "object",
"properties": {
"years": {
"type": "number",
"maximum": 50,
"minimum": 1,
"description": "Years to compare, 1 to 50. A decimal is rounded to the nearest whole year. Default 10"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency for the amounts in the summary and the link. Default USD; amounts are never converted"
},
"inflation_pct": {
"type": "number",
"maximum": 20,
"minimum": -5,
"description": "Inflation, % a year. Used to show balances in today's money, and to set the yearly increase when step_up_matches_inflation is true. Default 3"
},
"starting_amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 0,
"description": "Amount in the account at the start, in the currency chosen below; the same for both paths. Default 10000"
},
"savings_rate_pct": {
"type": "number",
"maximum": 20,
"minimum": 0,
"description": "Savings account rate, % a year, with compounding included (APY in the US, AER in the UK). Held the same every year. Default 3"
},
"investment_fee_pct": {
"type": "number",
"maximum": 5,
"minimum": 0,
"description": "Yearly fee on investments, % a year, subtracted from the return (6% with a 1% fee grows at 5%). Default 0"
},
"monthly_contribution": {
"type": "number",
"maximum": 10000000,
"minimum": 0,
"description": "Amount added to both paths at the end of every month, in the same currency. Default 500"
},
"investment_return_pct": {
"type": "number",
"maximum": 20,
"minimum": -10,
"description": "Investment return before any fee, % a year; may be negative. Held the same every year. Default 6"
},
"contribution_step_up_pct": {
"type": "number",
"maximum": 20,
"minimum": 0,
"description": "Yearly increase in the monthly contribution, % a year. Year 1 is the amount given; each later year rises by this. Ignored when step_up_matches_inflation is true. Default 0"
},
"investment_gains_tax_pct": {
"type": "number",
"maximum": 60,
"minimum": 0,
"description": "Tax on investment gains, % of the gains, taken once as if the investments were sold at the end of the years. A simplified assumption, not tax advice. Default 0"
},
"savings_interest_tax_pct": {
"type": "number",
"maximum": 60,
"minimum": 0,
"description": "Tax on savings interest, % of the interest, taken as the interest is credited. A simplified assumption, not tax advice. Default 0"
},
"step_up_matches_inflation": {
"type": "boolean",
"description": "True: each later year's monthly contribution changes by inflation_pct instead of contribution_step_up_pct. Default false"
}
},
"additionalProperties": false
}| response_format |
| string |
| detailed adds worst fall and Sharpe ratio to the summary. Default concise |
| dip_threshold_pct | number | Buy-the-dip trigger: a fall of this % from the latest high. Default 10 |
| dip_percent_per_buy | number | Share of the amount spent on each dip, in %. Default 10 |
{
"type": "object",
"required": [
"ticker",
"amount",
"start_month"
],
"properties": {
"amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 1,
"description": "Total dollars to invest across the whole period"
},
"ticker": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z.\\-]{0,9}$",
"description": "Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI."
},
"end_month": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
"description": "Last month to include, YYYY-MM. Omit for the latest available month"
},
"start_month": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
"description": "First month, YYYY-MM, e.g. 2016-01"
},
"response_format": {
"enum": [
"concise",
"detailed"
],
"type": "string",
"description": "detailed adds worst fall and Sharpe ratio to the summary. Default concise"
},
"dip_threshold_pct": {
"enum": [
5,
10,
15,
20
],
"type": "number",
"description": "Buy-the-dip trigger: a fall of this % from the latest high. Default 10"
},
"dip_percent_per_buy": {
"enum": [
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
],
"type": "number",
"description": "Share of the amount spent on each dip, in %. Default 10"
}
},
"additionalProperties": false
}| term_years | number | Loan term, years, 1 to 40. Default 30 |
| hoa_monthly | number | HOA or condo fees, a month, in the currency chosen, 0 to 10000. Default 0 |
| monthly_rent* | number | Monthly rent, a month, in the currency chosen, 1 to 1000000. Default 2000 |
| years_to_stay | number | Years you plan to stay, whole years, 1 to 40. Default 10 |
| annual_rate_pct | number | Mortgage rate, % a year, fixed, 0 to 25. Default 6.5 |
| cost_growth_pct | number | Yearly increase in insurance and HOA, % a year, -5 to 15. Default 3 |
| maintenance_pct | number | Maintenance, % of home value a year, 0 to 5. Default 1 |
| buying_costs_pct | number | Closing costs when buying, % of price, 0 to 10. Default 3 |
| down_payment_pct | number | Down payment, % of price, 0 to 100. Default 20 |
| property_tax_pct | number | Property tax, % of home value a year, 0 to 5. Default 1 |
| rent_increase_pct | number | Yearly rent increase, % a year, -10 to 15. Default 3 |
| selling_costs_pct | number | Agent and closing costs when selling, % of sale price, 0 to 10. Default 6 |
| investment_tax_pct | number | Tax on investment gains, % of gains, 0 to 50. Default 0 |
| home_insurance_yearly | number | Home insurance, a year, in the currency chosen, 0 to 100000. Default 1500 |
| home_value_growth_pct | number | Home value growth, % a year, -10 to 15. Default 3 |
| investment_return_pct | number | Return on invested savings, % a year, -10 to 20. Default 6 |
| renters_insurance_monthly | number | Renter's insurance, a month, in the currency chosen, 0 to 1000. Default 0 |
{
"type": "object",
"required": [
"home_price",
"monthly_rent"
],
"properties": {
"pmi_pct": {
"type": "number",
"maximum": 3,
"minimum": 0,
"description": "Mortgage insurance (PMI), % of loan a year, 0 to 3. Default 0"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency for the amounts in the summary and the link. Default USD; amounts are never converted"
},
"keep_home": {
"type": "boolean",
"description": "True: the home is kept at the end of the stay and counted as equity, not cash; false: it is sold. Default false"
},
"home_price": {
"type": "number",
"maximum": 100000000,
"minimum": 1000,
"description": "Home price, in the currency chosen, 1000 to 100000000. Default 400000"
},
"term_years": {
"type": "number",
"maximum": 40,
"minimum": 1,
"description": "Loan term, years, 1 to 40. Default 30"
},
"hoa_monthly": {
"type": "number",
"maximum": 10000,
"minimum": 0,
"description": "HOA or condo fees, a month, in the currency chosen, 0 to 10000. Default 0"
},
"monthly_rent": {
"type": "number",
"maximum": 1000000,
"minimum": 1,
"description": "Monthly rent, a month, in the currency chosen, 1 to 1000000. Default 2000"
},
"years_to_stay": {
"type": "number",
"maximum": 40,
"minimum": 1,
"description": "Years you plan to stay, whole years, 1 to 40. Default 10"
},
"annual_rate_pct": {
"type": "number",
"maximum": 25,
"minimum": 0,
"description": "Mortgage rate, % a year, fixed, 0 to 25. Default 6.5"
},
"cost_growth_pct": {
"type": "number",
"maximum": 15,
"minimum": -5,
"description": "Yearly increase in insurance and HOA, % a year, -5 to 15. Default 3"
},
"maintenance_pct": {
"type": "number",
"maximum": 5,
"minimum": 0,
"description": "Maintenance, % of home value a year, 0 to 5. Default 1"
},
"buying_costs_pct": {
"type": "number",
"maximum": 10,
"minimum": 0,
"description": "Closing costs when buying, % of price, 0 to 10. Default 3"
},
"down_payment_pct": {
"type": "number",
"maximum": 100,
"minimum": 0,
"description": "Down payment, % of price, 0 to 100. Default 20"
},
"property_tax_pct": {
"type": "number",
"maximum": 5,
"minimum": 0,
"description": "Property tax, % of home value a year, 0 to 5. Default 1"
},
"rent_increase_pct": {
"type": "number",
"maximum": 15,
"minimum": -10,
"description": "Yearly rent increase, % a year, -10 to 15. Default 3"
},
"selling_costs_pct": {
"type": "number",
"maximum": 10,
"minimum": 0,
"description": "Agent and closing costs when selling, % of sale price, 0 to 10. Default 6"
},
"investment_tax_pct": {
"type": "number",
"maximum": 50,
"minimum": 0,
"description": "Tax on investment gains, % of gains, 0 to 50. Default 0"
},
"home_insurance_yearly": {
"type": "number",
"maximum": 100000,
"minimum": 0,
"description": "Home insurance, a year, in the currency chosen, 0 to 100000. Default 1500"
},
"home_value_growth_pct": {
"type": "number",
"maximum": 15,
"minimum": -10,
"description": "Home value growth, % a year, -10 to 15. Default 3"
},
"investment_return_pct": {
"type": "number",
"maximum": 20,
"minimum": -10,
"description": "Return on invested savings, % a year, -10 to 20. Default 6"
},
"renters_insurance_monthly": {
"type": "number",
"maximum": 1000,
"minimum": 0,
"description": "Renter's insurance, a month, in the currency chosen, 0 to 1000. Default 0"
}
},
"additionalProperties": false
}| string |
| Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. |
| second_ticker* | string | Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI. |
| monthly_amount | number | Optional amount added to each every month after the start, in US dollars. Default 0 |
{
"type": "object",
"required": [
"first_ticker",
"second_ticker"
],
"properties": {
"amount": {
"type": "number",
"maximum": 1000000000,
"minimum": 1,
"description": "Starting amount invested once in each, in US dollars. Default 1000"
},
"end_date": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"description": "End date, YYYY-MM-DD; a weekend or holiday uses the nearest trading day. Omit for the latest close"
},
"start_date": {
"type": "string",
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"description": "Start date, YYYY-MM-DD; a weekend or holiday uses the nearest trading day (the earlier on a tie). Omit for 10 years before the latest close"
},
"first_ticker": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z.\\-]{0,9}$",
"description": "Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI."
},
"second_ticker": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z.\\-]{0,9}$",
"description": "Stock or ETF symbol, not a company name: AAPL not Apple. Covers 508 symbols: the S&P 500 companies plus the index ETFs SPY, VOO, IVV, QQQ, DIA, IWM, VTI."
},
"monthly_amount": {
"type": "number",
"maximum": 10000000,
"minimum": 0,
"description": "Optional amount added to each every month after the start, in US dollars. Default 0"
}
},
"additionalProperties": false
}{
"type": "object",
"required": [
"principal",
"annual_rate_pct",
"years"
],
"properties": {
"years": {
"type": "number",
"maximum": 100,
"minimum": 1,
"description": "Number of years"
},
"currency": {
"enum": [
"USD",
"EUR",
"GBP",
"CHF",
"AUD",
"CAD",
"SGD",
"HKD",
"INR",
"JPY"
],
"type": "string",
"description": "Currency symbol for the amounts in the summary only; amounts are never converted. The link opens the page in US dollars, and how_to says to pick the currency there. Default USD"
},
"principal": {
"type": "number",
"maximum": 10000000000,
"minimum": 0,
"description": "Starting amount in the currency chosen"
},
"annual_rate_pct": {
"type": "number",
"maximum": 1000,
"minimum": -99,
"description": "Assumed yearly rate in %, e.g. 7"
},
"compounds_per_year": {
"enum": [
1,
2,
4,
12,
365
],
"type": "number",
"description": "1 yearly, 2 twice a year, 4 quarterly, 12 monthly, 365 daily. Default 12"
},
"monthly_contribution": {
"type": "number",
"maximum": 1000000000,
"minimum": 0,
"description": "Added each month, in the currency chosen. Default 0"
}
},
"additionalProperties": false
}