Skip to content

Instantly share code, notes, and snippets.

View ahlusar1989's full-sized avatar
🏀
Let's Go!

Saran Ahluwalia ahlusar1989

🏀
Let's Go!
View GitHub Profile
@ahlusar1989
ahlusar1989 / nasdaq_daily.csv
Last active April 16, 2023 11:09
NASDAQ Daily Index (January 1, 2012 - April 11, 2023)
DATE NASDAQCOM
2012-01-03 2648.72
2012-01-04 2648.36
2012-01-05 2669.86
2012-01-06 2674.22
2012-01-09 2676.56
2012-01-10 2702.50
2012-01-11 2710.76
2012-01-12 2724.70
2012-01-13 2710.67
@ahlusar1989
ahlusar1989 / dca_divestment_12292022.ipynb
Created December 29, 2022 18:56
DCA Cases 1- 3: Bitcoin case study
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahlusar1989
ahlusar1989 / snr-periodic.py
Created December 12, 2020 22:28 — forked from mbejger/snr-periodic.py
Matched filter and signal-to-noise for a periodic template
"""
Plot white noise with added sinusoidal signal
"""
import numpy as np
import matplotlib.pyplot as plt
import sys
import h5py
fs = 4096 # sampling rate [Hz]
T = 4 # duration [s]
#' Hellwig's method for choosing subset of independet variables
#'
#' Hellwig's method selects a subset of independent variables in a linear
#' regression model based on their correlations with some dependent variable as
#' well as correlations between themselves. The goal is to select a subset of
#' variables which are fairly independent from each other but highly correlated
#' with the dependent variable.
#'
#' Given \eqn{m} independent variables Hellwig's method consists of evaluating
#' all \eqn{2^m - 1} combinations using the following steps:
---
generator: pandoc
title: Gibbs sampling
viewport: 'width=device-width, initial-scale=1'
---
::: {.container-fluid .main-container}
::: {#header .fluid-row}
Gibbs sampling {#gibbs-sampling .title .toc-ignore}
==============
generator title viewport
pandoc
Gibbs sampling
width=device-width, initial-scale=1

::: {.container-fluid .main-container} ::: {#header .fluid-row} Gibbs sampling {#gibbs-sampling .title .toc-ignore}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahlusar1989
ahlusar1989 / YeoJohnson.py
Created June 13, 2019 23:08 — forked from mesgarpour/YeoJohnson.py
Yeo-Johnson Transformation
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import warnings
import numpy as np
import pandas as pd
import sys
__author__ = "Mohsen Mesgarpour"
__copyright__ = "Copyright 2016, https://github.com/mesgarpour"
__credits__ = ["Mohsen Mesgarpour"]
FIPS_code County State unemployment
01001 Autauga County Alabama 5.9
01003 Baldwin County Alabama 6.1
01005 Barbour County Alabama 10.5
01007 Bibb County Alabama 7.2
01009 Blount County Alabama 6.1
01011 Bullock County Alabama 8.8
01013 Butler County Alabama 8.5
01015 Calhoun County Alabama 8.0
01017 Chambers County Alabama 6.7