Hastructure-0.50.0: Cashflow modeling library for structured finance
Safe HaskellNone
LanguageHaskell2010

Lib

Synopsis

Documentation

type Dates = [Day] Source #

data Period Source #

Instances

Instances details
FromJSON Period Source # 
Instance details

Defined in Types

ToJSON Period Source # 
Instance details

Defined in Types

Generic Period Source # 
Instance details

Defined in Types

Associated Types

type Rep Period 
Instance details

Defined in Types

type Rep Period = D1 ('MetaData "Period" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) ((C1 ('MetaCons "Daily" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Weekly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BiWeekly" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Monthly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Quarterly" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SemiAnnually" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Annually" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: Period -> Rep Period x #

to :: Rep Period x -> Period #

Show Period Source # 
Instance details

Defined in Types

Eq Period Source # 
Instance details

Defined in Types

Methods

(==) :: Period -> Period -> Bool #

(/=) :: Period -> Period -> Bool #

Ord Period Source # 
Instance details

Defined in Types

ToSchema Period Source # 
Instance details

Defined in AssetClass.AssetBase

type Rep Period Source # 
Instance details

Defined in Types

type Rep Period = D1 ('MetaData "Period" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) ((C1 ('MetaCons "Daily" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Weekly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BiWeekly" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Monthly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Quarterly" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SemiAnnually" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Annually" 'PrefixI 'False) (U1 :: Type -> Type))))

daysBetween :: Date -> Date -> Integer Source #

Given a start date and a end date, return number of days between(Integer)

daysBetweenI :: Date -> Date -> Int Source #

Given a start date and a end date, return number of days between(Int)

type Date = Day Source #

data Ts Source #

Instances

Instances details
FromJSON Ts Source # 
Instance details

Defined in Types

ToJSON Ts Source # 
Instance details

Defined in Types

Generic Ts Source # 
Instance details

Defined in Types

Associated Types

type Rep Ts 
Instance details

Defined in Types

type Rep Ts = D1 ('MetaData "Ts" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) (((C1 ('MetaCons "FloatCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: C1 ('MetaCons "BoolCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Bool]))) :+: (C1 ('MetaCons "BalanceCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Balance])) :+: (C1 ('MetaCons "LeftBalanceCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Balance])) :+: C1 ('MetaCons "RatioCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational]))))) :+: ((C1 ('MetaCons "ThresholdCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: (C1 ('MetaCons "IRateCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint IRate])) :+: C1 ('MetaCons "FactorCurveClosed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Date)))) :+: (C1 ('MetaCons "PricingCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: (C1 ('MetaCons "PeriodCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Int])) :+: C1 ('MetaCons "IntCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Int]))))))

Methods

from :: Ts -> Rep Ts x #

to :: Rep Ts x -> Ts #

Read Ts Source # 
Instance details

Defined in Types

Show Ts Source # 
Instance details

Defined in Types

Methods

showsPrec :: Int -> Ts -> ShowS #

show :: Ts -> String #

showList :: [Ts] -> ShowS #

Eq Ts Source # 
Instance details

Defined in Types

Methods

(==) :: Ts -> Ts -> Bool #

(/=) :: Ts -> Ts -> Bool #

Ord Ts Source # 
Instance details

Defined in Types

Methods

compare :: Ts -> Ts -> Ordering #

(<) :: Ts -> Ts -> Bool #

(<=) :: Ts -> Ts -> Bool #

(>) :: Ts -> Ts -> Bool #

(>=) :: Ts -> Ts -> Bool #

max :: Ts -> Ts -> Ts #

min :: Ts -> Ts -> Ts #

ToSchema Ts Source # 
Instance details

Defined in AssetClass.AssetBase

type Rep Ts Source # 
Instance details

Defined in Types

type Rep Ts = D1 ('MetaData "Ts" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) (((C1 ('MetaCons "FloatCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: C1 ('MetaCons "BoolCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Bool]))) :+: (C1 ('MetaCons "BalanceCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Balance])) :+: (C1 ('MetaCons "LeftBalanceCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Balance])) :+: C1 ('MetaCons "RatioCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational]))))) :+: ((C1 ('MetaCons "ThresholdCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: (C1 ('MetaCons "IRateCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint IRate])) :+: C1 ('MetaCons "FactorCurveClosed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Date)))) :+: (C1 ('MetaCons "PricingCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Rational])) :+: (C1 ('MetaCons "PeriodCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Int])) :+: C1 ('MetaCons "IntCurve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TsPoint Int]))))))

type Cap = Micro Source #

data TsPoint a Source #

Constructors

TsPoint Date a 

Instances

Instances details
TimeSeries (TsPoint a) Source # 
Instance details

Defined in Types

FromJSON a => FromJSON (TsPoint a) Source # 
Instance details

Defined in Types

ToJSON a => ToJSON (TsPoint a) Source # 
Instance details

Defined in Types

Generic (TsPoint a) Source # 
Instance details

Defined in Types

Associated Types

type Rep (TsPoint a) 
Instance details

Defined in Types

type Rep (TsPoint a) = D1 ('MetaData "TsPoint" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) (C1 ('MetaCons "TsPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Date) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: TsPoint a -> Rep (TsPoint a) x #

to :: Rep (TsPoint a) x -> TsPoint a #

Read a => Read (TsPoint a) Source # 
Instance details

Defined in Types

Show a => Show (TsPoint a) Source # 
Instance details

Defined in Types

Methods

showsPrec :: Int -> TsPoint a -> ShowS #

show :: TsPoint a -> String #

showList :: [TsPoint a] -> ShowS #

Eq a => Eq (TsPoint a) Source # 
Instance details

Defined in Types

Methods

(==) :: TsPoint a -> TsPoint a -> Bool #

(/=) :: TsPoint a -> TsPoint a -> Bool #

Ord a => Ord (TsPoint a) Source # 
Instance details

Defined in Types

Methods

compare :: TsPoint a -> TsPoint a -> Ordering #

(<) :: TsPoint a -> TsPoint a -> Bool #

(<=) :: TsPoint a -> TsPoint a -> Bool #

(>) :: TsPoint a -> TsPoint a -> Bool #

(>=) :: TsPoint a -> TsPoint a -> Bool #

max :: TsPoint a -> TsPoint a -> TsPoint a #

min :: TsPoint a -> TsPoint a -> TsPoint a #

ToSchema (TsPoint Balance) Source # 
Instance details

Defined in AssetClass.AssetBase

ToSchema (TsPoint IRate) Source # 
Instance details

Defined in AssetClass.AssetBase

ToSchema (TsPoint Rational) Source # 
Instance details

Defined in AssetClass.AssetBase

ToSchema (TsPoint Bool) Source # 
Instance details

Defined in AssetClass.AssetBase

ToSchema (TsPoint Int) Source # 
Instance details

Defined in AssetClass.AssetBase

type Rep (TsPoint a) Source # 
Instance details

Defined in Types

type Rep (TsPoint a) = D1 ('MetaData "TsPoint" "Types" "Hastructure-0.50.0-9tFAxbqhtE23KiGoJqUlJG" 'False) (C1 ('MetaCons "TsPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Date) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

zipWith8 :: (a -> b -> c -> d -> e -> f -> g -> h -> i) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -> [i] Source #

zipWith9 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -> [i] -> [j] Source #

zipWith10 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -> [i] -> [j] -> [k] Source #

zipWith11 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -> [i] -> [j] -> [k] -> [l] Source #

zipWith12 :: (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k -> l -> m) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] -> [i] -> [j] -> [k] -> [l] -> [m] Source #

weightedBy :: [Rational] -> [Rational] -> Rational Source #

given balances and weight, get sum weighted balance