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)
| from __future__ import print_function, division | |
| from timeit import default_timer as timer | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from numba import njit | |
| w = 400 | |
| h = 300 |
| from pandas import * | |
| from datetime import * | |
| import pdb as pdb | |
| df = DataFrame.from_csv('aapl_1-2012_5min.csv') | |
| dayCount=0 | |
| rangeHigh = -1 | |
| rangeLow = 9999 | |
| openDayRangeDict = {} | |
| getRange = 1 |
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)
| #include <glm/matrix.hpp> | |
| class Frustum | |
| { | |
| public: | |
| Frustum() {} | |
| // m = ProjectionMatrix * ViewMatrix | |
| Frustum(glm::mat4 m); |
| #!/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 |
| # -*- 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: |