Skip to main content

Simple nonparametric inference for sealed first-price auctions.

Project description

A package for the "Nonparametric inference on counterfactuals in sealed first-price auctions" paper by Pasha Andreyanov and Grigory Franguridy.

It contains a class that fits the auction data using a symmetric first-price auction model with either additive or multiplicative heterogeneity, and predicts latent valuations and counterfactuals.

The interface of the package consists of 4 steps.

  • pass a dataframe with auctionid and bid column names
  • pass covariate (continuous and discrete) column names and create bid residuals and fitted values
  • fit the non-parametric model
  • predict latent bids, and also expected total surplus, potential bidder surplus and revenue, as functions of exclusion level

Arxiv and Github repository

https://arxiv.org/abs/2106.13856

https://github.com/pandreyanov/pashas_simple_fpa

Sample code

df = pd.read_csv('../_data/haile_data_prepared.csv', index_col=0)

model = Model(data = df, auctionid_columns = ['auctionid'], bid_column = 'actual_bid')

cont_covs = ['adv_value', 'hhi', 'volume_total_1']
disc_covs = ['year', 'forest']
model.residualize(cont_covs, disc_covs, 'multiplicative')

model.summary()

model.trim_residuals(5)
model.fit(smoothing_rate = 0.2, trim_percent = 5, reflect = True)
model.predict()

model.make_ci(95)
model.plot_stats()
model.plot_counterfactuals()

model.data.sample(5)

Predictions

The counterfactuals are populated into the original dataset, ordered by the magnitude of bid redisuals. Some observations will not have a prediction, as they will be ignored (trimmed) in the non-parametric estimation.

  • _resid : bid residuals
  • _fitted : bid fitted values
  • _trimmed : variable takes 1 if observations were omitted (trimmed) and 0 otherwise
  • _u : u-quantile levels, takes values between 0 and 1
  • _hat_q : estimate of quantile density of bid residuals
  • _hat_v : estimate of quantile function of value residuals
  • _latent_resid : same as _hat_v
  • _ts : total surplus as function of exclusion level u
  • _bs : potential bidder surplus as function of exclusion level u
  • _rev : auctioneer revenue as function of exclusion level u

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_fpa-0.7.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_fpa-0.7-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file simple_fpa-0.7.tar.gz.

File metadata

  • Download URL: simple_fpa-0.7.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for simple_fpa-0.7.tar.gz
Algorithm Hash digest
SHA256 53a981203fd8183fd3857c004b872ef07b80a5ca90db58d761b257a50fc1e59b
MD5 6bb88bdc17bd2e0b2280bdac73a040af
BLAKE2b-256 4af5d283f946a1ed0f380e2b08c92372f717fbeb25a9045724702fb057b97c6c

See more details on using hashes here.

File details

Details for the file simple_fpa-0.7-py3-none-any.whl.

File metadata

  • Download URL: simple_fpa-0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for simple_fpa-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0ac849a54c0cef9c54fc3c80014f862c9915d04c27bdef0a7dd168df77443ad8
MD5 4fc7234c759d5fa9da9f5211c0a8f2c2
BLAKE2b-256 635af8a9a2fa5723ae417b9f87e238ccba70b0b9a03d24cf5dc06b6373f0f453

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page