asset-peer-group
Example
<cr-component id="component" name="asset-peer-group" loading></cr-component>
<script>
const component = document.querySelector("#component");
component.init({
symbolId: 117746,
customRanking: {
label: "Custom ranking",
stats: {
return: {
importance: 0,
},
volatility: {
importance: 0.6,
},
ocr: {
importance: 0.4,
},
},
},
symbolIds: [127967, 78532, 113202, 76091, 108226, 66940, 117746, 110805, 114589],
});
</script>
Schema
{
"type": "object",
"properties": {
"symbolId": {
"type": "number",
"minimum": 1,
"description": "Symbol id to compare"
},
"assessmentId": {
"type": "integer",
"minimum": 1,
"description": "Assessment identifier"
},
"compareSymbolId": {
"type": [
"number",
"null"
],
"description": "Anther symbol id to compare to"
},
"symbolIds": {
"type": "array",
"description": "Array of symbolIds",
"items": {
"type": "number",
"minimum": 1
}
},
"customRanking": {
"type": "object",
"description": "Config for a ranking with custom weights",
"additionalProperties": false,
"properties": {
"stats": {
"type": "object",
"description": "Config for a ranking with custom weights",
"additionalProperties": false,
"properties": {
"return": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"volatility": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"drawdown": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"assets": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"age": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"ocr": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
"esg": {
"type": "object",
"default": {
"importance": 0
},
"properties": {
"importance": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
}
}
}
}
}
},
"additionalProperties": true,
"oneOf": [
{
"required": [
"symbolId"
],
"prohibited": [
"assessmentId",
"symbolIds"
]
},
{
"required": [
"symbolId",
"assessmentId"
],
"prohibited": [
"symbolIds"
]
},
{
"required": [
"symbolId",
"symbolIds"
],
"prohibited": [
"assessmentId"
]
}
]
}
Complete Schema
{}
Events
-
changed
Fired when the user clicks in another symbol to compare
Return
- {{ symbolId, compareSymbolId }} data
Locales
{
"statisticsAnalysis": {
"title": "Asset vs 1st asset in the Ranking",
"statistics": {
"cost": "Cost",
"performance": "Performance",
"volatility": "Volatility",
"assets": "Assets"
}
},
"rankingAnalysis": {
"orderBy": "Order by",
"choices": {
"customRanking": "Custom ranking",
"performance": "Performance",
"drawdown": "Maximum drawdown",
"volatility": "Volatility",
"costs": "Costs",
"assets": "Assets",
"esg": "ESG"
}
},
"powerbarsAnalysis": {
"categoryAverage": "Category average",
"criterias": {
"esg": "ESG",
"popularity": "Popularity",
"riskAversion": "Risk aversion",
"costSavings": "Costs savings",
"performance": "Performance"
}
}
}