or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

economic-data.mdfinancial-instruments.mdfundamental-analysis.mdindex.mdmarket-indices.mdstock-data.md

economic-data.mddocs/

0

# Economic Indicators

1

2

AKShare provides comprehensive macroeconomic data with 226 functions covering economic indicators from China, United States, European Union, Japan, Australia, Canada, and the United Kingdom. This is the largest category in AKShare, reflecting the importance of macroeconomic analysis in financial markets.

3

4

## Chinese Economic Data (77+ functions)

5

6

### Core Economic Indicators

7

8

#### Consumer Price Index (CPI)

9

```python { .api }

10

import akshare as ak

11

12

def macro_china_cpi() -> pd.DataFrame:

13

"""

14

Chinese Consumer Price Index data from East Money

15

16

Returns:

17

pd.DataFrame: CPI data with columns:

18

- 时间 (Time): Date

19

- 全国-同比 (National YoY): National CPI year-over-year

20

- 全国-环比 (National MoM): National CPI month-over-month

21

- 城市-同比 (Urban YoY): Urban CPI year-over-year

22

- 农村-同比 (Rural YoY): Rural CPI year-over-year

23

"""

24

25

# Get national CPI data

26

cpi_df = ak.macro_china_cpi()

27

print(cpi_df.head())

28

# 时间 全国-同比 全国-环比 城市-同比 农村-同比

29

# 0 2024-11-01 102.3 100.2 102.1 102.8

30

# 1 2024-10-01 102.0 100.4 101.8 102.5

31

```

32

33

#### Gross Domestic Product (GDP)

34

```python { .api }

35

import akshare as ak

36

37

def macro_china_gdp() -> pd.DataFrame:

38

"""

39

Chinese GDP quarterly data

40

41

Returns:

42

pd.DataFrame: GDP data with columns:

43

- 季度 (Quarter): Quarter period

44

- 国内生产总值-绝对值 (GDP Absolute): Absolute GDP value

45

- 国内生产总值-同比增长 (GDP YoY): Year-over-year growth

46

- 第一产业-绝对值 (Primary Industry): Primary sector GDP

47

- 第二产业-绝对值 (Secondary Industry): Secondary sector GDP

48

- 第三产业-绝对值 (Tertiary Industry): Tertiary sector GDP

49

"""

50

51

# Get GDP data

52

gdp_df = ak.macro_china_gdp()

53

print(gdp_df.head())

54

# 季度 国内生产总值-绝对值 国内生产总值-同比增长 第一产业-绝对值 第二产业-绝对值 第三产业-绝对值

55

# 0 2024Q3 296298.4 4.6 80480.5 117647.2 98170.7

56

```

57

58

#### Purchasing Managers Index (PMI)

59

```python { .api }

60

import akshare as ak

61

62

def macro_china_pmi() -> pd.DataFrame:

63

"""

64

Chinese PMI (Manufacturing and Services)

65

66

Returns:

67

pd.DataFrame: PMI data with columns:

68

- 日期 (Date): Date

69

- 制造业PMI (Manufacturing PMI): Manufacturing PMI value

70

- 服务业PMI (Services PMI): Services PMI value

71

- 综合PMI (Composite PMI): Composite PMI value

72

"""

73

74

# Get PMI data

75

pmi_df = ak.macro_china_pmi()

76

print(pmi_df.head())

77

# 日期 制造业PMI 服务业PMI 综合PMI

78

# 0 2024-11-01 50.2 51.4 51.8

79

# 1 2024-10-01 49.8 50.2 50.5

80

```

81

82

#### Money Supply

83

```python { .api }

84

import akshare as ak

85

86

def macro_china_money_supply() -> pd.DataFrame:

87

"""

88

Chinese money supply data (M0, M1, M2)

89

90

Returns:

91

pd.DataFrame: Money supply data with columns:

92

- 月份 (Month): Month

93

- 货币和准货币(M2) (M2): Broad money supply

94

- 货币(M1) (M1): Narrow money supply

95

- 流通中现金(M0) (M0): Currency in circulation

96

- M2同比增长 (M2 YoY): M2 year-over-year growth

97

- M1同比增长 (M1 YoY): M1 year-over-year growth

98

- M0同比增长 (M0 YoY): M0 year-over-year growth

99

"""

100

101

# Get money supply data

102

money_df = ak.macro_china_money_supply()

103

```

104

105

#### Trade Statistics

106

```python { .api }

107

import akshare as ak

108

109

def macro_china_trade() -> pd.DataFrame:

110

"""

111

Chinese international trade data

112

113

Returns:

114

pd.DataFrame: Trade statistics with columns:

115

- 月份 (Month): Month

116

- 出口金额 (Exports): Export value in USD

117

- 进口金额 (Imports): Import value in USD

118

- 贸易差额 (Trade Balance): Trade balance

119

- 出口同比 (Export YoY): Export year-over-year growth

120

- 进口同比 (Import YoY): Import year-over-year growth

121

"""

122

123

# Get trade data

124

trade_df = ak.macro_china_trade()

125

```

126

127

### Industrial and Production Indicators

128

129

#### Industrial Production

130

```python { .api }

131

import akshare as ak

132

133

def macro_china_industrial_production() -> pd.DataFrame:

134

"""

135

Chinese industrial production index

136

137

Returns:

138

pd.DataFrame: Industrial production data

139

"""

140

141

# Get industrial production data

142

industrial_df = ak.macro_china_industrial_production()

143

```

144

145

#### Fixed Asset Investment

146

```python { .api }

147

import akshare as ak

148

149

def macro_china_fixed_asset_investment() -> pd.DataFrame:

150

"""

151

Chinese fixed asset investment data

152

153

Returns:

154

pd.DataFrame: Investment statistics by sector

155

"""

156

157

# Get investment data

158

investment_df = ak.macro_china_fixed_asset_investment()

159

```

160

161

### Financial and Monetary Indicators

162

163

#### Interest Rates

164

```python { .api }

165

import akshare as ak

166

167

def macro_china_interest_rate() -> pd.DataFrame:

168

"""

169

Chinese central bank interest rates

170

171

Returns:

172

pd.DataFrame: Interest rate data including:

173

- 存款基准利率 (Deposit Rate)

174

- 贷款基准利率 (Loan Rate)

175

- 公开市场操作利率 (OMO Rate)

176

"""

177

178

# Get interest rate data

179

rate_df = ak.macro_china_interest_rate()

180

```

181

182

#### Reserve Requirement Ratio

183

```python { .api }

184

import akshare as ak

185

186

def macro_china_rrr() -> pd.DataFrame:

187

"""

188

Chinese bank reserve requirement ratio

189

190

Returns:

191

pd.DataFrame: RRR adjustment history

192

"""

193

194

# Get RRR data

195

rrr_df = ak.macro_china_rrr()

196

```

197

198

## US Economic Data (49+ functions)

199

200

### Employment Indicators

201

202

#### Non-farm Payrolls

203

```python { .api }

204

import akshare as ak

205

206

def macro_usa_non_farm() -> pd.DataFrame:

207

"""

208

US Non-farm Payroll employment data

209

210

Returns:

211

pd.DataFrame: Employment data with columns:

212

- 日期 (Date): Release date

213

- 非农就业人口 (Non-farm Employment): Employment change

214

- 失业率 (Unemployment Rate): Unemployment rate

215

"""

216

217

# Get non-farm payroll data

218

nonfarm_df = ak.macro_usa_non_farm()

219

print(nonfarm_df.head())

220

# 日期 非农就业人口 失业率

221

# 0 2024-11-01 12000 4.1

222

# 1 2024-10-04 254000 4.0

223

```

224

225

#### Unemployment Rate

226

```python { .api }

227

import akshare as ak

228

229

def macro_usa_unemployment_rate() -> pd.DataFrame:

230

"""

231

US unemployment rate statistics

232

233

Returns:

234

pd.DataFrame: Unemployment data by demographics

235

"""

236

237

# Get detailed unemployment data

238

unemployment_df = ak.macro_usa_unemployment_rate()

239

```

240

241

### Economic Growth

242

243

#### GDP Data

244

```python { .api }

245

import akshare as ak

246

247

def macro_usa_gdp() -> pd.DataFrame:

248

"""

249

US GDP quarterly data

250

251

Returns:

252

pd.DataFrame: GDP data with columns:

253

- 日期 (Date): Quarter

254

- GDP环比折年率 (GDP QoQ Annualized): GDP growth rate

255

- GDP同比 (GDP YoY): GDP year-over-year

256

"""

257

258

# Get US GDP data

259

us_gdp_df = ak.macro_usa_gdp()

260

```

261

262

### Inflation Indicators

263

264

#### Consumer Price Index

265

```python { .api }

266

import akshare as ak

267

268

def macro_usa_cpi() -> pd.DataFrame:

269

"""

270

US Consumer Price Index

271

272

Returns:

273

pd.DataFrame: CPI data with core and headline measures

274

"""

275

276

# Get US CPI data

277

us_cpi_df = ak.macro_usa_cpi()

278

```

279

280

#### Producer Price Index

281

```python { .api }

282

import akshare as ak

283

284

def macro_usa_ppi() -> pd.DataFrame:

285

"""

286

US Producer Price Index

287

288

Returns:

289

pd.DataFrame: PPI data for producer inflation

290

"""

291

292

# Get US PPI data

293

us_ppi_df = ak.macro_usa_ppi()

294

```

295

296

### Manufacturing and Business

297

298

#### ISM Manufacturing PMI

299

```python { .api }

300

import akshare as ak

301

302

def macro_usa_ism_pmi() -> pd.DataFrame:

303

"""

304

US ISM Manufacturing PMI

305

306

Returns:

307

pd.DataFrame: Manufacturing PMI data

308

"""

309

310

# Get US manufacturing PMI

311

us_pmi_df = ak.macro_usa_ism_pmi()

312

```

313

314

#### Industrial Production

315

```python { .api }

316

import akshare as ak

317

318

def macro_usa_industrial_production() -> pd.DataFrame:

319

"""

320

US industrial production index

321

322

Returns:

323

pd.DataFrame: Industrial production data

324

"""

325

326

# Get US industrial production

327

us_industrial_df = ak.macro_usa_industrial_production()

328

```

329

330

## European Economic Data (16+ functions)

331

332

### Eurozone Indicators

333

334

#### European Central Bank Policy

335

```python { .api }

336

import akshare as ak

337

338

def macro_euro_interest_rate() -> pd.DataFrame:

339

"""

340

ECB interest rate decisions

341

342

Returns:

343

pd.DataFrame: ECB policy rate history

344

"""

345

346

# Get ECB rates

347

ecb_rates = ak.macro_euro_interest_rate()

348

```

349

350

#### Eurozone CPI

351

```python { .api }

352

import akshare as ak

353

354

def macro_euro_cpi() -> pd.DataFrame:

355

"""

356

Eurozone Consumer Price Index

357

358

Returns:

359

pd.DataFrame: Eurozone inflation data

360

"""

361

362

# Get Eurozone CPI

363

euro_cpi = ak.macro_euro_cpi()

364

```

365

366

#### Eurozone GDP

367

```python { .api }

368

import akshare as ak

369

370

def macro_euro_gdp() -> pd.DataFrame:

371

"""

372

Eurozone GDP quarterly data

373

374

Returns:

375

pd.DataFrame: Eurozone economic growth

376

"""

377

378

# Get Eurozone GDP

379

euro_gdp = ak.macro_euro_gdp()

380

```

381

382

## Other Major Economies

383

384

### Japan Economic Data

385

```python { .api }

386

import akshare as ak

387

388

def macro_japan_cpi() -> pd.DataFrame:

389

"""Japanese Consumer Price Index"""

390

391

def macro_japan_gdp() -> pd.DataFrame:

392

"""Japanese GDP data"""

393

394

def macro_japan_interest_rate() -> pd.DataFrame:

395

"""Bank of Japan policy rates"""

396

397

# Get Japanese economic indicators

398

japan_cpi = ak.macro_japan_cpi()

399

japan_gdp = ak.macro_japan_gdp()

400

japan_rates = ak.macro_japan_interest_rate()

401

```

402

403

### Australia Economic Data

404

```python { .api }

405

import akshare as ak

406

407

def macro_australia_cpi() -> pd.DataFrame:

408

"""Australian Consumer Price Index"""

409

410

def macro_australia_gdp() -> pd.DataFrame:

411

"""Australian GDP data"""

412

413

def macro_australia_employment() -> pd.DataFrame:

414

"""Australian employment statistics"""

415

416

# Get Australian economic data

417

aus_cpi = ak.macro_australia_cpi()

418

aus_gdp = ak.macro_australia_gdp()

419

aus_employment = ak.macro_australia_employment()

420

```

421

422

### Canada Economic Data

423

```python { .api }

424

import akshare as ak

425

426

def macro_canada_cpi() -> pd.DataFrame:

427

"""Canadian Consumer Price Index"""

428

429

def macro_canada_gdp() -> pd.DataFrame:

430

"""Canadian GDP data"""

431

432

def macro_canada_employment() -> pd.DataFrame:

433

"""Canadian employment data"""

434

435

# Get Canadian economic indicators

436

canada_cpi = ak.macro_canada_cpi()

437

canada_gdp = ak.macro_canada_gdp()

438

canada_employment = ak.macro_canada_employment()

439

```

440

441

### United Kingdom Economic Data

442

```python { .api }

443

import akshare as ak

444

445

def macro_uk_cpi() -> pd.DataFrame:

446

"""UK Consumer Price Index"""

447

448

def macro_uk_gdp() -> pd.DataFrame:

449

"""UK GDP quarterly data"""

450

451

def macro_uk_employment() -> pd.DataFrame:

452

"""UK employment statistics"""

453

454

# Get UK economic data

455

uk_cpi = ak.macro_uk_cpi()

456

uk_gdp = ak.macro_uk_gdp()

457

uk_employment = ak.macro_uk_employment()

458

```

459

460

## Economic Calendar and Events

461

462

### Economic Event Calendar

463

```python { .api }

464

import akshare as ak

465

466

def macro_economic_calendar() -> pd.DataFrame:

467

"""

468

Economic event calendar with scheduled releases

469

470

Returns:

471

pd.DataFrame: Upcoming economic events and indicators

472

"""

473

474

# Get economic calendar

475

calendar_df = ak.macro_economic_calendar()

476

```

477

478

## Data Integration Patterns

479

480

### Cross-Country Analysis

481

```python { .api }

482

import akshare as ak

483

import pandas as pd

484

485

def get_global_cpi_comparison() -> pd.DataFrame:

486

"""Compare CPI across major economies"""

487

488

# Get CPI data from major economies

489

china_cpi = ak.macro_china_cpi()

490

us_cpi = ak.macro_usa_cpi()

491

euro_cpi = ak.macro_euro_cpi()

492

japan_cpi = ak.macro_japan_cpi()

493

494

# Process and combine data for comparison

495

# (Implementation would involve data alignment and merging)

496

497

return combined_cpi_df

498

499

def get_global_gdp_comparison() -> pd.DataFrame:

500

"""Compare GDP growth across major economies"""

501

502

china_gdp = ak.macro_china_gdp()

503

us_gdp = ak.macro_usa_gdp()

504

euro_gdp = ak.macro_euro_gdp()

505

japan_gdp = ak.macro_japan_gdp()

506

507

return combined_gdp_df

508

509

# Usage

510

global_cpi = get_global_cpi_comparison()

511

global_gdp = get_global_gdp_comparison()

512

```

513

514

### Economic Indicator Dashboard

515

```python { .api }

516

import akshare as ak

517

518

def create_economic_dashboard(country: str = "china") -> dict:

519

"""Create comprehensive economic indicator dashboard"""

520

521

dashboard = {}

522

523

if country.lower() == "china":

524

dashboard.update({

525

'cpi': ak.macro_china_cpi(),

526

'gdp': ak.macro_china_gdp(),

527

'pmi': ak.macro_china_pmi(),

528

'money_supply': ak.macro_china_money_supply(),

529

'trade': ak.macro_china_trade(),

530

'interest_rate': ak.macro_china_interest_rate()

531

})

532

elif country.lower() == "usa":

533

dashboard.update({

534

'cpi': ak.macro_usa_cpi(),

535

'gdp': ak.macro_usa_gdp(),

536

'employment': ak.macro_usa_non_farm(),

537

'unemployment': ak.macro_usa_unemployment_rate(),

538

'pmi': ak.macro_usa_ism_pmi(),

539

'industrial': ak.macro_usa_industrial_production()

540

})

541

542

return dashboard

543

544

# Usage

545

china_dashboard = create_economic_dashboard("china")

546

us_dashboard = create_economic_dashboard("usa")

547

```

548

549

## Data Characteristics

550

551

### Update Frequencies

552

- **Monthly indicators**: CPI, PPI, Industrial Production, Trade Data

553

- **Quarterly indicators**: GDP, Fixed Asset Investment

554

- **Weekly indicators**: Money Supply (some components)

555

- **Daily indicators**: Interest Rates, Exchange Rates

556

557

### Data Coverage

558

- **Historical depth**: Most indicators cover 10+ years of history

559

- **Geographic coverage**: 7 major economies/regions

560

- **Indicator breadth**: 226 different economic metrics

561

- **Release timeliness**: Data typically available within days of official release

562

563

### Common Use Cases

564

1. **Macroeconomic Research**: Cross-country economic analysis

565

2. **Investment Strategy**: Economic cycle and policy analysis

566

3. **Risk Management**: Economic indicator monitoring for market risk

567

4. **Academic Research**: Economic data for empirical studies

568

5. **Policy Analysis**: Central bank and government policy impact assessment

569

570

The economic data capabilities in AKShare provide comprehensive coverage for macroeconomic analysis across major global economies, supporting both academic research and practical investment decision-making.