06 Trade Analysis (Imports & Exports)
Interfaces implemented in this chapter are listed below; uncovered indicators are noted under “To be added” at the end.
Customs imports and exports overview
Interface: macro_china_hgjck
Source URL: https://data.eastmoney.com/cjsj/hgjck.html
Description: China Customs imports and exports overview; monthly data from 200801 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Month | object | - |
| Current-month exports-Amount | float64 | Unit: USD 100 million |
| Current-month exports-YoY | float64 | Unit: % |
| Current-month exports-MoM | float64 | Unit: % |
| Current-month imports-Amount | float64 | Unit: USD 100 million |
| Current-month imports-YoY | float64 | Unit: % |
| Current-month imports-MoM | float64 | Unit: % |
| Cumulative exports-Amount | float64 | Unit: USD 100 million |
| Cumulative exports-YoY | float64 | Unit: % |
| Cumulative imports-Amount | float64 | Unit: USD 100 million |
| Cumulative imports-YoY | float64 | Unit: % |
Example
import meshare as ms
macro_china_hgjck_df = ms.macro_china_hgjck()
print(macro_china_hgjck_df)
Sample data
Month Current-month exports-Amount Current-month exports-YoY ... Cumulative exports-YoY Cumulative imports-Amount Cumulative imports-YoY
0 Oct 2022 2.983717e+08 -0.3 ... 11.1 2.264551e+09 3.5
1 Sep 2022 3.226903e+08 5.9 ... 12.5 2.051334e+09 4.0
2 Aug 2022 3.143794e+08 7.2 ... 13.5 1.813451e+09 4.5
3 Jul 2022 3.318411e+08 18.0 ... 14.5 1.578288e+09 5.2
4 Jun 2022 3.281211e+08 17.1 ... 13.9 1.347358e+09 5.7
.. ... ... ... ... ... ... ...
173 May 2008 1.204965e+08 28.1 ... 22.9 4.670271e+08 30.4
174 Apr 2008 1.187067e+08 21.8 ... 21.5 3.665725e+08 27.9
175 Mar 2008 1.089629e+08 30.6 ... 21.4 2.644787e+08 28.6
176 Feb 2008 8.736780e+07 6.5 ... 16.8 1.689377e+08 30.9
177 Jan 2008 1.096400e+08 26.6 ... 26.6 9.017445e+07 27.6
Exports YoY (USD)
Interface: macro_china_exports_yoy
Source URL: https://datacenter.jin10.com/reportType/dc_chinese_exports_yoy
Description: China exports annual rate in USD; data from 19820201 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Item | object | - |
| Date | object | - |
| Actual | float64 | Unit: % |
| Forecast | float64 | Unit: % |
| Previous | float64 | Unit: % |
Example
import meshare as ms
macro_china_exports_yoy_df = ms.macro_china_exports_yoy()
print(macro_china_exports_yoy_df)
Sample data
Item Date Actual Forecast Previous
0 China exports YoY in USD report 1982-02-01 8.7 NaN NaN
1 China exports YoY in USD report 1982-03-01 23.2 NaN 8.7
2 China exports YoY in USD report 1982-04-01 12.2 NaN 23.2
3 China exports YoY in USD report 1982-05-01 -2.5 NaN 12.2
4 China exports YoY in USD report 1982-06-01 41.5 NaN -2.5
.. ... ... ... ... ...
505 China exports YoY in USD report 2023-12-07 0.5 -1.1 -6.4
506 China exports YoY in USD report 2024-01-12 2.3 1.7 0.5
507 China exports YoY in USD report 2024-01-13 NaN NaN 0.5
508 China exports YoY in USD report 2024-03-07 7.1 1.9 2.3
509 China exports YoY in USD report 2024-04-12 NaN NaN 7.1
[510 rows x 5 columns]
Imports YoY (USD)
Interface: macro_china_imports_yoy
Source URL: https://datacenter.jin10.com/reportType/dc_chinese_imports_yoy
Description: China imports annual rate in USD; data from 19960201 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Item | object | - |
| Date | object | - |
| Actual | float64 | Unit: % |
| Forecast | float64 | Unit: % |
| Previous | float64 | Unit: % |
Example
import meshare as ms
macro_china_imports_yoy_df = ms.macro_china_imports_yoy()
print(macro_china_imports_yoy_df)
Sample data
Item Date Actual Forecast Previous
0 China imports YoY in USD report 1996-02-01 55.8 NaN NaN
1 China imports YoY in USD report 1996-03-01 14.2 NaN 55.8
2 China imports YoY in USD report 1996-04-01 8.7 NaN 14.2
3 China imports YoY in USD report 1996-05-01 6.4 NaN 8.7
4 China imports YoY in USD report 1996-06-01 4.5 NaN 6.4
.. ... ... ... ... ...
343 China imports YoY in USD report 2023-12-07 -0.6 3.3 3.0
344 China imports YoY in USD report 2024-01-12 0.2 0.3 -0.6
345 China imports YoY in USD report 2024-01-13 NaN NaN -0.6
346 China imports YoY in USD report 2024-03-07 3.5 1.5 0.2
347 China imports YoY in USD report 2024-04-12 NaN NaN 3.5
[348 rows x 5 columns]
Trade balance (USD 100 million)
Interface: macro_china_trade_balance
Source URL: https://datacenter.jin10.com/reportType/dc_chinese_trade_balance
Description: China trade balance in USD; data from 19810201 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Item | object | - |
| Date | object | - |
| Actual | float64 | Unit: USD 100 million |
| Forecast | float64 | Unit: USD 100 million |
| Previous | float64 | Unit: USD 100 million |
Example
import meshare as ms
macro_china_trade_balance_df = ms.macro_china_trade_balance()
print(macro_china_trade_balance_df)
Sample data
Item Date Actual Forecast Previous
0 China trade balance in USD report 1981-02-01 -2.2 NaN NaN
1 China trade balance in USD report 1981-03-01 -4.9 NaN -2.2
2 China trade balance in USD report 1981-04-01 -7.4 NaN -4.9
3 China trade balance in USD report 1981-05-01 -4.8 NaN -7.4
4 China trade balance in USD report 1981-06-01 -5.4 NaN -4.8
.. ... ... ... ... ...
528 China trade balance in USD report 2023-12-07 683.9 580.0 565.3
529 China trade balance in USD report 2024-01-12 753.4 747.5 683.9
530 China trade balance in USD report 2024-01-13 NaN NaN 683.9
531 China trade balance in USD report 2024-03-07 1251.6 1103.0 753.4
532 China trade balance in USD report 2024-04-12 NaN NaN 1251.6
[533 rows x 5 columns]
Baltic Dry Index (BDI)
Interface: macro_shipping_bdi
Source URL: https://data.eastmoney.com/cjsj/hyzs_list_EMI00107664.html
Description: Baltic Dry Index; data from 19881019 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Date | object | - |
| Latest | int64 | - |
| Change % | float64 | Unit: % |
| 3M change % | float64 | Unit: % |
| 6M change % | float64 | Unit: % |
| 1Y change % | float64 | Unit: % |
| 2Y change % | float64 | Unit: % |
| 3Y change % | float64 | Unit: % |
Example
import meshare as ms
macro_shipping_bdi_df = ms.macro_shipping_bdi()
print(macro_shipping_bdi_df)
Sample data
Date Latest Change % ... 1Y change % 2Y change % 3Y change %
0 1988-10-19 1317 NaN ... NaN NaN NaN
1 1988-10-20 1316 -0.075930 ... NaN NaN NaN
2 1988-10-21 1328 0.911854 ... NaN NaN NaN
3 1988-10-24 1361 2.484940 ... NaN NaN NaN
4 1988-10-25 1363 0.146951 ... NaN NaN NaN
... ... ... ... ... ... ...
8577 2023-03-03 1211 5.764192 ... -42.442966 -31.310267 120.582878
8578 2023-03-06 1258 3.881090 ... -41.433892 -31.219245 103.889789
8579 2023-03-07 1298 3.179650 ... -41.923937 -29.032258 110.372771
8580 2023-03-08 1327 2.234206 ... -43.579932 -28.386400 115.072934
8581 2023-03-09 1379 3.918613 ... -46.090696 -27.459232 123.863636
Crude oil tanker index (BDTI)
Interface: macro_china_bdti_index
Source URL: https://data.eastmoney.com/cjsj/hyzs_list_EMI00107668.html
Description: Crude oil tanker index data; from 20011227 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Date | object | - |
| Latest | int64 | - |
| Change % | float64 | Unit: % |
| 3M change % | float64 | Unit: % |
| 6M change % | float64 | Unit: % |
| 1Y change % | float64 | Unit: % |
| 2Y change % | float64 | Unit: % |
| 3Y change % | float64 | Unit: % |
Example
import meshare as ms
macro_china_bdti_index_df = ms.macro_china_bdti_index()
print(macro_china_bdti_index_df)
Sample data
Date Latest Change % ... 1Y change % 2Y change % 3Y change %
0 2001-12-27 849 NaN ... NaN NaN NaN
1 2001-12-28 850 0.117786 ... NaN NaN NaN
2 2002-01-02 845 -0.588235 ... NaN NaN NaN
3 2002-01-03 826 -2.248521 ... NaN NaN NaN
4 2002-01-04 811 -1.815981 ... NaN NaN NaN
... ... ... ... ... ... ...
4921 2022-04-05 1469 7.304602 ... 110.157368 6.218366 138.087520
4922 2022-04-06 1547 5.309735 ... 125.839416 24.758065 150.729335
4923 2022-04-07 1653 6.851972 ... 144.888889 47.326203 167.909238
4924 2022-04-08 1677 1.451906 ... 154.863222 56.582633 174.918033
4925 2022-04-11 1730 3.160405 ... 167.801858 55.296230 172.870662
Shipping and trade freight indices
Interface: macro_china_freight_index
Source URL: http://finance.sina.com.cn/mac/#industry-22-0-31-2
Description: Sina Finance — China macro data — shipping and trade freight indices
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| As-of date | object | Year-month |
| Baltic Capesize Index (BCI) | float64 | - |
| Handymax composite index (BHMI) | float64 | - |
| Baltic Supramax Index (BSI) | float64 | - |
| Baltic Dry Index (BDI) | float64 | - |
| HRCI international container charter index | float64 | - |
| Clean tanker index (BCTI) | float64 | - |
| Dirty tanker index (BDTI) | float64 | - |
Example
import meshare as ms
macro_china_freight_index_df = ms.macro_china_freight_index()
print(macro_china_freight_index_df)
Sample data
As-of date Baltic Capesize Index (BCI) ... Clean tanker index (BCTI) Dirty tanker index (BDTI)
0 2021-08-10 4328.0 ... NaN NaN
1 2021-08-09 4342.0 ... NaN NaN
2 2021-08-06 4359.0 ... NaN NaN
3 2021-08-05 4414.0 ... NaN NaN
4 2021-08-04 4302.0 ... NaN NaN
... ... ... ... ...
3845 2005-12-13 3459.0 ... 1326.0 2063.0
3846 2005-12-12 3476.0 ... 1286.0 2051.0
3847 2005-12-09 3509.0 ... 1261.0 2061.0
3848 2005-12-08 3553.0 ... NaN NaN
3849 2005-12-07 3709.0 ... NaN NaN
Capesize freight index (BCI)
Interface: macro_shipping_bci
Source URL: https://data.eastmoney.com/cjsj/hyzs_list_EMI00107666.html
Description: Capesize freight index; data from 19990430 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Date | object | - |
| Latest | int64 | - |
| Change % | float64 | Unit: % |
| 3M change % | float64 | Unit: % |
| 6M change % | float64 | Unit: % |
| 1Y change % | float64 | Unit: % |
| 2Y change % | float64 | Unit: % |
| 3Y change % | float64 | Unit: % |
Example
import meshare as ms
macro_shipping_bci_df = ms.macro_shipping_bci()
print(macro_shipping_bci_df)
Sample data
Date Latest Change % ... 1Y change % 2Y change % 3Y change %
0 1999-04-30 940 NaN ... NaN NaN NaN
1 1999-05-04 947 0.744681 ... NaN NaN NaN
2 1999-05-05 960 1.372756 ... NaN NaN NaN
3 1999-05-06 969 0.937500 ... NaN NaN NaN
4 1999-05-07 981 1.238390 ... NaN NaN NaN
... ... ... ... ... ... ...
5988 2023-03-03 1195 19.500000 ... -27.089689 -28.741801 445.375723
5989 2023-03-06 1329 11.213389 ... -18.715596 -25.504484 525.961538
5990 2023-03-07 1471 10.684725 ... -15.894797 -17.544843 571.474359
5991 2023-03-08 1550 5.370496 ... -18.248945 -15.068493 596.794872
5992 2023-03-09 1662 7.225806 ... -27.169150 -14.769231 546.774194
Panamax freight index (BPI)
Interface: macro_shipping_bpi
Source URL: https://data.eastmoney.com/cjsj/hyzs_list_EMI00107665.html
Description: Panamax freight index; data from 19981231 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Date | object | - |
| Latest | int64 | - |
| Change % | float64 | Unit: % |
| 3M change % | float64 | Unit: % |
| 6M change % | float64 | Unit: % |
| 1Y change % | float64 | Unit: % |
| 2Y change % | float64 | Unit: % |
| 3Y change % | float64 | Unit: % |
Example
import meshare as ms
macro_shipping_bpi_df = ms.macro_shipping_bpi()
print(macro_shipping_bpi_df)
Sample data
Date Latest Change % ... 1Y change % 2Y change % 3Y change %
0 1998-12-31 732 NaN ... NaN NaN NaN
1 1999-01-04 717 -2.049180 ... NaN NaN NaN
2 1999-01-05 709 -1.115760 ... NaN NaN NaN
3 1999-01-06 729 2.820874 ... NaN NaN NaN
4 1999-01-07 734 0.685871 ... NaN NaN NaN
... ... ... ... ... ... ...
5951 2023-03-03 1565 0.578406 ... -42.015561 -27.579824 67.379679
5952 2023-03-06 1582 1.086262 ... -43.195691 -29.406515 48.127341
5953 2023-03-07 1580 -0.126422 ... -45.536022 -29.495761 47.940075
5954 2023-03-08 1592 0.759494 ... -47.648800 -29.495128 49.063670
5955 2023-03-09 1624 2.010050 ... -49.154665 -27.435210 52.202437
Clean tanker index (BCTI)
Interface: macro_shipping_bcti
Source URL: https://data.eastmoney.com/cjsj/hyzs_list_EMI00107669.html
Description: Clean tanker index; data from 20011217 to present
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Date | object | - |
| Latest | int64 | - |
| Change % | float64 | Unit: % |
| 3M change % | float64 | Unit: % |
| 6M change % | float64 | Unit: % |
| 1Y change % | float64 | Unit: % |
| 2Y change % | float64 | Unit: % |
| 3Y change % | float64 | Unit: % |
Example
import meshare as ms
macro_shipping_bcti_df = ms.macro_shipping_bcti()
print(macro_shipping_bcti_df)
Sample data
Date Latest Change % ... 1Y change % 2Y change % 3Y change %
0 2001-12-27 693 NaN ... NaN NaN NaN
1 2001-12-28 691 -0.288600 ... NaN NaN NaN
2 2002-01-02 688 -0.434153 ... NaN NaN NaN
3 2002-01-03 687 -0.145349 ... NaN NaN NaN
4 2002-01-04 687 0.000000 ... NaN NaN NaN
... ... ... ... ... ... ...
5148 2023-03-03 789 -1.743462 ... -20.383451 62.012320 22.136223
5149 2023-03-06 782 -0.887199 ... -20.930233 60.245902 14.160584
5150 2023-03-07 784 0.255754 ... -26.797386 60.655738 14.452555
5151 2023-03-08 827 5.484694 ... -21.163012 67.748479 20.729927
5152 2023-03-09 871 5.320435 ... -15.682478 73.161034 21.478382
Society-wide passenger and freight transport volume
Interface: macro_china_society_traffic_volume
Source URL: http://finance.sina.com.cn/mac/#industry-10-0-31-1
Description: NBS — society-wide passenger and freight transport volume — non-cumulative
Limits: Returns all historical data in a single call
Input
| Name | Type | Description |
|---|---|---|
| - | - | - |
Output
| Name | Type | Description |
|---|---|---|
| Statistical period | object | Year-month |
| Statistical object | object | - |
| Freight volume | float64 | Unit: 100 million tons |
| Freight volume YoY | float64 | Unit: % |
| Freight turnover | float64 | Unit: 100 million |
| Freight turnover YoY | float64 | Unit: % |
| Passenger volume | float64 | Unit: 100 million persons |
| Passenger volume YoY | float64 | Unit: % |
| Passenger turnover | float64 | Unit: 100 million |
| Passenger turnover YoY | float64 | Unit: % |
| Cargo throughput of major coastal ports | float64 | Unit: 100 million tons |
| Cargo throughput of major coastal ports YoY | float64 | Unit: % |
| Of which: foreign-trade cargo throughput | float64 | Unit: 100 million tons |
| Of which: foreign-trade cargo throughput YoY | float64 | Unit: % |
| Civil aviation total turnover | float64 | Unit: 100 million |
| Civil aviation total turnover YoY | float64 | Unit: % |
Example
import meshare as ms
macro_china_society_traffic_volume_df = ms.macro_china_society_traffic_volume()
print(macro_china_society_traffic_volume_df)
Sample data
Statistical period Statistical object Freight volume ... Of which: foreign-trade cargo throughput YoY Civil aviation total turnover Civil aviation total turnover YoY
0 2023.7 International routes 23.60 ... NaN 29.9 74.9
1 2023.7 Hong Kong/Macao/Taiwan routes 1.40 ... NaN 1.0 488.6
2 2023.7 Domestic routes 36.50 ... NaN 83.8 64.6
3 2023.7 Civil aviation 60.11 ... NaN 113.7 67.1
4 2023.7 Waterway 7.90 ... NaN NaN NaN
... ... ... ... ... ... ...
2403 1952.12 Waterway NaN ... NaN NaN NaN
2404 1952.12 Highway NaN ... NaN NaN NaN
2405 1952.12 Railway NaN ... NaN NaN NaN
2406 1952.12 Total NaN ... NaN NaN NaN
2407 1952.12 Civil aviation NaN ... NaN NaN NaN
[2408 rows x 16 columns]