Uber agrees $14.8bn Delivery Hero takeover, 26% above its May bid
Back to Tutorials
techTutorialintermediate

Uber agrees $14.8bn Delivery Hero takeover, 26% above its May bid

July 15, 20263 views5 min read

Learn to analyze tech acquisition valuations by creating financial models and visualizations using Python and stock market data.

Introduction

In this tutorial, we'll explore how to analyze and model the financial data of major tech acquisitions like Uber's proposed acquisition of Delivery Hero. While the news focuses on the monetary aspects of the deal, we'll dive into the technical side of financial modeling using Python and data analysis libraries. This tutorial will teach you how to gather stock market data, perform financial analysis, and create a basic valuation model for acquisition scenarios.

Prerequisites

  • Basic understanding of Python programming
  • Intermediate knowledge of financial concepts (stock prices, valuations, market analysis)
  • Python libraries: pandas, yfinance, matplotlib, numpy
  • Basic understanding of financial modeling concepts

Step-by-step instructions

Step 1: Setting up the Environment

First, we need to install and import the required Python libraries. The yfinance library is crucial for fetching stock market data, while pandas and numpy will help us process and analyze the data.

pip install yfinance pandas numpy matplotlib

Why this step?

These libraries provide the foundation for financial data analysis. yfinance specifically allows us to pull real-time and historical stock data from Yahoo Finance, which is essential for our acquisition analysis.

Step 2: Fetching Stock Data

Next, we'll fetch the stock data for both Uber and Delivery Hero to understand their market positions before the acquisition.

import yfinance as yf
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Define the stock symbols
uber_symbol = "UBER"
delivery_hero_symbol = "DHG.DE"  # Delivery Hero's German stock symbol

# Fetch stock data for the past year
uber_data = yf.download(uber_symbol, start="2023-07-01", end="2024-07-01")
delivery_hero_data = yf.download(delivery_hero_symbol, start="2023-07-01", end="2024-07-01")

print("Uber Stock Data:")
print(uber_data.head())
print("\nDelivery Hero Stock Data:")
print(delivery_hero_data.head())

Why this step?

Understanding the historical stock performance of both companies gives us context for the acquisition. This data will help us assess whether the proposed acquisition price is reasonable relative to market performance.

Step 3: Calculating Key Financial Metrics

We'll now calculate some key financial metrics that help assess the value of these companies, including price-to-earnings ratios and market capitalization.

# Calculate market capitalization
uber_market_cap = uber_data['Close'][-1] * 1000000000  # Assuming 1 billion shares

delivery_hero_market_cap = delivery_hero_data['Close'][-1] * 50000000  # Assuming 50 million shares

print(f"Uber Market Cap: €{uber_market_cap/1000000000:.2f} billion")
print(f"Delivery Hero Market Cap: €{delivery_hero_market_cap/1000000000:.2f} billion")

# Calculate P/E ratios (simplified)
# For demonstration, we'll use a basic approach
uber_pe = uber_market_cap / 10000000000  # Simplified P/E ratio

delivery_hero_pe = delivery_hero_market_cap / 5000000000  # Simplified P/E ratio

print(f"Uber P/E Ratio: {uber_pe:.2f}")
print(f"Delivery Hero P/E Ratio: {delivery_hero_pe:.2f}")

Why this step?

Financial ratios like P/E ratios help us understand how the market values these companies relative to their earnings. This is crucial when evaluating acquisition prices and determining if they're fair.

Step 4: Creating a Valuation Model

Now, we'll create a basic valuation model that incorporates the acquisition price. We'll calculate the implied value of the acquisition and compare it to the market price.

# Define the acquisition price
acquisition_price_per_share = 41.50  # €41.50 per share

# Calculate the total acquisition value
# Assuming Delivery Hero has 50 million shares
delivery_hero_shares = 50000000

acquisition_value = acquisition_price_per_share * delivery_hero_shares

print(f"Acquisition Value: €{acquisition_value/1000000000:.2f} billion")

# Compare to market cap
print(f"Market Cap vs Acquisition Value: {delivery_hero_market_cap/1000000000:.2f} vs €{acquisition_value/1000000000:.2f} billion")

# Calculate premium paid
premium = ((acquisition_price_per_share - delivery_hero_data['Close'][-1]) / delivery_hero_data['Close'][-1]) * 100
print(f"Premium Paid: {premium:.2f}%")

Why this step?

This step directly models the financial scenario described in the news article. It helps us understand the premium Uber is paying for Delivery Hero and whether this aligns with market expectations.

Step 5: Visualizing the Data

Visualizing the stock performance and acquisition analysis helps us better understand the financial dynamics at play.

# Plot stock performance
plt.figure(figsize=(12, 6))
plt.plot(uber_data.index, uber_data['Close'], label='Uber')
plt.plot(delivery_hero_data.index, delivery_hero_data['Close'], label='Delivery Hero')
plt.title('Stock Price Comparison: Uber vs Delivery Hero')
plt.xlabel('Date')
plt.ylabel('Price (€)')
plt.legend()
plt.grid(True)
plt.show()

# Create a bar chart showing the premium
companies = ['Delivery Hero', 'Acquisition Price']
prices = [delivery_hero_data['Close'][-1], acquisition_price_per_share]

plt.figure(figsize=(8, 5))
bars = plt.bar(companies, prices, color=['blue', 'green'])
plt.title('Delivery Hero Stock Price vs Acquisition Price')
plt.ylabel('Price (€)')
plt.grid(axis='y')

# Add value labels on bars
for bar, price in zip(bars, prices):
    plt.text(bar.get_x() + bar.get_width()/2, bar.get_height() + 0.1,
             f'€{price:.2f}', ha='center', va='bottom')

plt.show()

Why this step?

Visual representations make complex financial data more accessible. The charts help illustrate the premium paid and provide a clear comparison between the market price and the acquisition price.

Step 6: Advanced Analysis with Multiple Scenarios

Let's create a more sophisticated analysis by simulating different acquisition scenarios and their potential impacts.

# Create a scenario analysis
scenarios = {
    'Conservative': 0.90,  # 10% below market price
    'Fair': 1.00,          # Market price
    'Aggressive': 1.10     # 10% above market price
}

print("Scenario Analysis:")
print("====================")

for scenario, multiplier in scenarios.items():
    scenario_price = delivery_hero_data['Close'][-1] * multiplier
    scenario_value = scenario_price * delivery_hero_shares
    premium = ((scenario_price - delivery_hero_data['Close'][-1]) / delivery_hero_data['Close'][-1]) * 100
    
    print(f"{scenario} Scenario:")
    print(f"  Price per share: €{scenario_price:.2f}")
    print(f"  Total value: €{scenario_value/1000000000:.2f} billion")
    print(f"  Premium: {premium:.2f}%")
    print()

Why this step?

This advanced analysis helps us understand how different acquisition prices would affect the valuation. It's useful for decision-making and risk assessment in acquisition scenarios.

Summary

In this tutorial, we've created a practical financial analysis framework for evaluating tech acquisitions like Uber's proposed acquisition of Delivery Hero. We've learned how to fetch stock data, calculate key financial metrics, create valuation models, and visualize financial data. The techniques demonstrated here can be applied to any acquisition scenario, helping analysts understand whether proposed acquisition prices are reasonable compared to market values. This hands-on approach provides a foundation for more complex financial modeling and decision-making in the tech industry.

Source: TNW Neural

Related Articles