cancel
Showing results for 
Search instead for 
Did you mean: 

Fundamentals Capstone 5.3 Problem

Freddie_Olsen
New Contributor II
New Contributor II

Hi all,

Just sending through a message because I am a little confused on the last exercise of the Fundamentals capstone assignment, which I am currently failing at:

quizItem    success description                                     error
-------------------------------------------------------------------------
exercise5.1 Pass    "optProfile Is Defined In Process"              ""   
exercise5.1 Pass    "optProfile Has Correct Format And Values"      ""   
exercise5.2 Pass    "edgeProfile Is Defined In Process"             ""   
exercise5.2 Pass    "edgeProfile Has Correct Format And Values"     ""   
exercise5.3 Pass    "edgeProfileFull Is Defined In Process"         ""   
exercise5.3 Fail    "edgeProfileFull Has Correct Format And Values" ""

Within this, I am currently calling the following:

**5.3 Create a new table `edgeProfileFull` using the `edgeProfile` table (or otherwise) which has the 
`edgeProfile` information augmented with the underlying instrument information in a readable format.** 
*Hint: The `instRef` table contains the readable information and can be linked with the `optRef` table*
*Helper Exercises: Try the exercises in our previous **Joins** module before attempting this exercise* 
```q
edgeProfileFull: lj[0!edgeProfile;xkey[`option_id;select inst_id, inst_syb, inst_name, option_id from lj[optRef;xkey[`inst_id;instRef]]]]

As I understand it, all this is asking us to do is join the data from the instRef to our existing edgeProfile table (which has passed all tests).
Could it be that I have misunderstood the question as I cannot spot any errors assuming that my interpretation is correct?

Thank you.

Freddie.

1 ACCEPTED SOLUTION

Michaela
Community Manager Community Manager
Community Manager

Hi Freddie,

Looks like your nested lj isn't doing what you expect as only columns from instRef are being joined on, not ones from optRef. The question asks for both.

 

Hint the table schema of edgeProfileFull should look like

Spoiler
c | t f a
---------| -----
option_id| s
numTrds | j
avgEdge | f
minQty | j
maxQty | j
inst_id | j
opt_type | s
strike | j
expiry | d
inst_syb | s
inst_name| C

and the table should be keyed.

 

Hope this helps!

View solution in original post

2 REPLIES 2

Michaela
Community Manager Community Manager
Community Manager

Hi Freddie,

Looks like your nested lj isn't doing what you expect as only columns from instRef are being joined on, not ones from optRef. The question asks for both.

 

Hint the table schema of edgeProfileFull should look like

Spoiler
c | t f a
---------| -----
option_id| s
numTrds | j
avgEdge | f
minQty | j
maxQty | j
inst_id | j
opt_type | s
strike | j
expiry | d
inst_syb | s
inst_name| C

and the table should be keyed.

 

Hope this helps!

That is problem solved!

Thank you.