Financial & Economic Indicators Database


Explore MacroVar Financial and Macroeconomic indicators database. Access historical data using MacroVar's web interface Excel or API.


Financial Data

varnm Symbol Country Type
POSCO CDS.POSCO South Korea Corporate CDS
RIO TINTO LIMITED CDS.RIO-TINTO Australia Corporate CDS
BHP BILLITON LIMITED CDS.BHP-BILLITON Australia Corporate CDS
Hutchison Whampoa Limited CDS.Hutchison-Whampoa Hong Kong Corporate CDS
PEUGEOT SA CDS.PEUGEOT France Corporate CDS
ACWI ETF EWA Global CDS
ARDAGH PACKAGING FINANCE PUBLIC LIMITED COMPANY CDS.Ardagh-Packaging-Finance United Kingdom Corporate CDS
CROWN EUROPEAN HOLDINGS CDS.Crown-Holdings France Corporate CDS
CMA CGM CDS.CMA-CGM France Corporate CDS
Aktiebolaget Electrolux CDS.Electrolux Sweden Corporate CDS

Economic Indicators

Economic Indicator Symbol Country url
balance of trade al.balanceoftrade Albania https://macrovar.com/albania/balance-of-trade
bank lending rate al.banks.lendingrate Albania https://macrovar.com/albania/bank-lending-rate
banks balance sheet al.banks.bs Albania https://macrovar.com/albania/banks-balance-sheet
building permits al.buildingpermits Albania https://macrovar.com/albania/building-permits
business confidence al.bizconfidence Albania https://macrovar.com/albania/business-confidence
central bank balance sheet al.cb.assets Albania https://macrovar.com/albania/central-bank-balance-sheet
consumer confidence al.consconfidence Albania https://macrovar.com/albania/consumer-confidence
consumer price index cpi al.cpi Albania https://macrovar.com/albania/consumer-price-index-cpi
current account al.currentaccount Albania https://macrovar.com/albania/current-account
current account to gdp al.currentaccountgdp Albania https://macrovar.com/albania/current-account-to-gdp

MacroVar API


Follow the Steps below to Access the MacroVar Database via the following API:
Step 1: Copy the following Code or click to download python file MacroVar Python API
Step 2: Search MacroVar financial securities and macroeconomic indicators database using the search options above Step 3:Insert your Query's criteria in d=am.load by specifying the variable name, start and end date
Alternatively, you can access MacroVar using MS Excel

# -*- coding: utf-8 -*-
"""
MacroVar API Python Script
Upgrade your Account to gain unlimited access https://macrovar.com/plans
Please find and search the full list of macroeconomic variables & financial variables at https://MacroVar.com/financial-database-variables
Instructions: 1. Insert your username, password 2. variable name, start date, end date 3. Run Script
"""
import http.client
from urllib.parse import quote
import pandas as pd
class MacroVar(object):
user_name, password, conn, headers, payload = None, None, None, None, None
def __init__(self, user_name, password):
self.auth(user_name, password)
self.conn = http.client.HTTPConnection("api.MacroVar.com:8080")
def auth(self, user_name, password):
self.user_name = user_name
self.password = password
self.headers = {'Authorization': '{};{}'.format(self.user_name, self.password)}
def get_vars(self):
self.conn.request(method="GET", url="/vars", headers=self.headers)
response = self.conn.getresponse()
data = response.read()
str_data = data.decode("utf-8")
return str_data.split(',')
def load_data(self, var_name, start_date=None, end_date=None):
v = self.get_vars()
if var_name not in v:
raise ValueError('Variable name not found, check the get_vars() result.')
params = 'name={}'.format(quote(var_name))
if start_date:
params += '&start_date={}'.format(start_date)
if end_date:
params += '&end_date={}'.format(end_date)
url = "/query?" + params
self.conn.request(method="GET", url=url, headers=self.headers)
response = self.conn.getresponse()
if response.status == 200:
data = response.read()
str_data = data.decode("utf-8")
data_rows = str_data.split('\r\n')
if len(data_rows) <= 1:
return data_rows
data_arr = []
for d in data_rows:
data_arr.append(d.split(','))
d = data_arr[:-1] # skip the last empty row
return pd.DataFrame(d[2:], columns=d[0])
else:
raise ValueError('Server error {} {}'.format(response.status, response.reason))
return None
if __name__ == '__main__':
am = MacroVar('MacroVartest', 'test')
v = am.get_vars()
d = am.load_data('US-1Y', '2010-01-03', '2019-02-01')
print (d)
Feedback
Feedback
How would you rate your experience?
Do you have any additional comment?
Next
Enter your email if you'd like us to contact you regarding with your feedback.
Back
Submit
Thank you for submitting your feedback!