A little demonstration of using Quant API REST Calls to value an Overnight Index Swaps in AppSmith. The whole application can be build in ~15 minutes!

This is how to do it:

  • Construct the data for building the yield curve by:
{{
Table1.tableData.map( r => {return {"tenor" : r.Term, "rate" : r.MidRate, "settleDays": 2, "index" : "Sofr"}})  
}}
  • Table with input market data are created by:
[
	{
    "Term": "1M",
    "MidRate": 0.01
  },
	{
    "Term": "6M",
    "MidRate": 0.01
  },
	{
    "Term": "1Y",
    "MidRate": 0.01
  },
	{
    "Term": "18M",
    "MidRate": 0.01
  }
]
  • The build Yield Curve can be presented as:
{{YC.data.dates.map( function (r,i) { return { "Date": r, "Rate": YC.data.rates[i]} } ) }}
  • Construct the call to OIS pricer with:
{{ { "swap" : { "startDate" : RefDate.formattedDate,
							"notional": Input1.text,
							"fixedRate": Input2.text,
							"index" : "Sofr",
							"schedule" : { "dates" : [DatePicker1.formattedDate, DatePicer2.formattedDate]},
							"fixedDC" : DayCount.selectedOptionValue},
			"curve": YC.data					
	 } 
}}
  • Day counts are defined in the selection box, e.g.:
[
  {
    "label": "Actual360",
    "value": "Actual360"
  },
  {
    "label": "Actual365Fixe",
    "value": "Actual365Fixe"
  }
]

Here is what it looks like:

AppSmith App
AppSmith App

QuantFns