KX Community

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

Home Forums KX Academy Level 2 Capstone Final Project Issues

  • Level 2 Capstone Final Project Issues

    Posted by karthik on September 3, 2024 at 9:54 pm

    I have attached all the screen snippets for context. My questions relate to the Level 2 fundamentals capstone project at section 3.1 and are are as follows:

    as seen in the image snippet provided, the question asks for the following:

    **3.1 Looking only at the last date in our database, create a new table tradeContext which has all the trade table information. This should have two extra columns – bid and ask – which contain the nbbo information for that particular trade option_id as at that trade time.**

    1. The sample output provided does not seem to be accurate, it matches the wrong row from the trade table to thenbbo table. This can be seen in the other snippet I included: all such bids and asks from the nbbo table that are of option_idFB20200720C230 have a time equal to 09:33:43.764

    2. But the option_id of that same value from the trade table, when as-of joined with thenbbo table matches with a different time (as seen in the snippet). The nbbo time it matches to is at 13:01:10.535. This is because the option_id we are dealing with has atrade table time equal to 13:01:30.268, so the nearest match from nbbo table would be 13:01:10.535, not 09:33:43.764 (this time corresponds to the time associated with the bids and ask prices seen in the expected sample output section).


    3. This result is inconsistent with the sample expected output provided, as the sample expected output seems to match this specifictrade record with the wrong nbbo record (given the fact that all bids = 44.55 and asks= 45.9 for option_id =FB20200720C230 are at 09:33:43.764, this seems to be the “expected output” when as-of joined.

    4. First question: Am I understanding this incorrectly? Or is this an actual inconsistency?

    5. Moving on from this, after conducting an as-of join on trade andnbbo, there seems to be some records from trade that happened at times earlier than the earliest time values innbbo. This means there are some records that are missing an associated bid and ask value since these trade table trades could not as-of join to anynbbo times (again, since they happened before any and all time stamps observed in `nbbo). Are there supposed to be records that could not as-of join to any nbbo time?

    6. I am Failing the test that occurs only in this section, as the error reads: “abort in before block due to error \”length\”” (this error can also be seen in the snippet image provided.

    Any guidance on these raised issues would be very helpful as I am quite unable to proceed forward for quite some time at this point.

    Thank you very much.

    karthik replied 2 months, 2 weeks ago 2 Members · 3 Replies
  • 3 Replies
  • karthik

    Member
    September 3, 2024 at 11:39 pm

    I made a few changes and now my test fails as seen in the snippet.

    tradeContext is defined as seen in snippet. Is there anything I am doing wrong?

    I am able to pass all tests except this one here. The information and snippets in the original above post and this one is all i can think of in terms of possibly influencing this test fail error.

  • megan_mcp

    Administrator
    September 4, 2024 at 10:33 am

    Hi @karthik

    I see you have received your certificate so congratulations on completing the capstone!

    I’ve looked in to your comments about the sample data and there are some inaccuracies. I will make sure to have these updated for future users.

    If you have any more questions please feel free to let me know!

    Many thanks,

    Megan 🙂

    • karthik

      Member
      September 4, 2024 at 5:08 pm

      Hi Megan,

      Thank you! I really found the capstone project to be insightful and of much value. Appreciate the clarification and prompt response to my queries. I’m all set for now but will reach out again here if I have any questions on the advanced developer assessment.

      Thanks again.

      Best,

      Karthik

Log in to reply.