[−][src]Function loan_ec::expectation_liquidity
pub fn expectation_liquidity(lambda: f64, q: f64, expectation: f64) -> f64
Returns the expectation of a portfolio with liquidity risk
Arguments
lambda
- Sum of lambda0 (base loss in liquidity event) and the lambda element from the Loan struct.q
- Probability of liquidity event (scaled by the total portfolio loss).expectation
- Base expectation for the portfolio without liquidity risk. Can be computed using the get_portfolio_expectation method.
Examples
extern crate loan_ec; let lambda=1.0; let q=0.01; let expectation=500.0; let liq_exp=loan_ec::expectation_liquidity(lambda, q, expectation);