Created
March 29, 2021 04:22
-
-
Save databyjp/fb7a9e654698982911a426efdb77c62d to your computer and use it in GitHub Desktop.
This file contains 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
temp_syms = [s for s in list(sp500_df[sp500_df.Sector == sect].Symbol.values) if s in df.symbol.unique()] | |
temp_syms = random.sample(temp_syms, n_symbols) | |
pf1_df = df[df.symbol.isin(temp_syms)] | |
pf1_avg = get_avg_prices(pf1_df) | |
pf1_var = pf1_avg.var() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment