Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pool
Synopsis
- data Pool a = Pool {}
- aggPool :: Maybe (Map CutoffFields Balance) -> [(CashFlowFrame, Map CutoffFields Balance)] -> (CashFlowFrame, Map CutoffFields Balance)
- getIssuanceField :: Pool a -> CutoffFields -> Either String Balance
- poolFutureCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow)
- poolIssuanceStat :: Asset a => Lens' (Pool a) (Map CutoffFields Balance)
- poolFutureScheduleCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow)
- poolBegStats :: Pool a -> (Balance, Balance, Balance, Balance, Balance, Balance)
- calcLiquidationAmount :: Asset a => PricingMethod -> Pool a -> Date -> Amount
- pricingPoolFlow :: Asset a => Date -> Pool a -> PoolCashflow -> PricingMethod -> Amount
- futureScheduleCfLens :: forall a f. Functor f => (Maybe PoolCashflow -> f (Maybe PoolCashflow)) -> Pool a -> f (Pool a)
- futureCfLens :: forall a f. Functor f => (Maybe PoolCashflow -> f (Maybe PoolCashflow)) -> Pool a -> f (Pool a)
- poolFutureCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow)
- runPool :: Asset a => Pool a -> Maybe ApplyAssumptionType -> Maybe [RateAssumption] -> Either String [(CashFlowFrame, Map CutoffFields Balance)]
Documentation
Constructors
Pool | |
Fields
|
Instances
aggPool :: Maybe (Map CutoffFields Balance) -> [(CashFlowFrame, Map CutoffFields Balance)] -> (CashFlowFrame, Map CutoffFields Balance) Source #
Aggregate all cashflow into a single cashflow frame patch with pool level cumulative defaults/loss etc
getIssuanceField :: Pool a -> CutoffFields -> Either String Balance Source #
get stats of pool
poolFutureCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow) Source #
poolIssuanceStat :: Asset a => Lens' (Pool a) (Map CutoffFields Balance) Source #
poolFutureScheduleCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow) Source #
calcLiquidationAmount :: Asset a => PricingMethod -> Pool a -> Date -> Amount Source #
price a pool with collected cashflow and future cashflow
pricingPoolFlow :: Asset a => Date -> Pool a -> PoolCashflow -> PricingMethod -> Amount Source #
futureScheduleCfLens :: forall a f. Functor f => (Maybe PoolCashflow -> f (Maybe PoolCashflow)) -> Pool a -> f (Pool a) Source #
futureCfLens :: forall a f. Functor f => (Maybe PoolCashflow -> f (Maybe PoolCashflow)) -> Pool a -> f (Pool a) Source #
poolFutureCf :: Asset a => Lens' (Pool a) (Maybe PoolCashflow) Source #
runPool :: Asset a => Pool a -> Maybe ApplyAssumptionType -> Maybe [RateAssumption] -> Either String [(CashFlowFrame, Map CutoffFields Balance)] Source #