Module ContingentClaims.Core.Builders¶
Functions¶
- unrollDates
: Int -> Int -> [Month] -> Int -> [Date]
Helper function to generate a series of fixing dates, e.g. for coupon payments in
fixed
. This assumesfixingMonths
andfixingDates
are ordered. The Daml Finance library(https://github.com/digital-asset/daml-finance) has more feature-complete date handling functions.
- forward
: t -> Observation t x o -> Claim t x a o -> Claim t x a o
Forward agreement. Discounted by (potentially stochastic) interest rate
r
.
- fra
: t -> t -> Observation t x o -> Observation t x o -> Claim t x a o -> Claim t x a o
Forward rate agreement.
- floating
: Observation t x o -> Observation t x o -> ccy -> [t] -> Claim t x ccy o
A floating rate bond.
- european
: t -> Claim t x a o -> Claim t x a o
European option on the passed claim. e.g. call option on S&P 500:
european (date 2021 05 14) (observe "SPX" - pure 4200)
- bermudan
: [t] -> Claim t x a o -> Claim t x a o
Bermudan option on the passed claim. Given a pre-defined set of times {t_1, t_2, .., t_N}, it allows the holder to acquire the underlying claim on at most one of these times.
- american
: t -> t -> Claim t x a o -> Claim t x a o
American option (knock-in). The lead parameter is the first possible acquisition date.
- swap
: ([t] -> Claim t x a o) -> ([t] -> Claim t x a o) -> [t] -> Claim t x a o
Asset swap on specific fixing dates
[t]
. For example:fixedUsdVsFloatingEur : [t] -> Serializable.Claim Text fixedUsdVsFloatingEur = fixed 100.0 0.02 "USD" `swap` floating (observe "USDEUR" * pure 100.0) (observe "EUR1M") "EUR"