Indicators
Trading Economics forecasts are built using a proprietary global macro model that takes into account our analysts’ expectations, correlations between countries, and a set of logical relationships between different indicators.
By country
Get forecast indicator data by country
te.getForecastData(country='mexico', output_type='df')
data = te.getForecasts(country = 'mexico').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/country/mexico?c=guest:guest");
te.getForecastData(country= ['mexico', 'sweden' ], output_type='df')
data = te.getForecasts(country = ['mexico','sweden']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/country/mexico,sweden?c=guest:guest");
By indicator
Get forecast indicator data by indicator
/forecast/indicator/{indicator}
te.getForecastData(indicator= 'gdp', output_type='df')
data = te.getForecasts(indicator = 'gdp').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/indicator/gdp?c=guest:guest");
/forecast/indicator/{indicators}
te.getForecastData(indicator= ['gdp', 'population'], output_type='df')
data = te.getForecasts(indicator = ['gdp','population']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/indicator/gdp,population?c=guest:guest");
By country and indicator
Get forecast indicator data by country and indicator
/forecast/country/{country}/indicator/{indicator}
te.getForecastData(country='mexico', indicator='gdp', output_type='df')
data = te.getForecasts(country = 'mexico', indicator = 'gdp').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/country/mexico/indicator/gdp?c=guest:guest");
/forecast/country/{countries}/indicator/{indicators}
te.getForecastData(country= ['mexico','sweden'],
indicator= ['gdp','population'], output_type='df')
data = te.getForecasts(country = ['mexico','sweden'],
indicator = ['gdp','population']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/country/mexico,sweden/indicator/gdp,population?c=guest:guest");
By ticker
Get forecast indicator data by ticker
te.getForecastByTicker(ticker= 'usurtot', output_type='df')
data = te.getForecasts(ticker = 'usurtot').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/ticker/usurtot?c=guest:guest");
te.getForecastByTicker(ticker= ['usurtot', 'wgdpchin'], output_type='df')
data = te.getForecasts(ticker = ['usurtot','wgdpchin']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/forecast/ticker/usurtot,wgdpchin?c=guest:guest");
Response fields
Field | Type | Description | Example |
---|---|---|---|
Country* | string | Country name | “Mexico” |
Category | string | Name of the indicator | “Auto Exports” |
Title | string | Combination of country and indicator name | “Mexico Auto Exports” |
LatestValue | number | Last released value | 272.69 |
LatestValueDate | string | Date of the last released value | “2023-03-31T00:00:00” |
ForecastValue1Q** | number | Forecast value for the next quarter | 257.00 |
ForecastValue2Q** | number | Forecast value for the quarter following ForecastValue1Q | 250.00 |
ForecastValue3Q** | number | Forecast value for the quarter following ForecastValue2Q | 239.00 |
ForecastValue4Q** | number | Forecast value for the quarter following ForecastValue3Q | 274.00 |
ForecastValue1** | number | Forecast value for the year end | 239.00 |
ForecastValue2** | number | Forecast value for the year end following ForecastValue1 | 242.00 |
ForecastValue3** | number | Forecast value for the year end following ForecastValue2 | 232.00 |
q1_date | string | Date for ForecastValue1Q | “2023-06-30T00:00:00” |
q2_date | string | Date for ForecastValue2Q | “2023-09-30T00:00:00” |
q3_date | string | Date for ForecastValue3Q | “2023-12-31T00:00:00” |
q4_date | string | Date for ForecastValue4Q | “2024-03-31T00:00:00” |
Frequency | string | Frequency of the indicator | “Monthly” |
Unit | string | Unit of the forecasted values | “Thousand Units” |
HistoricalDataSymbol | string | Unique symbol used by Trading Economics | “MEXICOAUTEXP” |
*Country only appears in the packages or when using ‘&f=json’ on endpoints.
**Forecast response fields can be diferent from HTML response fields:
Python/Node | HTML |
---|---|
yearend | ForecastValue1 |
yearend2 | ForecastValue2 |
yearend3 | ForecastValue3 |
q1 | ForecastValue1Q |
q2 | ForecastValue2Q |
q3 | ForecastValue3Q |
q4 | ForecastValue4Q |