aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/new_index_series.R8
-rw-r--r--python/Dawn/static/dawn.js4
-rw-r--r--python/bespoke_utils.py11
-rw-r--r--python/thetas-durations.py4
-rwxr-xr-xscripts/curve.sh2
5 files changed, 17 insertions, 12 deletions
diff --git a/R/new_index_series.R b/R/new_index_series.R
index e88d0d41..b8d16529 100644
--- a/R/new_index_series.R
+++ b/R/new_index_series.R
@@ -136,11 +136,11 @@ markit.mappings <- function(df){
}
if(interactive()) {
- basket.id <- newbasketID('XO', 32, 1, as.Date("2024-12-20"), 100, "2I666VCV5")
- df <- newcurves('XO', 32, basket.id)
+ basket.id <- newbasketID('XO', 33, 1, as.Date("2025-06-20"), 500, "2I667KHL5")
+ df <- newcurves('XO', 33, basket.id)
mappings <- data.frame(company_id = df$company_id, seniority = df$seniority,
- markit_ticker=c("FAUR", "TEOLVOI", "SCHAAG", "VOLVCAR"),
- markit_tier=c("SNRFOR", "SNRFOR", "SNRFOR","SNRFOR"), coupon=500)
+ markit_ticker=c("AIRLIQ"),
+ markit_tier=c("SNRFOR"), coupon=100)
markit.mappings(mappings)
## then update index_list in markit/import_quotes.py and rerun insert_cds
}
diff --git a/python/Dawn/static/dawn.js b/python/Dawn/static/dawn.js
index a45411f4..e9fd586c 100644
--- a/python/Dawn/static/dawn.js
+++ b/python/Dawn/static/dawn.js
@@ -1,7 +1,7 @@
var index_list = [];
var bbg_map = {'CDX': ["IG", "HY"], 'ITRX': ["EUR", "XOVER"]};
-var series_map = {'CDX': ["24", "25", "26", "27", "28", "29", "30", "31", "32", "33"],
- 'ITRX': ["24", "25", "26", "27", "28", "29", "30", "31", "32"]};
+var series_map = {'CDX': ["24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34"],
+ 'ITRX': ["24", "25", "26", "27", "28", "29", "30", "31", "32", "33"]};
var index_tenor = ["3Y", "5Y", "7Y", "10Y"];
for(var begin_index in bbg_map){
for(var i=0; i<bbg_map[begin_index].length; i++){
diff --git a/python/bespoke_utils.py b/python/bespoke_utils.py
index 8cf9d4b1..33d9255d 100644
--- a/python/bespoke_utils.py
+++ b/python/bespoke_utils.py
@@ -126,13 +126,13 @@ def get_bbg_ids(
def get_basketid(conn: connection, name: str) -> Tuple[int, int]:
with conn.cursor() as c:
c.execute("SELECT max(series)+1 FROM index_version where index='BS'")
- serie, = c.fetchone()
+ (serie,) = c.fetchone()
c.execute(
"INSERT INTO index_version(index, series, version, redindexcode) "
"VALUES('BS', %s, 1, %s) RETURNING basketid",
(serie, name),
)
- basket_id, = c.fetchone()
+ (basket_id,) = c.fetchone()
conn.commit()
return serie, basket_id
@@ -194,7 +194,12 @@ def new_index_series(conn, basketid, index_type, series):
c.executemany(
"INSERT INTO basket_constituents VALUES(%s, %s, %s, %s)",
[
- (t.company_id, t.seniority, basketid, 1.0)
+ (
+ t.company_id,
+ "SLA" if t.seniority == "LAC" else t.seniority,
+ basketid,
+ 1.0,
+ )
for t in df.itertuples(index=False)
],
)
diff --git a/python/thetas-durations.py b/python/thetas-durations.py
index feffc869..4d61a009 100644
--- a/python/thetas-durations.py
+++ b/python/thetas-durations.py
@@ -63,8 +63,8 @@ if __name__ == "__main__":
recoveries = np.full(len(tenors[index]), 0.3)
else:
recoveries = np.full(len(tenors[index]), 0.4)
- for series in range(18, 34):
- if index in ["EU", "XO"] and series == 33:
+ for series in range(18, 35):
+ if index in ["EU", "XO"] and series == 34:
continue
if index == "HYBB" and series != 33:
continue
diff --git a/scripts/curve.sh b/scripts/curve.sh
index 5aafef7f..f265361a 100755
--- a/scripts/curve.sh
+++ b/scripts/curve.sh
@@ -9,7 +9,7 @@
#done
#popd > /dev/null
indices=("EU" "IG" "HY" "XO" "HYBB")
-series=(22 23 24 25 26 27 28 29 30 31 32 33)
+series=(22 23 24 25 26 27 28 29 30 31 32 33 34)
pushd "$CODE_DIR/python" > /dev/null
for index in ${indices[@]}; do
for s in ${series[@]}; do