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

Accounts

Synopsis

Documentation

data Account Source #

Constructors

Account 

Fields

Instances

Instances details
UseRate Account Source # 
Instance details

Defined in Accounts

QueryByComment Account Source # 
Instance details

Defined in Accounts

FromJSON Account Source # 
Instance details

Defined in Accounts

ToJSON Account Source # 
Instance details

Defined in Accounts

Generic Account Source # 
Instance details

Defined in Accounts

Associated Types

type Rep Account 
Instance details

Defined in Accounts

Methods

from :: Account -> Rep Account x #

to :: Rep Account x -> Account #

Show Account Source # 
Instance details

Defined in Accounts

Eq Account Source # 
Instance details

Defined in Accounts

Methods

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

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

Ord Account Source # 
Instance details

Defined in Accounts

type Rep Account Source # 
Instance details

Defined in Accounts

data ReserveAmount Source #

Constructors

PctReserve DealStats Rate

target amount with reference to % of formula

FixReserve Balance

target amount with fixed balance amount

Either Pre ReserveAmount ReserveAmount

target amount depends on a test, if true, then use first one ,otherwise use second one

Max [ReserveAmount]

use higher of all reserve formulas

Min [ReserveAmount]

use lower of all reserve formulas

Instances

Instances details
FromJSON ReserveAmount Source # 
Instance details

Defined in Accounts

ToJSON ReserveAmount Source # 
Instance details

Defined in Accounts

Generic ReserveAmount Source # 
Instance details

Defined in Accounts

Show ReserveAmount Source # 
Instance details

Defined in Accounts

Eq ReserveAmount Source # 
Instance details

Defined in Accounts

Ord ReserveAmount Source # 
Instance details

Defined in Accounts

type Rep ReserveAmount Source # 
Instance details

Defined in Accounts

draw :: Amount -> Date -> TxnComment -> Account -> Account Source #

draw cash from account with a comment

deposit :: Amount -> Date -> TxnComment -> Account -> Account Source #

deposit cash to account with a comment

transfer :: (Account, Account) -> Date -> Amount -> (Account, Account) Source #

move cash from account A to account B

depositInt :: Date -> Account -> Account Source #

sweep interest/investement income into account

data InterestInfo Source #

Constructors

BankAccount IRate DatePattern Date

fix reinvest return rate

InvestmentAccount Index Spread DatePattern DatePattern Date IRate

float type: index, spread, sweep dates, rate reset , last accrue day, last reset rate

Instances

Instances details
FromJSON InterestInfo Source # 
Instance details

Defined in Accounts

ToJSON InterestInfo Source # 
Instance details

Defined in Accounts

Generic InterestInfo Source # 
Instance details

Defined in Accounts

Show InterestInfo Source # 
Instance details

Defined in Accounts

Eq InterestInfo Source # 
Instance details

Defined in Accounts

Ord InterestInfo Source # 
Instance details

Defined in Accounts

type Rep InterestInfo Source # 
Instance details

Defined in Accounts

buildEarnIntAction :: [Account] -> Date -> [(String, Dates)] -> [(String, Dates)] Source #

build interest earn actions

tryDraw :: Amount -> Date -> TxnComment -> Account -> ((Amount, Amount), Account) Source #

draw cash from account with a comment,return shortfall and acccount