My job unfortunatly just got rid of some really talented programmers, and i am left to do this. We are working with a new system we are developing which takes an input (stock quotes) from a database (could even be excel file) and returns a specific answers based on the following function:

The function to be evaluated is this: P.S. the 'E' means Summation (Sigma).

N-1 L-1 M-1

y(n) = E a(k) x(n-k) + E + E b(l,m) x(n-1) x(n-m)

K=0 I=0 m=0

Now, i have no idea why the algorithm has to be based on the above function, (remember, i am taking over a half completed job and im not even a real programmer) but this is what was in the old programmers notes. I need some sort of java or c++ code to evaluate the above function. I know that we are going to be working with 200 stock quotes at a time, so let x(n) be 200 values, choosing some variable (a and b) to be real constant coefficiants.

public float y(n)

{

t1=0;

for(int k=0;k<=N-1;k++)

{

t1=t1+a[k]*x[n-k];

}

for(int l=0;l<=L-1;l++)

for(int m=0;l<=M-1;m++)

{

t1=t1+ b[l][m]*x[n-1]*x[n-m];

}

}

System.out.println("y100="