def test_getts1b(self): res = mp.series('BRN_001_Month', 'ICE_EuroFutures_continuous', column='settlement_price') self.assertEqual( res.loc[pd.to_datetime('2020-01-02'), 'settlement_price(BRN_001_Month)'], 66.25)
def test_getts2(self): res = mp.series('PJABA00', 'Platts_EB', feedkeyname='Code') self.assertEqual( res.loc[pd.to_datetime('2019-11-04'), 'close(PJABA00)'], 635.25)
def test_getts1c(self): res = mp.series('CL_001_Month', column='settlement_price') self.assertEqual( res.loc[pd.to_datetime('2020-01-02'), 'settlement_price(CL_001_MONTH)'], 61.18)
def test_getts1(self): res = mp.series('BRN-Q0F', 'ICE_EuroFutures') self.assertEqual( res.loc[pd.to_datetime('2017-03-31'), 'settlement_price(BRN-Q0F)'], 53.32)
def test_clean_column(self): res = mp.series('BRN-Q0F', 'ICE_EuroFutures', clean_columns='symbol') self.assertEqual(res.columns[0], 'BRN-Q0F')
def test_getts4(self): res = mp.series('Country=AT&Product=GASDIES&Flow=CLOSTLV&Unit=KBBL', feedname='Jodi_GlobalOil') self.assertEqual(res.loc[pd.to_datetime('2019-01-01')].iloc[0], 7818.08)
def test_getts3(self): res = mp.series('AAIBI00') self.assertEqual( res.loc[pd.to_datetime('2019-12-01'), 'close(AAIBI00)'], 713.65)