Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server financial functions


XLeratorDB / financial

Use XLeratorDB / financial for a wide variety of financial calculations. The feature-rich XLeratorDB function library lets you include calculations in any T-SQL statement including SELECT, INSERT, UPDATE, DELETE, CREATE VIEW as well as in CTEs, stored procedures, user-defined functions, and computed columns.

XLeratorDB / financial is available in two packages - XLeratorDB / financial which requires SQL Server 2005 or later, and XLeratorDB / financial 2008 which requires SQL Server 2008 or later. 

Functions denoted with Available in XLeratorDB/financial 2008 only are only available in the XLeratorDB / financial-2008 package and will not install or run in SQL Server 2005. XLeratorDB-2008 packages contain functions which leverage SQL CLR features that are only available in SQL Server 2008 or later, namely 'multi-input aggregates' which provide a much easier calling syntax and typically run much faster than their scalar counterparts.


FUNCTION REFERENCE - FINANCIAL FUNCTIONS
BOND FIGURATION
Date Calculations
COUPDAYBS
 
Calculate the number of days from the beginning of the coupon period to the settlement date.
 
COUPDAYS
 
Calculate the number of days in the coupon period that contains the settlement date.
 
COUPDAYSNC
 
Calculate the number of days from the settlement date to the next coupon date.
 
COUPNCD
 
Calculate the next coupon date after the settlement date.
 
COUPNUM
 
Calculate the number of coupons payable between the settlement date and maturity date rounded up to the nearest whole coupon.
 
COUPPCD
 
Calculate the immediately previous coupon date before the settlement date.
 
 
Accrued Interest
ACCINTACT
 
Calculate the accrued interest on a bond where the coupon amounts are calculated as the actual number of days in the coupon period divided by the number of days in the year.
 
ACCRINT
 
Calculate the accrued interest for a security that pays interest at maturity.
 
ACCRINTM
 
Calculate the accrued interest for a security that pays interest at maturity.
 
AIFACTOR
 
Calculate the Accrued Interest Factor.
 
AIFACTOR_IAM
 
Calculate the Accrued Interest Factor for an Interest-at-Maturity security.
 
AIFACTOR_OFC
 
Calculate the Accrued Interest Factor for a bond during its odd first coupon period.
 
AIFACTOR_OLC
 
Calculate the Accrued Interest Factor for a bond during its odd last coupon period.
 
AIFACTOR_RPI
 
Calculate Accrued Interest Factor for a Regular Periodic Interest period.
 
AMORTRATE
 
Calculate the constant daily effective rate to be used in the amortization/accretion of bond (or loan) premium or discount.
 
BONDAMORT
 
Generate a bond amortization schedule from the settlement date to the maturity date of the bond.
 (table-valued function)
BONDINT
 
Calculate the accrued interest on a bond that pays regular, periodic interest.
 
COMPINT
 
Calculate the accrued interest for a security where interest is compounded periodically and paid at maturity.
 
ODDCOMPINT
 
Calculate the accrued interest for a security with an odd first or an odd last coupon period (or both) where interest is compounded periodically and paid at maturity.
 
ODDFINT
 
Calculate the accrued interest in the first coupon period for a bond with an odd first coupon and a par value of 100.
 
ODDLINT
 
Calculate the accrued for a bond with an odd last coupon and a par value of 100.
 
STEPACCINT
 
Calculate the accrued interest for a stepped-coupon bond with a par value of 100. 
 
 
Duration & Convexity
CFCONVEXITY
 
Calculate the convexity of a series of cash flows.
Available in XLeratorDB/financial 2008 only
CFDURATION
 
Calculate the duration of a series of cash flows.s
Available in XLeratorDB/financial 2008 only
CFMDURATION
 
Calculate the modified duration of a series of cash flows.
Available in XLeratorDB/financial 2008 only
CONVEXITY
 
Calculate the convexity of an option free bond.
 
DURATION
 
Calculate the Macaulay duration (in years) of a security with regular, periodic interest payments.
 
MDURATION
 
Calculate the modified duration for a security with an assumed par value of 100.
 
OFCCONVEXITY
 
Calculate the convexity for a bond that has an odd first coupon.
 
OFCDURATION
 
Calculate the duration for a bond that has an odd first coupon.
 
OFCMDURATION
 
Calculate the modified duration for a bond that has an odd first coupon.
 
OFLCONVEXITY
 
Calculate the convexity for a bond that has an odd first and an odd last coupon.
 
OFLDURATION
 
Calculate the duration for a bond that has an odd first and an odd last coupon.
 
OFLMDURATION
 
Calculate the modified duration for a bond that has an odd first and an odd last coupon.
 
OLCCONVEXITY
 
Calculate the convexity for a bond that has an odd last coupon.
 
OLCDURATION
 
Calculate the duration for a bond that has an odd last coupon.
 
OLCMDURATION
 
Calculate the modified duration for a bond that has an odd last coupon.
 
RPICONVEXITY
 
Calculate the convexity for a bond that pays regular periodic interest.
 
RPIDURATION
 
Calculate the duration for a bond that pays regular periodic interest.
 
RPIMDURATION
 
Calculate the effective duration for a bond that pays regular periodic interest.
 
STEPCONVEXITY
 
Calculate the convexity for a stepped-coupon bond. 
 
STEPDURATION
 
Calculate the duration for a stepped-coupon bond. 
 
STEPMDURATION
 
Calculate the modified duration for a stepped-coupon bond. 
 
 
Price & Yield
ADJCURRYIELD
 
Calculate the adjusted current yield.
 
BONDCF
 
Calculate the cash flows of a bond with regular periodic coupon payments.
 (table-valued function)
DIRTYPRICE
 
Calculate the dirty price of bond.
 
DIRTYYIELD
 
Calculate the yield of a bond from its dirty price.
 
DIS
 
Calculate the price or discount rate for a discount security.
 
DISC
 
Calculate the discount rate for a discount security.
 
DISFACTORS
 
Calculate the components used in the calculation of price, discount rate, and yield for a discount security.
 (table-valued function)
IAM
 
Calculate the price or yield for a bond that pays interest at maturity and has a par value of 100.
 
IAMFACTORS
 
Calculate the components used in the calculation of price and yield for a security that pays interest at maturity.
 (table-valued function)
INTRATE
 
Calculate the interest rate for a fully invested security.
 
ODDFPRICE
 
Calculate price per 100 face value of a security with an odd first period.
 
ODDFYIELD
 
Calculate the yield of a security with an odd first period.
 
ODDLPRICE
 
Calculate the price per 100 face value of a bond with an odd last coupon period.
 
ODDLYIELD
 
Calculate the yield of a security with an odd last coupon period.
 
OFC
 
Calculate the price or yield of a bond with an odd first period and a par value of 100.
 
OFCFACTORS
 
Calculate the components used in the calculation of price and yield for a bond with an odd first coupon.
 (table-valued function)
OFL
 
Calculate the price or yield of a bond with an odd first period, an odd last period, and a par value of 100.
 
OFLFACTORS
 
Calculate the components used in the calculation of price and yield for a bond with an odd last coupon.
 (table-valued function)
OFLPRICE
 
Calculate the price from yield per 100 face value of a bond with an odd first period and an odd last period.
 
OFLYIELD
 
Calculate the yield from price per 100 face value of a bond with an odd first period and an odd last period.
 
OLC
 
Calculate the price or yield of a bond with an odd last period and a par value of 100.
 
OLCFACTORS
 
Calculate the components used in the calculation of price and yield for a bond with an odd last coupon.
 (table-valued function)
PRICE
 
Calculate the price for a bond that pays periodic interest and has a par value of 100.
 
PRICEACT
 
Calculate the price from yield of a bond where the coupon amounts are calculated as the actual number of days in the coupon period divided by the number of days in the year.
 
PRICEACTTV
 
Generate the cash flows of a bond where the coupon payments are calculated using the actual number of days in the coupon period divide by the days in the year.
  (table-valued function)
PRICEDISC
 
Calculate the price per 100 face value for a discounted security.
 
PRICEFR
 
Calculate the price from yield of a bond with a forced redemption schedule where the coupon payment dates occur at regular periods and the redemptions can occur on any coupon date.
 
PRICEMAT
 
Calculate the price (expressed per 100 par value) of a security that pays interest at maturity.
 
PRICESTEP
 
Calculate the price from yield per 100 face value of a security with multiple interest coupon rates, also known as step-up rates. 
 
RECEIVED
 
Calculate the amount received at maturity for a fully invested security.
 
RPI
 
Calculate the price or yield for a bond that pays periodic interest and has a par value of 100.
 
RPIFACTORS
 
Calculate the components used in the calculation of price and yield for a bond with regular periodic coupons.
 (table-valued function)
STEPCF 
 
Calculate the cash flows of a stepped-rate bond.
 (table-valued function) Available in XLeratorDB/financial 2008 only
TBILLEQ
 
Calculate the bond-equivalent yield for a Treasury bill.
 
TBILLPRICE
 
Calculate the price per 100 face value for a Treasury bill.
 
TBILLYIELD
 
Calculate the yield for a Treasury bill.
 
YIELD
 
Calculate the yield, given the price, for a security that pays periodic interest and has a par value of 100.
 
YIELDACT
 
Calculate the yield on a bond where the coupon amounts are calculated as the actual number of days in the coupon period divided by the number of days in the year.
 
YIELDDISC
 
Calculate the annual yield for a discounted security; for example, a treasury bill.
 
YIELDFR
 
Calculate the yield given price of a bond with a forced redemption schedule where the coupon payment dates occur at regular periods and the redemptions can occur on any coupon date.
 
YIELDMAT
 
Calculate the annual yield of a security that pays interest at maturity.
 
YIELDSTEP
 
Calculate the yield from price per 100 face value of a security with multiple interest coupon rates, also known as step-up rates. 
 
 
SPREAD PRICING
BondPriceFromZeroes
 
Calculate the price of a bond given it's z-spread and the zero coupon curve.
 Available in XLeratorDB/financial 2008 only
CMTCurve
 
Calculate the spot and continuously compounded zero coupon rate from the Constant Maturity Treasury par curve.
 (table-valued function) Available in XLeratorDB/financial 2008 only
LogNormalIRLattice
 
Show the zero-coupon curve, calibrated forward rates, discount factors, and cash flows used in the calculation of a bond's price using its option-adjusted spread.
 (table-valued function) Available in XLeratorDB/financial 2008 only
OAC
 
Calculate the option-adjusted convexity on a bond.
 Available in XLeratorDB/financial 2008 only
OAD
 
Calculate the option-adjusted duration on a bond.
 Available in XLeratorDB/financial 2008 only
OAS
 
Calculate the option-adjusted spread on a bond.
 Available in XLeratorDB/financial 2008 only
PriceFromIRLattice
 
Calculate the price of a bond given its option-adjusted spread and a zero coupon curve.
 Available in XLeratorDB/financial 2008 only
PriceFromZeroesTVF
 
Show the interpolated zero-coupon curve, discount factors, forward rates, and cash flows used in the calculation of a bond's price using its Z-spread.
 (table-valued function) Available in XLeratorDB/financial 2008 only
ZSPREAD
 
Calculate the zero-volatility or static spread on a bond.
 Available in XLeratorDB/financial 2008 only
 
ANNUITY CALCULATIONS
CUMIPMT
 
Calculate the cumulative interest paid on a loan between any two periods.
 
CUMODDFIPMT
 
Calculate the cumulative interest on the periodic payments for an annuity where the first period is either longer or shorter than the other periods.
 
CUMODDFPPMT
 
Calculate the cumulative principal on the periodic payments for an annuity where the first period is either longer or shorter than the other periods.
 
CUMPRINC
 
Calculate the cumulative principal paid on a loan between any two periods.
 
FV
 
Calculate future value of an annuity based on periodic, constant payments and a constant interest rate.
 
FVGA
 
Calculate the future value of a growing annuity.
 
IPMT
 
Calculate interest payment for a given period for an annuity based on periodic, constant payments and a constant interest rate.
 
NPER
 
Calculate the number of periods for an annuity.
 
NPERGA
 
Calculate the number of whole periods for a growing annuity to reach a future value.
 
ODDFIPMT
 
Calculate the interest portion of a periodic payment for an annuity where the first period is either longer or shorter than the other periods.
 
ODDFPMT
 
Calculate the periodic payment for an annuity where the first period is either longer or shorter than the other periods.
 
ODDFPMTSCHED
 
Calculate an amortization schedule for an annuity where the first period is either longer or shorter than all the other periods.
 (table-valued function)
ODDFPPMT
 
Calculate the principal portion of a periodic payment for an annuity where the first period is either longer or shorter than the other periods.
 
ODDFPV
 
Calculate the present value of an annuity where the first period is either longer or shorter than the other periods.
 
ODDFRATE
 
Calculate the periodic interest rate for an annuity where the first period is either longer or shorter than the other periods.
 
ODDFSCHED 
 
Calculate an annuity-like payment schedule where the first period is a different length of the time than all subsequent periods and those subsequent periods are assumed to be of equal length.
 (table-valued function) Available in XLeratorDB/financial 2008 only
ODDPV
 
Calculate the present value of an annuity with an odd first period.
 
PDURATION *!*
 
Calculate the number of periods required by an investment to reach a specified value.
 Available in XLeratorDB/financial 2008 only
PMT
 
Calculate the periodic payment for an annuity.
 
PMTGA
 
Calculate the initial payment for a growing annuity, given the future value.
 
PMTSCHED
 
Calculate an amortization schedule for a loan with no odd periods.
 (table-valued function)
PPMT
 
Calculate principal payments for an annuity for a given period.
 
PV
 
Calculate the present value of an annuity.
 
PVGA
 
Calculate the present value of a growing annuity.
 
RATE
 
Calculate the interest rate per period of an annuity.
 
RRI *!*
 
Calculate an equivalent interest rate for the growth of an investment.
 Available in XLeratorDB/financial 2008 only
 
INTERNAL RATES OF RETURN
AMORTIZECASHFLOWS
 
Calculate a schedule showing the discounted cash flow value of a series of cash flows at each cash flow date. 
 (table-valued function)
CDRCASHFLOWIRR 
 
Calculate the internal rate of return on cash flows produced using the CDRCASHFLOW inputs.
 Available in XLeratorDB/financial 2008 only
IRR
 
Calculate an internal rate of return for a series of cash flows.
 
IRR_q
 
Calculate an internal rate of return for a series of cash flows. 
 
MIRR
 
Calculate the modified internal rate of return, where positive and negative cash flows are financed at different rates.
 
MIRR_q
 
Calculate the modified internal rate of return, where positive and negative cash flows are financed at different rates. 
 
XIRR
 
Calculate an internal rate of return for a series of cash flows on different dates.
 
XIRR_q
 
Calculate an internal rate of return for a series of cash flows on different dates. 
 
XIRR30360
 
Calculate an internal rate of return for a series of irregular cash flows using a 30/360 day-count convention.
Available in XLeratorDB/financial 2008 only
XIRRT
 
Calculate an internal rate of return for a series of cash flows with irregular time periods—cash flows of varying amount occurring at various points in time.
Available in XLeratorDB/financial 2008 only
XMIRR
 
Calculate the modified internal rate of return, where positive and negative cash flows are financed at different rates and where the cash flows occur irregularly and are specified by date.
Available in XLeratorDB/financial 2008 only
 
NET PRESENT VALUE
CDRCASHFLOWDCF 
 
Calculate the discounted cash flow value for a loan with a fixed periodic payment with Conditional Prepayment Rates (CPR) and Constant Default Rates (CDR) applied.
 Available in XLeratorDB/financial 2008 only
EFV
 
Calculate the future value of a cash flow between two periods.
 
ENPV
 
Calculate the net present value of an investment based on a series of periodic cash flows and a discount rate.
 
ENPV_q
 
Calculate the net present value of an investment based on a series of periodic cash flows and a discount rate. 
 
EPV
 
Calculate the discounted value of a cash flow between two periods.
 
NFV
 
Calculate the net future value of an investment based on a series of periodic cash flows and a rate.
Available in XLeratorDB/financial 2008 only
NPV
 
Calculate the net present value of an investment based on a series of periodic cash flows and a discount rate.
 
NPV_q
 
Calculate the net present value of an investment based on a series of periodic cash flows and a discount rate. 
 
XDCF
 
Calculate the discounted cash flows value of a series of irregular cash flows—cash flows of varying amounts occurring on various dates.
Available in XLeratorDB/financial 2008 only
XFV
 
Calculate the future value of a cash flow between two dates.
 
XNFV
 
Calculate the net future value of a series of irregular cash flows—cash flows of varying amounts occurring on various dates.
Available in XLeratorDB/financial 2008 only
XNPV
 
Calculate the net present value of a series of irregular cash flows—cash flows of varying amounts occurring on various dates.
 
XNPV_q
 
Calculate the net present value of a series of irregular cash flows—cash flows of varying amounts occurring on various dates. 
 
XNPV30360
 
Calculate the net present value for a series of cash flows with irregular time periods—cash flows of varying amount occurring at various points in time—using a 30/360 day-count convention.
Available in XLeratorDB/financial 2008 only
XNPVT
 
Calculate the net present value for a series of cash flows with irregular time periods—cash flows of varying amount occurring at various points in time.
Available in XLeratorDB/financial 2008 only
XPV
 
Calculate the discounted value of a cash flow between two dates.
 
 
TIME WEIGHTED RATE OF RETURN
EMDIETZ
 
Calculate the performance of an investment portfolio based on time-weighted cash flows.
Available in XLeratorDB/financial 2008 only
GTWRR
 
Calculate time-weighted rates of return. GTWRR supports three different methods for calculating time-weighted rates of return.
Available in XLeratorDB/financial 2008 only
LMDIETZ
 
Calculate the linked Modified Dietz.
Available in XLeratorDB/financial 2008 only
MDIETZ
 
Calculate the performance of an investment portfolio based on time-weighted cash flows. 
 
MDIETZ_q
 
Calculate the performance of an investment portfolio based on time-weighted cash flows. 
 
TWROR
 
Calculate time-weighted rates of return, allowing you to specify which cash flows are used in the numerator of the calculation and which cash flows are used in the denominator.
Available in XLeratorDB/financial 2008 only
TWRR
 
Calculate time-weighted rate of return.
Available in XLeratorDB/financial 2008 only
 
CAPITAL ASSET PRICING MODEL
BetaCoKurt 
 
Calculate the beta-cokurtosis of an asset return and a benchmark return.
Available in XLeratorDB/financial 2008 only
BetaCoSkew 
 
Calculate the beta-coskewness of an asset return and a benchmark return.
Available in XLeratorDB/financial 2008 only
BetaCoVar 
 
Calculate the beta-covariance of an asset return and a benchmark return.
Available in XLeratorDB/financial 2008 only
DownsideDeviation 
 
Calculate the downside deviation of asset returns.
Available in XLeratorDB/financial 2008 only
DownsideFrequency 
 
Calculate the downside frequency of asset returns.
Available in XLeratorDB/financial 2008 only
DownsidePotential 
 
Calculate the downside potential of asset returns.
Available in XLeratorDB/financial 2008 only
EQALPHA
 
Calculate the intercept of the security characteristic line (SCL), between an asset and a specified benchmark.
Available in XLeratorDB/financial 2008 only
EQBETA
 
Calculate the correlated volatility (beta) between an asset and a specified benchmark.
Available in XLeratorDB/financial 2008 only
EQVOLATILITY
 
Calculate the historical volatility based upon price or valuation data.
Available in XLeratorDB/financial 2008 only
FinCoKurt 
 
Calculate the cokurtosis of an asset return and a benchmark return.
Available in XLeratorDB/financial 2008 only
FinCoSkew 
 
Calculate coskewness of an asset return and a benchmark return.
Available in XLeratorDB/financial 2008 only
INFORATIO
 
Calculate the Information ratio based upon return data.
Available in XLeratorDB/financial 2008 only
INFORATIO2
 
Calculate the Information ratio based upon price or valuation data.
Available in XLeratorDB/financial 2008 only
MAXDD
 
Calculate the maximum drawdown based on net asset or portfolio values.
Available in XLeratorDB/financial 2008 only
MAXDD2
 
Calculate the maximum drawdown based on net asset or portfolio returns.
Available in XLeratorDB/financial 2008 only
MOIC
 
Calculate the multiple of invested capital.
 
Omega 
 
Calculate the Omega of asset returns.
Available in XLeratorDB/financial 2008 only
OmegaExcessReturn 
 
Calculate the Omega Excess Return.
Available in XLeratorDB/financial 2008 only
OmegaSharpeRatio 
 
Calculate the Omega-Sharpe ratio of asset returns.
Available in XLeratorDB/financial 2008 only
SemiDeviation 
 
Calculate the semi-deviation of asset returns.
Available in XLeratorDB/financial 2008 only
SemiVariance 
 
Calculate the semi-variance of asset returns.
Available in XLeratorDB/financial 2008 only
SHARPE
 
Calculate the Sharpe ratio based upon return data.
Available in XLeratorDB/financial 2008 only
SHARPE2
 
Calculate the Sharpe ratio based upon price or valuation data.
Available in XLeratorDB/financial 2008 only
SORTINO
 
Calculate the Sortino ratio based upon return data.
Available in XLeratorDB/financial 2008 only
SORTINO2
 
Calculate the Sortino ratio based upon price data.
Available in XLeratorDB/financial 2008 only
SpecificRisk 
 
Calculate Specific Risk, the standard deviation of the error term in the regression equation.
Available in XLeratorDB/financial 2008 only
SystematicRisk 
 
Calculate the Systematic Risk.
Available in XLeratorDB/financial 2008 only
TotalRisk 
 
Calculate Total Risk.
Available in XLeratorDB/financial 2008 only
TREYNOR
 
Calculate the Treynor ratio based upon return data.
Available in XLeratorDB/financial 2008 only
TREYNOR2
 
Calculate the Treynor ratio based upon price or valuation data.
Available in XLeratorDB/financial 2008 only
UpsideFrequency 
 
Calculate the upside frequency of asset returns.
Available in XLeratorDB/financial 2008 only
UpsidePotentialRatio 
 
Calculate the Upside Potential Ratio.
Available in XLeratorDB/financial 2008 only
UpsideRisk 
 
Calculate the Upside Risk, Upside Variance or Upside Deviation. .
Available in XLeratorDB/financial 2008 only
 
LOANS
Payment Calculations
CUMLIPMT
 
Calculate the cumulative interest payments for a specified range of periods for a loan or lease.
 
CUMLPPMT
 
Calculate the cumulative principal payments for a loan or lease.
 
EFFECT
 
Calculate the effective annual interest rate.
 
FVSCHEDULE
 
Calculate the future value of an initial investment using a series of compound rates.
 
LIPMT
 
Calculate the periodic payment for a loan or lease.
 
LPMT
 
Calculate the periodic payment for a loan or lease.
 
LPMTSCHED
 
Generate a loan amortization schedule.
  (table-valued function)
LPPMT
 
Calculate the principal payment for a specified payment for a loan or lease.
 
LRATE
 
Calculate the annual interest rate for an annuity with an odd first period.
 
NOMINAL
 
Calculate the annual nominal interest rate.
 
NUMPMTS
 
Calculate the number of payments from the first interest payment date to the last payment date; in other words, the total number of payments over the life of the loan.
 
SimpleAccrual *!*
 
Calculate the daily interest accruals over a range of dates for a single cash flow or a series of cash flows, using a single rate or a series of rates.
 (table-valued function) Available in XLeratorDB/financial 2008 only
TOTALINT
 
Calculate the total interest on a loan or lease.
 
 
Loan Amortization
AMORTSCHED
 
Generate a loan amortization schedule.
  (table-valued function)
Balloon
 
Calculate the cash flow schedule for a loan with periodic payments of interest (only) and with the principal paid at maturity.
 (table-valued function)
Bullet
 
Calculate the cash flow schedule for a loan with a single payment of principal and interest at maturity.
 (table-valued function)
CDRCASHFLOW 
 
Calculate a cash-flow schedule for a loan with a fixed periodic payment with Conditional Prepayment Rates (CPR) and Constant Default Rates (CDR) applied.
 (table-valued function) Available in XLeratorDB/financial 2008 only
CDRRate 
 
Calculate the CDR Rate given the loan default amount.
 Available in XLeratorDB/financial 2008 only
ConstantCashFlow
 
Calculate the cash flow schedule for a loan with a fixed maturity date and annuity-style payments.
 (table-valued function)
ConstantCashFlowFR
 
Calculate the cash flow schedule for a loan with a fixed maturity date and annuity-style payments using a table of forward rates to calculate each periodic payment.
 (table-valued function)Available in XLeratorDB/financial 2008 only
ConstantPaymentAmount
 
Calculate the cash flow schedule for a loan with a fixed payment amount but no fixed maturity date.
 (table-valued function)
ConstantPrincipal
 
Calculate the cash flow schedule for a loan with a fixed maturity date where the principal is reduced on a straight-line basis.
 (table-valued function)
ConstantPrincipalAmount
 
Calculate the cash flow schedule for a loan with no fixed maturity date where the principal is reduced using a fixed amount.
 (table-valued function)
ConstantPrincipalRate
 
Calculate the cash flow schedule for a loan with no fixed maturity date where the principal is reduced on using a fixed rate.
 (table-valued function)
CONSTPRINAMORT
 
Calculate an amortization schedule for a loan with a fixed principal repayment.
  (table-valued function)
NPD
 
Calculate the next payment date for loan with regularly scheduled periodic payments.
 
NPNO
 
Calculate the next payment number for loan with regularly scheduled periodic payments.
 
PPD
 
Calculate the previous payment date for loan with regularly scheduled periodic payments.
 
PAYMENTPERIODS
 
Calculate return the number of months from a reference date to: an initial grace period; the start of interim grace period; and the end of interim grace period.
 
PERIODRATE
 
Calculate the nominal rate for a loan or other financial instrument when the compounding period of the quoted rate and the compounding period for the calculation of the loan are different.
 
PPNO
 
Calculate the previous payment number for loan with regularly scheduled periodic payments.
 
SMMAmort 
 
Calculate a cash-flow schedule for a loan with a fixed periodic payment with Conditional Prepayment Rates (CPR) and Constant Default Rates (CDR) applied.
 (table-valued function) Available in XLeratorDB/financial 2008 only
UNEQUALLOANPAYMENTS
 
Calculate a payment schedule for a loan where the interest payment frequency and the principal payment frequency are different, or the loan starts with an interest only schedule with principal repayments commencing after the first interest payment date.
 (table-valued function)
 
Rule-of-78
R78IPMT
 
Calculate the interest payment for a specified payment for a loan or lease using the Rule of 78.
 
R78PAYOFF
 
Calculate the payoff amount for a loan or lease using the Rule of 78.
 
R78PPMT
 
Calculate the principal payment for a specified payment for a loan or lease using the Rule of 78.
 
R78REBATE
 
Calculate the rebate amount for a loan or lease using the Rule of 78.
 
 
DEPRECIATION
DB
 
Calculate the depreciation of an asset for a specified period using the fixed-declining balance method.
 
DDB
 
Calculate the depreciation of an asset for a specified period using the double-declining balance method or some other user-specified method.
 
SLN
 
Calculate the straight-line depreciation of an asset for one period.
 
SYD
 
Calculate the sum-of-years' digits depreciation of an asset for a specified period.
 
VDB
 
Calculate the depreciation of an asset for a specified or partial period by using a declining balance method.
 
 
YIELD CURVES
Yield Curve Construction
DFINTERP
 
Calculate the interpolated discount factor given a date.
 
ED_FUT_CONV_ADJ_HL
 
Calculate a Eurodollars futures price into a forward rate using the Ho Lee convexity adjustment formula.
 
INTERPDFACT
 
Calculate interpolated discount factors for a range of dates.
  (table-valued function)
SWAPCURVE
 
Calculate discount factors, zero-coupon rates, and continuously compounded zero-coupon rates from a series of cash rates, futures prices, or swaps rates.
  (table-valued function)
ZEROCOUPON
 
Calculate an interpolated zero-coupon rate from a series of cash rates, futures prices, or swaps rates.
 
 
Nelson Siegel
NELSONSIEGEL
 
Calculate the zero coupon rate for a date from the supplied parameters.
 
NSCOEF
 
Calculate the Nelson Siegel coefficients for a zero coupon curve. 
  (table-valued function)
NSCOEF2
 
Calculate the Nelson Siegel coefficients for a zero coupon curve. 
  (table-valued function)
 
Date Calculations for Yield Curves
ED_FUTYF
 
Calculate the amount of time (in years) from a start date to the delivery date of a futures contract.
 
ED_FUT2DATE
 
Calculate a Eurodollar futures delivery code into a delivery date.
 
TENOR2DATE
 
Convert an alphanumeric expression into a swaps or money market maturity date.
 
 
BUSINESS DAYS CALCULATIONS
Businesss Day Calculations
BUSDAYS
 
Calculate the number of business days from a start date (inclusive) to an end date (exclusive).
 
BUSDAYSWE
 
Calculate the number of business days from a start date (inclusive) to an end date (exclusive), where the weekend days are not Saturday and Sunday.
 
BUSINESSDATE
 
Calculate a new date taking holidays and weekends into account.
 
BUSINESSDATEWE
 
Calculate a new date taking holidays and weekends into account.
 
T360
 
Calculate the number of periods (fractional part included) from a cash flow date to a settlement date.
Available in XLeratorDB/financial 2008 only
 
Date Functions
CALCDATE
 
Calculate a datetime value for a specified Year, Month, and Day.
 
DATEFLOAT
 
Calculate a float value for a specified Year, Month, and Day.
 
DATEINT
 
Calculate an integer value for a specified Year, Month, and Day.
 
DAYS360
 
Calculate the number of days from a start date (inclusive) to an end date (exclusive) using any of several 30/360 day count conventions.
 
DAYSINMONTH
 
Calculate the number of days in the month of the specified date.
 
DAYSINYEAR
 
Calculate the number of days in the year of the specified date.
 
DAYSNL
 
Calculate the number of days from a start date (inclusive) to an end date (exclusive) excluding all occurrences of Feb-29.
 
EASTER
 
Calculate the date of Western Easter for the specified year.
 
EDATE
 
Calculate the date that is the indicated number of months before or after a specified date (the start date).
 
EOMONTH
 
Calculate the date for the last day of the month that is the indicated number of months before or after the start date.
 
FIRSTWEEKDAY
 
Calculate the first specified day of the week in any calendar month.
 
ISREGULARPAY
 
Calculate if a date is a regular payment date for a loan given the first payment date, the issue date, and the number of payments per year.
 
LASTWEEKDAY
 
Calculate the last specified day of the week in any calendar month.
 
NBD
 
Calculate a comma separated string of non-business dates in the format YYYYMMDD.
 
NUMMONTHS
 
Calculate the number of months between 2 dates.
 
YEARFRAC
 
Calculate the fraction of the year represented by the number of whole days between two dates.
 
 
INVENTORY
FIFOend *!*
 
Calculate the ending FIFO balances in an ordered resultant table.
 (table-valued function) Available in XLeratorDB/financial 2008 only
FIFOtvf *!*
 
Calculate running FIFO (First In, First Out) values in an ordered resultant table.
 (table-valued function) Available in XLeratorDB/financial 2008 only
LIFOend *!*
 
Calculate the ending LIFO balances in an ordered resultant table.
 (table-valued function) Available in XLeratorDB/financial 2008 only
LIFOtvf *!*
 
Calculate the running LIFO balances in an ordered resultant table.
 (table-valued function) Available in XLeratorDB/financial 2008 only
WACtvf *!*
 
Calculate running weighted-average cost values in an ordered resultant table.
 (table-valued function) Available in XLeratorDB/financial 2008 only
 
MISC FUNCTIONS
DOLLARDE
 
Dollar - fraction to Decimal
DOLLARFR
 
Calculate a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction.
 
RelativeError
 
Calculate the relative error between two values.
 
 
XLDB_FINANCIAL_VERSION
 
Calculate version information for the XLeratorDB/financial module.
 
 

 


*!*Added in Most Recent Release of package

*BETA This function is only available in the XLeratorDB SuitePLUS-2008 Trial package as a BETA preview


This function cannot reference data from SQL Server 2014 memory-optimized tables

 



Copyright 2008-2017 Westclintech LLC         Privacy Policy        Terms of Service