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)
#%% | |
import warnings | |
warnings.filterwarnings("ignore") | |
def action_with_warnings(): | |
warnings.warn("should not appear") | |
with warnings.catch_warnings(record=True): | |
action_with_warnings() | |
import sys | |
sys.path.insert(0, '.') | |
import os |
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)
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/vim-easy-align' | |
Plug 'https://github.com/junegunn/vim-github-dashboard.git' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'derekwyatt/vim-scala' | |
Plug 'flazz/vim-colorschemes' |
#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 |
import streamlit as st | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from datetime import timedelta | |
def generate_stock_equity(start_date, end_date): | |
num_days = (end_date - start_date).days + 1 | |
changes = np.random.randint(low=-150, high=150, size=num_days) |
#%% | |
import random | |
import numpy as np | |
from pymoo.core.problem import ElementwiseProblem | |
from pymoo.algorithms.moo.nsga2 import NSGA2 | |
from pymoo.algorithms.moo.nsga3 import NSGA3 | |
from pymoo.optimize import minimize | |
from pymoo.util.ref_dirs import get_reference_directions | |
from pymoo.operators.sampling.rnd import FloatRandomSampling |