-
-
Notifications
You must be signed in to change notification settings - Fork 204
Description
This is not an issue or bug, but rather a desired feature that I think would make our lives easier and more elegant.
It would be useful if multivariate discrete distributions had:
- A property telling us whether its dimensions are independent.
- A method to extract joint distributions of subsets of its dimensions. E.g., if I have the joint distribution of permanent shocks to income, transitory shocks to income, and risky returns
ShkDstn, it would be useful to be able to do something likeInkShkDstn = ShkDstn.marginal(dims=[0,1]). - A method to determine whether its dimensions are independent. Since we are dealing with discrete distributions, this should be easy.
What is the value of all this?
1. Redundancy reduction: IndShockConsumerType currently tracks IncShkDstn, TranShkDstn, and PermShkDstn. It'd be good if we kept track of a single object.
2. In-code determination of the methods/speedups that can be used: Harmenberg's method works only if permanent shocks are independent from all other shocks (I think); a portfolio problem can be solved much more quickly if the return factor is independent of other shocks. Currently we ask the user to tell us whether these things are true with arguments like IndepDstnBool. If would be good if the user could simply give us a joint distribution of shocks and we figured out the rest.
3. The above point would help to reduce hard-coded features and make things more modular: IndShockConsumerType knows its shocks are independent because we have hard-coded its income process. If we want to move towards a world where we can pass an income distribution constructed elsewhere, we have to be able to determine the properties of that distribution, for the reasons above.
Metadata
Metadata
Assignees
Type
Projects
Status