Skip to content

Instantly share code, notes, and snippets.

View alexchinco's full-sized avatar

Alex Chinco alexchinco

View GitHub Profile
@alexchinco
alexchinco / 1 prog--yesteryear-bias--14apr2017.R
Last active April 17, 2017 17:36
Code for preliminary Yesteryear Bias results.
## #########################################################################
## #########################################################################
## @purpose: plot rate at which WSJ articles about the S&P 500 each month
## mention horizons ranging from 1 day to 1 year over the period
## from JAN 1995 to DEC 2016.
## -------------------------------------------------------------------------
## @author: alex chinco
## @date: 14-APR-2017
## #########################################################################
## #########################################################################
@alexchinco
alexchinco / data--ff-industry-returns--04apr2017.csv
Last active April 4, 2017 15:47
Plot bubble episodes from Greenwood, Shleifer, and You (2017)
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 49 columns, instead of 44. in line 2.
,Agric,Food ,Soda ,Beer ,Smoke,Toys ,Fun ,Books,Hshld,Clths,Hlth ,MedEq,Drugs,Chems,Rubbr,Txtls,BldMt,Cnstr,Steel,FabPr,Mach ,ElcEq,Autos,Aero ,Ships,Guns ,Gold ,Mines,Coal ,Oil ,Util ,Telcm,PerSv,BusSv,Comps,Chips,LabEq,Paper,Boxes,Trans,Whlsl,Rtail,Meals,Banks,Insur,RlEst,Fin ,Other
192607, 2.37, 0.12, -99.99, -5.19, 1.29, 8.65, 2.50, 50.21, -0.48, 8.08, -99.99, 4.95, 0.91, 8.14, -99.99, 0.39, 2.46, -8.21, 4.07, -99.99, 5.43, 3.18, 16.39, -0.65, 1.05, -99.99, -99.99, 5.64, 1.54, -1.40, 7.04, 0.83, -99.99, 5.85, 3.76, 1.31, 1.35, -99.99, 7.70, 1.94, -23.79, 0.07, 1.87, 4.61, -0.54, 2.89, -4.85, 5.20
192608, 2.23, 2.68, -99.99, 27.03, 6.50, 16.81, -0.76, 42.98, -3.58, -2.51, -99.99, 4.20, 4.26, 5.50, -99.99, 8.14, 4.63, 7.37, 2.17, -99.99, 2.06, 2.10, 4.23, -6.58, 1.80, -99.99, -99.99, 0.55, 0.85, 3.69, -1.69, 2.17, -99.99, 1.51, 3.57, -4.70, 6.89, -99.99, -2.38, 4.88, 5.39, -0.75,
@alexchinco
alexchinco / Condorcet's Jury Theorem.carbide.md
Last active February 4, 2017 16:49
Condorcet's Jury Theorem

Condorcet's Jury Theorem

Interpreting BRCA Test

@alexchinco
alexchinco / code.R
Last active January 21, 2017 14:56
Probability that the maximum in-sample correlation is less than a given cutoff value.
## ##########################################################################################################################
## ##########################################################################################################################
## @section: Prep workspace
## ##########################################################################################################################
## ##########################################################################################################################
options(width=200, digits=6, digits.secs=6)
rm(list=ls())
library(plyr)
@alexchinco
alexchinco / code.R
Last active March 27, 2018 18:30
Illustrative Example: Why Bayesian Variable Selection Doesn't Scale
## ##########################################################################################################################
## ##########################################################################################################################
## @section: Prep workspace
## ##########################################################################################################################
## ##########################################################################################################################
options(width=200, digits=6, digits.secs=6)
rm(list=ls())
@alexchinco
alexchinco / Hard Thresholding is Non-Convex.carbide.md
Last active January 12, 2017 23:16
Hard Thresholding is Non-Convex

Hard Thresholding is Non-Convex

@alexchinco
alexchinco / index.html
Created December 29, 2016 14:34
Estimate Beta via MAP and OLS
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.olsLine {
stroke: red;
stroke-width: 5.0px;
stroke-dasharray: 5;
opacity: 0.75;
}
@alexchinco
alexchinco / Gaussian Updating.carbide.md
Last active December 6, 2016 22:39
Gaussian Updating

Gaussian Updating

@alexchinco
alexchinco / Hard Thresholding is Non-Convex, Scaled.carbide.md
Last active January 13, 2017 17:23
Hard Thresholding is Non-Convex, Scaled

Hard Thresholding is Non-Convex, Scaled