aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--risk_insight/insight.py9
-rw-r--r--risk_insight/templates/tranches.html68
2 files changed, 43 insertions, 34 deletions
diff --git a/risk_insight/insight.py b/risk_insight/insight.py
index 533ba2ac..e422470d 100644
--- a/risk_insight/insight.py
+++ b/risk_insight/insight.py
@@ -16,6 +16,13 @@ def get_attach_from_name(index_type, series):
attach = [0, 3, 7, 15, 100]
elif index_type.lower() == "hy":
attach = [0, 15, 25, 35, 100]
+ elif index_type.lower() == "xo":
+ attach = [0, 10, 20, 35, 100]
+ elif index_type.lower() == "eu":
+ if series == 9:
+ attach = [0, 3, 6, 9, 12, 22, 100]
+ else:
+ attach = [0, 3, 6, 12, 100]
return attach
def get_db():
@@ -75,7 +82,7 @@ def tranches():
@app.route("/indices.html")
def indices():
- return render_template("indices.html", series=[9, 10, 11, 13, 15, 17, 19, 21, 23])
+ return render_template("indices.html", series=[9, 10, 11, 13, 15, 17, 19, 21, 22, 23])
@app.route("/")
def main():
diff --git a/risk_insight/templates/tranches.html b/risk_insight/templates/tranches.html
index 0a8df9ac..d40a7d20 100644
--- a/risk_insight/templates/tranches.html
+++ b/risk_insight/templates/tranches.html
@@ -1,43 +1,45 @@
<!doctype html>
<html>
<head>
-<script type="text/javascript" src="{{ url_for('static', filename='dygraph-combined.js') }}"></script>
-<script type="text/javascript" src="{{ url_for('static', filename='jquery-2.1.1.min.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('static', filename='dygraph-combined.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('static', filename='jquery-2.1.1.min.js') }}"></script>
</head>
<body>
- <div id="graph1"
- style="width:800px; height:500px;float:left;margin:auto">
- </div>
- <div id="graph2"
- style="width:800px; height:500px;float:left;padding-left:5em">
- </div>
- <div style="margin-top:5em;display:inline-block">
- <select id="index">
+ <div id="graph1"
+ style="width:800px; height:500px;float:left;margin:auto">
+ </div>
+ <div id="graph2"
+ style="width:800px; height:500px;float:left;padding-left:5em">
+ </div>
+ <div style="margin-top:5em;display:inline-block">
+ <select id="index">
<option value="ig">IG</option>
<option value="hy">HY</option>
- </select>
- <select id="series">
- {% for s in series %}
- <option value="{{s}}">{{s}}</option>
- {% endfor %}
- </select>
- <select id="tenor">
- <option value="3yr">3yr</option>
- <option value="5yr">5yr</option>
- <option value="7yr">7yr</option>
- <option value="10yr">10yr</option>
- </select>
- <select id="greek">
- <option value="Dealer Deltas">Dealer Delta</option>
- <option value="Model Deltas">Model Delta</option>
- <option value="Forward Deltas">Forward Delta</option>
- <option value="gammas">Gamma</option>
- <option value="thetas">Theta</option>
- <option value="corr01">Corr01</option>
- <option value="durations">Duration</option>
- <option value="el">Expected Loss</option>
- </select>
+ <option value="xo">XO</option>
+ <option value="eu">EU</option>
+ </select>
+ <select id="series">
+ {% for s in series %}
+ <option value="{{s}}">{{s}}</option>
+ {% endfor %}
+ </select>
+ <select id="tenor">
+ <option value="3yr">3yr</option>
+ <option value="5yr">5yr</option>
+ <option value="7yr">7yr</option>
+ <option value="10yr">10yr</option>
+ </select>
+ <select id="greek">
+ <option value="Dealer Deltas">Dealer Delta</option>
+ <option value="Model Deltas">Model Delta</option>
+ <option value="Forward Deltas">Forward Delta</option>
+ <option value="gammas">Gamma</option>
+ <option value="thetas">Theta</option>
+ <option value="corr01">Corr01</option>
+ <option value="durations">Duration</option>
+ <option value="el">Expected Loss</option>
+ </select>
</div>
-<script type="text/javascript" src="{{ url_for('static', filename='tranches.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('static', filename='tranches.js') }}"></script>
</body>
</html>