moexapi 1.6.44__tar.gz → 1.6.45__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.6.44
3
+ Version: 1.6.45
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -125,7 +125,7 @@ class Bond:
125
125
  self.offers = [item for item in self.offers if item.date != start_date]
126
126
  original_values = [item.value for item in self.amortization]
127
127
  amortization_sum = sum(original_values)
128
- if abs(amortization_sum - self.initial_face_value) > 1e-9:
128
+ if abs(amortization_sum - self.initial_face_value) > 1e-9 and len(original_values) > 1:
129
129
  values = [value / amortization_sum * self.initial_face_value for value in original_values]
130
130
  rounded_values = [round(value + 1e-9, 2) for value in values]
131
131
  for original_value, rounded_value in zip(original_values, rounded_values):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.6.44
3
+ Version: 1.6.45
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "moexapi"
7
- version = "1.6.44"
7
+ version = "1.6.45"
8
8
  description = "Python API for MOEX ISS"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Aliaksei Rak", email = "kventinel@gmail.com" }]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes