Failures on "tradeContext has correct format."

https://learninghub.kx.com/forums/topic/failures-on-tradecontext-has-correct-format

Hi team,

I saw other people asking same thing but I am facing the same problem on fandamental capstone exercise 3.1.

The table format looks correct according to other threads but it fails and I have no clue.
Could anyone please have eyes on this?

Here's the screenshot of meta tradeContext and the result.


Thank you!


Hi @Yu

When creating your tradeContext table are selecting from the trade table or a variation of the trade table that you have created yourself?

This is how I see some people get caught out, as the format of these manually created tables are incorrect.

Let me know!

Many thanks,

Megan

This is what I do

tradeContext:aj[option_idtime;select from trade where date= max date;select option_id,time,ask,bid from nbbo where date= max date]


The trade table is the original one.

Hi @Yu

Can you try sorting time in ascending order? I realise this may not be obvious in the question itself so I will look in to adjusting this question for future users.

Thanks,

Megan

I tried this way but didn't work as it changed the format.

Is this the correct way to do it?


Yu

Hi @Yu

`time xasc select option_id, time ..

Hope this helps!

Hi megan,

I tried a couple of sorting but seems I lose the partition on option_id no matter how I do.

Do you expect it? Or are there any ways to keep the partition?

Regards,

Yu

Hi @Yu

Sorry my mistake .. sorting the time by ascending order wasn't the error.

In the exercise it states "This should have two extra columns - bid and ask"

I've noticed you have formatted your table to have your ask column before your bid column which has resulted in the formatting being incorrect.

I've tested your code by swapping the two columns and the test passed.

Hope this helps.


Megan

Megan,


Ah, it finally worked.

Thank you very much for the advice!


Regards,

Yu