Replies: 3 comments 2 replies
-
I think you're asking about adding support for a kind of 'decomposition' the details of which resemble slicing? |
Beta Was this translation helpful? Give feedback.
-
To support the discussion. #14 |
Beta Was this translation helpful? Give feedback.
-
I recently wrote tests for the Also, the most recent release of SLASH, 0.3, added support for The |
Beta Was this translation helpful? Give feedback.
-
Here is a problem, that I want to be able to use
Vec
,Matrix
for.I'm modelling a financial instrument. I have 10,000 potential outcomes for each instrument.
I can write an extension method, to fairly easily calculate the tVar of each instrument, and a portfolio of instruments.
TVaR has the advantage of being
coherent
(I think is the right word), which is a fancy way of saying we can decompose it.Now, I want to find the contribution of each instrument to the tVar of my portfolio.
In this simple case, the 50% (<--- normally we want a more extreme percentile, like 99%) tVar of the portoflio is 7 + 11 / 2 = 9.
The contribution of the instruments are
Inst 1 = (2 + 5 ) / 2 = 3.5
Inst 2 = (4 + 6) / 5 = 5
Inst 3 = 1 / 2 = 0.5
Currently, I think calculating that decomponsition isn't possible with Vec / martix?
The obvious solution would be to identify the rows of interest by returning a
NArray[Boolean]
of the rows of interest, extracting out the sub-matrix / vectors... and from there it's easy.Woudl you welcome a PR which attempted this?
Beta Was this translation helpful? Give feedback.
All reactions