Equity & sector analysts
Stock theses on the Pakistan Stock Exchange rest on sector volumes and the macro backdrop. PakDataHub provides both from official sources. For the share prices themselves, pair it with pypsx.com, the developer API for PSX market data.
Sector volume series
| Sector | Series |
|---|---|
| Autos | auto.sales_cars, auto.production_cars, auto.sales_jeeps_pickups, auto.sales_tractors, auto.total_sales_2_3_wheelers |
| Cement | industry.domestic, industry.export (dispatches, to 2023) |
| Power | power.electricity_generation_hydel, …_gas, …_coal (generation by fuel) |
| Oil marketing | fuel.pol_sales_power_sector, fuel.pol_sales_domestic, fuel.overall_pol_sales_various_sectors_agri_govt |
| Fertilizer | agriculture.fertilizer.urea, agriculture.fertilizer.dap |
| FMCG | industry.fmcg.sales_fmcgs |
| Telecom | telecom.subscribers.cellular.jazz (and other operators), telecom.arpu |
| Banks | banking.m2, banking.total_deposits_with_scheduled_banks, banking.npl.*, rates.kibor.6m |
| Corporate sector | corporate.* (annual financial aggregates of listed non-financial companies) |
Macro backdrop
- Rates:
rates.policy_target,rates.pkrv.10y. - Currency:
fx.rate.avg.usd. - Inflation:
inflation.cpi.national.yoy. - Growth:
industry.lsm.qim,gdp.growth_rate_real_gross_domestic_product_4. - External:
bop.current_account_balance_3,reserves.total_sbp_reserves.
Example: car sales vs interest rates
import pandas as pd
KEY = "pk_live_xxx"
u = lambda sid, extra="": f"https://api.pakdatahub.com/v1/series/{sid}?format=csv&sort=asc&limit=10000{extra}&api_key={KEY}"
cars = pd.read_csv(u("auto.sales_cars", "&transform=yoy"), parse_dates=["date"]).set_index("date")["value"]
rate = pd.read_csv(u("rates.policy_target"), parse_dates=["date"]).set_index("date")["value"]
print(pd.concat([cars.rename("car_sales_yoy"), rate.resample("ME").ffill().rename("policy_rate")], axis=1).dropna().tail(24))