Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # [kewr.acr.lan.issues.183](https://bitbucket.org/autonomy/kewr.acr.lan/issue/183)
- #
- set -x
- echo "Started: " $(date)
- source /etc/portion.env
- source /etc/profile.d/runtime-context.sh
- echo $RUNTIME_CONTEXT
- echo $PYTHONPATH
- export PATH=$PATH:/opt/bbthyme/current/bin
- export TERM=xterm
- export TEND='20140730'
- #
- # https://bitbucket.org/autonomy/knyc.acr.lab/issue/338/november-delete-defunct-symbols-and-series
- #
- python << END
- import mint.rest.RestClientKit as RC
- import pandas as pd
- from StringIO import StringIO
- import thyme.tx.TxResourceKit as TRK
- from thyme.tx.ResourceErrorKit import ResourceError
- rc = RC.make()
- resp = rc.get_csv('http://rest.kewr.acr.lan:8080/tx/symbols?page=0&size=100000').text
- symbols_data = pd.read_csv(StringIO(resp))
- for symseries_name, dataframe in symbols_data.groupby('symbol-series-name'):
- symseries = TRK.SYMBOL_SERIES.read_by_name(name=symseries_name)
- if symseries.name.startswith('vol-smile'):
- for token in dataframe['token']:
- symbol = TRK.SYMBOLS.read_by_token(token=token, symbol_series=symseries)
- TRK.SYMBOLS.delete(symbol)
- TRK.SYMBOL_SERIES.delete(symseries)
- END
- #
- # https://bitbucket.org/autonomy/knyc.acr.lab/issue/358/november-backfill-new-event-series
- #
- cat > /tmp/new-deals << EOD
- /ticker/bccdbae index
- /ticker/ihni3m curncy
- /ticker/euri3m curncy
- /ticker/hkdi3m curncy
- /ticker/thbi3m curncy
- /ticker/trni3m curncy
- EOD
- cat >/tmp/new-indexes << EOD
- /ticker/sp1 index
- /ticker/la1 comdty
- /ticker/co1 comdty
- /ticker/cc1 comdty
- /ticker/kc1 comdty
- /ticker/lp1 comdty
- /ticker/c 1 comdty
- /ticker/ct1 comdty
- /ticker/fc1 comdty
- /ticker/qs1 comdty
- /ticker/gc1 comdty
- /ticker/ho1 comdty
- /ticker/kw1 comdty
- /ticker/ll1 comdty
- /ticker/lh1 comdty
- /ticker/lc1 comdty
- /ticker/ng1 comdty
- /ticker/ln1 comdty
- /ticker/si1 comdty
- /ticker/s 1 comdty
- /ticker/sb1 comdty
- /ticker/xb1 comdty
- /ticker/w 1 comdty
- /ticker/cl1 comdty
- /ticker/lx1 comdty
- /ticker/la2 comdty
- /ticker/co2 comdty
- /ticker/cc2 comdty
- /ticker/kc2 comdty
- /ticker/lp2 comdty
- /ticker/c 2 comdty
- /ticker/ct2 comdty
- /ticker/fc2 comdty
- /ticker/qs2 comdty
- /ticker/gc2 comdty
- /ticker/ho2 comdty
- /ticker/kw2 comdty
- /ticker/ll2 comdty
- /ticker/lh2 comdty
- /ticker/lc2 comdty
- /ticker/ng2 comdty
- /ticker/ln2 comdty
- /ticker/si2 comdty
- /ticker/s 2 comdty
- /ticker/sb2 comdty
- /ticker/xb2 comdty
- /ticker/w 2 comdty
- /ticker/cl2 comdty
- /ticker/lx2 comdty
- /ticker/bcc2la0p index
- /ticker/bcc2co0p index
- /ticker/bcc2cc0p index
- /ticker/bcc2kc0p index
- /ticker/bcc2lp0p index
- /ticker/bcc2cn0p index
- /ticker/bcc2ct0p index
- /ticker/bcc2fc0p index
- /ticker/bcc2go0p index
- /ticker/bcc2gc0p index
- /ticker/bcc2ho0p index
- /ticker/bcc2kw0p index
- /ticker/bcc2ll0p index
- /ticker/bcc2lh0p index
- /ticker/bcc2lc0p index
- /ticker/bcc2ng0p index
- /ticker/bcc2ln0p index
- /ticker/bcc2si0p index
- /ticker/bcc2so0p index
- /ticker/bcc2sb0p index
- /ticker/bcc2rb0p index
- /ticker/bcc2wh0p index
- /ticker/bcc2cl0p index
- /ticker/bcc2lz0p index
- /ticker/spgsia index
- /ticker/spgsbr index
- /ticker/spgscc index
- /ticker/spgskc index
- /ticker/spgsic index
- /ticker/spgscn index
- /ticker/spgsct index
- /ticker/spgsfc index
- /ticker/spgsgo index
- /ticker/spgsgc index
- /ticker/spgsho index
- /ticker/spgskw index
- /ticker/spgsil index
- /ticker/spgslh index
- /ticker/spgslc index
- /ticker/spgsng index
- /ticker/spgsik index
- /ticker/spgssi index
- /ticker/spgsso index
- /ticker/spgssb index
- /ticker/spgshu index
- /ticker/spgswh index
- /ticker/spgscl index
- /ticker/spgsiz index
- /ticker/gddlit index
- /ticker/gddlsw index
- /ticker/gddlas index
- /ticker/gdletcf index
- /ticker/gdlesia index
- /ticker/gdlesthf index
- /ticker/gdlestk index
- /ticker/gecu2yr index
- /ticker/gnor2yr index
- /ticker/gecu5yr index
- EOD
- bbg-update -m /tmp/new-indexes -b 19500101 -e ${TEND} -q index
- bbg-update -m /tmp/new-deals -b 19500101 -e ${TEND} -q deal
- #
- # https://bitbucket.org/autonomy/knyc.acr.lab/issue/364/november-backfill-new-deal-event-series
- #
- cat > /tmp/new-deals << EOD
- /ticker/bccdbae index
- /ticker/ihni3m curncy
- /ticker/euri3m curncy
- /ticker/hkdi3m curncy
- /ticker/thbi3m curncy
- /ticker/trni3m curncy
- EOD
- bbg-update -m /tmp/new-deals -b 19500101 -e ${TEND} -q deal
- echo "Finished: " $(date)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement