Skip to content

Instantly share code, notes, and snippets.

View sharavsambuu's full-sized avatar
🚀

sharavsambuu sharavsambuu

🚀
View GitHub Profile
@databento-bot
databento-bot / scanner.py
Last active September 29, 2025 12:37
Real-time scanner for detecting large price movements in all US stocks and ETFs
"""
This script demonstrates how to build a real-time scanner that detects significant
price movements across all US stocks and ETFs using Databento's market data APIs.
Features:
- Handles entire US equities universe of ~9,000 symbols efficiently
- Median sub-ms feed delay to NY4/5 (WAN-shaped) and ~5s to start scanning
- Monitors all US stocks and ETFs for price movements exceeding a configurable threshold
- Compares current prices against previous day's closing prices
- Displays alerts when significant moves are detected
@mdancho84
mdancho84 / core-strategy-1-volatility-targeting.ipynb
Created February 20, 2024 00:08
Core Strategy 1: Volatility Targeting
Loading
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 September 23, 2025 03:25 — 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)

@Patitotective
Patitotective / custom_context_menu.py
Last active June 26, 2024 10:27
Minimal example of how to use a custom context menu and add actions to it.
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit, QMenu, QAction
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.text_edit = QTextEdit()
@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 October 15, 2025 20:51
Quantopian Lectures Saved
@boyboi86
boyboi86 / create_synthetic_data.py
Last active February 1, 2025 04:34
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 July 24, 2025 19:58
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>