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 +4 -4
- data/lib/istox/quant/bond.rb +2 -2
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7966045ae225d89f6881853faebfc2b9ac826053964d27f1d79a1870be301da
|
4
|
+
data.tar.gz: ddaf8c7cfcbf15d62d7d5ec739593c2b1f5b93e80d502c852a14c852941b03a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c207054f717f60a2eadc3dab9cd39954e58e2c37748ab18df87ec687516e9b68f2abf44176405028fee8872e61e8a808271e41bbda63d63ca54a1959ff56c37
|
7
|
+
data.tar.gz: eb784318e41850201bd1bfbac812d7d153959141385cb9e01fe7071948e648e46b6fd240e912bd62670b7de9ea6f1eca6a5be75e7731a6ba2cdfede8e7a8b13b
|
data/lib/istox/quant/bond.rb
CHANGED
@@ -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? ||
|
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? ||
|
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