Insights are useful only if they arrive on time â€“ the faster, the better. In fact, speed and accuracy are the two most important pillars of financial analytics. Now, if we add another ingredient â€śscale of dataâ€ť to the mix, the combination can transform financial analytics for any business.
Imagine if you could analyze years of financial data on the cloud or on-premise data lakes in sub-seconds and that too with extremely high precision. In this blog, we will cover how Kyvos enables extreme decimal support, helping you explore vast amounts of complex financial data instantly so that you can identify anomalies and decimate potential breakdowns.
Approximations Bring in Inaccuracies
When preparing data for financial analytics, you often encounter numeric data in a variety of formats from around the world. As supported by most tools, the double and float are approximate data types that do not store the exact values specified for large numbers. They store an extremely close approximation of the value.
Due to the approximate nature, you cannot use them when exact numeric behavior is required, such as in financial applications, in operations involving rounding, or in equality checks. The exact numeric data type like decimal is the best fit for storing exact values, performing precise and safe calculations, performing the fastest integer calculations, and avoiding binary-to-decimal rounding errors. Values are stored as literal representations of a numberâ€™s value. Rounding up from four decimal places to two can have a significant impact on the accuracy of calculations, as precision suffers from every lost decimal place.
In addition to the rounding of decimal places, reporting tools like MS Excel have a limit on the number of digits that can be stored. Currently, Excel allows you to store only 15 digits in a column.
Size Matters When It Comes to Decimal Places
Banking and other financial institutions deal with massive amounts of transactional data. Financial reporting on such huge volumes of data needs both speed and accuracy. For many applications, a tiny difference between the specified value and the stored approximation is not noticeable, but for high-value transactions, the difference becomes remarkable.
Consider a scenario where you want to create a report with calculations based on an amount, such as a rate charged per unit quantity. This rate (with higher decimal places) when multiplied with a large total quantity ends up giving a huge difference in the net amount. Hence, it becomes extremely important to get as precise calculations as possible. Microsoft Excel limits the number of digits to 15, and numbers larger than 15 are rounded off.
$ 123456789.123456789 * $ 987654321.987654321 = $ 121,932,631,356,500,531.35
MS Excel renders this value in double data type as $ 121,932,631,356,500,528.00
In decimal data type, the same is rendered as: 1.21932631356500528E17
Now, if you have multiple such values in a report, the calculations would be inaccurate, and lead to misinterpretation.
Making the Cut with Kyvos
To solve this problem, Kyvos offers support for the Decimal data type. The decimal data type stores an exact representation of the number; there is no approximation of the stored value.
The two attributes that define decimal columns, variables, and parameters are:
- Precision: Represents the total number of digits that can be represented by the column, regardless of the location of the decimal point.
- Scale: Represents the number of fractional digits, i.e., digits that come after the decimal point. This value must be less than or equal to the precision value. A scale of 0 produces integral values, with no fractional part.
For example, if we have a number 200.245, then precision is six because we need six digits to write down this number, and the scale is three as it has three digits after the decimal.
Kyvos in Action
Now, letâ€™s see how you can define this in Kyvos.
At the time of registering file, you get an option to Refine data. Here you can format your data and define data types.
In the Data Sub Type, select the decimal option, and then define the number of Decimal Places using the Format option, as shown in the following figure.
Figure 1: Registering Files for High Precision Numbers
If you did not select the decimal places at the time of registering files, but you expect your calculations to result in extreme decimals, you can define the decimal places while transforming your data. For this, specify the Decimal Places for the output format in the Formula field, as shown in the following figure.
Figure 2: Transforming Data
Similarly, you can define the scale at the time of designing the cube.
For this, select the measure for which you want to define the scale. Specify the number of Decimal Places using the Format option, as shown in the following figure.
Figure 2: Transforming Data
When working with financial applications or reports, in operations involving rounding, or inequality checks, it is imperative to use exact values for calculations. Commonly used tools such as Microsoft Excel, do not support numerical values with more than 15 digits. Hence, larger numbers are rounded off, resulting in inaccurate calculations.
Most BI tools support double data type. However, due to the approximate nature of the double data type, you cannot use it for data modeling when exact numeric behavior is required.
Kyvos eliminates these limitations by supporting decimals with precision up to 38 digits and a scale up to 20. One of our clients is currently working with financial data validated to 17 decimals.
If you want to learn about our unique product features and how Kyvos supports high-speed financial analytics, request a custom demo now.
You can also join our upcoming webinar, Financial Analysis on Trillion Rows: High-Performance BI Acceleration Layer, to learn how you can transform financial analytics into a fully automated process at a fraction of the cost, setting you free to focus solely on analysis and prediction.