Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hedge
Synopsis
- data RateSwap = RateSwap {
- rsType :: RateSwapType
- rsDayCount :: DayCount
- rsSettleDates :: Maybe (SettleDates, String)
- rsUpdateDates :: DatePattern
- rsNotional :: RateSwapBase
- rsRefBalance :: Balance
- rsPayingRate :: IRate
- rsReceivingRate :: IRate
- rsNetCash :: Balance
- rsStartDate :: StartDate
- rsLastStlDate :: Maybe Date
- rsStmt :: Maybe Statement
- data RateCap = RateCap {}
- data RateSwapType
- data RateSwapBase
- accrueIRS :: Date -> RateSwap -> RateSwap
- payoutIRS :: Date -> Amount -> RateSwap -> RateSwap
- receiveIRS :: Date -> RateSwap -> RateSwap
- receiveRC :: Date -> RateCap -> RateCap
- data CurrencySwap = CurrencySwap {}
- rsRefBalLens :: Lens' RateSwap Balance
- data SRT = SRT {}
- data SrtType = SrtByEndDay DealStats DatePattern
Documentation
Constructors
RateSwap | |
Fields
|
Instances
Constructors
RateCap | |
Fields
|
Instances
data RateSwapType Source #
Constructors
FloatingToFloating Floater Floater | Paying Floating rate and receiving Floating Rate |
FloatingToFixed Floater IRate | Paying Floating Rate and receiving Fixed Rate |
FixedToFloating IRate Floater | Paying Fixed Rate and receiving Floating rate |
FormulaToFloating DealStats Floater | Paying Formula Rate and receiving Floating rate |
FloatingToFormula Floater DealStats | Paying Floating Rate and receiving Formula rate |
Instances
FromJSON RateSwapType Source # | |||||
Defined in Hedge | |||||
ToJSON RateSwapType Source # | |||||
Defined in Hedge Methods toJSON :: RateSwapType -> Value # toEncoding :: RateSwapType -> Encoding # toJSONList :: [RateSwapType] -> Value # toEncodingList :: [RateSwapType] -> Encoding # omitField :: RateSwapType -> Bool # | |||||
Generic RateSwapType Source # | |||||
Defined in Hedge Associated Types
| |||||
Show RateSwapType Source # | |||||
Defined in Hedge Methods showsPrec :: Int -> RateSwapType -> ShowS # show :: RateSwapType -> String # showList :: [RateSwapType] -> ShowS # | |||||
Eq RateSwapType Source # | |||||
Defined in Hedge | |||||
Ord RateSwapType Source # | |||||
Defined in Hedge Methods compare :: RateSwapType -> RateSwapType -> Ordering # (<) :: RateSwapType -> RateSwapType -> Bool # (<=) :: RateSwapType -> RateSwapType -> Bool # (>) :: RateSwapType -> RateSwapType -> Bool # (>=) :: RateSwapType -> RateSwapType -> Bool # max :: RateSwapType -> RateSwapType -> RateSwapType # min :: RateSwapType -> RateSwapType -> RateSwapType # | |||||
type Rep RateSwapType Source # | |||||
Defined in Hedge type Rep RateSwapType = D1 ('MetaData "RateSwapType" "Hedge" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) ((C1 ('MetaCons "FloatingToFloating" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater)) :+: C1 ('MetaCons "FloatingToFixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRate))) :+: (C1 ('MetaCons "FixedToFloating" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRate) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater)) :+: (C1 ('MetaCons "FormulaToFloating" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStats) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater)) :+: C1 ('MetaCons "FloatingToFormula" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Floater) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStats))))) |
data RateSwapBase Source #
Constructors
Fixed Balance | a fixed balance as notional base |
Base DealStats | a referece as notional base |
Schedule Ts | a predfiend schedule of notional balance |
Instances
FromJSON RateSwapBase Source # | |||||
Defined in Hedge | |||||
ToJSON RateSwapBase Source # | |||||
Defined in Hedge Methods toJSON :: RateSwapBase -> Value # toEncoding :: RateSwapBase -> Encoding # toJSONList :: [RateSwapBase] -> Value # toEncodingList :: [RateSwapBase] -> Encoding # omitField :: RateSwapBase -> Bool # | |||||
Generic RateSwapBase Source # | |||||
Defined in Hedge Associated Types
| |||||
Show RateSwapBase Source # | |||||
Defined in Hedge Methods showsPrec :: Int -> RateSwapBase -> ShowS # show :: RateSwapBase -> String # showList :: [RateSwapBase] -> ShowS # | |||||
Eq RateSwapBase Source # | |||||
Defined in Hedge | |||||
Ord RateSwapBase Source # | |||||
Defined in Hedge Methods compare :: RateSwapBase -> RateSwapBase -> Ordering # (<) :: RateSwapBase -> RateSwapBase -> Bool # (<=) :: RateSwapBase -> RateSwapBase -> Bool # (>) :: RateSwapBase -> RateSwapBase -> Bool # (>=) :: RateSwapBase -> RateSwapBase -> Bool # max :: RateSwapBase -> RateSwapBase -> RateSwapBase # min :: RateSwapBase -> RateSwapBase -> RateSwapBase # | |||||
type Rep RateSwapBase Source # | |||||
Defined in Hedge type Rep RateSwapBase = D1 ('MetaData "RateSwapBase" "Hedge" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (C1 ('MetaCons "Fixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Balance)) :+: (C1 ('MetaCons "Base" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStats)) :+: C1 ('MetaCons "Schedule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ts)))) |
accrueIRS :: Date -> RateSwap -> RateSwap Source #
The accrueIRS
will calculate the Net
amount
( payble with negative, positve with receivable) of Rate Swap
payoutIRS :: Date -> Amount -> RateSwap -> RateSwap Source #
set rate swap to state of payout all possible cash to counterparty
receiveIRS :: Date -> RateSwap -> RateSwap Source #
set rate swap to state of receive all cash from counterparty
data CurrencySwap Source #
Constructors
CurrencySwap | |
Instances
FromJSON CurrencySwap Source # | |||||
Defined in Hedge | |||||
ToJSON CurrencySwap Source # | |||||
Defined in Hedge Methods toJSON :: CurrencySwap -> Value # toEncoding :: CurrencySwap -> Encoding # toJSONList :: [CurrencySwap] -> Value # toEncodingList :: [CurrencySwap] -> Encoding # omitField :: CurrencySwap -> Bool # | |||||
Generic CurrencySwap Source # | |||||
Defined in Hedge Associated Types
| |||||
Show CurrencySwap Source # | |||||
Defined in Hedge Methods showsPrec :: Int -> CurrencySwap -> ShowS # show :: CurrencySwap -> String # showList :: [CurrencySwap] -> ShowS # | |||||
Eq CurrencySwap Source # | |||||
Defined in Hedge | |||||
Ord CurrencySwap Source # | |||||
Defined in Hedge Methods compare :: CurrencySwap -> CurrencySwap -> Ordering # (<) :: CurrencySwap -> CurrencySwap -> Bool # (<=) :: CurrencySwap -> CurrencySwap -> Bool # (>) :: CurrencySwap -> CurrencySwap -> Bool # (>=) :: CurrencySwap -> CurrencySwap -> Bool # max :: CurrencySwap -> CurrencySwap -> CurrencySwap # min :: CurrencySwap -> CurrencySwap -> CurrencySwap # | |||||
type Rep CurrencySwap Source # | |||||
Defined in Hedge type Rep CurrencySwap = D1 ('MetaData "CurrencySwap" "Hedge" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (C1 ('MetaCons "CurrencySwap" 'PrefixI 'True) (S1 ('MetaSel ('Just "csBalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Balance))) |
Constructors
SRT | |
Fields
|
Instances
UseRate SRT Source # | |||||
Liable SRT Source # | |||||
Defined in Hedge Methods isPaidOff :: SRT -> Bool Source # getCurBalance :: SRT -> Balance Source # getCurRate :: SRT -> IRate Source # getOriginBalance :: SRT -> Balance Source # getOriginDate :: SRT -> Date Source # getAccrueBegDate :: SRT -> Date Source # getDueInt :: SRT -> Balance Source # getDueIntAt :: SRT -> Int -> Balance Source # getDueIntOverInt :: SRT -> Balance Source # getDueIntOverIntAt :: SRT -> Int -> Balance Source # getTotalDueInt :: SRT -> Balance Source # getTotalDueIntAt :: SRT -> Int -> Balance Source # getOutstandingAmount :: SRT -> Balance Source # | |||||
Generic SRT Source # | |||||
Defined in Hedge Associated Types
| |||||
Show SRT Source # | |||||
Eq SRT Source # | |||||
Ord SRT Source # | |||||
type Rep SRT Source # | |||||
Defined in Hedge type Rep SRT = D1 ('MetaData "SRT" "Hedge" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (C1 ('MetaCons "SRT" 'PrefixI 'True) (((S1 ('MetaSel ('Just "srtName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "srtType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrtType)) :*: (S1 ('MetaSel ('Just "srtPremiumType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RateType) :*: (S1 ('MetaSel ('Just "srtRefBalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Balance) :*: S1 ('MetaSel ('Just "srtPremiumRate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRate)))) :*: ((S1 ('MetaSel ('Just "srtOpenBalance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Balance) :*: (S1 ('MetaSel ('Just "srtDuePremiumDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Date)) :*: S1 ('MetaSel ('Just "srtDuePremium") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Balance))) :*: (S1 ('MetaSel ('Just "srtStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Date) :*: (S1 ('MetaSel ('Just "srtEnds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Date)) :*: S1 ('MetaSel ('Just "srtStmt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Statement))))))) |
Constructors
SrtByEndDay DealStats DatePattern | autu accrue by end of day |
Instances
Generic SrtType Source # | |||||
Defined in Hedge Associated Types
| |||||
Show SrtType Source # | |||||
Eq SrtType Source # | |||||
Ord SrtType Source # | |||||
type Rep SrtType Source # | |||||
Defined in Hedge type Rep SrtType = D1 ('MetaData "SrtType" "Hedge" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (C1 ('MetaCons "SrtByEndDay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStats) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DatePattern))) |