KX Community

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

Home Forums KX Academy Fundamental Capstone Exercise 4 and 5

  • Fundamental Capstone Exercise 4 and 5

    Posted by daramcs on August 3, 2023 at 12:00 am

    Exercise 4: My table for edge15 is not passing the test, can someone confirm what is wrong

    Exercise 5:  The edgeProfileFull table is passing the test but the other two tables (optProfile and edgeProfile) are failing. I dont understand why this is happening as you derive edgeProfileFull from the previous table

     

     

     

     

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

    Administrator
    August 4, 2023 at 12:00 am

    Hi

    The first few rows of edge15 look like :

    minute| edge    qty numTrds 
    ------| ---------------------- 
    09:30 | 2946.818 3193 58 
    09:45 | 721.9481 905 21 
    10:00 | 564.0584 499 11 
    10:15 | 563.706 870 14 
    10:30 | 670.9859 1222 21 
    10:45 | 784.223 1002 21 
    11:00 | 134.2699 957 17 
    11:15 | 230.7435 728 14 
    11:30 | 560.6381 528 11 
    11:45 | 306.1817 769 14 
    12:00 | 876.8397 765 17

    so it does seem different to your results – if you can share you definition of edge15 I can better assist – you can use the spolier tag (expand three dots in toolbar to select).

  • daramcs

    Member
    August 16, 2023 at 12:00 am

    Hi Michaela, thanks for the reply

     

    edge15: select edge:sum edge,qty:sum qty, numTrds:count trade_id by 15 xbar `minute$time from tradeContext where date=2020.08.03,time >= 09:30:00

     

  • megan_mcp

    Administrator
    August 17, 2023 at 12:00 am

    Hi !

    If you take a look at the attached image of the question at hand, you’ll see the variable itself must be named ‘minute’.

    As well as this, we are after the latest date so the most recent date. You can do this by using ‘date = last date’. Feel free to have a look at this on our website ! first, last Reference kdb+ and q documentation – Kdb+ and q documentation (kx.com)

    Thanks,

    Megan

     

Log in to reply.