Skip to content

Conversation

@ConorSwainDI
Copy link
Contributor

PR to resolve #690

/- helper function to support queries against the sym column
maptoint:{[symbol]
sym?symbol
sym?`NONE^symbol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use something different here - NONE seems like it could validly be in an instrument universe
https://finance.yahoo.com/quote/NONE-USD/
Can we do something like `TORQNULLSYMBOL or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I am happy to fix this to use some explicitly stated `TORQNULLSYMBOL or similar. Existing code moved null symbols to NONE

(sortedlist union tables[`.]) except ignorelist}

/- function to check for null syms
checknullsym:{[s] -1 _ `${@[x; where not ((type each x) in (10 -10h));string]} s,(::)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this function?

Copy link
Contributor Author

@ConorSwainDI ConorSwainDI Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was existing logic to check whether a sym was null (old wdb code line 126). I wanted leverage it in new code line 124, and didn't want any duplicate code so moved it into its own function

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name of this function/the comment above is misleading. It's not checking for null syms, it's making sure that regardless of what is passed to it, a list of syms is returned. Can you update the name/comment to something more descriptive of what's actually happening here? Maybe ensuresymlist or something.

@ConorSwainDI ConorSwainDI changed the title Fix partbyenum to enumerate against NONE symbol Fix partbyenum to enumerate against placeholding symbol Jan 30, 2025
Copy link
Member

@jonathonmcmurray jonathonmcmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One naming issue, otherwise looks good

(sortedlist union tables[`.]) except ignorelist}

/- function to check for null syms
checknullsym:{[s] -1 _ `${@[x; where not ((type each x) in (10 -10h));string]} s,(::)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name of this function/the comment above is misleading. It's not checking for null syms, it's making sure that regardless of what is passed to it, a list of syms is returned. Can you update the name/comment to something more descriptive of what's actually happening here? Maybe ensuresymlist or something.

@ConorSwainDI ConorSwainDI merged commit d844917 into master Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WDB partbyenum misses null symbols

4 participants