Introduction

An easy way to test the API is with Google Sheets add-ons which are scripts implemented with Javascript. Some functionalities of the API can be used with already implemented scripts. The examples contains links to google spreadhseets using the functions.

How to use quantra Google Sheeets add-on

There are two options to use google sheets add-on:

Install the add-on
This is the easiest way to start using it. Just open a google spreadsheet, click the "Add-ons" menu, then click "Get add-ons..." and search for quantrasheets. Install it and you are done.
From sources
If you don't feel comfortable installing an add-on or you just want to see and modify the code it is possible to use the google sheets functions from the source code that is available at github. To do so, open a spreadsheet, select Tools -> Script editor and copy paste the code from github. Functions are in separate files to make it easier to find them.

Google sheets functions

Enumerations

Function name Used at
GETECALENDARS() Enumerations and dates
GETEFREQUENCIES() Enumerations and dates
GETTIMEUNITS() Enumerations and dates
GETDAYCONVENTIONS() Enumerations and dates
GETDAYCOUNTERS() Enumerations and dates
GETPOINTTYPES() Enumerations and dates
GETIBORS() Enumerations and dates
GETCOMPOUNDINGS() Enumerations and dates
GETINTERPOLATORS() Enumerations and dates
GETSWAPTYPES() Enumerations and dates
GETDATEGENERATIONRULES() Enumerations and dates
GETOVERNIGHTINDEX() Enumerations and dates
GETBOOTSTRAPTRAITS() Enumerations and dates

Dates and calendars

Function name Used at
ISLEAP(year) Enumerations and dates
ENDOFMONTH(date) Enumerations and dates
ISENDOFMONTH(date) Enumerations and dates
NTHWEEKDAY(nth, weekday, month, year) Enumerations and dates
NEXTWEEKDAY(date, weekday) Enumerations and dates
ISBUSINESSDAY(date, calendar) Enumerations and dates
ISHOLIDAY(date, calendar) Enumerations and dates
HOLIDAYLIST(from, to, calendar, includeWeekends) Enumerations and dates
ADJUSTDATE(date, calendar, convention) Enumerations and dates
ADVANCEDATE(date, calendar, convention, number, timeUnit, endOfMonth) Enumerations and dates
BUSINESSDAYSBETWEEN(from, to, calendar, includeFirst, includeLast) Enumerations and dates
ISIMMDATE(date) Enumerations and dates
NEXTIMMDATE(date) Enumerations and dates
YEARFRACTION(startDate, endDate, dayCounter) Enumerations and dates

Curves

Function name Used at
GENERATEZEROCURVE(depositPoints, FRAPoints, futurePoints, swapPoints, bondPoints, OISPoints, DatedOISPoints, jumps, bootstrapTrait, compounding, dayCounter, interpolator, asOfDate) Curve functions
GENERATEFWDCURVE(depositPoints, FRAPoints, futurePoints, swapPoints, bondPoints, OISPoints, DatedOISPoints, jumps, bootstrapTrait, compounding, dayCounter, fwdCurvePeriodTimeUnit, fwdCurvePeriodNumber, fwdCurveCalendar, fwdDayCounter, fwdCompounding, interpolator, asOfDate) Curve functions
FWDCURVESECTION(depositPoints, FRAPoints, futurePoints, swapPoints, bondPoints, OISPoints, DatedOISPoints,jumps, bootstrapTrait, compounding, dayCounter, fwdCurveStartDate, fwdCurveEndDate, fwdCurveCalendar, fwdDayCounter, fwdCompounding, interpolator, asOfDate) Curve functions
CURVENODES(depositPoints, FRAPoints, futurePoints, swapPoints, bondPoints, OISPoints, DatedOISPoints, bootstrapTrait, compounding, dayCounter, interpolator, asOfDate) Curve functions
GENERATEDISCOUNTCURVE(depositPoints, FRAPoints, futurePoints, swapPoints, bondPoints, OISPoints, DatedOISPoints, jumps,bootstrapTrait, compounding, dayCounter, interpolator, asOfDate) Curve functions
INTERPOLATEDFWDCURVESECTION(points, compounding, dayCounter, fwdStartDate, fwdEndDate, fwdCurveCalendar, fwdDayCounter, fwdCompounding, interpolator, asOfDate) End of year jump calculation
INTERPOLATEDFWDCURVE(points, compounding, dayCounter, fwdCurvePeriodTimeUnit, fwdCurvePeriodNumber, fwdCurveCalendar, fwdDayCounter, fwdCompounding, interpolator, asOfDate) End of year jump calculation

Pricing

Function name Used at
PRICEVANILLASWAP(PRICEVANILLASWAP(discountingDepositPoints, discountingFRAPoints, discountingFuturePoints, discountingSwapPoints, discountingBondPoints, discountingOIS, discountingDatedOIS, discountingJumps, discountingDayCounter, discountingInterpolator, discountingBootstrapTrait, fwdDepositPoints, fwdFRAPoints, fwdFuturePoints, fwdSwapPoints, fwdBondPoints, fwdOIS, fwdDatedOIS, fwdJumps, fwdDayCounter, fwdInterpolator, fwdBootstrapTrait, swapStartDate, swapLenghtInYears, swapNotional, swapCalendar, swapType, fixedLegFrequency, fixedLegConvention, fixedLegTerminationConvention, fixedLegDayCounter, fixedLegRate, fixedLegDateGenerationRule, fixedLegEndOfMonth, floatingLegFrequency, floatingLegConvention, floatingLegTerminationConvention, floatingLegDayCounter, floatingLegSpread, floatingDateGenerationRule, floatingEndOfMonth, floatingLegIndexSettlementDays, floatingLegIndexCalendar, floatingLegIndexConvention, floatingLegIndexEndOfMonth, floatingLegIndexDayCounter, indexFixings, pricingAsOfDate) Vanilla swap pricing