Skip to content

Instantly share code, notes, and snippets.

View sharavsambuu's full-sized avatar
🐌

sharavsambuu sharavsambuu

🐌
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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)

@sharavsambuu
sharavsambuu / FrustumCull.h
Created September 7, 2023 16:51 — forked from podgorskiy/FrustumCull.h
Ready to use frustum culling code. Depends only on GLM. The input is only bounding box and ProjectionView matrix. Based on Inigo Quilez's code.
#include <glm/matrix.hpp>
class Frustum
{
public:
Frustum() {}
// m = ProjectionMatrix * ViewMatrix
Frustum(glm::mat4 m);
@sharavsambuu
sharavsambuu / cuda_11.8_installation_on_Ubuntu_22.04
Created August 29, 2023 08:05 — forked from MihailCosmin/cuda_11.8_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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharavsambuu
sharavsambuu / pair-trade.ipynb
Created August 7, 2023 07:10 — forked from sharavsambuunev/pair-trade.ipynb
Pair Trade in Zipline
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharavsambuu
sharavsambuu / nsga2.py
Created June 21, 2023 10:59 — forked from darden1/nsga2.py
DEAP's nsga2 tutorial.
# -*- coding: utf-8 -*-
import array
import random
import json
import numpy as np
import matplotlib.pyplot as plt
from math import sqrt
import numpy as np
from numba import jit
from numba import float64
from numba import int64
@jit((float64[:], int64), nopython=True, nogil=True)
def _ewma(arr_in, window):
r"""Exponentialy weighted moving average specified by a decay ``window``
to provide better adjustments for small windows via:
@sharavsambuu
sharavsambuu / create_synthetic_data.py
Created January 4, 2023 22:49 — forked from boyboi86/create_synthetic_data.py
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())
@sharavsambuu
sharavsambuu / list.md
Created December 18, 2022 16:56 — forked from ih2502mk/list.md
Quantopian Lectures Saved