SmartFin

fyi.smartfin由 smartfin.fyi 发布官方发布者v3.0.0更新于 Oct 24, 2026

Backtest S&P 500 stocks and ETFs on real prices, plus loan, savings, FIRE and retirement tools.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

SmartFin 是一个远程 MCP 服务器,让助手基于真实历史价格对美股和 ETF 做回测,并完成各类理财计算。

可以做什么
基于真实每日收盘价回测和比较美股或指数 ETF,支持一次性投入、每月定投和逢跌买入策略,以及跨参考周期或两只标的的对比。计算投资回报、ROI、终值、现值、单利,以及复利公式中缺失的变量。测算贷款、房贷、首付和提前还贷,并比较租房与买房。预测储蓄增长、储蓄与投资对比、通胀影响、FIRE 数字和退休提取。计算利润率,并获取 SmartFin 免费计算器的嵌入代码。
适用场景
适合需要快速、口径一致地回答个人理财问题的场景:过去一笔投资现在值多少、贷款每月和总成本、储蓄能撑多久、租房与买房哪个更划算。适合教学和规划类问答,让助手展示计算过程而不是凭感觉估算。
运行要求
远程 streamable HTTP 端点 smartfin.fyi;未声明任何软件包、环境变量或请求头。历史价格类工具需要能访问该服务器的数据。未声明身份验证。
安装前请注意
结果是基于用户提供的假设(利率、通胀、收益率)和历史价格的模型输出,不构成投资建议。嵌入代码工具会返回用于用户自己网站的 HTML。未声明需要凭据、付款或对第三方账户的写入操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SmartFin,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/fyi.smartfin%2Fsmartfin/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "smartfin": {
      "type": "http",
      "url": "https://smartfin.fyi/mcp"
    }
  }
}

工具

20

smartfin_compare_investment_strategies

Compare lump sum, monthly and buy-the-dip

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.

输入参数amount必填ticker必填end_monthstart_month必填response_formatdip_threshold_pctdip_percent_per_buy

smartfin_calculate_investment_return

Return of one investment strategy

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.

输入参数amount必填ticker必填strategy必填end_monthstart_month必填dip_threshold_pctdip_percent_per_buy

smartfin_compare_time_periods

One investment across reference periods

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.

输入参数amountticker必填periodsas_of_date

smartfin_calculate_loan_payment

Loan payment and total interest

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.

输入参数currencyloan_typehome_priceterm_years必填loan_amountannual_rate_pct必填down_payment_pct

smartfin_project_savings_growth

Project savings growth

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.

输入参数years必填currencyprincipal必填annual_rate_pct必填compounds_per_yearmonthly_contribution

smartfin_calculate_inflation_impact

Inflation impact over time

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.

输入参数years必填amount必填currencyannual_inflation_pct必填

smartfin_calculate_fire_number

FIRE number and years to reach it

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.

输入参数currencycurrent_ageinflation_pctannual_savingsretirement_ageannual_expenses必填current_savingsexpected_return_pctwithdrawal_rate_pct

smartfin_calculate_retirement_withdrawal

Retirement withdrawals: how long or how much

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.

输入参数yearsbalance必填currencyquestion必填frequencyinflation_pctlasts_foreverwithdrawal_amountexpected_return_pct必填

smartfin_calculate_simple_interest

Simple interest

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.

输入参数years必填currencyprincipal必填annual_rate_pct必填

smartfin_calculate_future_value

Future value of an amount

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.

输入参数years必填currencypresent_value必填annual_rate_pct必填compounding_frequency必填

smartfin_calculate_missing_variable

Solve for the missing number: future value, starting amount, rate or time

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.

输入参数yearscurrencysolve_for必填future_valuepresent_valueannual_rate_pctcompounding_frequency必填

smartfin_calculate_present_value

Present value of a future amount

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.

输入参数years必填currencyfuture_value必填annual_rate_pct必填compounding_frequency必填

smartfin_calculate_roi

Return on investment (ROI)

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.

输入参数currencyfinal_value必填initial_value必填

smartfin_calculate_profit_margin

Profit margin

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.

输入参数revenue必填currencytotal_costs必填

smartfin_compare_rent_vs_buy

Compare renting and buying a home

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.

输入参数pmi_pctcurrencykeep_homehome_price必填term_yearshoa_monthlymonthly_rent必填years_to_stayannual_rate_pctcost_growth_pctmaintenance_pctbuying_costs_pct另有 9 个

smartfin_calculate_savings_vs_investing

Compare saving and investing the same money

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.

输入参数yearscurrencyinflation_pctstarting_amountsavings_rate_pctinvestment_fee_pctmonthly_contributioninvestment_return_pctcontribution_step_up_pctinvestment_gains_tax_pctsavings_interest_tax_pctstep_up_matches_inflation

smartfin_calculate_mortgage_payoff

Pay off a mortgage sooner with extra payments

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.

输入参数currencylump_sumyears_leftextra_monthlylump_sum_monthannual_rate_pct必填current_balance必填monthly_payment

smartfin_calculate_down_payment

Save for a home down payment

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.

输入参数currencyhome_price必填saved_so_fargrowth_rate_pctdown_payment_pctmortgage_rate_pctsaving_each_monthdown_payment_amountmortgage_term_yearsreach_within_months

smartfin_compare_two_stocks

Compare two stocks over the same dates

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.

输入参数amountend_datestart_datefirst_ticker必填second_ticker必填monthly_amount

smartfin_get_embed_code

Put a SmartFin calculator on a website

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).

输入参数currencycalculator必填

版本历史

1
  1. v3.0.0最新Sep 29, 2026

评分

已满足适用检查项的 72%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分

    请在注册中心条目中发布图标。

  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。