This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running 0.00 km ░░░░░░░░░░░░░░░░░░░ 0.00/h | |
Cycling 1264.55 km ███████████████████ 28.76/h | |
Last month 236.90 km 21 achievements 8:46h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ********************************************************************************* */ | |
/* ************** W R D S R E S E A R C H A P P L I C A T I O N S ************** */ | |
/* ********************************************************************************* */ | |
/* Summary : Calculate Institutional Ownership, Concentration, and Breadth Ratios */ | |
/* Date : May 18, 2009 */ | |
/* Author : Luis Palacios, Rabih Moussawi, and Denys Glushkov */ | |
/* Variables : - INPUT : Thomson-Reuters 13F Data (TR-13F) S34TYPE3 Holdings data */ | |
/* S34TYPE1 data for FDATE and RDATE variables */ | |
/* - OUTPUT: IO_TimeSeries dataset with IO variables for common stocks */ | |
/* ********************************************************************************* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This SAS program calculates the distance to default using the KMV-Merton model | |
with the iterated estimate of the volatility of firm value. Many of the results | |
of Bharath and Shumway (2004) are generated by this program. The program | |
requires the data described below, and it generates a permanent sas data file | |
called ssd.kmv which contains distances to default. The program calculates | |
monthly distances to default every year from 1980 to 1990 as it is currently written*/ | |
/* This program requires two datasets: | |
ssd.comp, which contains monthly observations taken from the quarterly compustat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Use Jackknife method to compute discretionary accruals */ | |
/* see https://mingze-gao.com/posts/compute-jackknife-coefficient-estimates-in-sas/ */ | |
/* UseHribarCollinsTotalAccruals: | |
- true: use Hribar-Collins Cashflow Total Accruals | |
- false: use normal method */ | |
%let UseHribarCollinsTotalAccruals = false; | |
/* Include %array and %do_over */ | |
filename do_over url "https://mingze-gao.com/utils/do_over.sas"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ********************************************************************************* */ | |
/* ******************** W R D S R E S E A R C H M A C R O S ******************** */ | |
/* ********************************************************************************* */ | |
/* WRDS Macro: INDRATIOS */ | |
/* Summary : Computes a broad range of financial ratios aggregated at */ | |
/* the industry level using Fama-French industry classification */ | |
/* Date : Apr, 2009 */ | |
/* Modified : Nov, 2010 */ | |
/* Author : Denys Glushkov, WRDS */ | |
/* Parameters: */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options mprint; | |
%macro lowcase(dsn); | |
%let dsid=%sysfunc(open(&dsn)); | |
%let num=%sysfunc(attrn(&dsid,nvars)); | |
%put # | |
data &dsn; | |
set &dsn(rename=( | |
%do i = 1 %to # | |
/*function of varname returns the name of a SAS data set variable*/ | |
%let var&i=%sysfunc(varname(&dsid,&i)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ********************************************************************************* */ | |
/* ************** W R D S R E S E A R C H A P P L I C A T I O N S ************** */ | |
/* ********************************************************************************* */ | |
/* Summary : Tobin's Q and Altman Z Score for Compustat Companies */ | |
/* Date : August 24, 2011 */ | |
/* Author : Rabih Moussawi */ | |
/* Variables : - Computes proxies for Tobin's Q and Altman Z using Financial Ratios */ | |
/* - Proxy for Age of company using number of years with available data */ | |
/* - Adds delisting reason and delisting date information */ | |
/* ********************************************************************************* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3, sys, os, pathlib, logging | |
import pandas as pd | |
# fmt: off | |
states = [ 'AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', | |
'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', | |
'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', | |
'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', | |
'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY'] | |
# fmt: on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ********************************************************************************* */ | |
/* ******************** W R D S R E S E A R C H M A C R O S ******************** */ | |
/* ********************************************************************************* */ | |
/* WRDS Macro: INDCLASS */ | |
/* Summary : Constructs 4 different industry classifications based on SIC, NAICS, */ | |
/* GICS and Fama-French industry classifications */ | |
/* */ | |
/* Date : Feb, 2010 */ | |
/* Author : Denys Glushkov, WRDS */ | |
/* Variables : */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ********************************************************************************* */ | |
/* ************** W R D S R E S E A R C H A P P L I C A T I O N S ************** */ | |
/* ********************************************************************************* */ | |
/* Summary : Construct Daniel Grinblatt Titman and Wermers(1997) Benchmarks */ | |
/* Date : January, 2011 */ | |
/* Author : Rabih Moussawi and Gjergji Cici */ | |
/* Variables : - BEGDATE: Sample Start Date */ | |
/* - ENDDATE: Sample End Date */ | |
/* ********************************************************************************* */ | |
NewerOlder