Skip to content

Commit 1305abe

Browse files
authored
correct fetching of tickers
the assets_m6.csv file contains a record of prices over time - to avoid issues whereby some asset might have been missing for a date, better to use `unique`
1 parent 0aa7c69 commit 1305abe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

precise/skatertools/m6/covarianceforecasting.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77

88
def m6_data(interval='d', n_dim=100, n_obs=300):
9-
constituents = pd.read_csv(
10-
'https://raw.githubusercontent.com/Mcompetitions/M6-methods/main/assets_m6.csv')[:n_dim]
11-
tickers = constituents['symbol'].values
9+
tickers = pd.read_csv(
10+
'https://raw.githubusercontent.com/Mcompetitions/M6-methods/main/assets_m6.csv')['symbol'].unique()[:n_dim]
1211
if (interval=='m') and (n_obs>60):
1312
print('Too many obs, switching to daily ')
1413
interval = 'd'

0 commit comments

Comments
 (0)