openseries 1.9.7__py3-none-any.whl → 2.0.1__py3-none-any.whl

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.
openseries/_risk.py CHANGED
@@ -1,11 +1,4 @@
1
- """Various risk related functions.
2
-
3
- Copyright (c) Captor Fund Management AB. This file is part of the openseries project.
4
-
5
- Licensed under the BSD 3-Clause License. You may obtain a copy of the License at:
6
- https://github.com/CaptorAB/openseries/blob/master/LICENSE.md
7
- SPDX-License-Identifier: BSD-3-Clause
8
- """
1
+ """Functions caclculating risk measures."""
9
2
 
10
3
  from __future__ import annotations
11
4
 
@@ -40,7 +33,7 @@ def _cvar_down_calc(
40
33
  The sought CVaR level
41
34
 
42
35
  Returns:
43
- -------
36
+ --------
44
37
  float
45
38
  Downside Conditional Value At Risk "CVaR"
46
39
 
@@ -74,7 +67,7 @@ def _var_down_calc(
74
67
  type of interpolation in Pandas.DataFrame.quantile() function.
75
68
 
76
69
  Returns:
77
- -------
70
+ --------
78
71
  float
79
72
  Downside Value At Risk
80
73
 
openseries/datefixer.py CHANGED
@@ -1,11 +1,4 @@
1
- """Date related utilities.
2
-
3
- Copyright (c) Captor Fund Management AB. This file is part of the openseries project.
4
-
5
- Licensed under the BSD 3-Clause License. You may obtain a copy of the License at:
6
- https://github.com/CaptorAB/openseries/blob/master/LICENSE.md
7
- SPDX-License-Identifier: BSD-3-Clause
8
- """
1
+ """Date related utilities."""
9
2
 
10
3
  from __future__ import annotations
11
4
 
@@ -70,7 +63,7 @@ def market_holidays(
70
63
  String or list of market codes supported by pandas_market_calendars.
71
64
 
72
65
  Returns:
73
- -------
66
+ --------
74
67
  list[str]
75
68
  list of holiday dates.
76
69
  """
@@ -122,7 +115,7 @@ def holiday_calendar(
122
115
  Argument where missing holidays can be added
123
116
 
124
117
  Returns:
125
- -------
118
+ --------
126
119
  numpy.busdaycalendar
127
120
  Generate a business calendar
128
121
 
@@ -183,7 +176,7 @@ def date_fix(
183
176
  The data item to parse
184
177
 
185
178
  Returns:
186
- -------
179
+ --------
187
180
  datetime.date
188
181
  Parsed date
189
182
 
@@ -232,7 +225,7 @@ def date_offset_foll(
232
225
  Determines if days should be offset forward (following) or backward
233
226
 
234
227
  Returns:
235
- -------
228
+ --------
236
229
  datetime.date
237
230
  Off-set date
238
231
 
@@ -280,7 +273,7 @@ def get_previous_business_day_before_today(
280
273
  Argument where missing holidays can be added
281
274
 
282
275
  Returns:
283
- -------
276
+ --------
284
277
  datetime.date
285
278
  The previous business day
286
279
 
@@ -326,7 +319,7 @@ def offset_business_days(
326
319
  Argument where missing holidays can be added
327
320
 
328
321
  Returns:
329
- -------
322
+ --------
330
323
  datetime.date
331
324
  The new offset business day
332
325
 
@@ -410,7 +403,7 @@ def generate_calendar_date_range(
410
403
  Argument where missing holidays can be added
411
404
 
412
405
  Returns:
413
- -------
406
+ --------
414
407
  list[dt.date]
415
408
  List of business day calendar dates
416
409
 
@@ -491,7 +484,7 @@ def _do_resample_to_business_period_ends(
491
484
  Argument where missing holidays can be added
492
485
 
493
486
  Returns:
494
- -------
487
+ --------
495
488
  Pandas.DatetimeIndex
496
489
  A date range aligned to business period ends
497
490