https://github.com/OpenSourceAP/CrossSectionDemos
Example code of simple things one can do with our open-source asset pricing data
https://github.com/OpenSourceAP/CrossSectionDemos
Last synced: 4 months ago
JSON representation
Example code of simple things one can do with our open-source asset pricing data
- Host: GitHub
- URL: https://github.com/OpenSourceAP/CrossSectionDemos
- Owner: OpenSourceAP
- License: gpl-3.0
- Created: 2021-05-04T12:53:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T14:43:27.000Z (8 months ago)
- Last Synced: 2024-08-23T16:25:05.039Z (8 months ago)
- Language: R
- Size: 59.6 KB
- Stars: 42
- Watchers: 4
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - OpenSourceAP/CrossSectionDemos - Example code of simple things one can do with our open-source asset pricing data (R)
README
# CrossSectionDemos
Example code of simple things one can do with [Open Source Asset Pricing data](www.openassetpricing.com), created with our [open source code](https://github.com/OpenSourceAP/CrossSection).
Each file is an **independent script** that **automatically downloads** data from the internet. You just need the googledrive R package and a Google Drive account.
## List of Scripts
Scripts are listed from lightest / fastest (top) to heaviest / slowest (bottom).
| File | Description |
| --- | --- |
| `plot_anomaly.R` | Downloads selected long-short returns and plots along with sample and publication dates |
| `openap_vs_frenchweb.R` | Downloads `BM` and `BMdec` portfolios and compares to Ken French's data |
| `daily_covid_demo.R` | Downloads daily returns (all signals) and plots performance in March 2020 |
| `FF1993_style_implementation.R` | Downloads selected characteristic, constructs Fama-French 1993 style factor (building on 2x3 sort with Size), compares with Ken French's HML. (*2x3 implementations are part of our dataset as of March 2022*)|
| `dl_signal_add_crsp.R` | Creates the data you need for machine learning stuff. Downloads all downloadable predictor characteristics (1.5 gigs zipped), downloads CRSP signals from WRDS, merges, and saves to disk (5.6 gig csv). |
|`mclean_pontiff_main.R`| Replicates the fact that returns are mostly there out-of-sample (McLean and Pontiff 2016) |
|`old_vs_new_returns_check.R`| Compares returns from two different releases |## Details
- Assumes working directory is the same folder the file is in.
- Creates folder `temp/` in working directory and puts output and intermediate files there
- **Links to Google Drive URLs may need to be updated**
- For the March 2022 Release use https://drive.google.com/drive/folders/1O18scg9iBTiBaDiQFhoGxdn4FdsbMqGo
- For the April 2021 Release use https://drive.google.com/drive/folders/1I6nMmo8k_zGCcp9tUvmMedKTAkb9734R