Fundamentals Capstone 4.3

Can anyone tell me why I get a rank error with this Line of code 

ReturnN: { [orderColumn;N;t} N sublist orderColumn xasc t }

returnN[`edge;5;edge15]

It would be fine if it just didn’t work but I was able to verify that this statement does work if you just wrote out the function each time instead of explicitly defining it as returnN. No straightforward answers were given online. 

Hi  a few things I notice:

  • you are defining function  ReturnN but calling  returnN  .

  • Function definition line throws error } because closing bracket around parameters is wrong - should be ] instead of }

  • missing parameter  order  as asked for in question

I would suggest looking at the pseudocode provided in FP.Functions ->returnN for some hints on the suggested logic implementation. What you have is nearly there - just missing a check on order.

Cheers I realized that the error was.

returnN: { [orderColumn;N;t} N sublist orderColumn xasc t }

I was getting a rank error on this line as the code expected 3 inputs in order to return a value instead of treating it as a standard definition for a general function. I should have put a semicolon at the end to tell the code I wasn’t expecting an output from this. 

Apologies I have an issue in regards to a datatype error. 

E:timeSeries[edge] F:timeSeries[qty]
G:timeSeries[numTrds] edgeCor: edgeqtynumTrds!cor[E;E] cor[E;F] cor[E;G]

I did out a function that would calculate the correlation but realized there was an inbuilt command afterwards. But it won’t create a dictionary out of the results due to a unknown type error that it can’t specify. 

 

Just missing commas to separate the values of your dictionary

edgeqty`numTrds!cor[E;E],cor[E;F],cor[E;G]