Skip to content

Package to import some Bloomberg data exported via Excel

License

Notifications You must be signed in to change notification settings

NicolaTommasi8/bloomimport

Repository files navigation

bloomimport

Package to import Bloomberg data exported via Excel

Example #1:

bloomimport using "data/testXbloomimport.xlsx", cellrange(A4) sheet("daily") ///
  datastart(B) nvar(6) lasttick(RB) clear

summ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        date |          0
     PX_OPEN |    194,636    21.49725    131.4422      .1375    3384.22
     PX_LAST |    194,640    21.46353    131.1024      .1375   3296.123
 CUR_MKT_CAP |    198,071    7627.696    10532.53    97.7533   87087.78
     EQY_DPS |     29,889    .0820321    .2797269          0        2.1
-------------+---------------------------------------------------------
IS_DIV_PER~R |     29,889    .0820321    .2797269          0        2.1
PX_TO_BOOK~O |    186,372    2.319075    4.859172       .009   110.5107
      ticker |          0

Example #2:

. bloomimport using "data/File270524bis.xlsx", sheet("FoglioA_download") cellrange(A4) ///
>   export(long)

. summ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      ticker |          0
        year |      1,691        2014    5.478846       2005       2023
ANN_NET_IN~N |      1,545    3.650048     2.52467      .9355    92.0942
ARDR_LIQUI~O |         38    118.4816    10.27879        106        165
ARDR_NET_S~O |         14    3.43e+10    2.25e+10        124   4.80e+10
-------------+---------------------------------------------------------
BS_CUSTOME~S |      1,557    35835.06    131601.6   219.2884    1482479
BS_DEMAND_~T |      1,525    10774.64    38850.63     10.323     527748
BS_LEV_RAT~P |      1,531     9.64031    1.861595          4       19.4
BS_LIQUIDI~O |         38    118.4816    10.27879        106        165
BS_NON_PER~T |      1,528    480.0016     4973.84          0     181872
-------------+---------------------------------------------------------
BS_NON_PER~S |      1,522    416.6706    4513.457          0     166212
  BS_RE_LOAN |      1,554    14605.54    49766.79     66.217     495842
BS_RISK_WE~S |      1,524    61941.18      957363          0   3.70e+07
BS_RSRV_LO~S |      1,557    458.3737    1773.278      1.453      24516
BS_T~P_RATIO |      1,544    12.80234    2.890617          6      32.57
-------------+---------------------------------------------------------
BS_T~Y_RATIO |        895    11.65907    2.740535     -.1206      20.88
BS_TOT_ASSET |      1,557    49138.65    186836.3   258.9534    1952911
BS_TOT_CAP~P |      1,542    14.59836    2.864258          8      32.57
 BS_TOT_LOAN |      1,557    29945.87    102357.4   182.2295     993993
COM_EQY_TO~T |      1,557    9.805642      2.3783    -1.6355    19.8588
-------------+---------------------------------------------------------
   EFF_RATIO |      1,556    60.47438    13.45661    11.1733   165.3167
  EPS_GROWTH |      1,530    16.11401    177.2297      -2575       3400
FDIC~250000K |         18    12881.62    13000.88   1273.907   36408.25
GROWTH_IN_~T |      1,540    10.90226    18.44787   -33.7049   362.9414
GROWTH_IN_~N |      1,540    10.80239    18.11365   -63.1226   319.6432
-------------+---------------------------------------------------------
HISTORICAL~P |      1,480    6492.774    24236.84     9.7506   296774.4
IS_ACT_LOA~T |      1,538    162.7568    880.0535       -335      18168
NET_INC_GR~H |      1,538    16.53337    220.1798  -2618.819   5497.222
NON_PERFOR~N |      1,528    1.818147    15.20118          0   574.5461
NON_PERF_A~T |      1,528    1.245741    11.03249          0    419.922
-------------+---------------------------------------------------------
NUM_OF_EMP~S |      1,529    7255.333    28973.21         28     281000
RETURN_COM~Y |      1,538    9.143434     14.5989  -264.7305    203.696
RETURN_ON_~T |      1,540    .9632708     .784239    -6.0911     7.0985
RETURN_TOT~Y |      1,538    9.511867    9.280677  -124.8476    74.5401
TANGIBLE_C~Y |      1,523    3584.578    13595.56   -109.045     149373
-------------+---------------------------------------------------------
 TEXAS_RATIO |      1,492    16.06594    148.3282          0   5481.544
TOT_LOAN_T~T |      1,557    87.59001    17.23081    15.3967   219.9147

Example #3:

bloomimport using "data/File per Nicola 260824.xlsx", cellrange(A4) sheet("multi_long") dates(multi) export(long)
summ

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      ticker |          0
        date |          0
DBETA_RAW_~E |      1,091    1.065243    .6020008    -5.8442     2.3763
DBS_TOT_AS~T |        986    86266.49    107075.7   6613.089     406794
DENTERPRIS~E |        978    301271.1    592509.5   10558.49    3154375
-------------+---------------------------------------------------------
  DESG_SCORE |        933     4.21433    1.398658        1.4       7.33
DHISTORICA~P |        978    305557.5    615701.9   5154.987    3206112
DPX_TO_BOO~O |        992    16.32091     19.4739       .875    82.2959
DRETURN_CO~Y |        966    47.19229    43.88256    -9.1584   197.4311
DSA_ESG_RI~R |        399    19.90053    6.138061       8.65      29.93
-------------+---------------------------------------------------------
DTOT_COMMO~Y |        986    21838.51    31409.93      -8940     140199
CUMULATIVE~S |      1,093    130.9515    161.4119    -74.054   781.5646
DAY_TO_DAY~S |      1,092    1.323135    8.210708   -36.0105    30.1131

gen tmp=date(date,"DMY")
order tmp, after(date)
format tmp %td
drop date
rename tmp date
gen monthly= mofd(date)
format monthly %tm
order monthly, after(date)
sort ticker date

About

Package to import some Bloomberg data exported via Excel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published