Esempio n. 1
0
 def test_gdst_data_no_properties(self, mocked_post):
     ciq_client = CapIQClient("username", "password")
     return_value = ciq_client.gdst(["TRIP"], ["IQ_CLOSEPRICE"],
                                    ["close_price"],
                                    start_date="12/19/1980",
                                    end_date="12/19/2000",
                                    frequency="M")
     self.assertEqual(return_value, {'TRIP:': {'close_price': [['46.80']]}})
Esempio n. 2
0
    #             continue
    #         for ii in range(0,len(i['Headers'])):
    #             print i['Headers'][ii],':',i['Rows'][ii]

    #print(client.gdsg(['WMT:'],['BASIC_SECURITY_DESCRIPTION'], ["description"]))

    # print client.gdshe(['nyse:ibm'],['IQ_QUICK_COMP'],properties=[{'StartRank':1,'EndRank':5}])
    #print(client.gdshv(['^ftse'],['IQ_CONSTITUENTS'],["constituents"], properties=[{'StartRank':1,'EndRank':5}]))
    metrics_map = {
        'name': 'IQ_COMPANY_NAME',
        'industry': 'IQ_INDUSTRY',
        'sector': 'IQ_INDUSTRY_SECTOR',
        'profile': 'IQ_BUSINESS_DESCRIPTION',
        'company_url': 'IQ_COMPANY_WEBSITE'
    }
    query = []
    return_keys = []
    for k, m in metrics_map.items():
        query.append(m)
        return_keys.append(k)

    #data = client.gdsp(['ibm:', 'aapl:'], query, return_keys, "")
    #data = client.gdsp(['aapl:'], query, return_keys, "")
    #print(data)

    # print client.gdsp(['ibm:'],['IQ_COMPANY_NAME'])
    # print client.gdsg(['ibm:nyse'],['BASIC_SECURITY_DESCRIPTION'])

    print(client.gdst(['IBM:'], ['TRACE_TRADE_30D_PRICE_VOLATILITY'], ["trace_volitility"], start_date="08/18/2015",
                     properties=[{'frequency': "Daily", 'currencyId': "USD", 'currencyConversionModeId': "HISTORICAL"}]))
Esempio n. 3
0
 def test_gdst_data(self, mocked_post):
     ciq_client = CapIQClient("username", "password")
     return_value = ciq_client.gdst(["TRIP"], ["IQ_CLOSEPRICE"],
                                    ["close_price"],
                                    properties=[{}])
     self.assertEqual(return_value, {'TRIP:': {'close_price': [['46.80']]}})