Skip to content
/ BGM Public
forked from albop/BGM

Graphs for "Monopoly Power and Endogenous Product Variety: Distortions and Remedies"

Notifications You must be signed in to change notification settings

ezgioz/BGM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monopoly Power and Endogenous Product Variety: Distortions and Remedies : production of welfare graphs.

This code is created by Pablo Winant and further developped by Ezgi Ozsogut.

The code is maintained here https://github.com/ezgioz/BGM

Option 1: Installation

Required programs to produce the graphs are

Complete documentation with installation instructions for Dolo available at http://dolo.readthedocs.org/en/latest/

Option 2: Binder (remote machine access)

  • Or run the code on the remote machine which has all the necesaary installations the the project folder (No installation is needed)

Binder

Producing the graphs

The code to produce the grapsh is contained in a IPython notebook. The notebook will solve each version of the model with several values of the parameters.

To view and execute it on your local computer:

  • Open a terminal and change the working directory so that it contains the Produce Graphs.ipynb file.
  • Launch ipython notebook. This should open a list of notebooks in a web browser. Click on ProduceGraphs.ipynb.

To view and execute it on the remote computer just clicj on theProduce Graphs.ipynb notebook.

The main notebook (Produce Graphs.ipynb)

This notebook solve various models for different parameter values and plots the associated welfare gains comparing competetitive equilibrium and planner equilibrium solutions. The models are coded using dolo specifications in the different yaml files in model_files folder. For the model solution code, see BGM_solver module. The welfare computations are based on a second order Taylor expansion of the decision-rule. For more information on the perturbation method see the documentation or the source code

On this notebook run each code block by "ctrl+enter" for the following computation steps. (There is detailed information in this notebook for each step)

1 Define various scenarios

2 Compute welfares calling the "BGM_solver" module. More information in the file itself, see comments at each step. This file

  • imports the model
  • sets the information such as the paramater to be changed at each step
  • solves the model for each case
  • return the results

3 Export results in a table (also export to excel)

Output

The resulting graphs and results are stored in the output folder. If you are running the code on the remote machine, you should save them on your local computer before leaving the remote machine. Changes you make on the code or the related ouput files won't be saved remotely. If you install python and dolo to use the BGM folder on your machine, ouput will be updated in the output folder automatically.

About

Graphs for "Monopoly Power and Endogenous Product Variety: Distortions and Remedies"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.6%
  • Python 2.4%