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

Cashflow

Synopsis

Documentation

data CashFlowFrame Source #

Instances

Instances details
FromJSON CashFlowFrame Source # 
Instance details

Defined in Cashflow

ToJSON CashFlowFrame Source # 
Instance details

Defined in Cashflow

Monoid CashFlowFrame Source # 
Instance details

Defined in Cashflow

Semigroup CashFlowFrame Source # 
Instance details

Defined in Cashflow

Generic CashFlowFrame Source # 
Instance details

Defined in Cashflow

Associated Types

type Rep CashFlowFrame 
Instance details

Defined in Cashflow

Show CashFlowFrame Source # 
Instance details

Defined in Cashflow

NFData CashFlowFrame Source # 
Instance details

Defined in Cashflow

Methods

rnf :: CashFlowFrame -> () #

Eq CashFlowFrame Source # 
Instance details

Defined in Cashflow

Ord CashFlowFrame Source # 
Instance details

Defined in Cashflow

type Rep CashFlowFrame Source # 
Instance details

Defined in Cashflow

mergePoolCf :: CashFlowFrame -> CashFlowFrame -> CashFlowFrame Source #

agg cashflow (but not updating the cumulative stats)

mflowRate :: TsRow -> IRate Source #

get rate(weigthed avg rate) for a cashflow record

sumPoolFlow :: CashFlowFrame -> PoolSource -> Balance Source #

lookup a pool source from a row

combineTss :: [TsRow] -> [TsRow] -> [TsRow] -> [TsRow] Source #

mflowBorrowerNum :: TsRow -> Maybe BorrowerNum Source #

get borrower numfer for Mortgage Flow

mflowPrepaymentPenalty :: TsRow -> Balance Source #

get prepayment penalty for a cashflow record

emptyTsRow :: Date -> TsRow -> TsRow Source #

reset all cashflow fields to zero and init with a date

mflowAmortAmount :: TsRow -> Balance Source #

calculate amortized amount for cashflow (for defaults only)

setPrepaymentPenaltyFlow :: [Balance] -> [TsRow] -> [TsRow] Source #

split single cashflow record by a rate

getDate :: TimeSeries ts => ts -> Date Source #

totalPrincipal :: CashFlowFrame -> Balance Source #

merge two cashflow frame but no patching beg balance

shiftCfToStartDate :: Date -> CashFlowFrame -> CashFlowFrame Source #

sum a single pool source from a cashflow frame

data TsRow Source #

Instances

Instances details
TimeSeries TsRow Source # 
Instance details

Defined in Cashflow

FromJSON TsRow Source # 
Instance details

Defined in Cashflow

ToJSON TsRow Source # 
Instance details

Defined in Cashflow

Semigroup TsRow Source # 
Instance details

Defined in Cashflow

Methods

(<>) :: TsRow -> TsRow -> TsRow #

sconcat :: NonEmpty TsRow -> TsRow #

stimes :: Integral b => b -> TsRow -> TsRow #

Generic TsRow Source # 
Instance details

Defined in Cashflow

Associated Types

type Rep TsRow 
Instance details

Defined in Cashflow

type Rep TsRow

Methods

from :: TsRow -> Rep TsRow x #

to :: Rep TsRow x -> TsRow #

Show TsRow Source # 
Instance details

Defined in Cashflow

Methods

showsPrec :: Int -> TsRow -> ShowS #

show :: TsRow -> String #

showList :: [TsRow] -> ShowS #

NFData TsRow Source # 
Instance details

Defined in Cashflow

Methods

rnf :: TsRow -> () #

Eq TsRow Source # 
Instance details

Defined in Cashflow

Methods

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

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

Ord TsRow Source # 
Instance details

Defined in Cashflow

Methods

compare :: TsRow -> TsRow -> Ordering #

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

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

(>) :: TsRow -> TsRow -> Bool #

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

max :: TsRow -> TsRow -> TsRow #

min :: TsRow -> TsRow -> TsRow #

ToSchema TsRow Source # 
Instance details

Defined in AssetClass.AssetBase

type Rep TsRow Source # 
Instance details

Defined in Cashflow

type Rep TsRow

patchCumulative :: CumulativeStat -> [TsRow] -> [TsRow] -> [TsRow] Source #

split cashflow by rate while build missing defaults/losses stats

currentCumulativeStat :: [TsRow] -> CumulativeStat Source #

patchCumulativeAtInit :: Maybe CumulativeStat -> [TsRow] -> [TsRow] Source #

patchBalance :: (Balance, Maybe CumulativeStat) -> [TsRow] -> [TsRow] -> [TsRow] Source #

isEmptyRow2 :: TsRow -> Bool Source #

Remove empty cashflow from the tail