# Complex Formula Handling in Quantrix

3.16K views
0

Hi:

I am in the process of evaluating modeling tools for modeling very large and complex set of financial algorithms. I have several general questions that I have in terms of whether Quantrix is a right tool or not. But, I would like to start with a very specific question since I like what I see with Quantrix so far!

I have two matrices one with quantity (Q) and the other with prices (P). The quantity has 3 dimensions (i, j, k) and the price has 2 dimentions (i, j). What I would like to do is calculate the Cost (C) which has a single dimensions.

I have created 3 matrices Q, P, and C and the shared categories are all linked. Is there a way to write a formula in matrix C that would give me the C(i) without creating summary items in the matrices Q and P or creating an intermediate matrix/view?

I have something like ‘= sum(Q::k) * P::k’. But, that gives me a wrong answer because it seems to sum the Q over j and k dimentions first before multiplying by first P. Is there a way of specifying the dimentional order of calculations within a formula?

The reason I am asking is I have highly defined mult-variate algebraic equations with numerous dimensions and interdependent variables. So, I would strongly prefer not to create additional variables than what I already have. For now, I am planning to craete a matrix for each variable and make the model to hold all the variables needed to calculate the charge code.