NAV Navbar
Logo
json Google Sheets

Introduction

This is the documentation for the quantra financial API endpoints. You will find examples for javascript and google sheets functions writen with google app scripts and that can be found as an add-on.

Enumerations

Get all calendars


GETECALENDARS()

The above command returns:

{
    "message": {
        "Calendar": [
            "Argentina",
            "Australia",
            "BespokeCalendar",
            "Brazil",
            "Canada",
            "China",
            "CzechRepublic",
            "Denmark",
            "Finland",
            "Germany",
            "HongKong",
            "Hungary",
            "Iceland",
            "India",
            "Indonesia",
            "Israel",
            "Italy",
            "Japan",
            "Mexico",
            "NewZealand",
            "Norway",
            "NullCalendar",
            "Poland",
            "Romania",
            "Russia",
            "SaudiArabia",
            "Singapore",
            "Slovakia",
            "SouthAfrica",
            "SouthKorea",
            "Sweden",
            "Switzerland",
            "TARGET",
            "Taiwan",
            "Turkey",
            "Ukraine",
            "UnitedKingdom",
            "UnitedStates",
            "UnitedStatesGovernmentBond",
            "UnitedStatesNERC",
            "UnitedStatesNYSE",
            "UnitedStatesSettlement",
            "WeekendsOnly"
        ]
    },
    "response": "ok"
}

A list of all available calendars

Endpoint to get all posible calendars

HTTP Request

POST https://api.quantra.io/getCalendars

Query Parameters

No parameters

Get all frequencies


GETEFREQUENCIES()

The above command returns:

{
  "message": {
    "Frequency": [
      "Annual",
      "Bimonthly",
      "Biweekly",
      "Daily",
      "EveryFourthMonth",
      "EveryFourthWeek",
      "Monthly",
      "NoFrequency",
      "Once",
      "OtherFrequency",
      "Quarterly",
      "Semiannual",
      "Weekly"
    ]
  },
  "response": "ok"
}

A list of all available frequencies

Endpoint to get all posible frequencies

HTTP Request

POST https://api.quantra.io/getFrequencys

Query Parameters

No parameters

Get all time units


GETTIMEUNITS()

The above command returns:

{
  "message": {
    "TimeUnit": [
      "Days",
      "Hours",
      "Microseconds",
      "Milliseconds",
      "Minutes",
      "Months",
      "Seconds",
      "Weeks",
      "Years"
    ]
  },
  "response": "ok"
}

A list of all available time units

Endpoint to get all posible time units

HTTP Request

POST https://api.quantra.io/getTimeUnits

Query Parameters

No parameters

Get all day conventions


GETDAYCONVENTIONS()

The above command returns:

{
  "message": {
    "BusinessDayConvention": [
      "Following",
      "HalfMonthModifiedFollowing",
      "ModifiedFollowing",
      "ModifiedPreceding",
      "Nearest",
      "Preceding",
      "Unadjusted"
    ]
  },
  "response": "ok"
}

A list of all available day conventions

Endpoint to get all posible day conventions

HTTP Request

POST https://api.quantra.io/getBusinessDayConventions

Query Parameters

No parameters

Get all day counters


GETDAYCOUNTERS()

The above command returns:

{
  "message": {
    "DayCounter": [
      "Actual360",
      "Actual365Fixed",
      "Actual365NoLeap",
      "ActualActual",
      "Business252",
      "One",
      "Simple",
      "Thirty360"
    ]
  },
  "response": "ok"
}

A list of all available day counters

Endpoint to get all posible day counters

HTTP Request

POST https://api.quantra.io/getDayCounters

Query Parameters

No parameters

Get all point types


GETPOINTTYPES()

The above command returns:

{
  "message": {
    "PointType": [
      "Deposit",
      "Fra",
      "Future",
      "Swap"
    ]
  },
  "response": "ok"
}

A list of all available curve point types

Endpoint to get all posible curve point types

HTTP Request

POST https://api.quantra.io/getPointTypes

Query Parameters

No parameters

Get all ibor indexes


GETDIBORS()

The above command returns:

{
    "message": {
        "Ibor": [
            "Eonia",
            "Euribor10M",
            "Euribor11M",
            "Euribor1M",
            "Euribor1Y",
            "Euribor2M",
            "Euribor2W",
            "Euribor365_10M",
            "Euribor365_11M",
            "Euribor365_1M",
            "Euribor365_1Y",
            "Euribor365_2M",
            "Euribor365_2W",
            "Euribor365_3M",
            "Euribor365_3W",
            "Euribor365_4M",
            "Euribor365_5M",
            "Euribor365_6M",
            "Euribor365_7M",
            "Euribor365_8M",
            "Euribor365_9M",
            "Euribor365_SW",
            "Euribor3M",
            "Euribor3W",
            "Euribor4M",
            "Euribor5M",
            "Euribor6M",
            "Euribor7M",
            "Euribor8M",
            "Euribor9M",
            "EuriborSW",
            "Sonia"
        ]
    },
    "response": "ok"
}

A list of all available ibor indexes

Endpoint to get all posible ibor indexes

HTTP Request

POST https://api.quantra.io/getIbors

Query Parameters

No parameters

Get all compoundings


GETDCOMPOUNDINGS()

The above command returns:

{
  "message": {
    "Compounding": [
      "Compounded",
      "Continuous",
      "Simple",
      "SimpleThenCompounded"
    ]
  },
  "response": "ok"
}

A list of all available compoundings

Endpoint to get all posible compoundings

HTTP Request

POST https://api.quantra.io/getCompoundings

Query Parameters

No parameters

Get all interpolators


GETDINTERPOLATORS()

The above command returns:

{
  "message": {
    "Interpolator": [
      "BackwardFlat",
      "ForwardFlat",
      "Linear",
      "LogLinear"
    ]
  },
  "response": "ok"
}

A list of all available interpolators

Endpoint to get all posible interpolators

HTTP Request

POST https://api.quantra.io/getInterpolators

Query Parameters

No parameters

Get all swap types


GETSWAPTYPES()

The above command returns:

{
  "message": {
    "SwapType": [
      "Payer",
      "Receiver"
    ]
  },
  "response": "ok"
}

A list of all available swap types

Endpoint to get all posible swap types

HTTP Request

POST https://api.quantra.io/getSwapTypes

Query Parameters

No parameters

Get all date generation rules


GETDATEGENERATIONRULES()

The above command returns:

{
  "message": {
    "DateGenerationRule": [
      "Backward",
      "CDS",
      "Forward",
      "OldCDS",
      "ThirdWednesday",
      "Twentieth",
      "TwentiethIMM",
      "Zero"
    ]
  },
  "response": "ok"
}

A list of all available date generation rules

Endpoint to get all posible date generation rules

HTTP Request

POST https://api.quantra.io/getDateGenerationRules

Query Parameters

No parameters

Get all week days


GETWEEKDAYS()

The above command returns:

{
    "message": {
        "WeekDay": [
            "Friday",
            "Monday",
            "Saturday",
            "Sunday",
            "Thursday",
            "Tuesday",
            "Wednesday"
        ]
    },
    "response": "ok"
}

A list of all available week days

Endpoint to get all posible week days. Not much will be modified here :)

HTTP Request

POST https://api.quantra.io/getWeekDays

Query Parameters

No parameters

Get all months


GETMONTHS()

The above command returns:

{
    "message": {
        "Month": [
            "April",
            "August",
            "December",
            "February",
            "January",
            "July",
            "June",
            "March",
            "May",
            "November",
            "October",
            "September"
        ]
    },
    "response": "ok"
}

A list of all available months

Endpoint to get all posible months. Not much will be modified here either :)

HTTP Request

POST https://api.quantra.io/getMonths

Query Parameters

No parameters

Objects

Fixed leg


"FixedLeg":{
   "DayCounter":"Actual360",
   "Rate":0.13,
   "Schedule":{
        "Calendar":"UnitedStatesGovernmentBond",
        "EffectiveDate":"2010/02/17",
        "TerminationDate":"2017/05/17",
        "Frequency":"Semiannual",
        "Convention":"ModifiedFollowing",
        "TerminationDateConvention":"ModifiedFollowing",
        "DateGenerationRule":"Backward",
        "EndOfMonth":false
    }
}


The above command returns:



JSON structure to create a fixed leg for an Interest Rate Swap.

HTTP Request

Query Parameters

Parameter Description
Rate Bond rate
DayCounter Accrual day counter.
Schedule Fixed leg payment schedule parametrization. Calendar, EffectiveDate and TerminationDate for leg Schedule can be overwritten if parent Swap has Calendar, EffectiveDate and LengthInYears defined.

Fixed rate bond


"FixedRateBond":{
      "SettlementDays":2,
      "FaceAmount":10000,
      "Rate":0.045,
      "DayCounter":"ActualActualBond",
      "Convention":"ModifiedFollowing",
      "Redemption":100,
      "IssueDate":"2007/05/15",
      "Schedule":{
        "Calendar":"UnitedStatesGovernmentBond",
        "EffectiveDate":"2007/05/15",
        "TerminationDate":"2017/05/15",
        "Frequency":"Annual",
        "Convention":"ModifiedFollowing",
        "TerminationDateConvention":"ModifiedFollowing",
        "DateGenerationRule":"Backward",
        "EndOfMonth":false
      },
      "Yield":{
        "DayCounter":"Actual360",
        "Compounding":"Compounded",
        "Frequency":"Annual"
      }
}


The above command returns:



JSON structure to create floating rate bonds.

HTTP Request

Query Parameters

Parameter Description
SettlementDays Index settlement days
FaceAmount Bond face amount
Rate Bond rate
DayCounter Accrual day counter.
Convention Payment convention.
Redemption Redemption price
IssueDate Bond issue date
Schedule Payment schedule parametrization.
Yield Yield parametrization.

Floating leg


"FloatingLeg":{
   "DayCounter":"Actual365Fixed",
   "Spread":0,
   "Index":{
      "SettlementDays":2,
      "Calendar":"Australia",
      "Convention":"HalfMonthModifiedFollowing",
      "EndOfMonth":true,
      "DayCounter":"Actual365Fixed"
   },
   "Schedule":{
      "Calendar":"UnitedStatesGovernmentBond",
      "EffectiveDate":"2010/02/17",
      "TerminationDate":"2017/05/17",
      "Frequency":"Semiannual",
      "Convention":"ModifiedFollowing",
      "TerminationDateConvention":"ModifiedFollowing",
      "DateGenerationRule":"Backward",
      "EndOfMonth":false
  }
}


The above command returns:



JSON structure to create a fixed leg for an Interest Rate Swap.

HTTP Request

Query Parameters

Parameter Description
Spread Bond spread
DayCounter Accrual day counter.
Index Index parametrization.
Schedule Floating leg payment schedule parametrization. Calendar, EffectiveDate and TerminationDate for leg Schedule can be overwritten if parent Swap has Calendar, EffectiveDate and LengthInYears defined.

Floating rate bond


"FloatingRateBond":{
      "FixingDays":2,
      "SettlementDays":2,
      "FaceAmount":1000000,
      "Spread":0.0,
      "DayCounter":"ActualActualBond",
      "Convention":"ModifiedFollowing",
      "Redemption":90,
      "IssueDate":"2010/02/17",
      "Frequency":"Semiannual",
      "Index":{
          "SettlementDays":0,
          "Calendar":"Australia",
          "Convention":"HalfMonthModifiedFollowing",
          "EndOfMonth":true,
          "DayCounter":"ActualActualBond"
      },
      "Schedule":{
          "Calendar":"UnitedStatesGovernmentBond",
          "EffectiveDate":"2010/02/17",
          "TerminationDate":"2017/05/17",
          "Frequency":"Semiannual",
          "Convention":"ModifiedFollowing",
          "TerminationDateConvention":"ModifiedFollowing",
          "DateGenerationRule":"Backward",
          "EndOfMonth":false
      },
      "Yield":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Frequency":"Annual"
      }
  }


The above command returns:



JSON structure to create floating rate bonds.

HTTP Request

Query Parameters

Parameter Description
SettlementDays Index settlement days
FaceAmount Bond face amount
Spread Rate spread
DayCounter Accrual day counter.
Convention Payment convention.
Redemption Redemption price
IssueDate Bond issue date
Frequency Payment frequency.
Index Index parametrization.
Schedule Payment schedule parametrization.
Yield Yield parametrization.

Forward curve


"FwdCurve":{
    "FwdCurvePeriodNumber":2,
    "FwdCurvePeriodTimeUnit":"Months"
}


The above command returns:



JSON structure to parametrize forward curve.

HTTP Request

Query Parameters

Parameter Description
FwdCurvePeriodNumber Tenor number to be used along with FwdCurvePeriodTimeUnit to calculate fwd tenor (tenor = TimeUnit * TenorNumber)
FwdCurvePeriodTimeUnit Time unit to be used along with FwdCurvePeriodNumber to calculate fwd tenor (tenor = TimeUnit * TenorNumber)

Index


"Index":{  
            "SettlementDays":2,
            "Calendar":"Australia",
            "Convention":"HalfMonthModifiedFollowing",
            "EndOfMonth":true,
            "DayCounter":"Actual365Fixed",
            "Fixings":[
                {
                  "Date":"2007/11/15",
                  "Rate":0.02
                },
                {
                  "Date":"2008/05/15",
                  "Rate":0.03
                },
                {
                  "Date":"2008/11/13",
                  "Rate":0.06
                }
            ]
         }


The above command returns:



JSON structure to create an Index. When needed for accrued calculations, past fixings will be added under Index structure.

HTTP Request

Query Parameters

Parameter Description
SettlementDays Index settlement days
Calendar Index calendar.
Convention Index convention.
EndOfMonth Adjust to end of month rule applied to the index. True or False
DayCounter Index day counter.
Fixings Optional. Array of fixings for past flows.

Schedule


"Schedule":{
          "Calendar":"UnitedStatesGovernmentBond",
          "EffectiveDate":"2010/02/17",
          "TerminationDate":"2017/05/17",
          "Period":"Semiannual",
          "Convention":"ModifiedFollowing",
          "TerminationDateConvention":"ModifiedFollowing",
          "DateGenerationRule":"Backward",
          "EndOfMonth":false
      }


The above command returns:



JSON structure to create flows Schedule.

Calendar, EffectiveDate and TerminationDate are optional as in some cases can be overwritten by its parent object. Interest rate swaps, for instance, can be created with its own Calendar, EffectiveDate and LengthInYears and the schedule for both legs will be created with these values in accordance with what has been definded for the Swap.

HTTP Request

Query Parameters

Parameter Description
Calendar Optional. Schedule calendar.
EffectiveDate Optional. Date when schedule starts in format yyyy/MM/dd. It must be a valid business date for provided calendar
TerminationDate Optional. Date when schedule ends in format yyyy/MM/dd. It must be a valid business date for provided calendar
Frequency Schedule payment frequency.
Convention Schedule convention.
TerminationDateConvention Termination date convention.
DateGenerationRule Date generation rule.
EndOfMonth Adjust to end of month rule applied to the schedule. True or False

Vanilla Interest Rate Swap


"VanillaInterestRateSwap":{
      "Notional":1000000,
      "SwapType":"Payer",
      "FixedLeg":{
        "DayCounter":"Actual360",
        "Rate":0.13,
        "Schedule":{
            "Calendar":"UnitedStatesGovernmentBond",
            "EffectiveDate":"2010/02/17",
            "TerminationDate":"2017/05/17",
            "Frequency":"Semiannual",
            "Convention":"ModifiedFollowing",
            "TerminationDateConvention":"ModifiedFollowing",
            "DateGenerationRule":"Backward",
            "EndOfMonth":false
        }
      },
      "FloatingLeg":{
        "DayCounter":"Actual365Fixed",
        "Spread":0,
        "Index":{
            "SettlementDays":2,
            "Calendar":"Australia",
            "Convention":"HalfMonthModifiedFollowing",
            "EndOfMonth":true,
            "DayCounter":"Actual365Fixed"
        },
        "Schedule":{
            "Calendar":"UnitedStatesGovernmentBond",
            "EffectiveDate":"2010/02/17",
            "TerminationDate":"2017/05/17",
            "Frequency":"Semiannual",
            "Convention":"ModifiedFollowing",
            "TerminationDateConvention":"ModifiedFollowing",
            "DateGenerationRule":"Backward",
            "EndOfMonth":false
        }
      }
}


The above command returns:



JSON structure to create a Vanilla Interest Rate Swap object.

Flow schedules for the swap (floating and fixed legs) can be created in two different ways.

HTTP Request

Query Parameters

Parameter Description
Notional Swap notional
SwapType Payer or receiver swap.
Calendar Optional. Swap calendar.
EffectiveDate Optional. Date when swap starts in format yyyy/MM/dd. It must be a valid business date for provided calendar
LenghtInYears Optional. Swap length in years
FixedLeg Swap fixed leg.
FloatingLeg Swap floating leg.

Yield


"Yield":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Frequency":"Annual"
      }


The above command returns:



JSON structure to create yield parametrization object.

HTTP Request

Query Parameters

Parameter Description
DayCounter Yield calculation day counter.
Compounding Yield calculation compounding.
Frequency Yield calculation frequency.

Zero coupon bond


 "ZeroCouponBond":{
    "MaturityDate":"2013/08/15",
    "IssueDate":"2003/08/15",
    "SettlementDays":2,
    "FaceAmount":10000,
    "Redemption":100,
    "Calendar":"UnitedStates",
    "PaymentConvention":"Following",
    "Yield":{
       "DayCounter":"Actual360",
       "Compounding":"Compounded",
       "Frequency":"Annual"
    }
 }


The above command returns:



JSON structure to create floating rate bonds.

HTTP Request

Query Parameters

Parameter Description
IssueDate Bond issue date
MaturtyDate Bond issue date
SettlementDays Index settlement days
FaceAmount Bond face amount
Redemption Redemption price
Calendar Bond calendar
Convention Payment convention
Yield Yield parametrization.

Dates and calendars

Is Leap

{
   "Year":1982
}

ISLEAP(year)

The above command returns:


{
    "message": {
        "IsLeap": false
    },
    "response": "ok"
}


| ------------- | 
| TRUE          | 
| ------------- | 

Endpoint to know if a year is leap.

HTTP Request

POST https://api.quantra.io/isLeap

Query Parameters

Parameter Description
Year Year to be checked

End of month

{
   "Date":"2017/05/25"
}

ENDOFMONTH(date)

The above command returns:


{
    "message": {
        "EndOfMonth": "2017-05-31"
    },
    "response": "ok"
}


| ------------- | 
| "2017/05/31"  | 
| ------------- | 


Return the last day for them month of provided date.

HTTP Request

POST https://api.quantra.io/endOfMonth

Query Parameters

Parameter Description
Date Date used to get the last day of month

Is end of month

{
   "Date":"2017/05/25"
}

ISENDOFMONTH(date)

The above command returns:


{
    "message": {
        "IsEndOfMonth": true
    },
    "response": "ok"
}


| ------------- | 
| TRUE          | 
| ------------- | 

Returns wether the date is end of month or not.

HTTP Request

POST https://api.quantra.io/isEndOfMonth

Query Parameters

Parameter Description
Date Query date

Next week day

{
   "Date":"2017/07/19",
   "Weekday":"Thursday"
}

NEXTWEEKDAY(date, weekday)

The above command returns:


{
    "message": {
        "NextWeekDay": "2017-07-20"
    },
    "response": "ok"
}


| ------------- | 
| "2017/07/20"  | 
| ------------- | 

Returns the

HTTP Request

POST https://api.quantra.io/nextWeekDay

Query Parameters

Parameter Description
Date Query date
Weekday Week day

Nth week day

{
   "Nth":3,
   "Weekday":"Thursday",
   "Month":"July",
   "Year": 2017
}

NTHWEEKDAY(nth, weekday, month, year)

The above command returns:


{
    "message": {
        "NthWeekDay": "2017-07-20"
    },
    "response": "ok"
}


| ------------- | 
| "2017/07/20"  | 
| ------------- | 

n-th given weekday in the given month and year.

HTTP Request

POST https://api.quantra.io/nthWeekDay

Query Parameters

Parameter Description
Nth n-th day
Weekday Week day
Month For this month
Year and year

Is business day

{
   "Date":"2017/07/22",
   "Calendar":"TARGET"
}

ISBUSINESSDAY(date, calendar)

The above command returns:


{
    "message": {
        "IsBusinessDay": false
    },
    "response": "ok"
}


| ------------- | 
| FALSE         | 
| ------------- | 

Is business day.

HTTP Request

POST https://api.quantra.io/isBusinessDay

Query Parameters

Parameter Description
Date Date to check
Calendar Reference calendar

Is holiday

{
   "Date":"2017/07/22",
   "Calendar":"TARGET"
}

ISHOLIDAY(date, calendar)

The above command returns:


{
    "message": {
        "IsHoliday": true
    },
    "response": "ok"
}


| ------------- | 
| TRUE          | 
| ------------- | 

Returns if given date is holiday.

HTTP Request

POST https://api.quantra.io/isHoliday

Query Parameters

Parameter Description
Date Date to check
Calendar Reference calendar

Holiday list

{
   "From":"2017/06/19",
   "To":"2017/07/19",
   "Calendar":"UnitedStates",
   "IncludeWeekends":true
}

ISBUSINESSDAY()

The above command returns:


{
    "HolidayList": [
        "2017-06-24",
        "2017-06-25",
        "2017-07-01",
        "2017-07-02",
        "2017-07-04",
        "2017-07-08",
        "2017-07-09",
        "2017-07-15",
        "2017-07-16"
    ],
    "response": "ok"
}


List of dates inbetween given dates and given calendar.

List of holiday dates inbetween given dates and given calendar.

HTTP Request

POST https://api.quantra.io/holidayList

Query Parameters

Parameter Description
From From date
To To date
Calendar Reference calendar
IncludeWeekends Wether include or not weekends in the list

Adjust date

{
   "Date":"2017/07/22",
   "Calendar":"UnitedStates",
   "Convention":"Following"
}

ADJUSTDATE(date, calendar, convention)

The above command returns:


{
    "message": {
        "AdjustedDate": "2017-07-24"
    },
    "response": "ok"
}


| ------------- | 
| "2017/07/20"  | 
| ------------- | 

Adjusted date in accordance to given calendar and day convention.

HTTP Request

POST https://api.quantra.io/adjustDate

Query Parameters

Parameter Description
Date Date to check
Calendar Reference calendar
Convention Day convention

Advance date

{
   "Date":"2017/07/24",
   "Calendar":"UnitedStates",
   "Convention":"Following",
   "Number":2,
   "TimeUnit":"Days",
   "EndOfMonth":true
}
ADVANCEDATE(date, calendar, convention, number, timeUnit, endOfMonth)

The above command returns:


{
    "message": {
        "AdvancedDate": "2017-07-26"
    },
    "response": "ok"
}


| ------------- | 
| "2017/07/26"  | 
| ------------- | 

Advance date for given calendar and time and adjusted to given convention.

HTTP Request

POST https://api.quantra.io/advanceDate

Query Parameters

Parameter Description
Date Date to check
Calendar Reference calendar
Convention Day convention
Number Number of time units
TimeUnit Time unit
EndOfMonth End of month rule

Business days between

{
   "From":"2017/07/22",
   "To":"2017/07/28",
   "Calendar":"UnitedStates",
   "IncludeFirst":true,
   "IncludeLast":true
}
BUSINESSDAYSBETWEEN(from, to, calendar, includeFirst, includeLast)

The above command returns:


{
    "message": {
        "BusinessDaysBetween": 5
    },
    "response": "ok"
}


| ------------- | 
|             5 | 
| ------------- | 

Business days between from and to given dates.

HTTP Request

POST https://api.quantra.io/businessDaysBetween

Query Parameters

Parameter Description
From From date
To To date
Calendar Reference calendar
IncludeFirst Include first date
IncludeLast Include last date

Is IMM Date

{
   "Date":"2017/09/20"
}
ISMMDATE(date)

The above command returns:


{
    "message": {
        "IsIMMdate": true
    },
    "response": "ok"
}


| ------------- | 
| TRUE          | 
| ------------- | 

Returns if given date is a valid IMM date.

HTTP Request

POST https://api.quantra.io/isIMMdate

Query Parameters

Parameter Description
Date Date to check

Next IMM Date

{
   "Date":"2017/09/20"
}
NEXTIMMDATE(date)

The above command returns:


{
    "message": {
        "NextIMMdate": "2017-09-20"
    },
    "response": "ok"
}


| ------------- | 
| "2017/09/20"  | 
| ------------- | 

Returns next valid IMM date since given date.

HTTP Request

POST https://api.quantra.io/nextIMMdate

Query Parameters

Parameter Description
Date Date to check

Term structure


    {
      "TermStructure":{
          "DayCounter":"Actual360",
            "Compounding":"Compounded",
            "FwdCurvePeriodTimeUnit":"Months",
            "FwdCurvePeriodNumbers":2,
            "Interpolator":"Linear"
        },
        "Points":[
        {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
        },
        ...
        {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M",
        }
      ]
    }


The above command returns:



How to create a term structure used for pricing purposes. Term structures are made of curve parametrization and an array of points.

Query Parameters

Parameter Description
TermStructure Curve parametrization.
Points Array of points to generate the curve.

Term structure parametrization


"TermStructure":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Interpolator":"Linear"
        }


The above command returns:



Curve parametrization

Query Parameters

Parameter Description
Compounding Compounding to generate the curve.
DayCounter DayCounter to generate the curve.
Interpolator Interpolator to generate the curve.

Curve points


[  
   {  
      "type":"Deposit",
      "Rate":0.0382,
      "Calendar":"TARGET",
      "FixingDays":2,
      "TenorTimeUnit":"Weeks",
      "TenorNumber":1,
      "BusinessDayConvention":"ModifiedFollowing",
      "DayCounter":"Actual360"
   },
   {  
      "type":"Fra",
      "Rate":0.037125,
      "MonthsToStart":3,
      "MonthsToEnd":6,
      "FixingDays":2,
      "Calendar":"TARGET",
      "BusinessDayConvention":"ModifiedFollowing",
      "DayCounter":"Actual360"
   },
   {  
      "type":"Future",
      "Rate":0.037125,
      "FutureStartDate":"2017/05/05",
      "FutMonths":6,
      "Calendar":"TARGET",
      "BusinessDayConvention":"ModifiedFollowing",
      "DayCounter":"Actual360"
   },
   {  
      "type":"Swap",
      "Rate":0.037125,
      "TenorTimeUnit":"Years",
      "TenorNumber":2,
      "Calendar":"TARGET",
      "SwFixedLegFrequency":"Annual",
      "SwFixedLegConvention":"Unadjusted",
      "SwFixedLegDayCounter":"Thirty360",
      "SwFloatingLegIndex":"Euribor6M"
   },
   {  
      "type":"Bond",
      "Rate":101.6875,
      "FixingDays":2,
      "FaceAmount":100,
      "Schedule":{
          "Calendar":"UnitedStatesGovernmentBond",
          "EffectiveDate":"2010/02/17",
          "TerminationDate":"2017/05/17",
          "Period":"Semiannual",
          "Convention":"ModifiedFollowing",
          "TerminationDateConvention":"ModifiedFollowing",
          "DateGenerationRule":"Backward",
          "EndOfMonth":false
      },
      "CouponRate":0.04,
      "DayCounter":"Actual360",
      "BusinessDayConvention":"ModifiedFollowing",
      "Redemption":100,
      "IssueDate":"2017/05/05"
   }
]


For Google Sheets all point types will be put together in a matrix
and be provided to the function. So four matrix should be created in 
case all types would be needed. 

Each row of the matrix will be one point that has to be created
with following order:

Deposit:
[Rate,TenorTimeUnit,TenorNumber,FixingDays,Calendar,BusinessDayConvention,DayCounter]

FRA:
[Rate,TenorTimeUnit,TenorNumber,FixingDays,Calendar,BusinessDayConvention,DayCounter]

Future:
[Rate,TenorTimeUnit,TenorNumber,FixingDays,Calendar,BusinessDayConvention,DayCounter]

Swap:
[Rate,TenorTimeUnit,TenorNumber,FixingDays,Calendar,BusinessDayConvention,DayCounter]

For example in GENERATEZEROCURVE(B6:H11, ... ) the first parameters are the deposit 
points for the curve, and a range of cells containing 6 deposit points is provided.

The above command returns:

Below the posible point types that can used to create a curve. All of them will be added to an array and don’t need to be sorted.

Deposit

Parameter Description
Rate Deposit rate in decimal format
TenorTimeUnit Time unit to be used along with TenorNumber to calculate deposit tenor (tenor = TimeUnit * TenorNumber).
TenorNumber Tenor number to be used along with TimeUnit to calculate deposit tenor (tenor = TimeUnit * TenorNumber)
FixingDays Rate fixind days
Calendar Deposit schedule calendar.
BusinessDayConvention Business day convention used for deposit schedule.
DayCounter Day counter base used to discount.

FRA

Parameter Description
Rate FRA rate in decimal format
MonthsToStart Months to start FRA
MonthsToEnd Months to end FRA
FixingDays Rate fixind days
Calendar Deposit schedule calendar.
BusinessDayConvention Business day convention used for deposit schedule.
DayCounter Day counter base used to discount.

Future

Parameter Description
Rate FRA rate in decimal format
FutureStartDate Future start date. I has to be a valid IMM date
FutureMonths Future duration in months
Calendar Deposit schedule calendar.
BusinessDayConvention Business day convention used for deposit schedule.
DayCounter Day counter base used to discount.

Swap

Parameter Description
Rate Deposit rate in decimal format
TenorTimeUnit Time unit to be used along with TenorNumber to calculate deposit tenor (tenor = TimeUnit * TenorNumber).
TenorNumber Tenor number to be used along with TimeUnit to calculate deposit tenor (tenor = TimeUnit * TenorNumber)
SwFixedLegFrequency Fixed leg frequency.
SwFixedLegConvention Business day convention used for swap fixed leg schedule.
SwFixedLegDayCounter Day counter for swap fixed leg.
SwFloatingLegIndex Index used for floating leg schedule. Frequency, day convention and day counter will be derived from it.

Fixed bond

Parameter Description
Rate Bond price
FixingDays Rate fixind days
FaceAmount Bond face amount
Schedule Bond payment schedule parametrization.
CouponRate Bond coupon rate
DayCounter Day counter base used to discount
BusinessDayConvention Business day convention used for deposit schedule
Redemption Bond redemption price
IssueDate Bond issue date

Curves

Discount curve

{
  "Pricing":{
      "AsOfDate":"2009/05/13"
  },
  "TermStructure":{
      "TermStructure":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Interpolator":"Linear"
      },
      "Points":[
      {
           "type":"Deposit",
           "Rate":0.0372,
           "TenorTimeUnit":"Months",
           "TenorNumber":1,
           "FixingDays":2,
           "Calendar":"TARGET",
           "BusinessDayConvention":"ModifiedFollowing",
           "DayCounter":"Actual360"
      },
      ...
      {
           "type":"Swap",
           "Rate":0.0398,
           "TenorTimeUnit":"Years",
           "TenorNumber":3,
           "Calendar":"TARGET",
           "SwFixedLegConvention":"Unadjusted",
           "SwFixedLegDayCounter":"Thirty360",
           "SwFixedLegFrequency":"Annual",
           "SwFloatingLegIndex":"Euribor6M"
      }
    ]
  }
}
GENERATEDISCOUNTCURVE(DepositPointsMatrix, FRAPointsMatrix, FuturePointsMatrix, SwapPointsMatrix, Compounding, DayCounter, Interpolator, AsOfDate)

Matrix have to be as shown previously.

The above command returns:

{  
   "response":"ok",
   "message":[  
      {  
         "Rate":0.0388928,
         "Date":"2017-05-05",
         "Point":0
      },
      {  
         "Rate":0.0388948,
         "Date":"2017-05-06",
         "Point":1
      },

      ...

      {  
         "Rate":0.0568327,
         "Date":"2032-05-08",
         "Point":5482
      },
      {  
         "Rate":0.0568365,
         "Date":"2032-05-09",
         "Point":5483
      }
   ]
}

A list of all available interpolators

Endpoint to generate discount curve points.

HTTP Request

POST https://api.quantra.io/discountCurve

Query Parameters

Parameter Description
Pricing Pricing options
TermStructure Term structure used to generate the discount points.

Fwd rate curve

{
  "Pricing":{
      "AsOfDate":"2009/05/13"
  },
  "FwdCurve":{
      "FwdCurvePeriodNumber":2,
      "FwdCurvePeriodTimeUnit":"Months"
  },
  "TermStructure":{
      "TermStructure":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Interpolator":"Linear"
      },
      "Points":[
      {
           "type":"Deposit",
           "Rate":0.0372,
           "TenorTimeUnit":"Months",
           "TenorNumber":1,
           "FixingDays":2,
           "Calendar":"TARGET",
           "BusinessDayConvention":"ModifiedFollowing",
           "DayCounter":"Actual360"
      },
      ...
      {
           "type":"Swap",
           "Rate":0.0398,
           "TenorTimeUnit":"Years",
           "TenorNumber":3,
           "Calendar":"TARGET",
           "SwFixedLegConvention":"Unadjusted",
           "SwFixedLegDayCounter":"Thirty360",
           "SwFixedLegFrequency":"Annual",
           "SwFloatingLegIndex":"Euribor6M",
      }
    ]
  }
}
GENERATEZEROCURVE(DepositPointsMatrix, FRAPointsMatrix, FuturePointsMatrix, SwapPointsMatrix, Compounding, DayCounter, Interpolator, AsOfDate)

Matrix have to be as shown previously.

The above command returns:

{  
   "response":"ok",
   "message":[  
      {  
         "Rate":0.0388928,
         "Date":"2017-05-05",
         "Point":0
      },
      {  
         "Rate":0.0388948,
         "Date":"2017-05-06",
         "Point":1
      },

      ...

      {  
         "Rate":0.0568327,
         "Date":"2032-05-08",
         "Point":5482
      },
      {  
         "Rate":0.0568365,
         "Date":"2032-05-09",
         "Point":5483
      }
   ]
}

A list of all available interpolators

Endpoint to generate fwd rate curve points.

HTTP Request

POST https://api.quantra.io/fwdRateCurve

Query Parameters

Parameter Description
Pricing Pricing options
FwdCurve Forward curve tenor
TermStructure Term structure used to generate the discount points.

Zero rate curve

{
  "Pricing":{
      "AsOfDate":"2009/05/13"
  },
  "TermStructure":{
      "TermStructure":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Interpolator":"Linear"
      },
      "Points":[
      {
           "type":"Deposit",
           "Rate":0.0372,
           "TenorTimeUnit":"Months",
           "TenorNumber":1,
           "FixingDays":2,
           "Calendar":"TARGET",
           "BusinessDayConvention":"ModifiedFollowing",
           "DayCounter":"Actual360"
      },
      ...
      {
           "type":"Swap",
           "Rate":0.0398,
           "TenorTimeUnit":"Years",
           "TenorNumber":3,
           "Calendar":"TARGET",
           "SwFixedLegConvention":"Unadjusted",
           "SwFixedLegDayCounter":"Thirty360",
           "SwFixedLegFrequency":"Annual",
           "SwFloatingLegIndex":"Euribor6M"
      }
    ]
  }
}

GENERATEZEROCURVE(DepositPointsMatrix, FRAPointsMatrix, FuturePointsMatrix, SwapPointsMatrix, Compounding, DayCounter, Interpolator, AsOfDate)

Matrix have to be as shown previously.

The above command returns:

{  
   "response":"ok",
   "message":[  
      {  
         "Rate":0.0388928,
         "Date":"2017-05-05",
         "Point":0
      },
      {  
         "Rate":0.0388948,
         "Date":"2017-05-06",
         "Point":1
      },

      ...

      {  
         "Rate":0.0568327,
         "Date":"2032-05-08",
         "Point":5482
      },
      {  
         "Rate":0.0568365,
         "Date":"2032-05-09",
         "Point":5483
      }
   ]
}

A list of all available interpolators

Endpoint to generate zero rate curve points.

HTTP Request

POST https://api.quantra.io/zeroRateCurve

Query Parameters

Parameter Description
Pricing Pricing options
TermStructure Term structure used to generate the discount points.

Pricing functions

List of functions to price the pruducts.

Pricing options

All of them share the “Pricing” structure with following parameters.

"Pricing":{
    "AsOfDate":"2009/05/13"
  }

Query Parameters

Parameter Description
AsOfDate Date to be priced

Fixed Rate Bond Pricing


{
   "Pricing":{
      "AsOfDate":"2015/04/21"
   },
   "FixedRateBond":{
      "SettlementDays":2,
      "FaceAmount":10000,
      "Rate":0.045,
      "DayCounter":"ActualActualBond",
      "Convention":"ModifiedFollowing",
      "Redemption":100,
      "IssueDate":"2007/05/15",
      "Schedule":{
        "Calendar":"UnitedStatesGovernmentBond",
        "EffectiveDate":"2007/05/15",
        "TerminationDate":"2017/05/15",
        "Frequency":"Annual",
        "Convention":"ModifiedFollowing",
        "TerminationDateConvention":"ModifiedFollowing",
        "DateGenerationRule":"Backward",
        "EndOfMonth":false
      },
      "Yield":{
        "DayCounter":"Actual360",
        "Compounding":"Compounded",
        "Frequency":"Annual"
      }
   },
   "Curves": {
     "DiscountingTermStructure":{
        "TermStructure":{
           "DayCounter":"Actual360",
           "Compounding":"Compounded",
           "FwdCurvePeriodTimeUnit":"Months",
           "FwdCurvePeriodNumber":2,
           "Interpolator":"Linear",
           "AsOfDate":"2008/09/18"
        },
        "Points":[
           {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
           },
           ...
           {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M"
           }
        ]
     }
   }
}


function PRICEZEFIXEDRATEBOND(discountingDepositPoints, //discounting curve
                          discountingFRAPoints,     //discounting curve
                          discountingFuturePoints,  //discounting curve
                          discountingSwapPoints,    //discounting curve
                          discountingBondPoints,    //discounting curve
                          discountingCompounding,   //discounting curve
                          discountingDayCounter,    //discounting curve
                          discountingInterpolator,  //discounting curve
                          faceAmount,               //bond
                          redemption,               //bond
                          issueDate,                //bond
                          rate,                     //bond
                          settlementDays,           //bond
                          dayCounter,               //bond
                          convention,               //bond
                          scheduleCalendar,         //schedule  
                          scheduleEffectiveDate,    //schedule
                          scheduleTerminationDate,  //schedule
                          schedulePeriod,           //schedule
                          scheduleConvention,       //schedule
                          scheduleTerminationDateConvention, //schedule
                          scheduleDateGenerationRule, //schedule
                          scheduleEndOfMonth,       //schedule
                          yieldCounter,             //yield
                          yieldCompounding,         //yield
                          yieldFrequency,           //yield
                          pricingAsOfDate           //pricing
                         )

The above command returns:

{
    "message": {
        "AccruedDays": 364,
        "Yield": 0.0358443,
        "DirtyPrice": 105.992,
        "CleanPrice": 101.505,
        "MacaulayDuration": 1.91131,
        "NPV": 10597,
        "BPS": 0.0289484,
        "Convexity": 3.85374,
        "ModifiedDuration": 1.9113,
        "AccruedAmount": 4.48767,
        "Flows": [
            {
                "AccrualStartDate": "2007-05-15",
                "AccrualEndDate": "2008-05-15",
                "Amount": 450,
                "Rate": 0.045,
                "Type": "PastInterest"
            },
            ...
            {
                "Rate": 0.045,
                "Amount": 450,
                "Discount": 0.92943,
                "Type": "Interest",
                "AccrualStartDate": "2016-05-16",
                "Price": 418.244,
                "AccrualEndDate": "2017-05-15"
            },
            {
                "Amount": 10000,
                "Discount": 0.92943,
                "Date": "2017-05-15",
                "Price": 9294.3,
                "Type": "Notional"
            }
        ]
    },
    "response": "ok"
}


| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "NPV"              | NPV Value         |               |               |                    |
| ------------------ | ----------------- | ------------- | ------------- | ------------------ |
| "Yield"            | Yield Value       |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "DirtyPrice"       | Dirty Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "CleanPrice"       | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "AccruedAmount"    | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "AccruedDays"      | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "BPS"              | Clean Price Value |               |               |                    |
| ------------------ | ----------------- | ------------- | ------------- | ------------------ |
| "Convexity"        | Convexity value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "ModifiedDuration" | Mod durat value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "MacaulayDuration" | Mac durat value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
...
| -------------- | ----------------- | ------------- | -------------------- | ------------------- | 
| "PastInterest" | Rate              | Amount        | Accrual start date   | Accrual end date    |
| -------------- | ------------------| --------------| ---------------------| ------------------- |
...

| -------------- | ----------------- | ------------- | -------------------- | ------------------- | -------------- | ----------------- |
| "PastInterest" | Rate              | Amount        | Accrual start date   | Accrual end date    | Discount rate  | Discounted amount |
| -------------- | ------------------| --------------| ---------------------| ------------------- | -------------- | ----------------- |

...

| -------------- | ----------------- | ------------- | -------------------- | ------------------- | -------------- | ----------------- |
| "Notional"     |                   | Amount        |                      |                     | Discount rate  | Discounted amount |
| -------------- | ------------------| --------------| ---------------------| ------------------- | -------------- | ----------------- |


Endpoint to price fixed rate coupon bond

HTTP Request

POST https://api.quantra.io/priceFloatingRateBond

Query Parameters

Parameter Description
Pricing Pricing options.
FixedRateBond Fixed rate bond to be priced.
Curves.DiscountingTermStructure Discounting term structure.

Returns

Returns an object with the calculations and the list of flows. PastInterest flows are the ones already settled, Interest flows have discounting information.

Floating Rate Bond Pricing


{
  "Pricing":{
    "AsOfDate":"2009/05/13"
  },
  "FloatingRateBond":{
      "SettlementDays":2,
      "FaceAmount":1000000,
      "Spread":0.0,
      "DayCounter":"ActualActualBond",
      "Convention":"ModifiedFollowing",
      "Redemption":90,
      "IssueDate":"2010/02/17",
      "Index":{
          "SettlementDays":0,
          "Calendar":"Australia",
          "Convention":"HalfMonthModifiedFollowing",
          "EndOfMonth":true,
          "DayCounter":"ActualActualBond"
      },
      "Schedule":{
          "Calendar":"UnitedStatesGovernmentBond",
          "EffectiveDate":"2010/02/17",
          "TerminationDate":"2017/05/17",
          "Frequency":"Semiannual",
          "Convention":"ModifiedFollowing",
          "TerminationDateConvention":"ModifiedFollowing",
          "DateGenerationRule":"Backward",
          "EndOfMonth":false
      },
      "Yield":{
          "DayCounter":"Actual360",
          "Compounding":"Compounded",
          "Frequency":"Annual"
      }
  },
  "Curves":{
    "DiscountingTermStructure":{
      "TermStructure":{
            "DayCounter":"Actual360",
            "Compounding":"Compounded",
            "FwdCurvePeriodTimeUnit":"Months",
            "FwdCurvePeriodNumbers":2,
            "Interpolator":"Linear"
        },
        "Points":[
        {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
        },
        ...
        {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M"
        }
      ]
     },
    "ForecastingTermStructure":{
        "TermStructure":{
           "DayCounter":"Actual360",
           "Compounding":"Compounded",
           "FwdCurvePeriodTimeUnit":"Months",
           "FwdCurvePeriodNumber":2,
           "Interpolator":"Linear"
        },
        "Points":[
           {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
           },
           ...
           {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M"
           }
        ]
     }  
  }
}


function PRICEFLOATINGRATEBOND(discountingDepositPoints, //discounting curve
                          discountingFRAPoints,     //discounting curve
                          discountingFuturePoints,  //discounting curve
                          discountingSwapPoints,    //discounting curve
                          discountingBondPoints,    //discounting curve
                          discountingCompounding,   //discounting curve
                          discountingDayCounter,    //discounting curve
                          discountingInterpolator,  //discounting curve
                          fwdDepositPoints,         //fwd curve
                          fwdFRAPoints,             //fwd curve
                          fwdFuturePoints,          //fwd curve
                          fwdSwapPoints,            //fwd curve
                          fwdBondPoints,            //fwd curve
                          fwdCompounding,           //fwd curve
                          fwdDayCounter,            //fwd curve
                          fwdInterpolator,          //fwd curve
                          faceAmount,               //bond
                          redemption,               //bond
                          issueDate,                //bond
                          spread,                   //bond
                          settlementDays,           //bond
                          dayCounter,               //bond
                          convention,               //bond
                          scheduleCalendar,         //schedule  
                          scheduleEffectiveDate,    //schedule
                          scheduleTerminationDate,  //schedule
                          schedulePeriod,           //schedule
                          scheduleConvention,       //schedule
                          scheduleTerminationDateConvention, //schedule
                          scheduleDateGenerationRule, //schedule
                          scheduleEndOfMonth,       //schedule
                          indexSettlementDays,   //index
                          indexCalendar,         //index
                          indexConvention,       //index
                          indexEndOfMonth,       //index
                          indexDayCounter,       //index
                          indexFixings,          //index   
                          yieldCounter,             //yield
                          yieldCompounding,         //yield
                          yieldFrequency,           //yield
                          pricingAsOfDate           //pricing
                         )

The above command returns:

{
    "message": {
        "AccruedDays": 56,
        "Yield": 0.0459293,
        "DirtyPrice": 93.1973,
        "CleanPrice": 92.7332,
        "MacaulayDuration": 6.39761,
        "NPV": 931775,
        "BPS": 0.0638166,
        "Convexity": 44.8056,
        "ModifiedDuration": 6.3976,
        "AccruedAmount": 0.464088,
        "Flows": [
            {
                "Rate": 0.03,
                "Type": "PastInterest",
                "AccrualStartDate": "2007-11-19",
                "AccrualEndDate": "2008-05-19",
                "Amount": 15000,
                "FixingDate": "2007-11-15"
            },
            ...
            {
                "Rate": 0.058337,
                "Type": "Interest",
                "AccrualStartDate": "2016-11-17",
                "Price": 20592.2,
                "AccrualEndDate": "2017-05-17",
                "Discount": 0.705974,
                "Amount": 29168.5,
                "FixingDate": "2016-11-15"
            },
            {
                "Amount": 900000,
                "Discount": 0.705974,
                "Date": "",
                "Price": 635376,
                "Type": "Notional"
            }
        ]
    },
    "response": "ok"
}


| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "NPV"              | NPV Value         |               |               |                    |
| ------------------ | ----------------- | ------------- | ------------- | ------------------ |
| "Yield"            | Yield Value       |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "DirtyPrice"       | Dirty Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "CleanPrice"       | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "AccruedAmount"    | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "AccruedDays"      | Clean Price Value |               |               |                    |
| ------------------ | ------------------| ------------- | ------------- | ------------------ |
| "BPS"              | Clean Price Value |               |               |                    |
| ------------------ | ----------------- | ------------- | ------------- | ------------------ |
| "Convexity"        | Convexity value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "ModifiedDuration" | Mod durat value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
| "MacaulayDuration" | Mac durat value   |               |               |                    |
| ------------------ | ------------------| --------------| ------------- | ------------------ |
...
| -------------- | ----------- | ------- | ------------- | -------------------- | ------------------- | 
| "PastInterest" | Fixind date | Rate    | Amount        | Accrual start date   | Accrual end date    |
| -------------- | ----------- | ------- | --------------| ---------------------| ------------------- |
...

| -------------- | ----------- | ------- | ------------- | -------------------- | ------------------- | -------------- | ----------------- |
| "PastInterest" | Fixind date | Rate    | Amount        | Accrual start date   | Accrual end date    | Discount rate  | Discounted amount |
| -------------- | ----------- | ------- | --------------| ---------------------| ------------------- | -------------- | ----------------- |

...

| -------------- | ----------- | ------- | ------------- | -------------------- | ------------------- | -------------- | ----------------- |
| "Notional"     |             |         | Amount        |                      |                     | Discount rate  | Discounted amount |
| -------------- | ----------- | --------| --------------| ---------------------| ------------------- | -------------- | ----------------- |



Endpoint to price floating rate bond

HTTP Request

POST https://api.quantra.io/priceFloatingRateBond

Query Parameters

Parameter Description
Pricing Pricing options.
FloatingRateBond Floating rate bond to be priced.
Curves.DiscountingTermStructure Discounting term structure.
Curves.ForecastingTermStructure Forecasting term structure.

Returns

Returns an object with the calculations and the list of flows. PastInterest flows are the ones already settled, Interest flows have discounting information. Rate contains fixed rate for PastInterest and forward rate for Interest flows.

Vanilla Interest Rate Swap Pricing


{
   "Pricing":{
      "AsOfDate":"2010/02/05"
   },
   "VanillaInterestRateSwap":{
      "Notional":1000000,
      "SwapType":"Payer",
      "FixedLeg":{
          "DayCounter":"Actual360",
          "Rate":0.13,
          "Schedule":{
              "Calendar":"UnitedStatesGovernmentBond",
              "EffectiveDate":"2010/02/17",
              "TerminationDate":"2017/05/17",
              "Frequency":"Semiannual",
              "Convention":"ModifiedFollowing",
              "TerminationDateConvention":"ModifiedFollowing",
              "DateGenerationRule":"Backward",
              "EndOfMonth":false
          } 
      },
      "FloatingLeg":{
          "DayCounter":"Actual365Fixed",
          "Spread":0,
          "Index":{
              "SettlementDays":2,
              "Calendar":"Australia",
              "Convention":"HalfMonthModifiedFollowing",
              "EndOfMonth":true,
              "DayCounter":"Actual365Fixed"
          },
          "Schedule":{
              "Calendar":"UnitedStatesGovernmentBond",
              "EffectiveDate":"2010/02/17",
              "TerminationDate":"2017/05/17",
              "Frequency":"Semiannual",
              "Convention":"ModifiedFollowing",
              "TerminationDateConvention":"ModifiedFollowing",
              "DateGenerationRule":"Backward",
              "EndOfMonth":false
          }
      }
   },
   "Curves":{
    "DiscountingTermStructure":{
      "TermStructure":{
          "DayCounter":"Actual360",
            "Compounding":"Compounded",
            "FwdCurvePeriodTimeUnit":"Months",
            "FwdCurvePeriodNumbers":2,
            "Interpolator":"Linear"
        },
        "Points":[
        {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
        },
        ...
        {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M"
        }
      ]
     },
    "ForecastingTermStructure":{
        "TermStructure":{
           "DayCounter":"Actual360",
           "Compounding":"Compounded",
           "FwdCurvePeriodTimeUnit":"Months",
           "FwdCurvePeriodNumber":2,
           "Interpolator":"Linear"
        },
        "Points":[
           {
              "type":"Deposit",
              "Rate":0.0372,
              "TenorTimeUnit":"Months",
              "TenorNumber":1,
              "FixingDays":2,
              "Calendar":"TARGET",
              "BusinessDayConvention":"ModifiedFollowing",
              "DayCounter":"Actual360"
           },
           ...
           {
              "type":"Swap",
              "Rate":0.0398,
              "TenorTimeUnit":"Years",
              "TenorNumber":3,
              "Calendar":"TARGET",
              "SwFixedLegConvention":"Unadjusted",
              "SwFixedLegDayCounter":"Thirty360",
              "SwFixedLegFrequency":"Annual",
              "SwFloatingLegIndex":"Euribor6M"
           }
        ]
     }  
  }
}


function PRICEVANILLASWAP(discountingDepositPoints, //discounting curve
                          discountingFRAPoints,     //discounting curve
                          discountingFuturePoints,  //discounting curve
                          discountingSwapPoints,    //discounting curve
                          discountingCompounding,   //discounting curve
                          discountingDayCounter,    //discounting curve
                          discountingInterpolator,  //discounting curve
                          fwdDepositPoints,         //fwd curve
                          fwdFRAPoints,             //fwd curve
                          fwdFuturePoints,          //fwd curve
                          fwdSwapPoints,            //fwd curve
                          fwdCompounding,           //fwd curve
                          fwdDayCounter,            //fwd curve
                          fwdInterpolator,          //fwd curve
                          swapStartDate,            //swap
                          swapLenghtInYears,        //swap
                          swapNotional,             //swap
                          swapCalendar,             //swap
                          swapType,                 //swap
                          fixedLegFrequency,        //fixed leg
                          fixedLegConvention,       //fixed leg
                          fixedLegDayCounter,       //fixed leg
                          fixedLegRate,             //fixed leg
                          floatingLegFrequency,     //floating leg
                          floatingLegConvention,    //floating leg
                          floatingLegDayCounter,    //floating leg
                          floatingLegSpread,        //floating leg
                          floatingLegIndexSettlementDays,      //floating leg index
                          floatingLegIndexCalendar,            //floating leg index
                          floatingLegIndexConvention,          //floating leg index
                          floatingLegIndexEndOfMonth,          //floating leg index
                          floatingLegIndexDayCounter,          //floating leg index
                          pricingAsOfDate           //pricing
                         )

The above command returns:

{  
   "message":{  
      "floatingFlows":[  
         {  
            "price":1.96516e+06,
            "fixing":0.0349768,
            "discount":0.965693,
            "accrualStartDate":"2010-02-10",
            "amount":2.03498e+06,
            "accrualEndDate":"2011-02-10",
            "date":"2011-02-10"
         },
         {  
            "price":1.89481e+06,
            "fixing":0.0393704,
            "discount":0.929114,
            "accrualStartDate":"2011-02-10",
            "amount":2.03937e+06,
            "accrualEndDate":"2012-02-10",
            "date":"2012-02-10"
         }
      ],
      "fixedFlows":[  
         {  
            "price":218812,
            "discount":0.993344,
            "accrualStartDate":"2010-02-10",
            "amount":220278,
            "accrualEndDate":"2010-04-12",
            "date":"2010-04-12"
         },
         {  
            "price":210437,
            "discount":0.987711,
            "accrualStartDate":"2010-04-12",
            "amount":213056,
            "accrualEndDate":"2010-06-10",
            "date":"2010-06-10"
         },
         {  
            "price":216325,
            "discount":0.982055,
            "accrualStartDate":"2010-06-10",
            "amount":220278,
            "accrualEndDate":"2010-08-10",
            "date":"2010-08-10"
         },
         {  
            "price":222129,
            "discount":0.976392,
            "accrualStartDate":"2010-08-10",
            "amount":227500,
            "accrualEndDate":"2010-10-12",
            "date":"2010-10-12"
         },
         {  
            "price":206909,
            "discount":0.971152,
            "accrualStartDate":"2010-10-12",
            "amount":213056,
            "accrualEndDate":"2010-12-10",
            "date":"2010-12-10"
         },
         {  
            "price":216208,
            "discount":0.965693,
            "accrualStartDate":"2010-12-10",
            "amount":223889,
            "accrualEndDate":"2011-02-10",
            "date":"2011-02-10"
         },
         {  
            "price":207931,
            "discount":0.959682,
            "accrualStartDate":"2011-02-10",
            "amount":216667,
            "accrualEndDate":"2011-04-11",
            "date":"2011-04-11"
         },
         {  
            "price":206629,
            "discount":0.95367,
            "accrualStartDate":"2011-04-11",
            "amount":216667,
            "accrualEndDate":"2011-06-10",
            "date":"2011-06-10"
         },
         {  
            "price":208726,
            "discount":0.947559,
            "accrualStartDate":"2011-06-10",
            "amount":220278,
            "accrualEndDate":"2011-08-10",
            "date":"2011-08-10"
         },
         {  
            "price":210757,
            "discount":0.941347,
            "accrualStartDate":"2011-08-10",
            "amount":223889,
            "accrualEndDate":"2011-10-11",
            "date":"2011-10-11"
         },
         {  
            "price":209366,
            "discount":0.935135,
            "accrualStartDate":"2011-10-11",
            "amount":223889,
            "accrualEndDate":"2011-12-12",
            "date":"2011-12-12"
         },
         {  
            "price":201308,
            "discount":0.929114,
            "accrualStartDate":"2011-12-12",
            "amount":216667,
            "accrualEndDate":"2012-02-10",
            "date":"2012-02-10"
         }
      ],
      "FairRate":1.97905,
      "FairSpread":1.30102,
      "NPV":1.32443e+06
   },
   "response":"ok"
}

| ------------- | ------------------| --------------| ------------- | ------------------ | ----------- | ---------------- | ---- |
| "NPV"         | NPV Value         |               |               |                    |             |                  |      |   
| ------------- | ----------------- | ------------- | ------------- | ------------------ | ----------- | ---------------- | ---- |
| "FairRate"    | Fair Rate Value   |               |               |                    |             |                  |      |
| ------------- | ------------------| ------------- | ------------- | ------------------ | ----------- | ---------------- | ---- |
| "FairSpread"  | Fair Spread Value |               |               |                    |             |                  |      |
| ------------- | ----------------- | ------------- | ------------- | ------------------ | ----------- | ---------------- | ---- |
| "Floating"    | Discounted flow   | Fixing rate   | Discount rate | Accrual start date | Flow amount | Accrual end date | Date |
| ------------- | ------------------| --------------| ------------- | ------------------ | ----------- | ---------------- | ---- |

...

| ------------- | ------------------| --------------| ------------- | ------------------ | ----------- | ---------------- | ---- |
| "Fixed"       | Discounted flow   |               | Discount rate | Accrual start date | Flow amount | Accrual end date | Date |
| ------------- | ------------------| --------------| ------------- | ------------------ | ----------- | ---------------- | ---- |

...

| ------------- | ------------------| --------------| ------------- | ------------------ | ----------- | ---------------- | ---- |

Endpoint to price vanilla interest rate swaps

HTTP Request

POST https://api.quantra.io/priceVanillaSwap

Query Parameters

Parameter Description
Pricing Pricing options.
VanillaInterestRateSwap Vanilla Interest Rate Swap to be priced.
Curves.DiscountingTermStructure Discounting term structure.
Curves.ForecastingTermStructure Forecasting term structure.

Zero Coupon Bond Pricing


{
   "Pricing":{
      "AsOfDate":"2008/09/18"
   },
   "Bond":{
      "MaturityDate":"2013/08/15",
      "IssueDate":"2003/08/15",
      "SettlementDays":2,
      "FaceAmount":10000,
      "Redemption":100,
      "Calendar":"UnitedStates",
      "PaymentConvention":"Following",
      "Yield":{
         "DayCounter":"Actual360",
         "Compounding":"Compounded",
         "Frequency":"Annual"
      }
   },
   "DiscountingTermStructure":{
      "TermStructure":{
         "DayCounter":"Actual360",
         "Compounding":"Compounded",
         "FwdCurvePeriodTimeUnit":"Months",
         "FwdCurvePeriodNumber":2,
         "Interpolator":"Linear",
         "AsOfDate":"2017/05/23"
      },
      "Points":[
         {
            "type":"Deposit",
            "Rate":0.0372,
            "TenorTimeUnit":"Months",
            "TenorNumber":1,
            "FixingDays":2,
            "Calendar":"TARGET",
            "BusinessDayConvention":"ModifiedFollowing",
            "DayCounter":"Actual360"
         },
         ...
         {
            "type":"Swap",
            "Rate":0.0398,
            "TenorTimeUnit":"Years",
            "TenorNumber":3,
            "Calendar":"TARGET",
            "SwFixedLegConvention":"Unadjusted",
            "SwFixedLegDayCounter":"Thirty360",
            "SwFixedLegFrequency":"Annual",
            "SwFloatingLegIndex":"Euribor6M"
         }
      ]
   }
}


function PRICEZEROCOUPONBOND(discountingDepositPoints, //discounting curve
                          discountingFRAPoints,     //discounting curve
                          discountingFuturePoints,  //discounting curve
                          discountingSwapPoints,    //discounting curve
                          discountingBondPoints,    //discounting curve
                          discountingCompounding,   //discounting curve
                          discountingDayCounter,    //discounting curve
                          discountingInterpolator,  //discounting curve
                          faceAmount,               //bond
                          redemption,               //bond
                          issueDate,                //bond
                          maturityDate,             //bond
                          settlementDays,           //bond
                          calendar,                 //bond
                          convention,               //bond
                          yieldCounter,             //yield
                          yieldCompounding,         //yield
                          yieldFrequency,           //yield
                          pricingAsOfDate           //pricing
                         )

The above command returns:

{
  "message": {
    "Flows": [
      {
        "price": 7619.4,
        "discount": 0.76194,
        "date": "2019-08-15",
        "amount": 10000
      }
    ],
    "Yield": 0.0456711,
    "DirtyPrice": 76.2102,
    "CleanPrice": 76.2102,
    "NPV": 7619.4
  },
  "response": "ok"
}

| ------------- | ------------------| --------------| ------------- | ------------------ |
| "NPV"         | NPV Value         |               |               |                    |
| ------------- | ----------------- | ------------- | ------------- | ------------------ |
| "Yield"       | Yield Value       |               |               |                    |
| ------------- | ------------------| ------------- | ------------- | ------------------ |
| "DirtyPrice"  | Dirty Price Value |               |               |                    |
| ------------- | ------------------| ------------- | ------------- | ------------------ |
| "CleanPrice"  | Clean Price Value |               |               |                    |
| ------------- | ----------------- | ------------- | ------------- | ------------------ |
| "Flow"        | Discounted flow   | Discount rate | Date          | Amount             |
| ------------- | ------------------| --------------| ------------- | ------------------ |


Endpoint to price zero coupon bond

HTTP Request

POST https://api.quantra.io/priceZeroCouponBond

Query Parameters

Parameter Description
Pricing Pricing options.
ZeroCouponBond Floating rate bond to be priced.
Curves.DiscountingTermStructure Discounting term structure.

Errors

Not much to say about errors. API will return basic request errors for bad requests or will respond with a 200 response ko and specific errors inside message. These errors could be quantlib functional messages, missing json fields or malformed json messages.

{
    "message": {
        "VanillaInterestRateSwapErrors": [
            "FloatingLeg Index SettlementDays: Not found ",
            "FloatingLeg Index Calendar: Not found ",
            "FloatingLeg Index Convention: Not found ",
            "FloatingLeg Index EndOfMonth: Not found ",
            "FloatingLeg Index DayCounter: Not found "
        ]
    },
    "response": "ko"
}

Error Code Meaning
400 Bad Request
404 Not Found