logo_thi

Powerful and accurate to use, simple to implement.

Why use QuantTools modules ?

When there isn’t an off-the-shelf vendor system available to run your business, and your development requirements outgrow the ubiquitous spreadsheet, designing an in-house proprietary system may be the answer. However, creating a system can be a formidable challenge requiring careful management of resources, quality and time. Prepackaged components can greatly reduce the risks and costs associated with such a project.

Extend your system’s analytic capabilities

Systems are only as good as the quality of the information they provide. Truly useful information is a result of good, reliable data processed by accurate models. QuantTools provides a wide set of market analytics that enhance your system’s inference capabilities, whether to suggest fair market value or to assess risk.

Save valuable time and development costs

Deriving formulas and developing software from scratch is an expensive and intricate process. Complex calculations can demand a good deal of derivation, design, programming, debugging and testing time. When you purchase QuantTools, you get the benefits of an in-house team of quants at a fraction of the cost.

Improve system accuracy and consistency

Callable library modules guarantee consistent calculation across different applications and reports. Each QuantTool module is carefully designed and rigorously tested. The same calculation procedure is invoked each time the function is called, regardless of where it is called from. THI maintains the same functions across all platforms (Unix or Windows) and applications (C++, VB, Java JNI, add-ins), guaranteeing the same results throughout your organization.

Designed for you and your system

QuantTools modules are designed to optimize your system performance with minimum demand on your system resources. Each single module contains numerous possibilities using the optional parameters. The optional parameters provide a wide range of flexibility, accommodating most of your specific needs. On the other hand, the built-in defaults accommodate the latest market conventions, saving you valuable development time.

Highlights

  • Over 450 easy-to-use functions with optional parameter support
  • Global bond coverage
  • Money market instruments
  • Options
  • Exotic options
  • Mortgage-backed securities
  • Generalized curve builder
  • Swaps
  • Interest rate options
  • Credit derivatives
  • Foreign exchange
  • Generalized cash flow analysis
  • Extensive date and business day calculations with holiday schedules
  • Callable from C++, C, Java (using JNI interface) and Visual Basic
  • Compliant with industry standards such as SIA, Bond Market Association (PSA), ISMA, ISDA, FASB and other de facto conventions
  • Available on all major operating systems
  • Extensive printed and on-line documentation

QuantTools modules

Bond

Highlights

Extensive analytical coverage of global fixed income markets including sovereign and corporate bonds, discount securities, interest-at-maturity securities, Brady bonds, and futures on bonds, notes and bills. The analytics include accrued interest, average life, cash flow generation, carry, convexity, duration, futures conversion factors, forward price, holding period return, implied future price, implied repo rate, net basis, price, yield, yield with an external reinvestment rate, value of a basis point, value of a 32nd and more. Where applicable, the functions accommodate stepped coupons, ex-dividend treatment, PIK bonds, floating rates, various calendars and tax analysis.

Functions

Bill Functions

  • THIblbeyBond equivalent yield
  • THIbldiscDollar discount
  • THIbldiscDiscount rate
  • THIblparBill parity or implied forward rate
  • THIblprDollar price
  • THIblrepoBreak-even repo rate (tail calculation)
  • THIblstripBreak-even discount rate on long bill (strip calculation)
  • THIbltailBreak-even forward discount rate for bill tail
  • THIblval01Value of a basis point
  • THIblyldSimple interest yield
  • THIblyldtodiscDiscount rate given yield
  • THIblyldtoprDollar price given yield
  • THIbillverReturn bill module version information

CD Functions

  • THIcdai Accrued interest
  • THIcdbey Bond equivalent yield
  • THIcdpr/
    THIcdpr1
    Quoted dollar price
  • THIcdrepo Break-even repo rate (tail calculation)
  • THIcdtail Break-even sale yield to maturity for tail
  • THIcdval01 Value of a basis point
  • THIcdybm Holding period yield
  • THIcdyld/
    THIcdyld1
    Yield to maturity
  • THIcdver Return CD module version information

Bond Functions

  • THIbai/
    THIbai1
    Accrued interest
  • THIbal Average life of a sinking fund bond
  • THIbcamt Coupon payment size
  • THIbcarry Carry
  • THIbconv Convexity
  • THIbcpn Coupon or quasi-coupon date
  • THIbcshflw Bond cash flow
  • THIbcshflw_free Free memory allocated by the THIbcshflw function
  • THIbcustom Specify a custom bond type
  • THIbdur Duration
  • THIbel Equivalent life
  • THIbexdiv Ex-dividend date for a bond
  • THIbfact/
    THIbfact1
    Bond + note futures price conversion factor
  • THIbfwd Forward price of a bond
  • THIbhyld Bond holding period return
  • THIbifutp Bond implied future price
  • THIbirepo Bond implied repo rate
  • THIbnbasis Net basis
  • THIbncpn Remaining number of coupon payments
  • THIbpr Price given yield-to-maturity
  • THIbradypr Price of a Brady bond
  • THIbradyyld Duration of a Brady bond
  • THIbradydur Yield of a Brady bond
  • THIbryld Yield-to-maturity with specified reinvestment rate
  • THIbtype Characteristics of bond types
  • THIbvalbp Value of a basis point
  • THIbval32 Value of a 32nd
  • THIbyld Yield-to-maturity
  • THIbyldalYield-to-average life
  • THIbyworstYield-to-worst
  • THIbondverReturn bond module version information

Perpetual Bond Functions

  • THIpbai Accrued interest
  • THIpbcamt Coupon payment size
  • THIpbcarry Carry
  • THIpbconv Convexity
  • THIpbcpn Coupon or quasi-coupon date
  • THIpbdur Duration
  • THIfwd Forward price of a bond
  • THIpbirepo Perpetual bond implied repo rate
  • THIpbpr Price given yield
  • THIpbvalbp Value of a basis point
  • THIpbval32 Value of a 32nd
  • THIpbyld Yield given price

Floating Rate Note Functions

  • THIfrnaiAccrued interest
  • THIfrncamtCoupon payment size
  • THIfrnconvConvexity
  • THIfrncshflwFloating rate note cash flow
  • THIfrncshflw_freeFree memory allocated by the THIfrncshflw function
  • THIfrndmDiscounted Margin
  • THIfrndurDuration
  • THIfrnprFRN price given yield
  • THIfrnsmSimple margin
  • THIfrnvalbpValue of a basis point
  • THIfrnval32Value of a 32nd
  • THIfrnyldYield-to-maturity

Index-linked Gilt Functions

  • THIilgai Accrued interest for index-linked gilts
  • THIilgcshflw Anticipated cash flow for an index-linked gilt
  • THIilgcshflw_free Free memory allocated by THIilgcshflw
  • THIilgpr Price given yield-to-maturity
  • THIilgyld Real yield of an index-linked gilt

Payment in Kind (PIK) Bond Functions

  • THIpikaiPIK bond accrued interest
  • THIpikcshflwPIK bond cash flows
  • THIdurPIK bond duration
  • THIpikprPIK bond price given yield
  • THIpikval32Value of a 32nd
  • THIpikvalbpValue of a basis point
  • THIpikyldPIK bond yield-to-maturity
  • THIpikcshflow_freeFree memory allocated by THIipikcshflow

Options

Highlights

Pricing, sensitivity analysis (the Greeks), implied volatility and implied strike price analysis for the following option pricing models: binomial, Black, Black-Scholes, jump-diffusion, Garman-Kohlhagen, Barone-Adesi and Whaley, and Roll-Geske-Whaley. The Greek coverage includes delta, omega, phi, gamma, kappa, rho, theta and vega. In addition, there are a variety of functions for estimating volatility from market data, for example from a high-low-open-close time series. Where applicable, the functions accommodate American and European exercise, a holding cost independent of the risk free rate, multiple dividend treatments (continuous yield, constant yield, and actual cash dividends), and holiday adjustments for American options with dividends.

Functions

Options Functions

  • THIbdopt Bond option pricing
  • THIbdimpv Implied volatility for bond options
  • THIbdis Implied strike price for bond options
  • THIbdsens Bond option price sensitivities
  • THIbinopt Binomial model option pricing
  • THIbinimpv Implied volatility for binomial model
  • THIbinis Implied strike price for binomial model
  • THIbinsens Binomial model sensitivities
  • THIblkopt Black option model pricing
  • THIblkimpv Implied volatility for Black model
  • THIblkis Implied strike price for Black model
  • THIblksens Black option model sensitivities
  • THIblkedopt Black Eurodollar futures option pricing
  • THIblkedimpv Implied volatility for Black Eurodollar model
  • THIblkedis Implied strike price for Black Eurodollar model
  • THIblkedsens Black Eurodollar futures option sensitivities
  • THIbsopt Black-Scholes pricing
  • THIbsimpv Implied volatility for the Black-Sholes model
  • THIbsis Implied strike price for the Black-Sholes model
  • THIbssens Black-Scholes sensitivities
  • THIgkopt,
    THIgkopt4
    Garman-Kohlhagen option pricing model
  • THIgkimpv,
    THIgkimpv4
    Implied volatility for Garman-Kohlhagen model
  • THIgkis,
    THIgkis4
    Implied strike price for Garman-Kohlhagen model
  • THIgksens,
    THIgksens4
    Garman-Kohlhagen model sensitivities
  • THIjumpopt Jump-diffusion option pricing
  • THIjumpimpv Implied volatility for jump-diffusion model
  • THIjumpis Implied strike price for jump-diffusion model
  • THIjumpsens Jump-diffusion sensitivities
  • THIrgwopt Roll-Geske-Whaley price of an American call
  • THIrgwimpv Implied volatility for Roll-Geske-Whaley model
  • THIrgwis Implied strike price for Roll-GeskeWhaley model
  • THIrgwsens Roll-Geske-Whaley sensitivities
  • THIwarrant Warrant pricing model
  • THIwarrantsens Warrant pricing model sensitivities
  • THIwhaley Whaley option pricing model
  • THIwhaleyimpv Implied volatility for Whaley model
  • THIwhaleyis Implied strike price for Whaley model
  • THIwhaleysens Whaley model sensitivities
  • THIvoltcc Close-to-close volatility estimation
  • THIvolthl High-low volatility estimation
  • THIvolthlc High-low-close volatility estimation
  • THIvolthloc High-low-open-close volatility estimation
  • THIvoltexp Exponentially weighted volatility computation
  • THIoptionver Return options module version information

Exotics

Highlights

Functions cover pricing and sensitivity analysis for all major exotic option types. Where applicable, the Greek coverage includes delta, omega, phi, gamma, theta, kappa, vega and rho, with respect to each underlying. Many models have several implementations such as analytic, Monte Carlo simulation and quanto variants. The model coverage includes Asian options (average strike and price), lookbacks, quantos, contingent premiums, barriers (single and double), binaries (cash, asset, gap, supershare), binary-barriers (one-touch cash or asset), baskets, exchange options, spread options, compound options, choosers, forward starts, Bermudans, cliquet and swing options

Functions

Asian/Lookback Options

  • THIavgprice,
    THIavgpriceq
    Price of an average price Asian option
  • THIavgpricesens,
    THIavgpriceqsens
    Average price Asian option sensitivities
  • THIavgstrike,
    THIavgstrikeq,
    THIavgstrike2
    Price of an average strike Asian option
  • THIavgstrikesens,
    THIavgstrikeqsens,
    THIavgstrike2sens
    Average strike Asian option sensitivities
  • THIlookback,
    THIlookackq
    Price of a European lookback option
  • THIlookbacksens,
    THIlookbackqsens
    Lookback option sensitivities
  • THIquantoPrice of a quanto (fixed exchange rate) option
  • THIquantosensQuanto (fixed exchange rate) options sensitivities
  • THIcntgntPremium for a contingent premium option
  • THIcntgntprPrice for a (pre-existing) contingent premium option
  • THIcntgntsens, THIcntgntsens1Contingent premium option sensitivities
  • THIasianverReturn Asian/Lookback module version information

Barrier/Binary Options

  • THIdowninPrice of a down-and-in barrier option
  • THIdowninsensDown-and-in barrier option sensitivities
  • THIdownoutPrice of a down-and-in barrier option
  • THIdownoutsensDown-and-out barrier option sensitivities
  • THIupinPrice of an up-and-in barrier option
  • THIupinsensUp-and-in barrier option sensitivities
  • THIupoutPrice of an up-and-out barrier option
  • THIupoutsensUp-and-out barrier option sensitivities
  • THIconthPrice of a cash-or-nothing binary option
  • THIconthsensCash-or-nothing binary option sensitivities
  • THIaonthPrice of an asset-or-nothing binary option
  • THIaonthsensAsset-or-nothing binary option sensitivities
  • THIgapPrice of a gap option
  • THIgapsensGap option sensitivities
  • THIsuperPrice of a supershare
  • THIsupersensSupershare sensitivities
  • THIotchitPrice of a one-touch cash-at-hit option
  • THIotchitsensOne-touch cash-at-hit option sensitivities
  • THIotahitPrice of a one-touch asset-at-hit option
  • THIotahitsensOne-touch asset-at-hit option sensitivities
  • THIotcexpPrice of a one-touch cash-at-expiration option
  • THIotcexpsensOne-touch cash-at-expiration option sensitivities
  • THIotaexpPrice of a one-touch asset-at-expiration option
  • THIotaexpsensOne-touch asset-at-expiration option sensitivities
  • THIdblkickinPrice of a double barrier kick-in option
  • THIdblkickinsensSensitivities for a double barrier kick-in option
  • THIdblknockoutPrice of a double barrier knock-out option
  • THIdblkosensSensitivities for a double barrier knock-out option
  • THIdblnotouchPrice of a double barrier no-touch option
  • THIdblnotchsensSensitivities for a double barrier no-touch option
  • THIdblotchitPrice of a double barrier one-touch cash-at-hit option
  • THIdblotchitsens Sensitivities for a double barrier one-touch cash-at-hit option
  • THIdblotcexp Price of a double barrier one-touch cash-at-expiration option
  • THIdblotcexpsens Sensitivities for a double barrier one-touch cash-at-expiration option
  • THIdblotahit Price of a double-barrier one-touch asset at hit option
  • THIdblotahitsens Sensitivities for a double-barrier one-touch asset at hit option
  • THIdblotaexp Price of a double-barrier one-touch asset at expiration option
  • THIdblotaexpsens Sensitivities for a double-barrier one-touch asset at expiration option
  • THIaonupin Price of an asset-or-nothing up-and-in digital barrier option
  • THIaonupinsens Sensitivities for asset-or-nothing up-and-in options
  • THIaonupout Price of an asset-or-nothing up-and-out digital barrier option
  • THIaonupoutsens Sensitivities for asset-or-nothing up-and-out options
  • THIaondwnin Price of an asset-or-nothing down-and-in digital barrier option
  • THIaondwninsens Sensitivities for asset-or-nothing down-and-in options
  • THIaonupin Price of an asset-or-nothing up-and-in digital barrier option
  • THIaonupinsens Sensitivities for asset-or-nothing up-and-in options
  • THIconupinPrice of a cash-or-nothing up-and-in digital barrier option
  • THIconupinsensSensitivities for cash-or-nothing up-and-in options
  • THIconupoutPrice of a cash-or-nothing up-and-out digital barrier option
  • THIconupoutsensSensitivities for cash-or-nothing up-and-out options
  • THIcondwninPrice of a cash-or-nothing down-and-in digital barrier option
  • THIcondwninsensSensitivities for cash-or-nothing down-and-in options
  • THIconupinPrice of a cash-or-nothing up-and-in digital barrier option
  • THIconupinsensSensitivities for cash-or-nothing up-and-in options
  • THIbinbarrverReturn Barrier/Binary module version information

Multiple Asset Options

  • THIbasketPrice of a basket option
  • THIbasketsensBasket option sensitivities
  • THIbasketoftwoPrice of a two-item basket option
  • THIbasketof2sensTwo-item basket option sensitivities
  • THIgbasketPrice of a generalized basket option
  • THIgbasketsensGeneralized basket option sensitivities
  • THIcorrexpExponentially weighted asset correlation
  • THIrmaxPrice of a maximum of two option
  • THIrmaxsensMaximum of two rainbow option sensitivities
  • THIrminPrice of a minimum of two option
  • THIrminsensMinimum of two rainbow option sensitivities
  • THIexchPrice of a European exchange option
  • THIexchsensEuropean exchange option sensitivities
  • THIbinexchPrice of an American exchange option
  • THIbinexchsensAmerican exchange option sensitivities
  • THIspreadPrice of a European spread option
  • THIspreadsensSpread option sensitivities
  • THIgap2Price of a correlation gap option
  • THIgap2sensCorrelation gap option sensitivities
  • THImassetverReturn Multiple Asset module version information

Multiple Exercise Options

  • THIcompoundPrice of a compound option
  • THIcompoundsensCompound option sensitivities
  • THIchooserPrice of a chooser option
  • THIchoosersensChooser option sensitivities
  • THIchoosercPrice of a complex chooser option
  • THIchoosercsensComplex chooser option sensitivities
  • THIcliquetCliquet option price
  • THIcliquetsensCliquet option sensitivities
  • THIfstartPrice of a forward start option
  • THIfstartsensForward start option sensitivities
  • THIbermudanPrice of a Bermudan option
  • THIbermudansensBermudan option sensitivities
  • THIgenbinoptGeneral binomial pricing model
  • THIgenbinsensSensitivities for general binomial model
  • THIswing,
    THIswing1
    Price of a swing option
  • THIswingsens,
    THIswingsens1
    Swing option sensitivities
  • THIshoutPrice of a shout option
  • THIshoutsensShout option sensitivities
  • THImtimeverReturn Multiple Exercise module version information

Swap

Highlights

Tools manipulating yield curves and analyzing and structuring swaps. Functions support vanilla and complex swaps including roller coaster and amortizing swaps and allow an unlimited number of swap legs. Almost all parameters may be customized: payment, reset and accrual dates can be arbitrary. Multiple currencies and yield curves, independent rate tenors and swap frequencies and fixed, floating and floating arrears payments are all supported. Included are advanced features such as convexity correction and turn-of-year effects. Capable of constructing yield curves from combinations of spot rates, futures, par swap rates, par bond yields. Also prices bonds (including Bradys) off of yield curves.

Functions

Swap Functions

  • THIalloclegAllocate a THILEGSTRUCT structure
  • THIcopylegCopy a THILEGSTRUCT structure
  • THIfreelegFree a THILEGSTRUCT structure
  • THIcopyswapflowCopy a THISWAPCASHFLOW structure
  • THIfreeswapflowFree a THISWAPCASHFLOW structure
  • THIswapcustom,
    THIswapcustom_a
    Price a custom swap
  • THIswaptemplate,
    THIswaptemplo,
    THIswaptemplnp
    Produce a swap leg structure suitable for customizing
  • THIswapleg,
    THIswaplego
    Price a leg of a swap
  • THIsimpleswap,
    THIsimpleswapo
    Price a simple swap
  • THIfxswap,
    THIfxswapo
    Price a cross-currency swap
  • THIimpliedlegsImplied margin to give swap a specific PV
  • THIimpliedswapImplied margin to give swap a specific PV
  • THIimplsimpswap,
    THIimplsimpswapo
    Implied margin to give swap a PV of zero
  • THIimplfxswap,
    THIimplfxswapo
    Implied margin to give FX swap a PV of zero
  • THIswapverReturn Basic Swaps module version information

Curve Building and Manipulation Functions

  • THIdfcurveConstruct a discount factor curve
  • THIalloccurveAllocate memory for curves
  • THIcopycurveMake a copy of a curve
  • THIfreecurveDestroy a curve
  • THIcrvdirectPut user-specified curve data in THICURVE format
  • THIcrvfwdConvert to a forward rate curve
  • THIcrvspotConvert to a spot rate curve
  • THIcrvdfConvert to a discount factor curve
  • THIcrvgetdfObtain discount factor
  • THIcrvgetrateObtain rate from curve
  • THIcrvperiodCreate periodic discount factor curve
  • THIcrvinsertInsert dates into discount factor curve
  • THIcrvshiftShift term structure
  • THIcrvshiftwShift window in term structure
  • THIcrvpivotPivot the term structure
  • THIfrapricePrice of a forward rate agreement
  • THIbpr2Bond price given discount curve
  • THIbspreadSpread over yield curve
  • THIbcspreadCoupon spread over yield curve
  • THIbradypr2,
    THIbradypr2s
    Brady bond price off of yield curves
  • THIbradysprdSovereign spread of a Brady bond
  • THIfbradypr,
    THIbradypr2s
    Floating rate Brady bond price
  • THIfbradysprdSovereign spread of floating rate Brady bonds
  • THIcurveverReturn Curve Building & Manipulation module version information

Interest Rate

Highlights

Extensive pricing and sensitivity analysis of interest rate options, with comprehensive coverage of caplets, floorlets, caps, floors, options on bonds (including zeroes) and swaptions. Ho-Lee, Hull-White and Black models are all fully supported, including Bermudan swaptions and bond options. The Black-Derman-Toy model is supported as well.

Included are advanced features such as convexity correction and turn-of-year effects and supports the latest methods of interpolation. Capable of constructing yield curves from combinations of spot rates, futures, par swap rates, par bond yields.

Functions

Interest Rate Options

  • THIzerooptPrice of a zero-coupon bond option
  • THIzerosensSensitivities for a zero-coupon bond option
  • THIzeroimpvImplied volatility for a zero-coupon bond option
  • THIcapfloorletPrice of a caplet or floorlet
  • THIcapfloorletsensSensitivities for a caplet or floorlet
  • THIcapfloorletimpvImplied volatility for caplets or floorlets
  • THIcapfloorPrice of a cap or floor
  • THIcapfloorsensSensitivities for a cap or floor
  • THIcapfloorimpvImplied volatility for caps or floors
  • THIgcapfloorletPrice of a generalized caplet or floorlet
  • THIgcapfloorletsensSensitivities for a generalized caplet or floorlet
  • THIgcapfloorletimpvImplied volatility for generalized caplets or floorlets
  • THIgcapfloorPrice of a generalized cap or floor
  • THIgcapfloorsensSensitivities for a generalized cap or floor
  • THIgcapfloorimpvImplied volatility for generalized caps or floors
  • THIbdopt2Price of a European bond option
  • THIbdsens2Sensitivities for a European bond option
  • THIbdimpv2Implied volatility for European bond options
  • THIbdopt3Price of a European, Bermudan or American bond option
  • THIbdsens3Sensitivities for a bond option
  • THIbdimpv3Implied volatility of a bond option
  • THIswaptionPrice of a European swaption
  • THIswaptionsensSensitivities for European swaptions
  • THIswaptionimpvImplied volatility for a European swaption
  • THIswaptionhwPrice of a European or Bermudan swaption
  • THIswaptnsenshwSensitivities of a European or Bermudan swaption
  • THIswaptnimpvhwImplied volatility for a European or Bermudan swaption
  • THIswaptionfhwPrice of a European, Bermudan or American swaption on a forward starting swap
  • THIswaptnfsenshwSensitivities of a European, Bermudan or American swaption on a forward starting swap
  • THIswaptnfimpvhwImplied volatility for a European, Bermudan or American swaption on a forward starting swap
  • THIirconthPrice of a binary interest rate option
  • THIirconthsensSensitivities for a binary interest rate option
  • THIhwmcConstruct transformed curves for Monte Carlo
  • THIiroverReturn Interest Rate Options module version information
  • Black-Derman-Toy Model
  • THIfreebdtFree BDT tree memory
  • THIbuildbdtConstruct a BDT binomial tree
  • THIcalcbdtRecalculate a BDT binomial tree
  • THIcapivoltsConstructs the implied volatility term structure from a set of caps and/or floors
  • THIcapivolts_freeFree memory allocated by THIcapivolts
  • THIcapcalbdtCap calibration of the BDT binomial tree
  • THIzeroopt_tPrice of a zero-coupon bond option using the BDT model
  • THIcapfloorlet_tPrice of a caplet or floorlet using the BDT model
  • THIcapfloor_tPrice of a cap or floor using the BDT model
  • THIswaption_tPrice of a European or Bermudan swaption using the BDT model
  • THIswaptnf_tPrice of a European or Bermudan swaption on a forward starting swap using the BDT model

Curve Building and Manipulation Functions

  • THIdfcurve Construct a discount factor curve
  • THIalloccurve Allocate memory for curves
  • THIcopycurve Make a copy of a curve
  • THIfreecurve Destroy a curve
  • THIcrvdirect Put user-specified curve data in THICURVE format
  • THIcrvfwd Convert to a forward rate curve
  • THIcrvspot Convert to a spot rate curve
  • THIcrvdf Convert to a discount factor curve
  • THIcrvgetdf Obtain discount factor
  • THIcrvgetrate Obtain rate from curve
  • THIcrvperiod Create periodic discount factor curve
  • THIcrvinsert Insert dates into discount factor curve
  • THIcrvshift Shift term structure
  • THIcrvshiftw Shift window in term structure
  • THIcrvpivot Pivot the term structure
  • THIfraprice Price of a forward rate agreement
  • THIbpr2 Bond price given discount curve
  • THIbspread Spread over yield curve
  • THIbcspread Coupon spread over yield curve
  • THIbradypr2,
    THIbradypr2s
    Brady bond price off of yield curves
  • THIbradysprd Sovereign spread of a Brady bond
  • THIfbradypr,
    THIbradypr2s
    Floating rate Brady bond price
  • THIfbradysprd Sovereign spread of floating rate Brady bonds
  • THIcurvever Return Curve Building & Manipulation module version information

Mortgage-Backed Security

Highlights

This group of functions covers level payment, graduated payment and adjustable rate mortgage-backed passthroughs including stripped securities like IO’s and PO’s. The functions support many prepayment types including PSA, CPR, SMM, custom prepayment vectors, ABS and n month. All of these prepayment types can be combined with a balloon. The analytics support price, yield, duration, cash flows, factors, weighted average life, effective convexity, Z-spread and several implied prepayment speed calculations.

Functions

Mortgaged-Backed Security Functions

  • THImbsai Accrued interest
  • THImbscf Computes amortization and outputs the cashflows
  • THImbscpr Constant repayment rate
  • THImbsdur Modified duration
  • THImbseconv Effective convexity
  • THImbsedur Effective duration
  • THImbssfact Factor at the end of the nth flow
  • THImbsint Interest component of the nth flow
  • THImbsisp Implied speed between two periods
  • THImbspr Price given yield
  • THImbspre Prepayment component of the nth flow
  • THImbssmm Single monthly mortality
  • THImbssp Implied speed given price and yield
  • THImbssprin Scheduled principal component of the nth flow
  • THImbstpay Nth total flow
  • THImbstprin Total principal component of the nth flow
  • THImbswal Weighted average life
  • THImbsyld Mortgage (cash flow) yield
  • THImbszpr Price given Z-spread
  • THImbszspread Z-spread given price
  • THImbsver Return mbs module version information

Adjustable Rate Mortgage (ARM) Functions

  • THIsetarmSpecify an ARM structure
  • THIarmaiAccrued interest
  • THIarmcfComputes amortization and outputs the cashflows
  • THIarmdmDiscount margin
  • THIarmdurModified duration
  • THIarmfactFactor at the end of the nth flow
  • THIarmprPrice given yield
  • THIarmprePrepayment component of the nth flow
  • THIarmsprinScheduled principal component of the nth flow
  • THIarmtpayNth total flow
  • THIarmtprinTotal principal portion of the nth flow
  • THIarmwalWeighted average life
  • THIarmyldMortgage (cash flow) yield

Credit Derivatives

Highlights

This group of functions analyzes credit derivatives, including default swaps, basket protection (including nth to default), options on default swaps and credit spread options. Provides two distinct pricing methods. Supports single and periodic premiums and allows for counterparty exposure compensation.

Functions

Credit Derivatives Functions

  • THIcredput Calculate the price of a default put (default swap) using credit spread methodology
  • THIcredputtm Calculate the price of a default put (default swap) using transition-matrix approach
  • THIcredtmdefault Return default rating transition matrix used by credit QuantTools functions
  • THIopcredput Calculate the value of options on credit puts using Monte Carlo and the credit spread to infer default rates
  • THIopcredputtm Calculate the value of options on credit puts using a transition-matrix approach
  • THIcredbasketdef Calculate the price of a credit basket default swap
  • THIcredbasketloss Calculate the price of a credit basket default loss swap
  • THIcredspread Calculate spread option prices using a modified Black model
  • THIcreditver Return credit module version information

Date and Business date

Highlights

This group of functions covers just about all the date manipulation routines needed in finance. This includes day counts under various calendars such as 30/360 and actual/actual, day of the week calculations, month counts, date cycle calculations, holidays in most major financial centers, and various business day calculations.

Functions

Financial Date Functions

  • THIacdaysCalendar day addition (actual, 30/360 or 30E/360)
  • THIamnthsMonth addition
  • THIcdaysCalendar day count (actual, 30/360 or 30E/360)
  • THIdateConvert year, month, day to date serial number
  • THIdmdyConvert date serial number to month, date and year
  • THIemnthDate of the last day of the month in which a date falls
  • THIlwkdayLast occurrence of a given weekday in a month
  • THImdaysNumber of days in a given month
  • THImnthsNumber of months between two dates
  • THInwkdayNth occurrence of a given day in a month
  • THIwkdayDay of the week on which a given date falls
  • THIydaysNumber of days in a given year
  • THIydivDate of a beginning of year division
  • THIdateverReturn date module version information

Business Day Functions

  • THIabdaysBusiness day addition
  • THIbdaysBusiness day count
  • THIbusdayClosest business day
  • THIfbdayFirst business day of the month in which date falls
  • THIholsHoliday count
  • THIimmDetermine next (and subsequent) IMM date(s)
  • THIisbdayBusiness day test
  • THIlbdayLast business day of the month in which a date falls
  • THInbdayNext business day
  • THIpbdayPrevious business day
  • THIholidays, THIholidays1List holidays in various centers
  • THIholidays_freeFree memory allocated by THIholidays and THIholidays1
  • THIbdateverReturn business date module version information

Generalized Cash Flow Analysis

Highlights

Generalized amortization, cash flow and portfolio return calculations. These functions address many of the complexities commonly encountered in amortizing structures such as advanced payments, residual payments, first payment delay, residual payment delay and interest treatment method over odd periods. In addition, the functions compute convexity, duration, future value, present value, internal rate of return and discount margin for arbitrary cash flow streams. All cash flow analysis functions handle unevenly spaced cash flows, multiple compounding methods and cash flow filtering. Portfolio return can be calculated using time-weighted, money-weighted or modified Dietz methods.

Functions

Amortization Functions

  • THIamaintAccumulated interest paid
  • THIamintInterest rate
  • THIampmtPeriodic payment
  • THIampmtiInterest portion of payment
  • THIampmtpPrincipal portion of payment
  • THIamprnInitial principal
  • THIamresResidual payment
  • THIamrprnLoan balance
  • THIamtermNumber of loan payments
  • THIamwalWeighted average life
  • THIamortverReturn amortization module version information

Financial Functions

  • THIconvex Cash flow convexity
  • THIdurat Cash flow duration
  • THIfutv Future value
  • THIirate Internal rate of return
  • THInetpv Net present value
  • THIscmarg Scenario margin
  • THImdietz Time-weighted return using the modified Dietz method
  • THImwr Money-weighted return
  • THItwr Time-weighted return
  • THIfinancever Return finance module version information

Math and Conversion

Highlights

Mathematical and utility routines that are often used in finance. The mathematical functions include bivariate normal distribution and density functions, combination and permutation functions, interpolation functions (linear, loglinear, cubic, cubic spline and two-dimensional linear), greatest common divisor, least common multiple, Fibonacci sequence and matrix determinant. The utility functions include conversions to and from decimal and other representation schemes, conversion between various compounding frequencies, and conversion between real (inflation-adjusted) and nominal yields.

Functions

Math Functions

  • THIbinorm Bivariate normal distribution function
  • THIbinormdens Bivariate normal probability density
  • THIcomb Number of unordered subgroup combinations
  • THIcsplint Cubic spline interpolation
  • THIcsplint_setup Cubic spline interpolation setup
  • THIcsplint_free Free memory allocated by THIcsplint_setup
  • THIcsplint1 Cubic spline interpolation with pre-computed derivatives
  • THIcubinterp Cubic and log-cubic interpolation
  • THIfact Factorial of a number
  • THIfib Nth term of the Fibonacci sequence
  • THIgcd Greatest common divisor
  • THIcm Least common multiple
  • THIlinterp Linear and loglinear interpolation
  • THIlinterp2d Two-dimensional linear interpolation
  • THImdet Determinant of a matrix
  • THIperm Number of ordered subgroup permutations
  • THImathver Return math module version information

Conversion Functions

  • THIdfracConvert decimal to fraction
  • THIdfrac32pConvert decimal to 32nd
  • THIdfrac32p_freeFree memory allocated by THIfrac32p
  • THIfracdConvert fraction to decimal
  • THIfracd32pConvert 32nd to decimal
  • THIyld2yldYield conversion
  • THIconvtverReturn conversion module version information
  • THIyldinflatNominal/real-yield conversion

FX Functions

  • THIdeporate1 Implied deposit rate for the primary currency
  • THIdeporate2 Implied deposit rate for the secondary currency
  • THIsfwdrate Implied rate for a forward rate agreement
  • THIswappt Implied swap points
  • THIfxver Return fx module version information

Convertible

Highlights

Comprehensive analytical coverage of domestic and international convertible bonds. The analytics include convertible bond pricing, implied credit spread, implied volatility and sensitivities to changes in time, stock price, stock volatility and interest rates. Where applicable, the functions accommodate stepped coupons, various calendars, conversion schedules, put options, call options, credit spreads, dividend payments, dividend protection and exchange rate dynamics.

Functions

Convertible Functions

Domestic and International Convertible Bonds including Stepped Coupons and Sinking Funds

  • THICSbondSpecify a convertible bond
  • THICScredspreadImplied credit spread of bond
  • THICSimpvolImplied volatility
  • THICSpricePrice of convertible bond
  • THICSsensSensitivities of convertible bond

Performance

Highlights

Provides functions for performing statistical analysis of asset returns. Statistics include average, beta, correlation, covariance, and standard deviation.

Functions

Performance Computations

  • THIperfPerformance of an instrument or a fund
  • THIperfptdPeriod-to-date performance of an instrument or a fund
  • THIperfpPerformance of an instrument or a fund during a specified calendar period
  • THIperfannuAverage annualized performance of an instrument or a fund
  • THIpfcagrCompound annual growth rate
  • THIperiodtagReturns date tagging a particular calendar period

Performance Statistics

  • THIpfalpha Alpha
  • THIpfavg Average performance conditioned by reference index
  • THIpfavggain Arithmetic average of positive performances in a series
  • THIpfavloss Arithmetic average of the negative performances in a series
  • THIpfbest Best performance in a sequence
  • THIpfbeta Beta
  • THIpfcorr Correlation
  • THIpfcovar Covariance
  • THIpfdowndev Downside deviation
  • THIpfjens Jensen measure
  • THIpfkurts Kurtosis
  • THIpfmaxdrawdn Computes maximum drop in net asset value
  • THIpfneg Relative number of time intervals when performance is negative
  • THIpfpeakvalley Total performance between (absolute) maximum and following minimum
  • THIpfpos Relative number of time intervals when performance is positive
  • THIpfrecov Time lapse from minimum to maximum
  • THIpfrsqr Coefficient of determination (R-squared)
  • THIpfsharpe Sharpe measure
  • THIpfsigma Standard deviation
  • THIpfskew Skewness
  • THIpfsortino Sortino measure
  • THIpftrackerr Tracking error
  • THIpftreyn Treynor measure
  • THIpfworst Worst performance in a sequence
Back to top