CarmineOptions / derisk-research

MIT License
4 stars 14 forks source link

feat: possibility to sum two portfolios #116

Closed lindsaymoralesb closed 1 month ago

lindsaymoralesb commented 1 month ago

Issue:

Resolves #113

Summary:

Modified the portfolio class to add the possibility of adding two instances together. For this I first added the validation of the second instance being of the same type (portfolio), if not, raise an error. Then take the tokens values and add them together to return a new portfolio instance containing these new values.

lukaspetrasek commented 1 month ago

Wonderful! Merging.