Sitemap

Difference-in-difference for House Price after Olympics event

10 min readSep 5, 2026

--

Introduction

The 2012 Olympics transformed parts of East London. They brought significant attention and restoration efforts in the neighborhoods of Stratford. Did this the Olympics cause the housing prices to spike up?

Method: Difference-in-Difference

Data:

Step 1: Problem Framing & Business Context

The tricky part was deciding at what point in time the Olympics first affected East London housing prices.

The games took place in July 2012. But London won the bid in 2005. If the housing market reacted to the announcement, then using 2012 as the treatment date would miss a large part of the effect.

So I focused on the period around the Olympic bid.

To estimate the effect, I used Difference-in-Differences (DiD).

1.1 Difference-in-Differences

Difference-in-Differences is a way to estimate the causal effect of an event. The basic idea is simple.

Imagine house prices in Stratford increased from £100k to £200k. At first glance, it looks like the area gained £100k.

But what if house prices in Ealing (area still in London but far from Stratford) increased from £100k to £150k during the same period? (Gain of £50k)

The control area tells us what might have happened simply because time passed, e.g. due to inflation, general cost increases, policies, etc.

That 100k gain in Stratford cannot be fully attributed to the Olympics, the gain also happened due to time passing. The real effect of the olympics would be £100k-£50k so ~£50k,

The important assumption is that, without the event, the treatment and control groups would have followed parallel trends. In other words, they don’t need to start from the same prices. They need to have followed a similar trajectory before the event.

Press enter or click to view image in full size
Difference-inDifference Parallel Trends

1.2 Understanding DiD Through Regression

Difference-in-Differences can be estimated using an OLS regression.

OLS Regression treats labels Test and Control , and Pre-event and Post-event, as categorical variables of the data points.

Regression handles categorical variables in a very convenient manner. Let’s see how. Then we’ll also look at interaction terms in regression as DiD relies on that.

Imagine we are predicting the price of a car based on its type. We have three categories: Fiat, Volkswagen, BMW

We use dummy variables for the categories, leaving one out as the reference category. Let’s say Fiat is the reference. So we have dummy columns Volks and BMW with 1s if the car is of that make and 0 otherwise.

When all the dummy variables are zero (Volks and BMW), the model represents a Fiat. The intercept therefore represents the average price of a Fiat.

The coefficient for BMW tells us how much more or less expensive a BMW is compared with a Fiat. Eg if b1 is £1000 , it tells us that a BMW is on average £1000 more expensive than a Fiat.

1.2.1 Interaction Terms

This becomes more interesting when we introduce an interaction.

Suppose we have two variables:

  • Car type: Fiat, BMW, Volkswagen
  • Colour: Black, Red

We use Fiat and Black as the reference categories for dummification.

Black cars follow one regression line. The Red cars follow a regression line of the same trend but just moved to a different intercept. This is due to the Red dummy being activated. This assumes that all types of cars increase in price by the same amount b3 if you choose red over black.

BUT what if swithcing from black to Red on a BMW is a different price jump than swithng from Black to red in a Fiat. This is where interaction term comes into play.

b4 indicateds an iteration term beterrn BMW and Red. This says that , on top of the usual price difference between red and black cars, BMW requires an additional premium of b4 to switch form black to red. The interaction term modifies the base relationship between sets of variables.

This is essentially what happens in Difference-in-Differences.
The interaction between POST and treatment_region captures whether the treatment group changed differently from the control group after the event.
That interaction coefficient is the number we care about most.

Press enter or click to view image in full size

This video explains it well.

Step 2: Data Collection & Study Design

To measure house prices, I needed actual transaction data. I got it from the Government website.

The dataset contains information such as:unique_id, price_paid, deed_date, postcode, property_type, new_build, estate_type, street, town, district, county, transaction_category, borough_group, address, year, transaction_count, transaction_number

There is an important limitation here:

We only know the price of a property if it was sold.

So instead of tracking individual houses over time, I used individual property transactions from the UK government’s property transaction dataset.

Because it is relatively uncommon for the same house to be sold multiple times within a short period, this is effectively a cross-sectional study, rather than a traditional panel study.

A panel study has complete information of each unit (eg houses) at regular intervals of time (eg every year). A cross-section instead is just a slice at a specific time , and unit from one cross section don’t necessarily match another cross section.

2.1 Measuring Distance From the Olympic Park

Instead of defining treatment and control areas purely by borough, I wanted a more precise measure of proximity.

So I measured the distance from each postcode to the Olympic Park.

I used the Haversine distance, which accounts for the curvature of the Earth when calculating the distance between two points.
Ideally, I would have obtained the exact latitude and longitude of every property.
But getting coordinates for every house across six or seven boroughs would have been expensive. Very expensive.

Press enter or click to view image in full size

So I used a free postcode-based service instead.

This gave me a practical way to estimate how close each property was to the Olympic Park.

2.2 Why Property Composition Matters

House prices aren’t directly comparable if the types of houses being sold are very different.

A £1 million detached house and a £300k flat don’t follow the same pricing dynamics.

So composition matters.

Imagine this:

Before the event, most of the properties sold were detached houses. After the event, most were flats.

Even if every type of property increased in value at exactly the same rate, the average price would still change substantially.

That could make it look like the market had changed when really the composition of properties being sold had changed.

This is one of the biggest challenges with using transaction data.

Step 3: Treatment & Control Groups

I used a three-year period before and after July 6, 2005, which is when the Olympic bid was announced.

The treatment group consisted of properties within a 2.5-mile radius of the Olympic Park.

Nearby boroughs were then considered as candidates for the control group.

The idea was to compare properties close to the Olympic Park with properties in similar nearby areas that were less directly exposed to the event.

But there was an obvious problem.

We aren’t comparing the exact same houses before and after the event due to the cross-sectional nature of the data.

Get I. Ishaque’s stories in your inbox

Join Medium for free to get updates from this writer.

So we need to make sure those groups are reasonably comparable.

3.1 Comparing Property Composition

I checked whether the composition of properties changed between the pre- and post-event periods.

The overall composition was reasonably comparable between the periods for both the treatment and control groups.

However, there was still a difference between treatment and control.

The treatment group contained more flats and terraces.

Press enter or click to view image in full size

The control group contained significantly more semi-detached properties.

Press enter or click to view image in full size

That matters because different property types can appreciate at different rates. To account for this, I included property type as a dummy variable in the regression.

3.2 What About New Builds?

New builds create another potential problem.

A large influx of new developments could change the price distribution of an area.

New properties may have different characteristics from existing properties. They might include newer amenities, better energy efficiency, or other features that affect their price.

So what exactly are we trying to measure?

Are we interested in the price increase of the entire area? Or do we want to know how existing houses changed in value?

Ideally, I’d like to isolate existing properties from new development projects.

Press enter or click to view image in full size
Press enter or click to view image in full size

The proportion of new builds wasn’t large enough in this analysis to make it a major concern, so I left the new_build variable out of the final analysis. But this is something worth investigating further.

A better approach would be to track the new_build flag as far back as possible and identify properties that entered the market as new builds.

For now, I assume new builds appreciate at roughly the same rate as existing properties.

Step 4: Parallel Trends Validation

I used two approaches to examine the parallel trends assumption.

4.1 Visual Inspection

The first step was simply to plot the average house price over time.

Press enter or click to view image in full size

The graph shows the mean monthly house price separately for the treatment and control groups.

Before the event, the two groups appear to follow a reasonably similar trend for part of the period. But the control group’s prices begin to increase somewhat more steeply. This isn’t ideal.

It suggests that the parallel trends assumption may not hold perfectly.

4.2 Event Study / Leads & Lags Regression

A second approach is an event study. An event study is closely related to Difference-in-Differences.

Press enter or click to view image in full size

The main difference is that instead of having one PRE and one POST variable, we create a dummy variable for each period around the event.

In this case, the periods are months. Each month gets its own interaction with the treatment group. One month is left out as the reference period.

This lets us see how the treatment group’s price changed relative to the control group month by month.

It is a much more detailed way to check whether the treatment effect appears before the event or only after it.

Step 5: Model Specification & Estimation

The main model was an OLS regression.

Press enter or click to view image in full size

I defined:

Pre: Three years before the Olympic bid.
Post: Three years after the Olympic bid.

Treatment: Properties within 2.5 miles of the Olympic Park.
Control: Properties in the selected nearby control areas.

The key variable is the interaction:

POST × treatment_region

This coefficient estimates the additional change in house prices for the treatment group after the event, relative to the control group.
That’s the Difference-in-Differences estimate.

Step 6: Interpreting the Results

The model produced the following coefficients:

Press enter or click to view image in full size
Press enter or click to view image in full size

Treatment region β₁ = -0.2107
This captures the baseline difference in log house prices between the treatment and control regions before the intervention. The treatment region’s properties were approximately 19% cheaper than properties in the control region before the treatment period.

POST β₂ = 0.1890
This captures the change over time that is common to both groups. After the treatment period, prices in the control group increased by approximately 20.81%.

Difference-in-Differences β₃ = -0.0011

This is the coefficient that matters most. It captures the additional change in the treatment region after the intervention, above and beyond the common time trend.

The estimate suggests an additional 0.11% decrease in house prices in the treatment region relative to the control group.

But the p-value was 0.8596. So the result is not statistically significant at the 5% level.

In other words, there isn’t enough evidence to conclude that the Olympic bid caused a change in house prices.

Conclusion

There isn’t a statistical significant evidence that the price of houses in Stratford area changed after the Olympic bis was won.

LinkedIn — https://www.linkedin.com/in/ilora-ishaque/

Bonus Section

B. Testing the Parallel Trends Assumption

This is where Difference-in-Differences gets interesting. The key assumption is parallel trends.

Before the event, the treatment and control groups should broadly move together. They don’t need to have the same price. They need to have a similar trend.

And this is where my data wasn’t perfect. The pre-event trends didn’t line up particularly well.

The control group followed a somewhat different trajectory from the treatment group. That creates a problem.

If the groups were already moving differently before the Olympics, how can we know that the difference after the event was actually caused by the Olympics?

B.1 Synthetic Control

One potential solution is synthetic control.

Instead of choosing one control group, we can combine several potential controls and give each one a weight.

For example:

  • Control area 1 might have a trend that’s too steep.
  • Control area 2 might have a trend that’s too shallow.
  • A weighted combination of the two might produce a much better match for the treatment group.

The goal is to construct a synthetic control that follows the treatment group’s pre-event trend as closely as possible.

The weights are chosen by an optimisation process that balances:

  1. How closely the synthetic control matches the treatment trend.
  2. Other characteristics that should be comparable.

There is one catch. Most applications of synthetic control are built around panel data, whereas this project is based on cross-sectional property transactions.

So synthetic control is promising, but it requires more work to apply properly here.

--

--

I. Ishaque
I. Ishaque

Written by I. Ishaque

0 followers

I am a Data Scientist based in London