KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Fundamentals Capstone 5.3 Problem

  • Fundamentals Capstone 5.3 Problem

    Posted by freddie_olsen on November 25, 2021 at 12:00 am

    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.

    freddie_olsen replied 3 months, 2 weeks ago 2 Members · 2 Replies
  • 2 Replies
  • Laura

    Administrator
    November 25, 2021 at 12:00 am

    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

    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!

  • freddie_olsen

    Member
    November 26, 2021 at 12:00 am

    That is problem solved!

    Thank you.

Log in to reply.