economics-finance-ai999x: offline, verified economics and finance solver with step-by-step answers
Desktop app & command line · Compute in your browser · Install (Python) · Guides · Evaluation · AI999X on Hugging Face · Website · Support: Buy Me a Coffee
License: Apache-2.0 · Author: Ibnul Jaif Farabi (creator and engineer) · Organization: AI999X · Version 1.5.0
Field: Economics & Finance · Tasks: Question Answering
economics-finance-ai999x is an offline, deterministic economics and finance solver written in Rust: a desktop app, a command-line program, a browser module and a Python package. It answers economics and finance questions with verified results from 96 certified capabilities, gives 384 documented answers identically on Windows and Linux, and refuses rather than guesses when an answer cannot be verified.
economics-finance-ai999x reads a question in plain English (or a typed call), picks a certified economics and finance capability, computes the answer exactly, checks it, and returns the result with its steps, units, LaTeX and assumptions, or a refusal that says what is missing. It runs fully offline on any CPU, needs no GPU, no API key and no internet, and is built to give zero wrong answers: when it is not sure, it refuses instead of guessing.
Run it your way. economics-finance-ai999x comes as the AI999X desktop app and as the command-line program economics-finance for Windows and Linux, runs in your browser as WebAssembly, and installs as a Python package. The desktop app, the command line and the browser run the same compiled Rust program on your own device: offline, no Python needed.
Get it
| Way to run it | For | Get it |
|---|---|---|
| AI999X Economics and Finance desktop app 1.5.0 | Windows, Linux. This model in its own app: search, ask in words, forms, live figures, explanations, offline | Windows (x86-64) · Linux (x86-64) |
| AI999X desktop app 1.5.0 | Windows, Linux. Every AI999X model in one app: search, ask in words, forms, live figures, explanations, offline | Windows (x86-64) · Linux (x86-64) |
Command line (economics-finance) |
Windows, Linux. One program per model, offline, no Python | Windows (x86-64) · Linux (x86-64) |
| In your browser | any device. Nothing to install | Compute on the model page |
| Python | Python 3.10+ | pip install economics-finance-ai999x |
Checksums: SHA256SUMS · every version: https://downloads.ai999x.com/desktop/latest/ · install guide: desktop & command line
Quick start
Desktop app
Download AI999X Economics and Finance for your system (above), unpack it and start it; type a question in words or pick a capability, fill in the form and press Compute. Figures and an explanation of the answer appear beside it. The AI999X desktop app has the same, with Economics and Finance among all AI999X models.
Linux, from a terminal:
curl -LO https://downloads.ai999x.com/desktop/1.5.0/ai999x-economics-finance-1.5.0-linux-x86_64.tar.gz
curl -LO https://downloads.ai999x.com/desktop/1.5.0/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar xzf ai999x-economics-finance-1.5.0-linux-x86_64.tar.gz
./ai999x-economics-finance-1.5.0-linux-x86_64/ai999x-economics-finance
Command line
Linux:
curl -LO https://downloads.ai999x.com/desktop/1.5.0/ai999x-cli-1.5.0-linux-x86_64.tar.gz
curl -LO https://downloads.ai999x.com/desktop/1.5.0/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
mkdir -p ~/.local/share && tar xzf ai999x-cli-1.5.0-linux-x86_64.tar.gz -C ~/.local/share
echo 'export PATH="$HOME/.local/share/ai999x-cli-1.5.0-linux-x86_64:$PATH"' >> ~/.bashrc && source ~/.bashrc
economics-finance --version
Windows (PowerShell):
$F = "ai999x-cli-1.5.0-windows-x86_64.zip"
Invoke-WebRequest "https://downloads.ai999x.com/desktop/1.5.0/$F" -OutFile $F
Invoke-WebRequest "https://downloads.ai999x.com/desktop/1.5.0/SHA256SUMS" -OutFile SHA256SUMS
(Get-FileHash $F -Algorithm SHA256).Hash.ToLower() -eq ((Select-String -SimpleMatch $F SHA256SUMS).Line -split ' ')[0]
Expand-Archive $F -DestinationPath "$env:LOCALAPPDATA\AI999X" -Force
$D = "$env:LOCALAPPDATA\AI999X\ai999x-cli-1.5.0-windows-x86_64"; $env:Path += ";$D"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$D", "User")
economics-finance --version
Every command below was run as shown; the text under it is what the program printed.
Ask in words: Write the question as you would say it: the program reads the quantities and their units, picks the capability and answers.
$ economics-finance ask "Find the monthly payment on a loan with principal = 200000, annual rate = 6%, years = 30."
Read as: Loan payment (amortizing loan)
payment = 1199.10105
number_of_payments = 360
total_paid = 431676.3781
total_interest = 231676.3781
by: Loan payment (amortizing loan) (PMT = P i / (1 - (1 + i)^-n), i = annual rate / m, n = years x m)
annual_rate = 0.06
principal = 200000
years = 30
assumes: principal > 0; 0 <= annual_rate < 1; years x payments_per_year a whole number, years at most 1000
What a capability needs: The equation or method, every input and output with its SI unit. Read this before solve: it tells you the input names.
$ economics-finance info loan_payment
Loan payment (amortizing loan)
PMT = P i / (1 - (1 + i)^-n), i = annual rate / m, n = years x m
in principal amount borrowed [1]
in annual_rate nominal annual interest rate (decimal), compounded at the payment frequency [1]
in years term of the loan in years [1]
in payments_per_year payments per year (12 = monthly, default) (integer) [1]
out payment level payment per period [1]
out number_of_payments number of payments n = years x m [1]
out total_paid payment x n [1]
out total_interest total paid - principal [1]
Solve: Inputs as name=value, each with any unit of the right kind. The answer lists every output, the method used, each input converted to SI, and the conditions the answer assumes.
$ economics-finance solve loan_payment principal=200000.0 annual_rate=0.06 years=30.0
payment = 1199.10105
number_of_payments = 360
total_paid = 431676.3781
total_interest = 231676.3781
by: Loan payment (amortizing loan) (PMT = P i / (1 - (1 + i)^-n), i = annual rate / m, n = years x m)
principal = 200000
annual_rate = 0.06
years = 30
assumes: principal > 0; 0 <= annual_rate < 1; years x payments_per_year a whole number, years at most 1000
Many questions at once: One JSON request per line in, one JSON answer per line out, in order: for scripts, notebooks and agents (the program starts once). In PowerShell: Get-Content cases.jsonl | economics-finance batch
cases.jsonl:
{"key": "loan_payment", "inputs": {"principal": 200000.0, "annual_rate": 0.06, "years": 30.0}}
{"key": "irr", "inputs": {"cash_flows": "[-1000, 300, 400, 500]"}}
$ economics-finance batch < cases.jsonl
{"outcome":"SOLVED","message":"","value":1199.1010503055138,"unit":"","solved_for":"payment","si":[["principal",200000.0],["annual_rate",0.06],["years",30.0]],"values":[["payment",1199.1010503055138,""],["number_of_payments",360,""],["total_paid",431676.378109985,""],["total_interest",231676.37810998497,""]],"target":"payment","phrase":"level payment per period","assumptions":["principal > 0","0 <= annual_rate < 1","years x payments_per_year a whole number, years at most 1000"],"name":"Loan payment (amortizing loan)","equation":"PMT = P i / (1 - (1 + i)^-n), i = annual rate / m, n = years x m"}
{"outcome":"SOLVED","message":"","value":0.08896339469334996,"unit":"","solved_for":"irr","values":[["irr",0.08896339469334996,""]],"target":"irr","phrase":"internal rate of return per period","assumptions":["the cash flows change sign exactly once (otherwise the IRR is not unique and none is given)"],"name":"Internal rate of return","equation":"bisection on v = 1/(1 + r) for the unique positive root of sum CFt v^t, Newton polishing"}
In your browser
Open Economics and Finance on ai999x.com, choose a capability and press Compute: the model runs on your own device as WebAssembly; nothing is sent anywhere. Change any input (any unit of the right kind) and the answer, its explanation and the figures follow.
In your own page: economics_finance_ai999x.wasm and the loader ax-wasm.js (https://www.ai999x.com/compute/rust/ax-wasm.js).
Python
pip install economics-finance-ai999x
Worked examples in every form
The same worked example from the command line, from Python and in the browser. Each command-line output is what the program printed.
Endowment insurance
Actuarial present value of a benefit paid at the end of the year of death within n years, or at year n if alive then (term insurance + pure endowment).
Command line:
$ economics-finance solve endowment_insurance "mortality_rates=[0.01, 0.02, 0.03]" interest_rate=0.04 term=3 benefit=1000
apv = 890.4258648
term_part = 53.79672565
pure_endowment = 836.6291392
by: Endowment insurance (A_{x:n} = A^1_{x:n} + v^n n p_x)
interest_rate = 0.04
benefit = 1000
assumes: 1 <= term <= number of rates
Python:
import economics_finance_ai999x as m
a = m.solve("endowment_insurance", mortality_rates=[0.01, 0.02, 0.03], interest_rate="0.04", term="3", benefit="1000")
print(a.values or (a.value, a.unit))
Browser: open this capability on the model page and press Compute in your browser.
What this means: This calculation determines the actuarial present value of an endowment insurance policy. It combines the value of a term insurance benefit, which pays out upon death within the specified term, with a pure endowment benefit, which pays out if the insured survives to the end of the term. The total present value of 890.426 reflects these two components based on the provided mortality rates, interest rate, term length, and benefit amount.
Life expectancy from a life table
Curtate expectation of life e_x = sum_{k>=1} k p_x (whole years lived) and the complete expectation e_x + 1/2 (deaths uniform within each year).
Command line:
$ economics-finance solve life_expectancy "mortality_rates=[0.1, 0.3, 0.6, 1]"
curtate = 1.782
complete = 2.282
by: Life expectancy from a life table (e_x = sum_{k=1}^{n} k p_x)
assumes: the table ends with q = 1
Python:
import economics_finance_ai999x as m
a = m.solve("life_expectancy", mortality_rates=[0.1, 0.3, 0.6, 1])
print(a.values or (a.value, a.unit))
Browser: open this capability on the model page and press Compute in your browser.
What this means: This calculation determines the average number of future years a person at a specific age is expected to live using the provided mortality rates. The curtate expectation counts only whole years lived and equals 1.782. The complete expectation adjusts this figure by adding half a year to account for deaths occurring uniformly within each year interval, resulting in 2.282. These values serve as fundamental metrics for assessing longevity risk and planning insurance or retirement products based on current survival probabilities.
Net annual premium for whole life insurance
The level annual net premium, paid at the start of each year while alive, for a whole life benefit (equivalence principle): P = B A_x / a-due_x.
Command line:
$ economics-finance solve net_premium_whole_life "mortality_rates=[0.1, 0.3, 0.6, 1]" interest_rate=0.05 benefit=1000
premium = 330.2729832
insurance_apv = 873.9876903
annuity_due = 2.646258503
by: Net annual premium for whole life insurance (equivalence principle: P a-due_x = B A_x)
interest_rate = 0.05
benefit = 1000
assumes: the table ends with q = 1; 0 < interest_rate < 1
Python:
import economics_finance_ai999x as m
a = m.solve("net_premium_whole_life", mortality_rates=[0.1, 0.3, 0.6, 1], interest_rate="0.05", benefit="1000")
print(a.values or (a.value, a.unit))
Browser: open this capability on the model page and press Compute in your browser.
What this means: This calculation finds the level annual net premium for whole life insurance, which is 330.273. It applies the equivalence principle by balancing the present value of the death benefit against the present value of premiums paid while alive. The result uses an annual effective interest rate of 0.05 and mortality rates starting at age [0.1, 0.3, 0.6, 1]. The computed present value of the benefit is 873.988, and the present value of the annuity due is 2.64626.
Survival and death probabilities from a life table
t p_x (survive t years), t q_x (die within t years) and t|u q_x (survive t years, then die within the next u years) from one-year mortality rates.
Command line:
$ economics-finance solve survival_probability "mortality_rates=[0.01, 0.02, 0.03, 0.05]" years=3
survival = 0.941094
death_probability = 0.058906
deferred_death_probability = 0.0470547
by: Survival and death probabilities from a life table (t p_x = prod_{k<t} (1 - q_{x+k}))
assumes: 0 <= q <= 1; t + u <= number of rates
Python:
import economics_finance_ai999x as m
a = m.solve("survival_probability", mortality_rates=[0.01, 0.02, 0.03, 0.05], years="3")
print(a.values or (a.value, a.unit))
Browser: open this capability on the model page and press Compute in your browser.
What this means: This calculation determines the likelihood of surviving a specific duration based on annual mortality rates. Using the provided one-year death probabilities, the model computes the cumulative survival chance for 3 years as 0.941094. Consequently, the probability of dying within this period is derived as 0.058906. If a deferred window is specified, the probability of surviving the initial term and then dying in the subsequent interval is calculated as 0.0470547. These values reflect the aggregate risk profile defined by the input mortality data.
Documentation
- Rust user guide: the command line, every capability with a command and what it printed: PDF · Markdown
- Python guide: every capability with a Python example: PDF · Markdown
- Desktop app & command line: downloads, install, ask and search, figures, offline use, checksums: https://www.ai999x.com/desktop-cli/
- Model page: compute in your browser, every capability explained: https://www.ai999x.com/models/economics-finance-ai999x/
Highlights
- Verified, not generated. Every answer is computed by a certified economics and finance capability and checked (substituted back, dimension-checked or compared with an independent computation) before it is returned.
- Zero wrong answers by design. Seven explicit outcomes (SOLVED, NEEDS_INPUT, AMBIGUOUS, INVALID_INPUT, OUT_OF_SCOPE, UNRECOGNIZED_FORMAT, INTERNAL_ERROR), never a silent guess. Every one of its 384 documented answers is reproduced exactly on every tested platform.
- Plain-English questions and a guaranteed typed interface.
ask()reads documented question forms;solve(capability_id, **inputs)always solves a supported task with valid inputs. - Explains itself. Steps, formulas in LaTeX, units, assumptions and the model used, ready for notebooks, tutoring apps and homework checkers.
- Native and in the browser. Every capability also computes natively in Rust: the desktop app and the
economics-financecommand line for Windows and Linux, and WebAssembly on the model page, no Python, no network. - Small and portable. Pure Python (sympy, mpmath); identical answers on Windows and Linux (Python 3.10, 3.11, 3.12, 3.13, 3.14).
- Coverage: time value of money, loans and annuities, bonds, stocks and options, portfolio theory, risk measures, actuarial mathematics, microeconomics, macroeconomics and econometrics.
Model overview
| Property | Value |
|---|---|
| Package | economics-finance-ai999x 1.5.0 (import economics_finance_ai999x) |
| Type | Deterministic neuro-symbolic economics and finance engine (rule-based reading + certified symbolic capabilities) |
| Capabilities | 96 certified procedures |
| Knowledge pack | version 1.0.1 |
| Golden answers | 384 documented answers, identical on every tested platform |
| Platforms tested | Windows (Python 3.13), Linux x86-64 (Python 3.10, 3.11, 3.12, 3.13, 3.14) |
| Runtime | CPU only, offline; no GPU, no network, no API key |
| License | Apache-2.0 |
| Creator / engineer | Ibnul Jaif Farabi |
| Organization | AI999X |
Python quick start
pip install economics-finance-ai999x
# or straight from this repository:
pip install https://huggingface.co/AI999X/economics-finance-ai999x/resolve/main/dist/economics_finance_ai999x-1.5.0-py3-none-any.whl
import economics_finance_ai999x as economics_finance
economics_finance.ask("Find the monthly payment on a loan with principal = 200000, annual rate = 6%, years = 30.").show()
# -> SOLVED — payment = 1199.1, number_of_payments = 360, total_paid = 431676, total_interest = 231676 (loan_payment)
economics_finance.ask("Find the internal rate of return with cash flows = [-1000, 300, 400, 500].").show()
# -> SOLVED — irr = 0.0889634 (irr)
economics_finance.solve("black_scholes", spot=100, strike=100, time=1, rate=0.05, volatility=0.2).show()
# -> SOLVED — call = 10.4506, put = 5.57353, d1 = 0.35, d2 = 0.15 (black_scholes)
economics_finance.ask("Find the bond price with face = 1000, coupon rate = 5%, years = 10, ytm = 6%, frequency = 2.").show()
# -> SOLVED — price = 925.613, current_yield = 0.0540183, coupon = 25 (bond_price)
economics_finance.ask("Find the market equilibrium with demand intercept = 100, demand slope = 2, supply intercept = -20, supply slope = 4.").show()
# -> SOLVED — price = 20, quantity = 60, consumer_surplus = 900, producer_surplus = 450 (market_equilibrium)
economics_finance.ask("Who created you?").message
# -> economics-finance-ai999x was created and engineered by Ibnul Jaif Farabi at AI999X.
The Python package also installs a Python command, economics-finance-ai999x "<question>"; for the native program use economics-finance (above). The outputs above were produced by running this exact code on economics-finance-ai999x 1.5.0.
How every answer is verified
- Reading: the question is turned into typed quantities (value, unit, kind, role) and one asked quantity; every stated number must be used or the question is refused.
- Planning: only certified capabilities may answer; a capability applies only under the conditions the wording states (for example a pendulum, a liquid at rest, boiling).
- Computing: exact symbolic or high-precision numeric evaluation.
- Checking: dimensions, substitution back into the defining equation, and agreement between independent readings; any disagreement becomes a refusal, never a number.
Capabilities are certified before they ship: each must reproduce hand-worked reference cases, reject a deliberately wrong variant (a control), and leave every benchmark answer unchanged.
Python worked examples, with their steps
Each question was put to economics-finance-ai999x; the answer is the one it returned, with the steps it took.
Loan payment (amortizing loan) · Loans and annuities
Find the monthly payment on a loan with principal = 200000, annual rate = 6%, years = 30.
→ payment = 1199.10105, number_of_payments = 360, total_paid = 431676.3781, total_interest = 231676.3781
Steps- Loan payment (amortizing loan): principal = 200000, annual_rate = 0.06, years = 30 → payment = 1199.10105, number_of_payments = 360, total_paid = 431676.3781, total_interest = 231676.3781
Internal rate of return · Capital budgeting
Find the internal rate of return with cash flows = [-1000, 300, 400, 500].
→ irr = 0.08896339469
Steps- Internal rate of return: cash_flows = [-1000, 300, 400, 500] → irr = 0.08896339469
Black-Scholes option prices · Stocks and options
m.solve("black_scholes", spot=100, strike=100, time=1, rate=0.05, volatility=0.2)
→ call = 10.45058357, put = 5.573526022, d1 = 0.35, d2 = 0.15
Steps- Black-Scholes option prices: spot = 100, strike = 100, time = 1, rate = 0.05, volatility = 0.2 → call = 10.45058357, put = 5.573526022, d1 = 0.35, d2 = 0.15
Bond price from its yield · Bonds
Find the bond price with face = 1000, coupon rate = 5%, years = 10, ytm = 6%, frequency = 2.
→ price = 925.6126257, current_yield = 0.05401827785, coupon = 25
Steps- Bond price from its yield: face = 1000, coupon_rate = 0.05, years = 10, ytm = 0.06, frequency = 2 → price = 925.6126257, current_yield = 0.05401827785, coupon = 25
Market equilibrium and surplus (linear curves) · Microeconomics
Find the market equilibrium with demand intercept = 100, demand slope = 2, supply intercept = -20, supply slope = 4.
→ price = 20, quantity = 60, consumer_surplus = 900, producer_surplus = 450, total_surplus = 1350
Steps- Market equilibrium and surplus (linear curves): demand_intercept = 100, demand_slope = 2, supply_intercept = -20, supply_slope = 4 → price = 20, quantity = 60, consumer_surplus = 900, producer_surplus = 450, total_surplus = 1350
Endowment insurance · Actuarial mathematics
Find the endowment insurance value with mortality rates = [0.01, 0.02, 0.03], interest rate = 4%, term = 3, benefit = 1000.
→ apv = 890.4258648, term_part = 53.79672565, pure_endowment = 836.6291392
Steps- Endowment insurance: mortality_rates = [0.01, 0.02, 0.03], interest_rate = 0.04, term = 3, benefit = 1000 → apv = 890.4258648, term_part = 53.79672565, pure_endowment = 836.6291392
Figures
Every point was computed by economics-finance-ai999x.
Call option payoff: profit and loss at expiry
Profit and loss at expiry of a European call (strike 100) bought for the Black–Scholes price the package returns, 10.4506 (rate 5 %, volatility 20 %, 1 year): the payoff is the package's value with 10⁻⁶ year left, at 101 prices, minus the premium. The loss (shaded) is capped at the premium; profit starts above the break-even price S ≈ 110.451 (strike + premium = 110.451). Dashed: value before expiry minus the premium.
Bond price against yield, with duration and convexity
Price of a 10-year bond (face 1000, coupon 5 %, 2 payments a year) against its yield, with the duration (tangent) and duration-plus-convexity approximations, all computed by the package for yield changes of ±4 points. Modified duration 7.66505; marked: yield = 6 %, price = 925.613.
Supply and demand: equilibrium and surpluses
Linear demand Q = 100 − 2P and supply Q = -20 + 4P: the package returns the equilibrium P* = 20, Q* = 60, consumer surplus 900 and producer surplus 450 (the shaded triangles; total 1350). Marked: Q = 60, P = 20.
Loan amortisation: interest and principal in each payment
How the monthly payment of 1199.1 on a loan of 200000 at 6 % over 30 years splits into interest (lower part) and principal (upper part): the first payment of each year, as computed by the package. Year 1: interest 1000, principal 199.101; principal is the larger part from year 20 (interest 578.324). Total interest over the loan: 231676.
Two-asset portfolios: the risk–return curve
Risk and return of every mix of two assets (returns 10 % and 15 %, standard deviations 20 % and 30 %, correlation 0.1), computed by the package at 51 weights. The mix w₁ = 0.6 gives 12 % at σ = 17.7989 %; marked: the minimum-variance mix w₁ = 0.711864, σ = 17.3791 %, return 11.4407 %.
Minimum-variance portfolio: covariance and weights
The global minimum-variance portfolio of three assets with the covariance matrix shown (left): the package returns weights [0.547506, 0.190409, 0.262085] (right), a portfolio standard deviation of 0.160198, below every single asset's (0.2, 0.3, 0.25, each also computed by the package).
Capabilities
96 certified procedures. A few of them:
- Procedures: Arithmetic and geometric mean return; Beta of an asset from return series; Binomial option price (Cox-Ross-Rubinstein); Black-Scholes Greeks; Black-Scholes option prices; Bond price change from duration and convexity; Bond price from its yield; Break-even and target-profit volume; Capital asset pricing model; Compound annual growth rate; Compound interest; Constant elasticity from a log-log regression; Continuous compounding; Convexity of a bond; Correlation and covariance of two series; Cournot duopoly equilibrium; Cross-price elasticity of demand (midpoint); Cumulative interest of a loan; Discounted payback period; Dividend discount model (Gordon growth); Doubling time; Durbin-Watson statistic; Effective annual rate; Endowment insurance …
economics_finance_ai999x.templates() lists every question form ask() reads; the capability guide (PDF, every example executed) is included in this repository.
All 96 formulas
Show every formula, by topicActuarial mathematics / life annuities
Temporary life annuity-due
$$ \ddot a_{x:\overline{n}\vert } = \sum_{k=0}^{n-1} v^{k},{}_{k}p_x $$
Whole life annuity-due
$$ \ddot a_x = \sum_{k=0}^{\infty} v^{k},{}_{k}p_x $$
Actuarial mathematics / life insurance
Endowment insurance
$$ A_{x:\overline{n}\vert } = A^{1}{x:\overline{n}\vert } + v^{n},{}{n}p_x $$
Term life insurance (net single premium)
$$ A^{1}{x:\overline{n}\vert } = \sum{k=0}^{n-1} v^{k+1},{}{k}p_x,q{x+k} $$
Whole life insurance (net single premium)
$$ A_x = \sum_{k=0}^{\infty} v^{k+1},{}{k}p_x,q{x+k} $$
Actuarial mathematics / life tables
Life expectancy from a life table
$$ e_x = \sum_{k=1}^{\infty} {}_{k}p_x $$
Survival and death probabilities from a life table
$$ {}{t}p_x = \prod{k=0}^{t-1}(1 - q_{x+k}),\quad {}{t\vert u}q_x = {}{t}p_x - {}_{t+u}p_x $$
Actuarial mathematics / premiums
Net annual premium for whole life insurance
$$ P = B,\frac{A_x}{\ddot a_x} $$
Bonds / interest-rate risk
Bond price change from duration and convexity
$$ \Delta P \approx -D_{mod},P,\Delta y + \tfrac{1}{2},C,P,(\Delta y)^{2} $$
Convexity of a bond
$$ C = \frac{1}{P,m^{2}} \sum_{k=1}^{N} \frac{k(k+1),CF_k}{(1 + y/m)^{k+2}} $$
Macaulay and modified duration of a bond
$$ D_{mac} = \frac{1}{P}\sum_{k=1}^{N} \frac{k}{m},\frac{CF_k}{(1 + y/m)^{k}},\quad D_{mod} = \frac{D_{mac}}{1 + y/m} $$
Bonds / pricing
Bond price from its yield
$$ P = \sum_{k=1}^{N} \frac{C}{(1 + y/m)^{k}} + \frac{F}{(1 + y/m)^{N}} $$
Price of a zero-coupon bond
$$ P = \frac{F}{(1 + y/m)^{m t}} $$
Bonds / term structure
Implied forward rate from spot rates
$$ f_{t_1,t_2} = \left[\frac{(1+s_2)^{t_2}}{(1+s_1)^{t_1}}\right]^{1/(t_2 - t_1)} - 1 $$
Bonds / yields
Yield to maturity of a bond
$$ \text{price} = \sum_{k=1}^{N} \frac{C}{(1 + y/m)^{k}} + \frac{F}{(1 + y/m)^{N}} $$
Capital budgeting / discounted cash flow
Equivalent annual annuity
$$ EAA = \frac{NPV,r}{1 - (1 + r)^{-n}} $$
Internal rate of return
$$ \sum_{t=0}^{n} \frac{CF_t}{(1 + \mathrm{IRR})^{t}} = 0 $$
Modified internal rate of return
$$ \mathrm{MIRR} = \left(\frac{FV_{+}}{PV_{-}}\right)^{1/n} - 1 $$
Net present value
$$ NPV = \sum_{t=0}^{n} \frac{CF_t}{(1 + r)^{t}} $$
Profitability index
$$ PI = \frac{\sum_{t=1}^{n} CF_t (1+r)^{-t}}{-CF_0} $$
Capital budgeting / payback
Discounted payback period
$$ \sum_{s \le t} \frac{CF_s}{(1+r)^{s}} \ge 0 $$
Payback period
$$ \text{payback} = (t-1) + \frac{-\sum_{s<t} CF_s}{CF_t} $$
Capital budgeting / project comparison
NPV crossover rate of two projects
$$ \sum_t \frac{CF^A_t - CF^B_t}{(1 + r^{*})^{t}} = 0 $$
Econometrics / association
Correlation and covariance of two series
$$ r = \frac{\sum (x - \bar x)(y - \bar y)}{\sqrt{\sum (x-\bar x)^{2}\sum (y-\bar y)^{2}}} $$
Econometrics / demand estimation
Constant elasticity from a log-log regression
$$ \ln Q = \ln A + \varepsilon \ln P $$
Econometrics / diagnostics
Durbin-Watson statistic
$$ DW = \frac{\sum_{t=2}^{n}(e_t - e_{t-1})^{2}}{\sum_{t=1}^{n} e_t^{2}} $$
Econometrics / regression
Multiple linear regression (OLS)
$$ \hat\beta = (X^{\top}X)^{-1}X^{\top}y $$
Simple linear regression (OLS)
$$ \hat\beta = \frac{\sum(x - \bar x)(y - \bar y)}{\sum (x - \bar x)^{2}},\quad \hat\alpha = \bar y - \hat\beta\bar x $$
Loans and annuities / amortization
Cumulative interest of a loan
$$ \sum_{j=1}^{k} I_j = k,PMT - (P - B_k) $$
Interest and principal in a loan payment
$$ I_k = i,B_{k-1},\quad P_k = PMT - I_k $$
Loan payment (amortizing loan)
$$ PMT = \frac{P,i}{1 - (1+i)^{-n}} $$
Number of payments to repay a loan
$$ n = \frac{-\ln\left(1 - \frac{PV,r}{PMT}\right)}{\ln(1 + r)} $$
Remaining balance of a loan
$$ B_k = P(1+i)^{k} - PMT,\frac{(1+i)^{k} - 1}{i} $$
Macroeconomics / aggregate demand
Keynesian spending multiplier
$$ k = \frac{1}{1 - c(1 - t) + m} $$
Macroeconomics / growth
Solow model steady state
$$ k^{*} = \left(\frac{sA}{n + g + \delta}\right)^{\frac{1}{1-\alpha}} $$
Macroeconomics / interest and inflation
Inflation from a price index series
$$ \bar\pi = \left(\frac{P_n}{P_0}\right)^{1/n} - 1 $$
Real interest rate (Fisher equation)
$$ 1 + i = (1 + r)(1 + \pi) $$
Macroeconomics / money and banking
Money multiplier
$$ m = \frac{1 + c}{rr + c} $$
Macroeconomics / national accounts
Nominal GDP, real GDP and the GDP deflator
$$ \text{Deflator} = 100,\frac{\sum p_1 q_1}{\sum p_0 q_1} $$
Macroeconomics / price indices
Laspeyres, Paasche and Fisher price indices
$$ L = 100\frac{\sum p_1 q_0}{\sum p_0 q_0},\quad P = 100\frac{\sum p_1 q_1}{\sum p_0 q_1},\quad F = \sqrt{LP} $$
Microeconomics / consumer choice
Utility-maximising demand (Cobb-Douglas)
$$ x^{} = \frac{\alpha}{\alpha+\beta}\frac{M}{p_x},\quad y^{} = \frac{\beta}{\alpha+\beta}\frac{M}{p_y} $$
Microeconomics / cost-volume-profit
Break-even and target-profit volume
$$ Q_{BE} = \frac{F + \pi_{target}}{p - v} $$
Microeconomics / elasticity
Cross-price elasticity of demand (midpoint)
$$ E_{AB} = \frac{\Delta Q_A/\bar Q_A}{\Delta P_B/\bar P_B} $$
Income elasticity of demand (midpoint)
$$ E_I = \frac{(Q_2 - Q_1)/\bar Q}{(I_2 - I_1)/\bar I} $$
Point elasticity of a linear demand curve
$$ E = \frac{dQ}{dP}\frac{P}{Q} = \frac{-bP}{a - bP} $$
Price elasticity of demand (midpoint)
$$ E = \frac{(Q_2 - Q_1)/[(Q_1 + Q_2)/2]}{(P_2 - P_1)/[(P_1 + P_2)/2]} $$
Microeconomics / inequality
Gini coefficient
$$ G = \frac{\sum_i \sum_j \vert x_i - x_j\vert }{2 n^{2} \bar x} $$
Microeconomics / market structure
Herfindahl-Hirschman index and concentration ratio
$$ HHI = 10,000\sum_i s_i^{2} $$
Monopoly profit maximization
$$ Q^{} = \frac{A - c}{2(B + e)},\quad P^{} = A - BQ^{*} $$
Microeconomics / oligopoly
Cournot duopoly equilibrium
$$ q_i^{*} = \frac{A - 2c_i + c_j}{3B} $$
Stackelberg duopoly equilibrium
$$ q_L^{} = \frac{A - 2c_L + c_F}{2B},\quad q_F^{} = \frac{A - c_F - Bq_L^{*}}{2B} $$
Microeconomics / supply and demand
Market equilibrium and surplus (linear curves)
$$ P^{*} = \frac{a - c}{b + d},\quad CS = \frac{Q^{*2}}{2b} $$
Microeconomics / taxation
Per-unit tax incidence (linear curves)
$$ P_b = \frac{a - c + d,t}{b + d},\quad DWL = \tfrac12,t,(Q_0 - Q_t) $$
Portfolio theory / mean-variance
Global minimum-variance portfolio
$$ w^{*} = \frac{\Sigma^{-1}\mathbf{1}}{\mathbf{1}^{\top}\Sigma^{-1}\mathbf{1}} $$
Minimum-variance portfolio of two assets
$$ w_1^{*} = \frac{\sigma_2^{2} - \rho\sigma_1\sigma_2}{\sigma_1^{2} + \sigma_2^{2} - 2\rho\sigma_1\sigma_2} $$
Portfolio expected return and risk
$$ E[R_p] = w^{\top}\mu,\quad \sigma_p^{2} = w^{\top}\Sigma,w $$
Tangency (maximum Sharpe ratio) portfolio
$$ w^{*} = \frac{\Sigma^{-1}(\mu - r_f\mathbf{1})}{\mathbf{1}^{\top}\Sigma^{-1}(\mu - r_f\mathbf{1})} $$
Two-asset portfolio return and risk
$$ \sigma_p^{2} = w_1^{2}\sigma_1^{2} + w_2^{2}\sigma_2^{2} + 2 w_1 w_2 \rho,\sigma_1\sigma_2 $$
Portfolio theory / performance measures
Information ratio and tracking error
$$ IR = \frac{\overline{R_p - R_b}}{s(R_p - R_b)} $$
Sharpe ratio
$$ S = \frac{\bar R - r_f}{s_R} $$
Sortino ratio
$$ \mathrm{Sortino} = \frac{\bar R - T}{\sqrt{\frac{1}{n}\sum_i \min(0, R_i - T)^{2}}} $$
Treynor ratio and Jensen's alpha
$$ T = \frac{\bar R_p - r_f}{\beta_p},\quad \alpha_J = \bar R_p - [r_f + \beta_p(\bar R_m - r_f)] $$
Portfolio theory / returns
Arithmetic and geometric mean return
$$ \bar R_G = \left[\prod_{t=1}^{n}(1 + R_t)\right]^{1/n} - 1 $$
Expected return and risk from scenarios
$$ E[R] = \sum_i p_i R_i,\quad \sigma^{2} = \sum_i p_i (R_i - E[R])^{2} $$
Portfolio theory / systematic risk
Beta of an asset from return series
$$ \beta = \frac{\mathrm{Cov}(R_i, R_m)}{\mathrm{Var}(R_m)} $$
Risk measures / drawdown
Maximum drawdown
$$ \mathrm{MDD} = \max_{t}\left(1 - \frac{P_t}{\max_{s\le t} P_s}\right) $$
Risk measures / value at risk
Historical value at risk and expected shortfall
$$ \mathrm{VaR}c = -R{(k)},\quad \mathrm{CVaR}c = -\frac{1}{k}\sum{i=1}^{k} R_{(i)},\quad k = \lceil n(1-c)\rceil $$
Parametric (normal) value at risk and expected shortfall
$$ \mathrm{VaR} = V(z_c,\sigma\sqrt{h} - \mu h),\quad \mathrm{ES} = V\left(\frac{\sigma\sqrt{h},\varphi(z_c)}{1 - c} - \mu h\right) $$
Portfolio value at risk (variance-covariance)
$$ \mathrm{VaR} = z_c\sqrt{w^{\top}\Sigma w},\sqrt{h},V $$
Stocks / asset pricing
Capital asset pricing model
$$ E[R_i] = r_f + \beta_i,(E[R_m] - r_f) $$
Stocks / cost of capital
Weighted average cost of capital
$$ \mathrm{WACC} = \frac{E}{V} r_e + \frac{D}{V} r_d (1 - t) $$
Stocks / cost of equity
Required return implied by the Gordon model
$$ r = \frac{D_1}{P_0} + g $$
Stocks / equity valuation
Dividend discount model (Gordon growth)
$$ P_0 = \frac{D_1}{r - g} = \frac{D_0 (1 + g)}{r - g} $$
Two-stage dividend discount model
$$ P_0 = \sum_{k=1}^{n} \frac{D_0(1+g_1)^{k}}{(1+r)^{k}} + \frac{D_{n}(1+g_2)}{(r - g_2)(1+r)^{n}} $$
Stocks and options / arbitrage
Put-call parity
$$ C + K e^{-rT} = P + S e^{-qT} $$
Stocks and options / forwards
Forward price with cost of carry
$$ F_0 = S_0,e^{(r + u - q)T} $$
Forward price with known dividends
$$ F_0 = \left(S_0 - \sum_i D_i e^{-r t_i}\right)e^{rT} $$
Stocks and options / option pricing
Binomial option price (Cox-Ross-Rubinstein)
$$ u = e^{\sigma\sqrt{\Delta t}},\ d = 1/u,\ p = \frac{e^{(r-q)\Delta t} - d}{u - d},\ V = e^{-r\Delta t}[pV_u + (1-p)V_d] $$
Black-Scholes option prices
$$ C = S e^{-qT}N(d_1) - K e^{-rT}N(d_2),\quad d_{1} = \frac{\ln(S/K) + (r - q + \sigma^{2}/2)T}{\sigma\sqrt{T}} $$
Implied volatility
$$ C_{BS}(\sigma_{imp}) = C_{market} $$
Stocks and options / option risk
Black-Scholes Greeks
$$ \Delta_C = e^{-qT}N(d_1),\ \Gamma = \frac{e^{-qT}\varphi(d_1)}{S\sigma\sqrt{T}},\ \nu = S e^{-qT}\varphi(d_1)\sqrt{T} $$
Time value of money / annuities
Future value of an annuity
$$ FV = PMT,\frac{(1+r)^{n} - 1}{r};(\times (1 + r)\ \text{if due}) $$
Interest rate of an annuity
$$ PV = PMT,\frac{1 - (1+r)^{-n}}{r} $$
Present and future value of a growing annuity
$$ PV = \frac{C_1}{r - g}\left[1 - \left(\frac{1+g}{1+r}\right)^{n}\right] $$
Present value of an annuity
$$ PV = PMT,\frac{1 - (1+r)^{-n}}{r};(\times (1 + r)\ \text{if due}) $$
Sinking fund payment
$$ PMT = \frac{FV,r}{(1 + r)^{n} - 1} $$
Time value of money / discounting
Present value of a single sum
$$ PV = \frac{FV}{(1 + r)^{n}} $$
Time value of money / growth rates
Compound annual growth rate
$$ \mathrm{CAGR} = \left(\frac{V_{end}}{V_{begin}}\right)^{1/t} - 1 $$
Time value of money / interest
Compound interest
$$ A = P\left(1 + \frac{r}{m}\right)^{m t} $$
Continuous compounding
$$ A = P e^{r t} $$
Doubling time
$$ n = \frac{\ln 2}{\ln(1 + r)} $$
Simple interest
$$ I = P,r,t,\quad A = P(1 + r t) $$
Time value of money / interest rates
Effective annual rate
$$ \mathrm{EAR} = \left(1 + \frac{r}{m}\right)^{m} - 1 $$
Nominal rate from an effective rate
$$ r = m\left[(1 + \mathrm{EAR})^{1/m} - 1\right] $$
Time value of money / perpetuities
Present value of a growing perpetuity
$$ PV = \frac{C_1}{r - g} $$
Present value of a perpetuity
$$ PV = \frac{C}{r} $$
Out of scope
- Open-ended explanation, essay writing or tutoring dialogue: it is a solver, not a chatbot.
- Questions outside its certified economics and finance capabilities, and any question whose stated numbers it cannot all use: it refuses with the reason instead.
- High-stakes engineering, medical or legal decisions without independent review.
Limitations
- It answers what its certified capabilities cover (time value of money, loans and annuities, bonds, stocks and options, portfolio theory, risk measures, actuarial mathematics, microeconomics, macroeconomics and econometrics); anything else is refused with a reason.
ask()reads documented question forms and common phrasings; unusual wording may be refused; usesolve()for guaranteed results.- Results are as correct as the certified relations and their stated conditions; a certified relation is a checked model, not a claim about every physical situation.
Citation
@software{economics_finance_ai999x_1_5_0,
title = {economics-finance-ai999x: an offline, verified economics and finance solver},
author = {Farabi, Ibnul Jaif}, organization = {AI999X},
year = {2026}, version = {1.5.0},
url = {https://huggingface.co/AI999X/economics-finance-ai999x}
}
Contact
Questions, bug reports and requests: open a discussion on https://huggingface.co/AI999X/economics-finance-ai999x/discussions or visit https://ai999x.com.
Support the project
economics-finance-ai999x is free and open source. If it helps you, you can support further development on Buy Me a Coffee.
Created and engineered by Ibnul Jaif Farabi · AI999X · ai999x.com