forked from open-source-modelling/Open_Source_Economic_Model
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsClasses.py
More file actions
26 lines (22 loc) · 743 Bytes
/
SettingsClasses.py
File metadata and controls
26 lines (22 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from dataclasses import dataclass
from datetime import datetime as dt, timedelta
from datetime import date
from dateutil.relativedelta import relativedelta
@dataclass
class Settings:
EIOPA_param_file: str
EIOPA_curves_file: str
country: str
run_type: str
n_proj_years: int
precision: float
tau: float
compounding: int
modelling_date: date
def __post_init__(self, ) -> None:
self.end_date = self.modelling_date + relativedelta(years=self.n_proj_years)
pass
# if self.n_proj_years <= 0:
# raise ValueError("n_proj_years must be greater than 0")
# if self.precision < 0:
# raise ValueError("precision must be positive")