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.
Assuming that you have Python installed, this should be relatively straightforward.
- 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-
Install the required packages by running
pip install -r requirements.txtin the terminal. This will install the required packages for the project in the virtual environment. -
Copy
_secrets.envtosecrets.env. Then edit thesecret.envfile by adding your WRDS credentials. -
If you have make installed, you can run
make allin the terminal. This will create the output files in theoutputdirectory. 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.fffFirst 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).