Comprehensive Stock Comparison

Compare YPF Sociedad Anónima (YPF) vs Ecopetrol S.A. (EC) Stock

Analyze side-by-side fundamentals, valuation, growth, and profitability to decide which stock is the better buy.

Tickers 2 / 10100+ Metrics

Selected Stocks

Add up to 10 tickers. Use presets or search to get started.

2 / 10
Try these comparisons:

Quick Verdict

CategoryWinnerWhy
GrowthYPF265.7% revenue growth vs EC's -6.9%
ValueECLower P/E (0.0x vs 0.0x)
Quality / MarginsEC8.2% net margin vs YPF's -3.7%
Stability / SafetyECBeta 0.90 vs YPF's 1.20
DividendsEC18.3% yield; 1-year raise streak; YPF pays no meaningful dividend
Momentum (1Y)EC+36.1% vs YPF's +1.0%
Efficiency (ROA)EC3.5% ROA vs YPF's -1.4%, ROIC 14.0% vs 8.1%
Bottom line: EC leads in 6 of 7 categories, making it the stronger pick for investors who prioritize valuation and capital efficiency and profitability and margin quality. YPF Sociedad Anónima is the better choice for growth and revenue expansion. As direct sector peers, they can serve as alternatives in the same portfolio allocation.

Who Each Stock Is For

Income & stability

Growth exposure

Long-term compounding (10Y)

Sleep-well-at-night portfolio

Defensive / Recession hedge

Business Model

What each company does and how it makes money

YPFYPF Sociedad Anónima
Energy

YPF is Argentina's largest integrated oil and gas company, operating across the entire energy value chain from exploration to retail fuel sales. It generates revenue primarily from upstream oil and gas production (roughly 60% of revenue) and downstream refining and marketing operations (roughly 40%), including its extensive network of service stations. The company's key advantage is its dominant position as Argentina's national champion in energy—controlling significant reserves, refineries, and distribution infrastructure that create substantial barriers to entry.

ECEcopetrol S.A.
Energy

Ecopetrol is Colombia's state-controlled integrated oil and gas company that explores for, produces, refines, and transports hydrocarbons. It generates revenue primarily from crude oil and natural gas sales (roughly 70% of total), with additional streams from refined products, petrochemicals, pipeline transportation, and power transmission. Its key advantage is its dominant position as Colombia's national oil champion—controlling the country's major pipelines and refineries—which creates significant barriers to entry and provides strategic control over the energy value chain.

Revenue Breakdown by Segment

How each company's revenue is distributed across its business units

YPFYPF Sociedad Anónima
FY 2024
Diesel
81.8%$6.6B
Crude Oil
12.7%$1.0B
Fertilizers and Crop Protection Products
4.8%$389M
Liquefied Natural Gas Regasification
0.6%$51M
ECEcopetrol S.A.
FY 2024
Crude oil
100.0%$48.81T

Financial Metrics Comparison

Side-by-side fundamentals across 2 stocks. BestLagging

Financial Scorecard

EC 4YPF 0
Financial MetricsEC5/6 metrics
Valuation MetricsEC6/6 metrics
Profitability & EfficiencyEC5/9 metrics
Total ReturnsTie3/6 metrics
Risk & VolatilityEC2/2 metrics
Analyst Outlook0/0 metrics

EC leads in 4 of 6 categories — strongest in Financial Metrics and Valuation Metrics. 1 category is tied.

Financial Metrics (TTM)

EC is the larger business by revenue, generating $125.67T annually — 7.6x YPF's $16.54T. EC is the more profitable business, keeping 8.2% of every revenue dollar as net income compared to YPF's -3.7%. On growth, YPF holds the edge at +33.9% YoY revenue growth, suggesting stronger near-term business momentum.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
RevenueTrailing 12 months$16.54T$125.67T
EBITDAEarnings before interest/tax$2.65T$41.82T
Net IncomeAfter-tax profit-$604.1B$10.31T
Free Cash FlowCash after capex-$259.1B$17.21T
Gross MarginGross profit ÷ Revenue+26.4%+31.6%
Operating MarginEBIT ÷ Revenue+3.6%+24.8%
Net MarginNet income ÷ Revenue-3.7%+8.2%
FCF MarginFCF ÷ Revenue-1.6%+13.7%
Rev. Growth (YoY)Latest quarter vs prior year+33.9%-13.8%
EPS Growth (YoY)Latest quarter vs prior year-120.3%-29.8%
EC leads this category, winning 5 of 6 comparable metrics.

Valuation Metrics

At 6.6x trailing earnings, EC trades at a 17% valuation discount to YPF's 8.0x P/E. On an enterprise value basis, EC's 3.7x EV/EBITDA is more attractive than YPF's 6.5x.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
Market CapShares × price$13.9B$24.4B
Enterprise ValueMkt cap + debt − cash$20.1B$52.6B
Trailing P/EPrice ÷ TTM EPS7.99x6.65x
Forward P/EPrice ÷ next-FY EPS est.0.01x0.00x
PEG RatioP/E ÷ EPS growth rate
EV / EBITDAEnterprise value multiple6.51x3.69x
Price / SalesMarket cap ÷ Revenue0.99x0.69x
Price / BookPrice ÷ Book value/share1.60x0.84x
Price / FCFMarket cap ÷ FCF9999.00x2.83x
EC leads this category, winning 6 of 6 comparable metrics.

Profitability & Efficiency

EC delivers a 9.6% return on equity — every $100 of shareholder capital generates $10 in annual profit, vs $-4 for YPF. YPF carries lower financial leverage with a 0.82x debt-to-equity ratio, signaling a more conservative balance sheet compared to EC's 1.09x. On the Piotroski fundamental quality scale (0–9), YPF scores 4/9 vs EC's 3/9, reflecting mixed financial health.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
ROE (TTM)Return on equity-3.6%+9.6%
ROA (TTM)Return on assets-1.4%+3.5%
ROICReturn on invested capital+8.1%+14.0%
ROCEReturn on capital employed+8.1%+15.4%
Piotroski ScoreFundamental quality 0–943
Debt / EquityFinancial leverage0.82x1.09x
Net DebtTotal debt minus cash$8.83T$105.91T
Cash & Equiv.Liquid assets$1.15T$14.05T
Total DebtShort + long-term debt$9.98T$119.97T
Interest CoverageEBIT ÷ Interest expense0.94x4.91x
EC leads this category, winning 5 of 9 comparable metrics.

Total Returns (with DRIP)

A $10,000 investment in YPF five years ago would be worth $85,072 today (with dividends reinvested), compared to $16,049 for EC. Over the past 12 months, EC leads with a +36.1% total return vs YPF's +1.0%. The 3-year compound annual growth rate (CAGR) favors YPF at 44.3% vs EC's 16.4% — a key indicator of consistent wealth creation.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
YTD ReturnYear-to-date-2.5%+16.3%
1-Year ReturnPast 12 months+1.0%+36.1%
3-Year ReturnCumulative with dividends+200.7%+57.8%
5-Year ReturnCumulative with dividends+750.7%+60.5%
10-Year ReturnCumulative with dividends+98.5%+242.5%
CAGR (3Y)Annualised 3-year return+44.3%+16.4%
Evenly matched — YPF and EC each lead in 3 of 6 comparable metrics.

Risk & Volatility

EC is the less volatile stock with a 0.90 beta — it tends to amplify market swings less than YPF's 1.20 beta. A beta below 1.0 means the stock typically moves less than the S&P 500.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
Beta (5Y)Sensitivity to S&P 5001.20x0.90x
52-Week HighHighest price in past year$40.38$13.27
52-Week LowLowest price in past year$22.82$7.80
% of 52W HighCurrent price vs 52-week peak+87.6%+89.6%
RSI (14)Momentum oscillator 0–10043.848.6
Avg Volume (50D)Average daily shares traded1.2M2.5M
EC leads this category, winning 2 of 2 comparable metrics.

Analyst Outlook

Wall Street rates YPF as "Buy" and EC as "Hold". Consensus price targets imply 32.8% upside for YPF (target: $47) vs -13.0% for EC (target: $10). EC is the only dividend payer here at 18.27% yield — a key consideration for income-focused portfolios.

MetricYPFYPF Sociedad Anón…ECEcopetrol S.A.
Analyst RatingConsensus buy/hold/sellBuyHold
Price TargetConsensus 12-month target$47.00$10.35
# AnalystsCovering analysts1511
Dividend YieldAnnual dividend ÷ price+18.3%
Dividend StreakConsecutive years of raises11
Dividend / ShareAnnual DPS$8177.16
Buyback YieldShare repurchases ÷ mkt cap0.0%+0.0%
Insufficient data to determine a leader in this category.

Historical Charts

Charts are rendered on first load. Hover for details.

Chart 1Total Return — 5 Years (Rebased to 100)

StockMar 20Feb 26Change
YPF Sociedad Anónima (YPF)100483.33+383.3%
Ecopetrol S.A. (EC)10069.16-30.8%

YPF Sociedad Anónima (YPF) returned +751% over 5 years vs Ecopetrol S.A. (EC)'s +60%. A $10,000 investment in YPF 5 years ago would be worth $85,072 today (including dividends reinvested).

Chart 2Revenue Growth — 10 Years

Stock20152024Change
YPF Sociedad Anónima (YPF)$156.1B$19.7T+12515.7%
Ecopetrol S.A. (EC)$52.3T$133.3T+154.7%

YPF Sociedad Anónima's revenue grew from $156.1B (2015) to $19.7T (2024) — a 71.2% CAGR. Ecopetrol S.A.'s revenue grew from $52.3T (2015) to $133.3T (2024) — a 10.9% CAGR.

Chart 3Net Margin Trend — 10 Years

Stock20152024Change
YPF Sociedad Anónima (YPF)2.9%12.3%+318.7%
Ecopetrol S.A. (EC)-13.7%10.4%+175.5%

YPF Sociedad Anónima's net margin went from 3% (2015) to 12% (2024). Ecopetrol S.A.'s net margin went from -14% (2015) to 10% (2024).

Chart 4P/E Ratio History — 8 Years

Stock20172024Change
YPF Sociedad Anónima (YPF)0.70-100.0%
Ecopetrol S.A. (EC)00

YPF Sociedad Anónima has traded in a 0x–1x P/E range over 4 years; current trailing P/E is ~8x. Ecopetrol S.A. has traded in a 0x–0x P/E range over 8 years; current trailing P/E is ~7x.

Chart 5EPS Growth — 10 Years

Stock20152024Change
YPF Sociedad Anónima (YPF)11.686,241.8+53340.1%
Ecopetrol S.A. (EC)-1,939.716,732+447.1%

YPF Sociedad Anónima's EPS grew from $11.68 (2015) to $6241.80 (2024) — a 101% CAGR. Ecopetrol S.A.'s EPS grew from $-1939.71 (2015) to $6732.00 (2024).

Chart 6Free Cash Flow — 5 Years

2021
$165B
$14622B
2022
$205B
$26693B
2023
$-8B
$5771B
2024
$477M
$32544B
YPF Sociedad Anónima (YPF)Ecopetrol S.A. (EC)

YPF Sociedad Anónima generated $477M FCF in 2024 (-100% vs 2021). Ecopetrol S.A. generated $32.5T FCF in 2024 (+123% vs 2021).

Loading custom metrics...

YPF vs EC: Frequently Asked Questions

9 questions · data-driven answers · updated daily

01

Is YPF or EC a better buy right now?

Ecopetrol S.A. (EC) offers the better valuation at 6.6x trailing P/E (0.0x forward), making it the more compelling value choice. Analysts rate YPF Sociedad Anónima (YPF) a "Buy" — based on 15 analyst ratings — the highest consensus in this comparison. The "better buy" depends entirely on your goals: growth investors should weight revenue trajectory, value investors should weight P/E and PEG, and income investors should weight dividend yield and streak.

02

Which has the better valuation — YPF or EC?

On trailing P/E, Ecopetrol S.A. (EC) is the cheapest at 6.6x versus YPF Sociedad Anónima at 8.0x. On forward P/E, Ecopetrol S.A. is actually cheaper at 0.0x.

03

Which is the better long-term investment — YPF or EC?

Over the past 5 years, YPF Sociedad Anónima (YPF) delivered a total return of +750.7%, compared to +60.5% for Ecopetrol S.A. (EC). A $10,000 investment in YPF five years ago would be worth approximately $85K today (assuming dividends reinvested). Over 10 years, the gap is even starker: EC returned +242.5% versus YPF's +98.5%. Past returns do not guarantee future results, and the stock with the higher historical return may already have its best growth priced in.

04

Which is safer — YPF or EC?

By beta (market sensitivity over 5 years), Ecopetrol S.A. (EC) is the lower-risk stock at 0.90β versus YPF Sociedad Anónima's 1.20β — meaning YPF is approximately 33% more volatile than EC relative to the S&P 500. On balance sheet safety, YPF Sociedad Anónima (YPF) carries a lower debt/equity ratio of 82% versus 109% for Ecopetrol S.A. — giving it more financial flexibility in a downturn.

05

Which has better profit margins — YPF or EC?

YPF Sociedad Anónima (YPF) is the more profitable company, earning 12.3% net margin versus 10.4% for Ecopetrol S.A. — meaning it keeps 12.3% of every revenue dollar as bottom-line profit. Operating margin tells a similar story: EC leads at 28.8% versus 7.7% for YPF. At the gross margin level — before operating expenses — EC leads at 35.1%, reflecting greater pricing power or product mix advantage. Stronger margins indicate durable pricing power, lower cost of revenue, or higher mix of software/services. They are one of the clearest signs of business quality.

06

Is YPF or EC more undervalued right now?

On forward earnings alone, Ecopetrol S.A. (EC) trades at 0.0x forward P/E versus 0.0x for YPF Sociedad Anónima — 0.0x cheaper on a one-year earnings basis. Analyst consensus price targets imply the most upside for YPF: 32.8% to $47.00.

07

Which pays a better dividend — YPF or EC?

In this comparison, EC (18.3% yield) pays a dividend. YPF does not pay a meaningful dividend and should not be held primarily for income.

08

Is YPF or EC better for a retirement portfolio?

For long-horizon retirement investors, Ecopetrol S.A. (EC) is the stronger choice — it scores higher on the combination of lower volatility, dividend reliability, and long-term compounding (low volatility (β 0.90), 18.3% yield, +242.5% 10Y return). Both have compounded well over 10 years (EC: +242.5%, YPF: +98.5%), confirming both are viable long-term holds — but the lower-volatility option typically results in less emotional selling during corrections. Retirement portfolios generally favour predictability over maximum returns. Consult a financial advisor before making allocation decisions.

09

What are the main differences between YPF and EC?

Both stocks operate in the Energy sector, making this a peer-level intra-sector comparison — the same macro tailwinds and headwinds will affect both. EC pays a dividend while YPF does not, making them suitable for different income and tax situations. These fundamental differences mean investors should not choose between them on a single metric — the "better stock" depends entirely on which of these characteristics aligns with your investment strategy.

Find Stocks Like These

Explore pre-built screens for each stock's profile, or build a custom screen to find stocks that beat both.

Stocks Like

YPF

High-Growth Disruptor

  • Sector: Energy
  • Market Cap > $100B
  • Revenue Growth > 16%
  • Gross Margin > 15%
Run This Screen
💰
Stocks Like

EC

Income & Dividend Stock

  • Sector: Energy
  • Market Cap > $100B
  • Net Margin > 5%
  • Dividend Yield > 7.3%
Run This Screen
Custom Screen

Better Than Both

Find stocks that beat YPF and EC on the metrics you choose

Revenue Growth>
%
(YPF: 33.9% · EC: -13.8%)
P/E Ratio<
x
(YPF: 8.0x · EC: 6.6x)