istox 0.2.4 → 0.2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d4f2a0587825e06d3ff6a6a3ad516f20b90f1ca7e59e11d686b03c892b8c441
4
- data.tar.gz: 3b6f8c0f67615b5165f9030343e0713f2b4562109632f93306ebb6a412d87aeb
3
+ metadata.gz: c7966045ae225d89f6881853faebfc2b9ac826053964d27f1d79a1870be301da
4
+ data.tar.gz: ddaf8c7cfcbf15d62d7d5ec739593c2b1f5b93e80d502c852a14c852941b03a0
5
5
  SHA512:
6
- metadata.gz: 6fb65f68fed5082be9d4b8ecd73547a06cc77224baf3e57296974768351127c0d39dc51d063c7855d38921bb7ca4925a1edd36eb097747ceb7da83bd1568379f
7
- data.tar.gz: 0be64c5925913cd5fad7242bc0604bf2f553f3d69a5969c1d3165571967d570d8cd2380d8b57b9e15b1af230b2c2f8a516c0bdd59ce59b9a8f9688d948b7406c
6
+ metadata.gz: 2c207054f717f60a2eadc3dab9cd39954e58e2c37748ab18df87ec687516e9b68f2abf44176405028fee8872e61e8a808271e41bbda63d63ca54a1959ff56c37
7
+ data.tar.gz: eb784318e41850201bd1bfbac812d7d153959141385cb9e01fe7071948e648e46b6fd240e912bd62670b7de9ea6f1eca6a5be75e7731a6ba2cdfede8e7a8b13b
@@ -190,7 +190,7 @@ module Istox
190
190
  if @pay_accrued_interest
191
191
  # accrued interest + face value discounted to the current date
192
192
  discounted_accrued_interest = 0
193
- if ex_coupon_date.nil? || ex_coupon_date == @maturity_date
193
+ if ex_coupon_date.nil? || date < ex_coupon_date
194
194
  discounted_accrued_interest = @coupon*@face_value*accrued_interest_factor*discount_factor
195
195
  end
196
196
  discounted_face_value = @face_value*discount_factor
@@ -198,7 +198,7 @@ module Istox
198
198
  return price
199
199
  else
200
200
  discounted_last_coupon = 0
201
- if ex_coupon_date.nil? || ex_coupon_date == @maturity_date
201
+ if ex_coupon_date.nil? || date < ex_coupon_date
202
202
  discounted_last_coupon = @coupon*@face_value/@coupon_frequency*discount_factor
203
203
  end
204
204
  discounted_face_value = @face_value*discount_factor
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.2.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng