XLeratorDB is a popular add-in for SQL Server that that provides sophisticated high-speed "in-database" analytics capabilities at the database level. Function packages include: Financial, Statistical, Math+Trig, Financial Options (OTC+ETO), Engineering, and more. XLeratorDB provides functions for calculating Rates of Return, Business Dates, Bond Figuration, Capital Asset Pricing Model, Matrix Calculations, Yield Curve construction, Correlation and Regression analysis, Option pricing, FIFO and LIFO, and much more. To date there are over 600 functions, and new functions are added every month.
Find out more at http://westclintech.com
2. XLeratorDB is a unique, in-database analytics package
that provides
Advanced Analytics – over 650 functions
Greater Performance – up to 100x faster than Excel
Risk Reduction – eliminate spreadsheet risk
Improved Security – calculations saved on DB
Faster Development – lower development costs
Unsurpassed Quality – over 1.2 billion test cases
Optimize SQL Server – enhance customer value
3. FUNCTION LIBRARIES FOR SQL SERVER 3
The History of XLeratorDB
2008 2009 2010 2011 2012
2008
Charles Flock and Joe Stampf found
WestClinTech and introduce
XLeratorDB with over 350 Finance,
Statistics, Math and Engineering
functions.
2008
First commercial sale of
XLeratorDB.
2010 - 2011
More than 250 new functions added to
XLeratorDB.
2012 - Present
XLeratorDB releases new Financial-
Options, CAPM and Windowing
functions. Client list grows to over 400
and function list grows to more than
650.
7. 77FUNCTION LIBRARIES FOR SQL SERVER
XLeratorDB Packages
Rates of Return
•Internal Rate of Return
•IRR with non-periodic cash
flows
•Net Present Value
•Modified Dietz
Capital Asset Pricing Model
•Alpha and Beta
•Sharpe, Sortino, Treynor and
Information ratios
Bond Figurations
•Accrued Interest
•Bond Price and Yield
•Odd First, Last coupons
Loans
•Principal and Interest payments
•Amortization schedules
Depreciation
•Declining Balance
•Straight Line
Other
•Business Days,
•Interest Basis
Descriptive Statistics
•Continuous data
•Dispersion
•Shape
Statistical Inference
•Chi Square
•T-Test
Correlation and Regression
•Correlation
•Probability
•Linear
•Slope
•Trend
Data collection
•Standard error
Probabilities
•Beta cumulative probability
density
•Inverse of BetaDist
•Binomial distribution
•Fisher transformation
Arithmetic/Algebraic
• Euclidean
• Factorials
• Mround
• Product
Trigonometry
• Hyperbolic Cosine
• Secant
• Inverse Hyperbolic
Interpolations
• Linear
• Polynomial
• Cubic Spline
Number/Series Generators
• Random
• Random Normal
Matrix
• Matrix Inverse
• Matrix Multiplication
• Transpose
Finance Statistics Math
High-Level list of Functions
8. 88FUNCTION LIBRARIES FOR SQL SERVER
XLeratorDB Packages
Option Models
European
•Black Scholes Merton
•Binomial
•Implied Volatility
American
•Binomial
•Bjerksund-Stensland
•Implied Volatility
Option Greeks
•Delta
•Gamma
•Vega
•Theta
•Rho
•Lambda
Risk Matrix
•Option Matrix
•Option P/L Matrix
Binomial Tree visualization
Engineering
•Bessel function
•Error
•Delta
Base Conversions
•Binary number
•Decimal
•Hexadecimal
•Octal
Complex Numbers
•Coefficients
•Absolute value
•Quotient
•Sine
•Square root
Area
•Acres
•Hectares
Length
Speed
Temperature
Volume
Weight
Formatting
•Concatenate
•Decimal to fraction
•Date Format
•Parsing
Inspection
•String count
•Character position
Calendar
•Working days
Logic
Windowing
•Lag
•Running Count, Sum, Avg,
STDEV, VAR, etc.
•Moving Count, Sum, Avg,
STDEV, VAR, etc.
•Running Slope, Intercept,
Forecast, etc.
•Moving Slope, Intercept,
Forecast, etc.
•Moving Averages
Financial-Options Engineering Strings & Windowing
High-Level list of Functions
10. XLeratorDB Performance Examples
The following highlights the performance increase from Excel 2010 to
XLeratorDB.
FUNCTION LIBRARIES FOR SQL SERVER
Function
No. of
Records
Excel 2010 XLeratorDB Difference
SLOPE 1,502,537 4.2 min. .048 min. -98%
XIRR – Internal Rate of Return (irregular cash flows) 2,700,080 8.32 min. 1.33 min. -84%
ACCRINTM – Accrued Interest at Maturity 1,000,000 3.5 min. 1.099 min. -68.5%
13. XLeratorDB Installed
FUNCTION LIBRARIES FOR SQL SERVER
XLeratorDB installed on the database as a native component
The installed functions look and behave like a native
SQL Server component.
14. XLeratorDB Installed
FUNCTION LIBRARIES FOR SQL SERVER
Example of XLeratorDB XIRR function in SQL Server Management Studio
As the example below shows, XLeratorDB functions
are easy to deploy and use.
15. XLeratorDB used as a Development Solution
FUNCTION LIBRARIES FOR SQL SERVER
Example of XLeratorDB CAPM functions in the QlikView BI solution
XLeratorDB not only includes sophisticated
functionality but is also “integration friendly”
16. XLeratorDB used as a Development Solution
FUNCTION LIBRARIES FOR SQL SERVER
Example of XLeratorDB’s Option Matrix functions in QlikView BI solution
17. XLeratorDB used as a Development Solution
FUNCTION LIBRARIES FOR SQL SERVER
Example of XLeratorDB in Healthcare Solutions
19. XLeratorDB Documentation
•XLeratorDB includes full documentation that is
available on the website
•All functions include examples that can be
implemented right out of the box
•XLeratorDB blog includes over 75 informative entries
that provide real-world examples that can be cut,
pasted and executed right from the page
FUNCTION LIBRARIES FOR SQL SERVER
20. XLeratorDB Documentation Example
DURATION
Updated: 5 August 2010
Use DURATION to calculate the annual duration of a security with regular, periodic interest payments.
Syntax
SELECT [westclintech].[wct].[DURATION] (
<@Settlement, datetime,>
,<@Maturity, datetime,>
,<@Rate, float,>
,<@Yld, float,>
,<@Frequency, float,>
,<@Basis, nvarchar(4000),>)
Arguments
@Settlement
the settlement date of the security. @Settlement is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Maturity
the maturity date of the security. @Maturity is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Rate
the security’s annual coupon rate. @Rate is an expression of type float or of a type that can be implicitly converted to float.
@Yld
the security’s annual yield. @Yld is an expression of type float or of a type that can be implicitly converted to float.
@Frequency
the number of coupon payments per year. For annual payments, @Frequency = 1; for semi-annual, @Frequency = 2; for quarterly, @Frequency = 4; for monthly, @Frequency = 12. @Frequency is
an expression of type float or of a type that can be implicitly converted to float.
@Basis
is the type of day count to use. @Basis is an expression of the character string data type category.
@Basis Day count basis
0 or omitted US (NASD) 30/360
1 Actual/Actual
2 Actual/360
3 Actual/365
4 European 30/360
Return Type
float
Remarks
· If @Yld < 0 or if @Rate < 0, DURATION returns an error
· If the @Frequency is any number other than 1, 2, 4, or 12, DURATION returns an error
· If @Settlement > @Maturity, DURATION returns an error
· If the @Basis < 0 or the @Basis > 4, DURATION returns an error
Example
SELECT wct.DURATION ('12/22/2007'
,'12/15/2009'
,0.05
,0.06
,2
,0)
Here is the result set
----------------------
1.90779125985842
21. XLeratorDB Blog examples
Calculating a time-weighted rate of return using modified Dietz in SQL Server
By cflock on 10/24/2012 1:24 PM
The modified Dietz calculation produces a result which measures the performance of an investment portfolio
based on time-weighted cash flows. Today, we will look at two XLeratorDB aggregate functions, EMDIETZ and
FVSCHEDULE, which calculate the modified Dietz value for each period and then link the results together to
come up with a time-weighted rate of return value.
Read More »
Creating a Bond Amortization Schedule in SQL Server
By cflock on 4/5/2012 8:55 PM
A look at different techniques for generating schedules to account for the premium or discount associated with
the issuance or purchase of a bond using the XLeratorDB functions COUPDAYSNC, COUPNUM, DAYS360,
EDATE, IRR, PRICE, PV, RATE, SeriesDate, SeriesInt, XIRR, and YIELD.
Read More »
Calculating the Time-Weighted Rate of Return in SQL Server
By cflock on 11/25/2011 1:51 PM
With the release of the TWRR multi-input aggregate function, XLeratorDB users can now calculate the time-
weighted rate of return directly in a T-SQL statement.
Read More »
11 financial calculations that you can’t do in EXCEL
By cflock on 10/18/2011 8:16 PM
Here is a list of 11 very simple financial calculations that you can’t do in EXCEL, either because the EXCEL
design of a function doesn’t support the input data, or because EXCEL produces a result that is wrong or
unreliable. Of course, we used EXCEL 2010 and, of course, you can do them in SQL Server using XLeratorDB.
Part 1 of 11 - Enter a negative yield to calculate the price of a bond
Read More »
23. 23
StatisticsFinance
MathWindowing
Financial-
Options
Strings Engineering
Utilities
XLeratorDB
XLeratorDB Product Quality and Testing
XLeratorDB‘s product quality
meets the highest standard
XLeratorDB quality is assured with
over 1.6 billion test cases
XLeratorDB employs a “test
harness“ for each function, each
containing an average of 2.4 million
test cases
The quality of XLeratorDB gives
you the confidence to focus on your
business, not your software
FUNCTION LIBRARIES FOR SQL SERVER
27. XLeratorDB Summary
•XLeratorDB includes over 650 sophisticated functions covering
Finance, Statistics, Financial-Options, Math, Engineering and
Windowing
•XLeratorDB dramatically increases performance and security,
reduces risk and has impeccable quality
•XLeratorDB greatly enhances the overall value of SQL Server
FUNCTION LIBRARIES FOR SQL SERVER