Skip to content

Commit

Permalink
fix to current calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-rivera committed Nov 10, 2024
1 parent ab91bb5 commit b4f87e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pydeflate/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ def __init__(
target_currency = resolve_common_currencies(
target_currency, deflator_source.name
)

self.exchange_rates = Exchange(
source=exchange_source,
source_currency=source_currency,
Expand Down Expand Up @@ -319,7 +318,7 @@ def _calculate_deflator_value(
pd.Series: Series with combined deflator values.
"""
return (
exchange_def / (price_def * exchange_rate)
(10_000 * exchange_rate) / (price_def * exchange_def)
if self.to_current
else (price_def * exchange_def) / (10_000 * exchange_rate)
)
Expand Down

0 comments on commit b4f87e1

Please sign in to comment.