Skip to content

Instantly share code, notes, and snippets.

View sharavsambuu's full-sized avatar
🐌

sharavsambuu sharavsambuu

🐌
View GitHub Profile
@mdancho84
mdancho84 / core-strategy-1-volatility-targeting.ipynb
Created February 20, 2024 00:08
Core Strategy 1: Volatility Targeting
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 2, 2024 12:46 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check

Risk Parity & Budgeting

With Python

Dr. Yves J. Hilpisch | The Python Quants & The AI Machine

Python for Quant Finance Meetup, London, 16. November 2022

(short link to this Gist: http://bit.ly/pqf_risk)

@sayakpaul
sayakpaul / rand_augment_tfrecords.py
Last active April 30, 2023 07:03
Example of incorporating RandAugment in a tf.data pipeline for image classification.
from imgaug import augmenters as iaa
import imgaug as ia
ia.seed(4)
import tensorflow as tf
tf.random.set_seed(666)
aug = iaa.RandAugment(n=2, m=9)
BATCH_SIZE = 224
@ih2502mk
ih2502mk / list.md
Last active May 4, 2024 04:16
Quantopian Lectures Saved
@boyboi86
boyboi86 / create_synthetic_data.py
Last active February 28, 2024 08:36
Generate Synthetic High-Frequency Data for Quantitative research
import numpy as np
import pandas as pd
import datetime as dt
from sklearn.datasets import make_classification
def create_price_data(start_price: float = 1000.00, mu: float = .0, var: float = 1.0, n_samples: int = 1000000):
i = np.random.normal(mu, var, n_samples)
df0 = pd.date_range(periods=n_samples, freq=pd.tseries.offsets.Minute(), end=dt.datetime.today())
@highfestiva
highfestiva / binance-liquidation-calculator.py
Last active April 16, 2024 06:13
CLI Binance liquidation calculation formula
#!/usr/bin/env python3
'''2021-03-26: Reverse-engineer by searching for the following terms in features*.js:
- bracketMaintenanceMarginRate
- cumFastMaintenanceAmount
- bracketNotionalFloor
- bracketNotionalCap'''
# (max) position, maintenance margin, maintenance amount
maint_lookup_table = [
@videotizer
videotizer / apod-playlist.html
Created November 29, 2019 06:03
Embeded APOD YouTube playlist with auto shuffle and auto loop in a responsive full size HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Astronomy Picture of the Day - Read Aloud by Artifical Intelligence - Created by Videotizer</title>
@luispuerto
luispuerto / r_ubuntu.sh
Last active December 19, 2020 16:16 — forked from ElToro1966/r_ubuntu_18_04.sh
Install R and RStudio on Ubuntu 19.10 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Add repo to install the last R
sudo apt install apt-transport-https software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/'
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
@sebjai
sebjai / OrderFlow.ipynb
Created September 26, 2019 21:39
Optimal trading with order-flow and short-term alpha
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.