Project · 2026
Trading Comparables Generator
A command-line tool that turns live public-market data into trading comps, valuation scenarios, and formatted Excel or CSV output.
The question
How can a peer set be refreshed quickly while keeping the valuation bridge and the underlying financial data visible?
What I built
A Python CLI that pulls three fiscal years of company data from Yahoo Finance, supports a trailing-twelve-month view assembled from the latest four quarters, calculates trading multiples, and exports a review-ready workbook or flat CSV.
Method
The user supplies a ticker set, selects any additional multiples, chooses fiscal-year or TTM mode, and chooses Excel or CSV. The program normalizes the inputs, retrieves the financials, suppresses ratios with zero or negative denominators, and applies peer-group minimum, mean, median, and maximum multiples to each company.
What it shows
The tool joins the operating comparison and the valuation conclusion in one output: source financials, growth and margin measures, trading multiples, summary statistics, and the implied share-price bridge can all be reviewed together.
Core capabilities
Financial data
Revenue, EBITDA, EBIT, net income, free cash flow, EPS, price, shares, enterprise value, market capitalization, cash, debt, and 52-week-high performance.
Trading multiples
EV/Revenue, EV/EBITDA, EV/EBIT, EV/FCF, P/E, P/FCF, P/Revenue, and P/EBITDA, with aliases for faster CLI input.
Operating comparison
Year-over-year revenue growth, EBITDA margin, and profit margin for each available period, plus peer-group mean and median rows.
Implied valuation
Minimum, mean, median, and maximum peer-multiple scenarios, including the enterprise-value-to-equity-value bridge and implied price versus current price.
Workflow
- Enter a comma-separated peer set and any additional trading multiples.
- Choose fiscal-year or trailing-twelve-month analysis.
- Review the fetched financials and calculated multiples; unsupported tickers or inputs are reported without stopping the run.
- Export the complete analysis to a formatted Excel workbook or a three-section CSV.
Outputs
- Trading comps table
- Company data, operating results, growth, margins, selected multiples, and peer summary statistics.
- Implied share-price matrix
- Four peer-multiple scenarios showing the applied multiple, base metric, implied enterprise or equity value, and resulting share price.
- Raw financial database
- The complete three-year or TTM data pull in millions so the calculated analysis can be checked against its inputs.
Limitations
- Yahoo Finance is a free, unofficial data source and can differ from institutional platforms, particularly around fiscal-year alignment and EBITDA.
- Companies with non-calendar fiscal years are not automatically realigned to a common calendar basis.
- Missing EBITDA observations remain blank, and larger ticker sets can encounter rate limits.
- The quality of any comparable-company conclusion still depends on the relevance of the peer set.