Skip to content

Instantly share code, notes, and snippets.

View roarkemc's full-sized avatar
🔮

Roarke McNaught roarkemc

🔮
View GitHub Profile
@josef-pkt
josef-pkt / empirical_likelihood.py
Created March 20, 2012 19:29 — forked from jseabold/empirical_likelihood.py
Empirical Likelihood with Moment Constraints
'''
Author: Skipper
https://gist.github.com/2109628
Josef: adjustments to example
'''
from statsmodels.base.model import LikelihoodModel
@arindam89
arindam89 / .bashrc
Created June 5, 2012 06:43
.bashrc example
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't overwrite GNU Midnight Commander's setting of 'ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
"""
Self-Exciting Threshold Autoregression
References
----------
Hansen, Bruce. 1999.
"Testing for Linearity."
Journal of Economic Surveys 13 (5): 551-576.
"""
@ChadFulton
ChadFulton / star_model.py
Created September 7, 2013 18:54
LSTAR1 model
"""
Smooth Transition Autoregression
References
----------
Dijk, Dick van, Timo Terasvirta, and Philip Hans Franses. 2002.
"Smooth Transition Autoregressive Models - a Survey of Recent Developments."
Econometric Reviews 21 (1): 1-47.
@josef-pkt
josef-pkt / example_gmm_poisson.ipynb
Last active August 24, 2023 20:53
Poisson with endogeneity, GMM with IV versus MLE in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josef-pkt
josef-pkt / example_gmm_euler.ipynb
Last active September 24, 2024 06:02
Generalized Method of Moments in Python: Estimating Euler Equations
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sloria
sloria / bobp-python.md
Last active September 9, 2025 10:52
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@StuartGordonReid
StuartGordonReid / RiskAdjustedReturnMetrics.py
Last active June 9, 2024 23:00
Measured of Risk-adjusted Return
import math
import numpy
import numpy.random as nrand
"""
Note - for some of the metrics the absolute value is returns. This is because if the risk (loss) is higher we want to
discount the expected excess return from the portfolio by a higher amount. Therefore risk should be positive.
"""
@josef-pkt
josef-pkt / example_binned_kernel_regression.ipynb
Created February 20, 2017 05:44
binned local linear kernel regression - illustration
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdipaolo
cdipaolo / LICENSE.txt
Last active June 6, 2024 22:54
Estimate a known degrees of freedom student t distribution from data using the EM algorithm
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit