Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SecurityCompareConnector #69

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

DJTechnoo
Copy link
Member

Added SecurityCompareConnector.

Copy link
Contributor

@jedrzejruta jedrzejruta left a comment

Choose a reason for hiding this comment

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

Overall looks really solid, I like the concept of defaultly pulling TrailingPerfomance 🎉

Q: When pulling assetAllocations and other types, what about the not-classified number? In XRay, we put it into the column name which isn't ideal, but we need to have this information somewhere, perhaps in the metadata? 🤔

Copy link
Contributor

@pawelfus pawelfus left a comment

Choose a reason for hiding this comment

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

Nice!

A question though: why do we need to rewrite the converters from SecurityDetails? Could we somehow just reuse them? Parametrize somehow, eg by providing the path to the array with data? (Sorry if I'm missing something obvious here)

Copy link
Contributor

@jedrzejruta jedrzejruta left a comment

Choose a reason for hiding this comment

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

Nice work, only a minor thing in the demo, other than that looks great!

Copy link
Contributor

@pawelfus pawelfus left a comment

Choose a reason for hiding this comment

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

Thanks! Just a few demo-polishing things and one parser-related discussion

name: typeMapping[item['AssetAllocations_Type_' + id]],
y: item['AssetAllocations_MorningstarEUR3_N_' + id]
}))
.filter(entry => entry.y !== 0) // Filter out entries where y is 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have to keep all values, otherwise we have mismatching colors in series (compare cash):

Zrzut ekranu 2025-02-18 o 13 07 16

}


const connector = new HighchartsConnectors.Morningstar.SecurityCompareConnector({
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move the connector config under Dash ataPool's config

.map(item => ({
name: typeMapping[item['AssetAllocations_Type_' + id]],
y: item['AssetAllocations_MorningstarEUR3_N_' + id]
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can resign from this. Use dataLabels.format to apply the translation and columnAssignment to choose the right columns for charts

Copy link
Contributor

Choose a reason for hiding this comment

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

Directory name:
Let's follow the convention, and since we use Dash here, the directory name should be dashboards-...

Copy link
Contributor

Choose a reason for hiding this comment

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

I still believe this might be optimized. SecurityDetails parses one security. This one parses multiple, just using a bit different code. However under the hood it's the same:

const securityDetails = json[0]; // Details
...

vs

for (let i = 0; i < json.length; i++) {
    const securityCompare = json[i], // Compare
    ...

The way I see it (please correct me if I'm wrong!):

  • use only exiting TrailingConverter
  • if JSON contains more than one security, then column names are <name>_MSID, if just one, then just <name>
  • metadata.ids and metadata.isins are set for multi-security response. For one security, set metadata.id and metadata.isin

Copy link
Contributor

Choose a reason for hiding this comment

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

Note: I didn't check other converters, but perhaps the same can be solution can be used?

@DJTechnoo DJTechnoo changed the title security-compare-connector Added SecurityCompareConnector Feb 18, 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.

3 participants