Closed matteolimberto-da closed 2 years ago
Hey @matteolimberto-da . I was thinking about this and trying to recall why I made this change originally (previously they were distinct types).
I'm thinking it boils down to pricing. Say I want to value a bond. On the leaves, I will have One "USD"
for example. Now the thing is, when this gets converted to a formula, I will have something in terms of an expectation E[ ... USD ..]
, so I need to be able to convert from the asset to an observation in Reals. If I have the same type, then I will be able to lookup the USD value. [edit: perhaps this is a bad example - think instead of having a security in the leaves. Or a currency that is not the valuation currency]. If not, then how do I do this?
Does that sound reasonable to you? It's been a while since I did this, and I'm struggling to remember the motivation. Does the above sound logical?
Let's raise a ticket for this instead, to not block the PR. As the pricing module is clearly marked experimental, I don't see any issue changing it later.
On Tue, Jun 7, 2022 at 9:41 AM Matteo Limberto @.***> wrote:
@.**** commented on this pull request.
In daml/ContingentClaims/Math/Stochastic.daml https://github.com/digital-asset/contingent-claims/pull/88#discussion_r890870124 :
-> (a -> a -> Process t)
- -- ^ Given an asset and a currency, it returns the value process of the asset expressed in units of currency
- -> (o -> a -> Process t)
Happy to get back to you after putting some thought into this. Would you see it as part of this PR or should I rather raise an issue and address this separately?
— Reply to this email directly, view it on GitHub https://github.com/digital-asset/contingent-claims/pull/88#discussion_r890870124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYA3GURFEXE3TULUB7GMDLVN34K7ANCNFSM5XNOCYYQ . You are receiving this because you were mentioned.Message ID: @.***>
-- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.
Let's raise a ticket for this instead, to not block the PR. As the pricing module is clearly marked experimental, I don't see any issue changing it later. … On Tue, Jun 7, 2022 at 9:41 AM Matteo Limberto @.> wrote: @*.*** commented on this pull request. ------------------------------ In daml/ContingentClaims/Math/Stochastic.daml <#88 (comment)> : > -> (a -> a -> Process t) + -- ^ Given an asset and a currency, it returns the value process of the asset expressed in units of currency + -> (o -> a -> Process t) Happy to get back to you after putting some thought into this. Would you see it as part of this PR or should I rather raise an issue and address this separately? — Reply to this email directly, view it on GitHub <#88 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYA3GURFEXE3TULUB7GMDLVN34K7ANCNFSM5XNOCYYQ . You are receiving this because you were mentioned.Message ID: @.> -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.
Thanks, I raised https://github.com/digital-asset/daml-finance/issues/533 to address it.
This PR decouples the type used to represent assets that can be delivered from observables.
The main reason why I think this makes sense is that observables are a much bigger set than assets and are generally non-deliverable. For instance, we wish to observe a Libor rate but can't deliver it.
This is a breaking change