This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
import time | |
import json | |
import numpy as np | |
import scipy as sp | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from tqdm import tqdm | |
import cvxopt as opt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import pymc3 as pm | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from tqdm import tqdm | |
model_df = pd.read_csv('./breakpoints.csv') | |
sectors = model_df['equity_sector'].unique() | |
industry = model_df['equity_industry'].unique() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import pandas as pd | |
font_title = {'family': 'roboto', | |
'color': '#0f3567', | |
'weight': 'bold', | |
'size': 16, | |
} | |
font_mini_title = {'family': 'roboto', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import f_oneway | |
a = all_metrics[all_metrics['significance'] == 'insignficant']['post_covid_return'].dropna().values | |
b = all_metrics[all_metrics['significance'] == 'intrinsic_only']['post_covid_return'].dropna().values | |
c = all_metrics[all_metrics['significance'] == 'sharpe_only']['post_covid_return'].dropna().values | |
d = all_metrics[all_metrics['significance'] == 'both']['post_covid_return'].dropna().values | |
import statsmodels | |
print(f_oneway(a,b,c,d)) # Signficicant Difference between groups | |
from itertools import combinations, product |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(TSA) | |
library(forecast) | |
library(tseries) | |
garchAutoTryFit = function( | |
ll, | |
data, | |
trace=FALSE, | |
forecast.length=1, | |
with.forecast=TRUE, |