Expand description
§value-metrics
Core equity valuation ratios used to screen for deep-value stocks: price-to-earnings, price-to-book, earnings yield, EV/EBIT, and dividend yield. Pure Rust, no deps. Same signals behind the DeepValueRadar value screener.
use value_metrics::*;
assert!((price_to_earnings(100.0, 5.0) - 20.0).abs() < 1e-9);
assert!((earnings_yield(5.0, 100.0) - 0.05).abs() < 1e-9);Functions§
- dividend_
yield - Dividend yield = annual dividend per share / price.
- earnings_
yield - Earnings yield = EPS / price (the reciprocal of P/E).
- ev_
to_ ebit - EV/EBIT = enterprise value / EBIT.
- price_
to_ book - Price-to-book ratio = price / book value per share.
- price_
to_ earnings - Price-to-earnings ratio = price / earnings per share.