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 'Not available for SQL2005' 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.
Not available for SQL2005
CFDURATION
 
Calculate the duration of a series of cash flows.s
Not available for SQL2005
CFMDURATION
 
Calculate the modified duration of a series of cash flows.
Not available for SQL2005
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
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
new!
Calculate the cash flows of a stepped-rate bond.
 (table-valued function) Not available for SQL2005
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.
 
 
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
new!
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) Not available for SQL2005
ODDPV
 
Calculate  the present value of an annuity with an odd first period.
 
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.
 
 
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
new!
Calculate  the internal rate of return on cash flows produced using the CDRCASHFLOW inputs.
 Not available for SQL2005
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.
Not available for SQL2005
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.
Not available for SQL2005
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.
Not available for SQL2005
 
NET PRESENT VALUE
CDRCASHFLOWDCF
new!
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.
 Not available for SQL2005
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.
Not available for SQL2005
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.
Not available for SQL2005
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.
Not available for SQL2005
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..
Not available for SQL2005
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.
Not available for SQL2005
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.
Not available for SQL2005
GTWRR
 
Calculate  time-weighted rates of return. GTWRR supports three different methods for calculating time-weighted rates of return.
Not available for SQL2005
LMDIETZ
 
Calculate the linked Modified Dietz.
Not available for SQL2005
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.
Not available for SQL2005
TWRR
 
Calculate time-weighted rate of return.
Not available for SQL2005
 
CAPITAL ASSET PRICING MODEL
BetaCoKurt
new!
Calculate the beta-cokurtosis of an asset return and a benchmark return.
Not available for SQL2005
BetaCoSkew
new!
Calculate the beta-coskewness of an asset return and a benchmark return.
Not available for SQL2005
BetaCoVar
new!
Calculate the beta-covariance of an asset return and a benchmark return.
Not available for SQL2005
DownsideDeviation
new!
Calculate the downside deviation of asset returns.
Not available for SQL2005
DownsideFrequency
new!
Calculate  the downside frequency of asset returns.
Not available for SQL2005
DownsidePotential
new!
Calculate the downside potential of asset returns.
Not available for SQL2005
EQALPHA
 
Calculate the intercept of the security characteristic line (SCL), between an asset and a specified benchmark.
Not available for SQL2005
EQBETA
 
Calculate the correlated volatility (beta) between an asset and a specified benchmark.
Not available for SQL2005
EQVOLATILITY
 
Calculate the historical volatility based upon price or valuation data.
Not available for SQL2005
FinCoKurt
new!
Calculate the cokurtosis of an asset return and a benchmark return.
Not available for SQL2005
FinCoSkew
new!
Calculate coskewness of an asset return and a benchmark return.
Not available for SQL2005
INFORATIO
 
Calculate the Information ratio based upon return data.
Not available for SQL2005
INFORATIO2
 
Calculate the Information ratio based upon price or valuation data.
Not available for SQL2005
MAXDD
 
Calculate  the maximum drawdown based on net asset or portfolio values.
Not available for SQL2005
MAXDD2
 
Calculate the maximum drawdown based on net asset or portfolio returns.
Not available for SQL2005
MOIC
 
Calculate the multiple of invested capital.
 
Omega
new!
Calculate the Omega of asset returns.
Not available for SQL2005
OmegaExcessReturn
new!
Calculate the Omega Excess Return.
Not available for SQL2005
OmegaSharpeRatio
new!
Calculate the Omega-Sharpe ratio of asset returns.
Not available for SQL2005
SemiDeviation
new!
Calculate the semi-deviation of asset returns.
Not available for SQL2005
SemiVariance
new!
Calculate  the semi-variance of asset returns.
Not available for SQL2005
SHARPE
 
Calculate the Sharpe ratio based upon return data.
Not available for SQL2005
SHARPE2
 
Calculate the Sharpe ratio based upon price or valuation data.
Not available for SQL2005
SORTINO
 
(Calculate the Sortino ratio based upon return data.
Not available for SQL2005
SORTINO2
 
(Calculate the Sortino ratio based upon price data.
Not available for SQL2005
SpecificRisk
new!
(Calculate Specific Risk, the standard deviation of the error term in the regression equation.
Not available for SQL2005
SystematicRisk
new!
(Calculate  the Systematic Risk.
Not available for SQL2005
TotalRisk
new!
(Calculate Total Risk.
Not available for SQL2005
TREYNOR
 
(Calculate the Treynor ratio based upon return data.
Not available for SQL2005
TREYNOR2
 
(Calculate the Treynor ratio based upon price or valuation data.
Not available for SQL2005
UpsideFrequency
new!
(Calculate the upside frequency of asset returns.
Not available for SQL2005
UpsidePotentialRatio
new!
(Calculate the Upside Potential Ratio.
Not available for SQL2005
UpsideRisk
new!
(Calculate the Upside Risk, Upside Variance or Upside Deviation. .
Not available for SQL2005
 
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.
 
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
new!
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) Not available for SQL2005
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)Not available for SQL2005
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
new!
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) Not available for SQL2005
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.
Not available for SQL2005
 
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.
 
 
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.
 
 

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

 



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service