Table Valued Functions in .NET

Uncommercial: finaquant® protos Commercial: finaquant® calcs
Uncommercial .Net Library with Table Functions
- Non-commercial & free .net library
- Analytical Table Functions with in-memory tables as input and output parameters (like standard formulas in excel)
- Table computations without any sql-based database programming
- A framework for user-defined Table Functions (like user-defined formulas in excel)
- Ability to calculate and store all the table valued parameters of multiple calculation instances in a relational database like MS SQL or MySQL – more info & downloads
Calculation Engine based on Table Functions (.NET)
- All the features and Table Functions of the non-commercial finaquant® protos, plus Calculation Nodes and Networks for enhanced automation, performance and modularity (Calculation Engine)
- Integration of table and matrix computations for applications like scenario analysis, estimations and predictions
- Can be used for applications like Business Analytics & Intelligence, Commission & Performance calculations, Simulations & Optimizations – more info & downloads

Posted on by admin | Leave a comment

Testing Table Valued Functions with LINQPad

LINQPad is a lightweight software development tool for .net developers that can be installed easily within a minute. LINQPad users may find it practical to test table-valued functions of finaquant’s .net libraries Finaquant Protos or Calcs directly in LINQPad, especially for running queries on input and output tables. This is quite easy as the following steps will illustrate.

Table Functions with LINQPad

How to run demo queries with table functions in LINQPad

Download Description
LINQPad_demo_queries Demo queries (scripts in C# and VB.NET) for finaquant’s table-valued functions

1) Download and install LINQPad
How LINQPad is defined by its developer: Querying is merely a special case of using LINQPad. More generally, LINQPad is a C#/VB/F# scratchpad that instantly executes any expression, statement block or program with rich output formatting and a wealth of features that “just work”.

2) Download and install one of the .net libraries with table-valued functions, Finaquant Protos (free) or Finaquant Calcs (commercial).
All the demo queries (i.e scripts) in LINQPad can be run with both libraries, excluding the Commission Calculation example which requires Finaquant Calcs.

These libraries include high-level methods (of class MatrixTable) with table-valued parameters, as often required in analytics or business intelligence. Continue reading

Copyright secured by Digiprove © 2014 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged , , , , , | Leave a comment

Building a Web Service that Receives and Returns Data Tables

As you will see below, it is quite easy to build a web service with the Web API Framework (ASP.NET), which:

  1. receives data tables from a web client as input parameters,
  2. makes some analytical operations on these input tables using table-valued functions,
  3. returns some resultant (output) tables to web client as output parameters.

web service that receive and return data tables

Download Description
WebService_MatrixTable MS Visual Studio 2012 project Web Service (.NET 4.0)
WebClient_MatrixTable MS Visual Studio 2012 project Web Client (.NET 4.0)

Application Examples

As you can imagine, you could implement a variety of data processing services with such a web service which is capable of receiving and returning data tables (of type MatrixTable). Here are some examples: Continue reading

Copyright secured by Digiprove © 2014 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged , , , , | Leave a comment

Optimizing Marketing Investment

Table Functions of our .NET libraries finaquant® protos (non-commercial) or finaquant® calcs (commercial) can be used to formulate evaluation function (also known as objective or fitness function) and constraints in any optimization scenario quite easily without cumbersome database programming; following model example shows how.

The output of an evaluation function can be measures like profit, time or costs, depending on the figure you want to minimize or maximize. In the following example, we want to get optimal marketing investment amounts per brand (value drivers) in order to maximize total profit from sales.

We will use Nelder-Mead Solver from Microsoft Solver Foundation (free .NET library) to find optimal investment amounts in this example.

You may download the Visual Studio project file with all the C# code required to run this example here.

Business Scenario

An online digital products dealer wants to increase its sales through advertisements on internet. Each ad will promote a certain brand (i.e. ads at brand level). The increase in sales for each product depends on (1) investment amount, and (2) sensitivity α of the product.
Marketing Investment as Value Driver Continue reading

Copyright secured by Digiprove © 2014 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged , | Leave a comment

Reporting with ReportViewer in Visual Studio

With finaquant® protos (non-commercial) or finaquant® calcs (commercial) a .NET developer has everything she needs for analytical table computations and database connection (i.e. storing and reading complete data tables).

Sometimes, tables need to be broken down into matrices for detail processing. As shown in our related forum post, the available matrix and vector functions in finaquant libraries can easily be extended with other numerical .NET libraries like ILNumerics that offer more specific functions for statistics and optimization.

Reporting (presenting data visually in well-formatted layouts and pdf files) is the only missing link. Luckily, basic reporting functionality is built in Visual Studio and .NET framework. Following video demonstrates how a simple report with a parameter can be created with ReportViewer:

You may find more information about reporting at Finaquant Community Forum explaining:

  • How to bind a DataSet to a report as data source programmatically (dynamic binding)
  • How to export a report to a PDF/WORD file programmatically (without preview)
  • How to send an Email with (PDF/WORD) attachment from an SMTP email account
Posted in Calculation engine | Tagged | Leave a comment