Fundamental Analysis
v0.1.0Read-only fundamental analysis: P/E, DCF, Graham, Altman Z, Piotroski and margins, with formulas
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pe_ratio Price to earnings (P/E)
Price to earnings ratio from a share price and earnings per share.
| Parameter | Type | Description |
|---|---|---|
eps * | number | Earnings per share, same period basis as you intend (trailing or forward) |
price * | number | Share price |
dcf_valuation Discounted cash flow (DCF)
Present value of projected free cash flows plus a Gordon-growth terminal value. Optionally converts enterprise value to an implied share price.
| Parameter | Type | Description |
|---|---|---|
discountRate * | number | Discount rate or WACC as a decimal, e.g. 0.09 for 9% |
projectedFCF * | array | Projected free cash flow for years 1 to N |
terminalGrowthRate * | number | Perpetual growth after year N as a decimal, e.g. 0.025 |
cash | number | Optional: cash and equivalents, for the implied share price |
sharesOutstanding | number | Optional: shares outstanding, for the implied share price |
totalDebt | number | Optional: total debt, for the implied share price |
graham_number Graham Number
Benjamin Graham's ceiling price for a defensive investor, from EPS and book value per share.
| Parameter | Type | Description |
|---|---|---|
bookValuePerShare * | number | Book value per share |
eps * | number | Earnings per share |
price | number | Optional: current share price, to compare |
altman_z_score Altman Z-Score
Bankruptcy risk score. The original model (1968) is for US public manufacturers; the Z'' model is for non-manufacturers, private and non-US companies.
| Parameter | Type | Description |
|---|---|---|
ebit * | number | Earnings before interest and taxes |
model * | string | original (public manufacturers) or double_prime (everyone else) |
retainedEarnings * | number | Retained earnings |
totalAssets * | number | Total assets |
totalLiabilities * | number | Total liabilities |
workingCapital * | number | Current assets minus current liabilities |
bookEquity | number | Book value of equity (double_prime model) |
marketValueEquity | number | Market value of equity (original model) |
sales | number | Revenue (original model) |
return_on_equity Return on equity (ROE)
Net income as a share of shareholders' equity.
| Parameter | Type | Description |
|---|---|---|
equity * | number | Shareholders' equity (average of the period if you have it) |
netIncome * | number | Net income for the period |
piotroski_f_score Piotroski F-Score
Nine pass or fail accounting signals (profitability, leverage and liquidity, efficiency) added into a 0 to 9 score. Signals that compare two years are scored only when both years are given.
| Parameter | Type | Description |
|---|---|---|
netIncome * | number | Net income, current year |
operatingCashFlow * | number | Cash flow from operations, current year |
totalAssets * | number | Total assets, current year |
assetTurnoverValue | number | Optional: revenue / total assets, current year (F9) |
currentRatioValue | number | Optional: current ratio, current year (F6) |
grossMarginValue | number | Optional: gross margin as a decimal, current year (F8) |
longTermDebt | number | Optional: long-term debt, current year (F5) |
priorAssetTurnoverValue | number | Optional: revenue / total assets, prior year (F9) |
priorCurrentRatioValue | number | Optional: current ratio, prior year (F6) |
priorGrossMarginValue | number | Optional: gross margin as a decimal, prior year (F8) |
priorLongTermDebt | number | Optional: long-term debt, prior year (F5) |
priorNetIncome | number | Optional: net income, prior year (F3) |
priorSharesOutstanding | number | Optional: shares outstanding, prior year (F7) |
priorTotalAssets | number | Optional: total assets, prior year (F3, F5) |
sharesOutstanding | number | Optional: shares outstanding, current year (F7) |
profit_margin Profit margin (gross, operating, net, FCF)
One margin as a share of revenue: gross, operating, net or free cash flow.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which margin |
revenue * | number | Revenue for the period |
costOfRevenue | number | Cost of revenue (gross) |
freeCashFlow | number | Free cash flow (free_cash_flow) |
netIncome | number | Net income (net) |
operatingIncome | number | Operating income (operating) |
liquidity_ratio Liquidity ratio (current, quick)
Whether short-term assets cover short-term liabilities: the current ratio, or the quick ratio that leaves out inventory.
| Parameter | Type | Description |
|---|---|---|
currentAssets * | number | Current assets |
currentLiabilities * | number | Current liabilities |
kind * | string | current or quick (acid test) |
inventory | number | Inventory (quick) |
leverage_ratio Leverage ratio (debt to equity, interest coverage)
How much debt a company carries against its equity, or how many times its operating profit covers its interest.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which ratio |
ebit | number | EBIT, operating income (interest_coverage) |
interestExpense | number | Interest expense, positive or negative as your data reports it (interest_coverage) |
totalDebt | number | Total debt (debt_to_equity) |
totalEquity | number | Shareholders' equity (debt_to_equity) |
analyze_company Company analysis (every ratio at once)
Every ratio the figures allow, in one call: valuation, profitability, liquidity, solvency, efficiency, risk (Altman Z, Z'', Piotroski) and quality. Every figure is optional; a metric whose figures are missing comes back null and is named. With withInsights, each metric also gets a status and a one-line reading.
| Parameter | Type | Description |
|---|---|---|
analystTargetPrice | number | Analyst target price |
annualDividendPerShare | number | Dividends per share over one year |
bookValuePerShare | number | Book value per share |
cashAndEquivalents | number | Cash and equivalents |
costOfRevenue | number | Cost of revenue, as a positive number |
currentAssets | number | Current assets |
currentLiabilities | number | Current liabilities |
ebit | number | Earnings before interest and taxes |
ebitda | number | EBITDA |
eps | number | Earnings per share, trailing twelve months or last fiscal year |
expectedEarningsGrowthRate | number | Expected yearly EPS growth as a decimal, e.g. 0.15 (PEG) |
freeCashFlow | number | Operating cash flow minus capital expenditure |
grossProfit | number | Gross profit, used when cost of revenue is not given |
interestExpense | number | Interest expense, as a positive number |
inventory | number | Inventory |
longTermDebt | number | Long-term debt |
marketCap | number | Market capitalisation (price x shares outstanding) |
netIncome | number | Net income |
operatingCashFlow | number | Cash flow from operations |
operatingIncome | number | Operating income |
price | number | Share price |
retainedEarnings | number | Retained earnings |
returns | number | Return for the period as a decimal (Sharpe) |
revenuePerShare | number | Revenue per share |
riskFree | number | Risk-free rate for the same period as a decimal (Sharpe) |
sharesOutstanding | number | Shares outstanding |
stdDev | number | Standard deviation of returns for the same period (Sharpe) |
taxRate | number | Effective tax rate as a decimal, e.g. 0.25 (ROIC) |
totalAssets | number | Total assets |
totalDebt | number | Short-term plus long-term borrowings |
totalEquity | number | Shareholders' equity |
totalLiabilities | number | Total liabilities |
totalRevenue | number | Revenue for the period |
tradeReceivables | number | Trade receivables |
withInsights | boolean | Optional: add a status (Good, Neutral, Bad, N/A) and a one-line reading to each metric |
workingCapital | number | Current assets minus current liabilities; worked out from them when left out |