Skip to content

fedossa/cqa_2025_assignment_1_solution_sketch_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corporate Decision-Making and Quantitative Analysis Winter 2024/25 - Assignment I

Audit market concentration in the EU

This repository contains the code and data for the first assignment of the Corporate Decision-Making and Quantitative Analysis Winter 2024/25. It is implemented in Python and quarto.

How Do I create the output?

Assuming that you have Python installed, this should be relatively straightforward.

  1. It is recommend to create a virtual environment for the project. Please do this and activate the virtual environment.
python3 -m venv venv
source venv/bin/activate # On Linux and Mac OS
# venv\Scripts\activate.bat # If you are using Windows - command prompt
# venv/Script/Activate.ps1 # If you are using Windows - PowerShell and have allowed script execution
  1. Install the required packages by running pip install -r requirements.txt in the terminal. This will install the required packages for the project in the virtual environment.

  2. Copy _secrets.env to secrets.env. Then edit the secret.env file by adding your WRDS credentials.

  3. If you have make installed, you can run make all in the terminal. This will create the output files in the output directory. Otherwise, you can run the following commands in the terminal with the virtual environment activated:

python code/python/pull_wrds_data.py
python code/python/prepare_data.py
python code/python/do_analysis.py
quarto render doc/paper.qmd
mv doc/paper.pdf output
rm -f doc/paper.ttt doc/paper.fff

First time you run the pull_wrds_data.py script, it will ask you to enter your WRDS credentials. You should enter them again and choose y to save the .pgpass file. This will save your credentials in the .pgpass file so that you do not need to enter them again.

This will create the paper in the output directory.

This repository was built based on the ['treat' template for reproducible research](https://github.com/fedossa/treat).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published