Safe Haskell | None |
---|---|
Language | Haskell2010 |
Asset
Synopsis
- class (Show a, UseRate a) => Asset a where
- calcCashflow :: a -> Date -> Maybe [RateAssumption] -> Either String CashFlowFrame
- getCurrentBal :: a -> Balance
- getOriginBal :: a -> Balance
- getOriginRate :: a -> IRate
- getCurrentRate :: a -> IRate
- getOriginDate :: a -> Date
- getOriginInfo :: a -> OriginalInfo
- isDefaulted :: a -> Bool
- getPaymentDates :: a -> Int -> [Date]
- getRemainTerms :: a -> Int
- getRemainDates :: a -> [Date]
- getTotalTerms :: a -> Int
- getPastTerms :: a -> Int
- projCashflow :: a -> Date -> AssetPerf -> Maybe [RateAssumption] -> Either String (CashFlowFrame, Map CutoffFields Balance)
- getBorrowerNum :: a -> Int
- splitWith :: a -> [Rate] -> [a]
- updateOriginDate :: a -> Date -> a
- resetToOrig :: a -> a
- getLastInterestPaymentDate :: a -> Maybe Date
- calcAccruedInterest :: a -> Date -> Balance
- calcAlignDate :: a -> Date -> Date
- getObligor :: a -> Maybe Obligor
- getObligorTags :: a -> Set String
- getObligorId :: a -> Maybe String
- getObligorFields :: a -> Maybe (Map String (Either String Double))
- buildAssumptionPpyDefRecRate :: Asset a => a -> [Date] -> AssetPerfAssumption -> Either String ([Rate], [Rate], Rate, Int)
- buildAssumptionPpyDelinqDefRecRate :: Asset a => a -> [Date] -> AssetPerfAssumption -> Either String ([Rate], [Rate], (Rate, Lag), Rate, Int)
- calcRecoveriesFromDefault :: Balance -> Rate -> [Rate] -> [Amount]
- getCurBalance :: Liable lb => lb -> Balance
- priceAsset :: Asset a => a -> Date -> PricingMethod -> AssetPerf -> Maybe [RateAssumption] -> CutoffType -> Either String PriceResult
- applyHaircut :: Maybe ExtraStress -> CashFlowFrame -> CashFlowFrame
- buildPrepayRates :: Asset b => b -> [Date] -> Maybe AssetPrepayAssumption -> Either String [Rate]
- buildDefaultRates :: Asset b => b -> [Date] -> Maybe AssetDefaultAssumption -> Either String [Rate]
- getObligorFields :: Asset a => a -> Maybe (Map String (Either String Double))
- getObligorTags :: Asset a => a -> Set String
- getObligorId :: Asset a => a -> Maybe String
- getRecoveryLagAndRate :: Maybe RecoveryAssumption -> (Rate, Int)
- getDefaultDelinqAssump :: Maybe AssetDelinquencyAssumption -> [Date] -> ([Rate], Int, Rate)
- getOriginInfo :: Asset a => a -> OriginalInfo
Documentation
class (Show a, UseRate a) => Asset a where Source #
Minimal complete definition
Methods
calcCashflow :: a -> Date -> Maybe [RateAssumption] -> Either String CashFlowFrame Source #
project contractual cashflow of an asset with interest assumptions
getCurrentBal :: a -> Balance Source #
Get current balance of an asset
getOriginBal :: a -> Balance Source #
Get original balance of an asset
getOriginRate :: a -> IRate Source #
Get original rate of an asset
getCurrentRate :: a -> IRate Source #
Get current rate of an asset
getOriginDate :: a -> Date Source #
Get origination date of an asset
getOriginInfo :: a -> OriginalInfo Source #
Get origin info of an asset
isDefaulted :: a -> Bool Source #
if the asset is defaulted
getPaymentDates :: a -> Int -> [Date] Source #
project projected dates of an asset
getRemainTerms :: a -> Int Source #
get number of remaining payments
getRemainDates :: a -> [Date] Source #
get remain payment dates
getTotalTerms :: a -> Int Source #
project asset cashflow under credit stress and interest assumptions
getPastTerms :: a -> Int Source #
projCashflow :: a -> Date -> AssetPerf -> Maybe [RateAssumption] -> Either String (CashFlowFrame, Map CutoffFields Balance) Source #
getBorrowerNum :: a -> Int Source #
Get possible number of borrower
splitWith :: a -> [Rate] -> [a] Source #
Split asset per rates passed in
updateOriginDate :: a -> Date -> a Source #
! Change the origination date of an asset
resetToOrig :: a -> a Source #
! Change the current asset state to the date of origination
getLastInterestPaymentDate :: a -> Maybe Date Source #
Get Last Interest Payment date
calcAccruedInterest :: a -> Date -> Balance Source #
Calculate Accrued Interest
calcAlignDate :: a -> Date -> Date Source #
! Internal use
getObligor :: a -> Maybe Obligor Source #
getObligorTags :: a -> Set String Source #
getObligorId :: a -> Maybe String Source #
getObligorFields :: a -> Maybe (Map String (Either String Double)) Source #
Instances
buildAssumptionPpyDefRecRate :: Asset a => a -> [Date] -> AssetPerfAssumption -> Either String ([Rate], [Rate], Rate, Int) Source #
build pool assumption rate (prepayment, defaults, recovery rate , recovery lag)
buildAssumptionPpyDelinqDefRecRate :: Asset a => a -> [Date] -> AssetPerfAssumption -> Either String ([Rate], [Rate], (Rate, Lag), Rate, Int) Source #
build prepayment rates/ delinq rates and (%,lag) convert to default, recovery rate, recovery lag
getCurBalance :: Liable lb => lb -> Balance Source #
priceAsset :: Asset a => a -> Date -> PricingMethod -> AssetPerf -> Maybe [RateAssumption] -> CutoffType -> Either String PriceResult Source #
applyHaircut :: Maybe ExtraStress -> CashFlowFrame -> CashFlowFrame Source #
apply a penalty cashflow
buildPrepayRates :: Asset b => b -> [Date] -> Maybe AssetPrepayAssumption -> Either String [Rate] Source #
buildDefaultRates :: Asset b => b -> [Date] -> Maybe AssetDefaultAssumption -> Either String [Rate] Source #
getRecoveryLagAndRate :: Maybe RecoveryAssumption -> (Rate, Int) Source #
getDefaultDelinqAssump :: Maybe AssetDelinquencyAssumption -> [Date] -> ([Rate], Int, Rate) Source #
getOriginInfo :: Asset a => a -> OriginalInfo Source #
Get origin info of an asset