Module: IB::ProbabilityOfExpiring
- Included in:
- Contract
- Defined in:
- lib/ib/probability_of_expiring.rb
Instance Method Summary collapse
Instance Method Details
#probability_of_assignment(**args) ⇒ Object
12 13 14 |
# File 'lib/ib/probability_of_expiring.rb', line 12 def probability_of_assignment **args ( probability_of_expiring(**args) - 1 ).abs end |
#probability_of_expiring(**args) ⇒ Object
15 16 17 18 |
# File 'lib/ib/probability_of_expiring.rb', line 15 def probability_of_expiring **args @probability_of_expiring = calculate_probability_of_expiring(**args) if @probability_of_expiring.nil? || ! args.empty? @probability_of_expiring end |