openseries 1.5.1__tar.gz → 1.5.2__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,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openseries
3
- Version: 1.5.1
4
- Summary: Package for analyzing financial timeseries.
5
- Home-page: https://github.com/CaptorAB/OpenSeries
3
+ Version: 1.5.2
4
+ Summary: Tools for analyzing financial timeseries.
5
+ Home-page: https://github.com/CaptorAB/openseries
6
6
  License: BSD-3-Clause
7
7
  Keywords: python,finance,fintech,data-science,timeseries,timeseries-data,timeseries-analysis,investment,investment-analysis,investing
8
8
  Author: Martin Karrin
@@ -31,7 +31,7 @@ Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
31
31
  Requires-Dist: requests (>=2.20.0,<3.0.0)
32
32
  Requires-Dist: scipy (>=1.11.4,<2.0.0)
33
33
  Requires-Dist: statsmodels (>=0.14.0,<1.0.0)
34
- Project-URL: Repository, https://github.com/CaptorAB/OpenSeries
34
+ Project-URL: Repository, https://github.com/CaptorAB/openseries
35
35
  Description-Content-Type: text/markdown
36
36
 
37
37
  <img src="https://sales.captor.se/captor_logo_sv_1600_icketransparent.png" alt="Captor
@@ -40,23 +40,23 @@ width="81" height="100" align="left" float="right"/><br/>
40
40
 
41
41
  <br><br>
42
42
 
43
- # OpenSeries
43
+ # openseries
44
44
 
45
45
  [![PyPI version](https://img.shields.io/pypi/v/openseries.svg)](https://pypi.org/project/openseries/)
46
46
  [![Conda version](https://img.shields.io/conda/vn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
47
47
  [![Conda platforms](https://img.shields.io/conda/pn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
48
48
  [![Python version](https://img.shields.io/pypi/pyversions/openseries.svg)](https://www.python.org/)
49
- [![GitHub Action Test Suite](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
50
- [![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/OpenSeries@master/coverage.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
51
- [![Styling, Linting & Type checks](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml)
49
+ [![GitHub Action Test Suite](https://github.com/CaptorAB/openseries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
50
+ [![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/openseries@master/coverage.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
51
+ [![Styling, Linting & Type checks](https://github.com/CaptorAB/openseries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/check.yml)
52
52
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
53
53
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://beta.ruff.rs/docs/)
54
54
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
55
55
 
56
- **OpenSeries** is a project with tools to analyse financial timeseries of a single
56
+ `openseries` is a project with tools to analyse financial timeseries of a single
57
57
  asset or a group of assets. It is solely made for daily or less frequent data.
58
58
 
59
- <span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/OpenSeries/blob/master/CHANGELOG.md)</span>
59
+ <span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/openseries/blob/master/CHANGELOG.md)</span>
60
60
 
61
61
 
62
62
  ## Basic Usage
@@ -138,8 +138,8 @@ on any attributes or methods inherited from this model.
138
138
  ### Windows Powershell
139
139
 
140
140
  ```powershell
141
- git clone https://github.com/CaptorAB/OpenSeries.git
142
- cd OpenSeries
141
+ git clone https://github.com/CaptorAB/openseries.git
142
+ cd openseries
143
143
  ./make.ps1 make
144
144
 
145
145
  ```
@@ -147,8 +147,8 @@ cd OpenSeries
147
147
  ### Mac Terminal/Linux
148
148
 
149
149
  ```bash
150
- git clone https://github.com/CaptorAB/OpenSeries.git
151
- cd OpenSeries
150
+ git clone https://github.com/CaptorAB/openseries.git
151
+ cd openseries
152
152
  make
153
153
  source source_me
154
154
  make install
@@ -161,7 +161,7 @@ Ruff and Mypy checking is embedded in the pre-commit hook. Both
161
161
  are also used in the project's GitHub workflows and are run when the `lint`
162
162
  alternative is chosen in the below commands.
163
163
  Any silenced error codes can be found in the
164
- [pyproject.toml](https://github.com/CaptorAB/OpenSeries/blob/master/pyproject.toml)
164
+ [pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml)
165
165
  file or in in-line comments.
166
166
 
167
167
  ### Windows Powershell
@@ -201,9 +201,9 @@ make lint
201
201
 
202
202
  | File | Description |
203
203
  |:-----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
204
- | [series.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
205
- | [frame.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
206
- | [simulation.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |
204
+ | [series.py](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
205
+ | [frame.py](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
206
+ | [simulation.py](https://github.com/CaptorAB/openseries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |
207
207
 
208
208
  ### Class methods used to construct objects.
209
209
 
@@ -214,7 +214,7 @@ make lint
214
214
  | `from_fixed_rate` | `OpenTimeSeries` | Class method to create an OpenTimeSeries object from a fixed rate, number of days and an end date. |
215
215
  | `from_deepcopy` | `OpenTimeSeries`, `OpenFrame` | Creates a copy of an OpenTimeSeries object. |
216
216
 
217
- ### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
217
+ ### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.
218
218
 
219
219
  | Property | type | Applies to | Description |
220
220
  |:----------------|:----------------|:-----------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
@@ -231,7 +231,7 @@ make lint
231
231
  | `countries` | `list` or `str` | `OpenTimeSeries` | (List of) country code(s) according to ISO 3166-1 alpha-2 used to generate business days. |
232
232
  | `valuetype` | `ValueType` | `OpenTimeSeries` | Field identifies the type of values in the series. ValueType is an Enum. |
233
233
 
234
- ### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
234
+ ### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
235
235
 
236
236
  | Property | type | Applies to | Description |
237
237
  |:-------------------|:-----------------------|:------------|:-------------------------------------------------------------------------|
@@ -245,7 +245,7 @@ make lint
245
245
  | `lengths_of_items` | `pandas.Series` | `OpenFrame` | Number of items in each of the series in the OpenFrame. |
246
246
  | `span_of_days_all` | `pandas.Series` | `OpenFrame` | Number of days from the first to the last in each of the series. |
247
247
 
248
- ### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
248
+ ### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
249
249
 
250
250
  | Property | type | Applies to | Description |
251
251
  |:--------------------|:---------------------------------|:------------------------------|:----------------------------------------------------------------------------------|
@@ -258,7 +258,7 @@ make lint
258
258
  | `periods_in_a_year` | `float` | `OpenTimeSeries`, `OpenFrame` | The number of observations in an average year for all days in the data. |
259
259
  | `yearfrac` | `float` | `OpenTimeSeries`, `OpenFrame` | Length of timeseries expressed as np.float64 fraction of a year with 365.25 days. |
260
260
 
261
- ### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
261
+ ### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.
262
262
 
263
263
  | Method | Applies to | Description |
264
264
  |:-------------------------|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
@@ -270,7 +270,7 @@ make lint
270
270
  | `from_1d_rate_to_cumret` | `OpenTimeSeries` | Converts a series of 1-day rates into a cumulative valueseries. |
271
271
  |
272
272
 
273
- ### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
273
+ ### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
274
274
 
275
275
  | Method | Applies to | Description |
276
276
  |:------------------------|:------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -291,7 +291,7 @@ make lint
291
291
  | `rolling_corr` | `OpenFrame` | Calculates and adds a series of rolling [correlations](https://www.investopedia.com/terms/c/correlation.asp) between two other series. |
292
292
  | `ewma_risk` | `OpenFrame` | Returns a `pandas.DataFrame` with volatility and correlation based on [Exponentially Weighted Moving Average](https://www.investopedia.com/articles/07/ewma.asp). |
293
293
 
294
- ### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
294
+ ### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
295
295
 
296
296
  | Method | Applies to | Description |
297
297
  |:-----------------------------------|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -316,7 +316,7 @@ make lint
316
316
  | `rolling_cvar_down` | `OpenTimeSeries`, `OpenFrame` | Returns a pandas.DataFrame with rolling CVaR figures. |
317
317
  | `calc_range` | `OpenTimeSeries`, `OpenFrame` | Returns the start and end dates of a range from specific period definitions. Used by the below numerical methods and not meant to be used independently. |
318
318
 
319
- ### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py).
319
+ ### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py).
320
320
 
321
321
  | Property | type | Applies to | Description |
322
322
  |:------------------------|:-------------------------|:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -4,23 +4,23 @@ width="81" height="100" align="left" float="right"/><br/>
4
4
 
5
5
  <br><br>
6
6
 
7
- # OpenSeries
7
+ # openseries
8
8
 
9
9
  [![PyPI version](https://img.shields.io/pypi/v/openseries.svg)](https://pypi.org/project/openseries/)
10
10
  [![Conda version](https://img.shields.io/conda/vn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
11
11
  [![Conda platforms](https://img.shields.io/conda/pn/conda-forge/openseries.svg)](https://anaconda.org/conda-forge/openseries)
12
12
  [![Python version](https://img.shields.io/pypi/pyversions/openseries.svg)](https://www.python.org/)
13
- [![GitHub Action Test Suite](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
14
- [![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/OpenSeries@master/coverage.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/test.yml)
15
- [![Styling, Linting & Type checks](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/OpenSeries/actions/workflows/check.yml)
13
+ [![GitHub Action Test Suite](https://github.com/CaptorAB/openseries/actions/workflows/test.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
14
+ [![Coverage](https://cdn.jsdelivr.net/gh/CaptorAB/openseries@master/coverage.svg)](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
15
+ [![Styling, Linting & Type checks](https://github.com/CaptorAB/openseries/actions/workflows/check.yml/badge.svg)](https://github.com/CaptorAB/openseries/actions/workflows/check.yml)
16
16
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
17
17
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://beta.ruff.rs/docs/)
18
18
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
19
19
 
20
- **OpenSeries** is a project with tools to analyse financial timeseries of a single
20
+ `openseries` is a project with tools to analyse financial timeseries of a single
21
21
  asset or a group of assets. It is solely made for daily or less frequent data.
22
22
 
23
- <span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/OpenSeries/blob/master/CHANGELOG.md)</span>
23
+ <span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/openseries/blob/master/CHANGELOG.md)</span>
24
24
 
25
25
 
26
26
  ## Basic Usage
@@ -102,8 +102,8 @@ on any attributes or methods inherited from this model.
102
102
  ### Windows Powershell
103
103
 
104
104
  ```powershell
105
- git clone https://github.com/CaptorAB/OpenSeries.git
106
- cd OpenSeries
105
+ git clone https://github.com/CaptorAB/openseries.git
106
+ cd openseries
107
107
  ./make.ps1 make
108
108
 
109
109
  ```
@@ -111,8 +111,8 @@ cd OpenSeries
111
111
  ### Mac Terminal/Linux
112
112
 
113
113
  ```bash
114
- git clone https://github.com/CaptorAB/OpenSeries.git
115
- cd OpenSeries
114
+ git clone https://github.com/CaptorAB/openseries.git
115
+ cd openseries
116
116
  make
117
117
  source source_me
118
118
  make install
@@ -125,7 +125,7 @@ Ruff and Mypy checking is embedded in the pre-commit hook. Both
125
125
  are also used in the project's GitHub workflows and are run when the `lint`
126
126
  alternative is chosen in the below commands.
127
127
  Any silenced error codes can be found in the
128
- [pyproject.toml](https://github.com/CaptorAB/OpenSeries/blob/master/pyproject.toml)
128
+ [pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml)
129
129
  file or in in-line comments.
130
130
 
131
131
  ### Windows Powershell
@@ -165,9 +165,9 @@ make lint
165
165
 
166
166
  | File | Description |
167
167
  |:-----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
168
- | [series.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
169
- | [frame.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
170
- | [simulation.py](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |
168
+ | [series.py](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) | Defines the class _OpenTimeSeries_ for managing and analyzing a single timeseries. The module also defines a function `timeseries_chain` that can be used to chain two timeseries objects together. |
169
+ | [frame.py](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) | Defines the class _OpenFrame_ for managing a group of timeseries, and e.g. calculate a portfolio timeseries from a rebalancing strategy between timeseries. The module also defines functions to simulate, optimize, and plot portfolios. |
170
+ | [simulation.py](https://github.com/CaptorAB/openseries/blob/master/openseries/simulation.py) | Defines the class _ReturnSimulation_ to create simulated financial timeseries. Used in the project's test suite |
171
171
 
172
172
  ### Class methods used to construct objects.
173
173
 
@@ -178,7 +178,7 @@ make lint
178
178
  | `from_fixed_rate` | `OpenTimeSeries` | Class method to create an OpenTimeSeries object from a fixed rate, number of days and an end date. |
179
179
  | `from_deepcopy` | `OpenTimeSeries`, `OpenFrame` | Creates a copy of an OpenTimeSeries object. |
180
180
 
181
- ### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
181
+ ### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.
182
182
 
183
183
  | Property | type | Applies to | Description |
184
184
  |:----------------|:----------------|:-----------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
@@ -195,7 +195,7 @@ make lint
195
195
  | `countries` | `list` or `str` | `OpenTimeSeries` | (List of) country code(s) according to ISO 3166-1 alpha-2 used to generate business days. |
196
196
  | `valuetype` | `ValueType` | `OpenTimeSeries` | Field identifies the type of values in the series. ValueType is an Enum. |
197
197
 
198
- ### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
198
+ ### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
199
199
 
200
200
  | Property | type | Applies to | Description |
201
201
  |:-------------------|:-----------------------|:------------|:-------------------------------------------------------------------------|
@@ -209,7 +209,7 @@ make lint
209
209
  | `lengths_of_items` | `pandas.Series` | `OpenFrame` | Number of items in each of the series in the OpenFrame. |
210
210
  | `span_of_days_all` | `pandas.Series` | `OpenFrame` | Number of days from the first to the last in each of the series. |
211
211
 
212
- ### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
212
+ ### Non-numerical or "helper" properties that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
213
213
 
214
214
  | Property | type | Applies to | Description |
215
215
  |:--------------------|:---------------------------------|:------------------------------|:----------------------------------------------------------------------------------|
@@ -222,7 +222,7 @@ make lint
222
222
  | `periods_in_a_year` | `float` | `OpenTimeSeries`, `OpenFrame` | The number of observations in an average year for all days in the data. |
223
223
  | `yearfrac` | `float` | `OpenTimeSeries`, `OpenFrame` | Length of timeseries expressed as np.float64 fraction of a year with 365.25 days. |
224
224
 
225
- ### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) class.
225
+ ### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class.
226
226
 
227
227
  | Method | Applies to | Description |
228
228
  |:-------------------------|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
@@ -234,7 +234,7 @@ make lint
234
234
  | `from_1d_rate_to_cumret` | `OpenTimeSeries` | Converts a series of 1-day rates into a cumulative valueseries. |
235
235
  |
236
236
 
237
- ### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
237
+ ### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
238
238
 
239
239
  | Method | Applies to | Description |
240
240
  |:------------------------|:------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -255,7 +255,7 @@ make lint
255
255
  | `rolling_corr` | `OpenFrame` | Calculates and adds a series of rolling [correlations](https://www.investopedia.com/terms/c/correlation.asp) between two other series. |
256
256
  | `ewma_risk` | `OpenFrame` | Returns a `pandas.DataFrame` with volatility and correlation based on [Exponentially Weighted Moving Average](https://www.investopedia.com/articles/07/ewma.asp). |
257
257
 
258
- ### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py) class.
258
+ ### Methods that apply to both the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) and the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class.
259
259
 
260
260
  | Method | Applies to | Description |
261
261
  |:-----------------------------------|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -280,7 +280,7 @@ make lint
280
280
  | `rolling_cvar_down` | `OpenTimeSeries`, `OpenFrame` | Returns a pandas.DataFrame with rolling CVaR figures. |
281
281
  | `calc_range` | `OpenTimeSeries`, `OpenFrame` | Returns the start and end dates of a range from specific period definitions. Used by the below numerical methods and not meant to be used independently. |
282
282
 
283
- ### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/OpenSeries/blob/master/openseries/frame.py).
283
+ ### Numerical properties available for individual [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) or on all series in an [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py).
284
284
 
285
285
  | Property | type | Applies to | Description |
286
286
  |:------------------------|:-------------------------|:------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -0,0 +1 @@
1
+ """openseries.openseries.__init__.py."""
@@ -1,5 +1,4 @@
1
1
  """Defining the _CommonModel class."""
2
-
3
2
  from __future__ import annotations
4
3
 
5
4
  import datetime as dt
@@ -5,7 +5,7 @@ import datetime as dt
5
5
  from typing import Optional, Union, cast
6
6
 
7
7
  from dateutil.relativedelta import relativedelta
8
- from holidays import ( # type: ignore[import-untyped,unused-ignore]
8
+ from holidays import (
9
9
  country_holidays,
10
10
  list_supported_countries,
11
11
  )
@@ -1,5 +1,4 @@
1
1
  """Defining the ReturnSimulation class."""
2
-
3
2
  from __future__ import annotations
4
3
 
5
4
  import datetime as dt
@@ -1,4 +1,5 @@
1
1
  """Declaring types used throughout the project."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import datetime as dt
@@ -8,6 +9,7 @@ from typing import Annotated, ClassVar, Literal, Union
8
9
  from numpy import datetime64
9
10
  from pandas import Timestamp
10
11
  from pydantic import BaseModel, Field, StringConstraints, conlist, conset
12
+ from typing_extensions import Self
11
13
 
12
14
  CountryStringType = Annotated[
13
15
  str,
@@ -119,6 +121,7 @@ LiteralLinePlotMode = Literal[
119
121
  "lines+text",
120
122
  "markers+text",
121
123
  "lines+markers+text",
124
+ None,
122
125
  ]
123
126
  LiteralHowMerge = Literal["outer", "inner"]
124
127
  LiteralQuantileInterp = Literal["linear", "lower", "higher", "midpoint", "nearest"]
@@ -137,7 +140,7 @@ LiteralBarPlotMode = Literal["stack", "group", "overlay", "relative"]
137
140
  LiteralPlotlyOutput = Literal["file", "div"]
138
141
  LiteralPlotlyJSlib = Literal[True, False, "cdn"]
139
142
  LiteralOlsFitMethod = Literal["pinv", "qr"]
140
- LiteralPortfolioWeightings = Literal["eq_weights", "eq_risk", "inv_vol", "mean_var"]
143
+ LiteralPortfolioWeightings = Literal["eq_weights", "inv_vol"]
141
144
  LiteralOlsFitCovType = Literal[
142
145
  "nonrobust",
143
146
  "fixed scale",
@@ -238,14 +241,14 @@ class OpenTimeSeriesPropertiesList(list[str]):
238
241
  }
239
242
 
240
243
  def __init__(
241
- self: OpenTimeSeriesPropertiesList,
244
+ self: Self,
242
245
  *args: LiteralSeriesProps,
243
246
  ) -> None:
244
247
  """Property arguments for the OpenTimeSeries class."""
245
248
  super().__init__(args)
246
249
  self._validate()
247
250
 
248
- def _validate(self: OpenTimeSeriesPropertiesList) -> None:
251
+ def _validate(self: Self) -> None:
249
252
  seen = set()
250
253
  for item in self:
251
254
  if item not in self.allowed_strings:
@@ -291,12 +294,12 @@ class OpenFramePropertiesList(list[str]):
291
294
  "span_of_days_all",
292
295
  }
293
296
 
294
- def __init__(self: OpenFramePropertiesList, *args: LiteralFrameProps) -> None:
297
+ def __init__(self: Self, *args: LiteralFrameProps) -> None:
295
298
  """Property arguments for the OpenFrame class."""
296
299
  super().__init__(args)
297
300
  self._validate()
298
301
 
299
- def _validate(self: OpenFramePropertiesList) -> None:
302
+ def _validate(self: Self) -> None:
300
303
  seen = set()
301
304
  for item in self:
302
305
  if item not in self.allowed_strings:
@@ -1,9 +1,9 @@
1
1
  [tool.poetry]
2
2
  name = "openseries"
3
- version = "1.5.1"
4
- description = "Package for analyzing financial timeseries."
3
+ version = "1.5.2"
4
+ description = "Tools for analyzing financial timeseries."
5
5
  authors = ["Martin Karrin <martin.karrin@captor.se>"]
6
- repository = "https://github.com/CaptorAB/OpenSeries"
6
+ repository = "https://github.com/CaptorAB/openseries"
7
7
  license = "BSD-3-Clause"
8
8
  readme = "README.md"
9
9
  classifiers = [
@@ -53,25 +53,18 @@ mypy = "^1.9.0"
53
53
  pandas-stubs = "^2.2.1.240316"
54
54
  pre-commit = "^3.7.0"
55
55
  pytest = "^8.1.1"
56
- ruff = "^0.3.4"
57
- types-openpyxl = "^3.1.0.20240311"
56
+ ruff = "^0.3.7"
57
+ types-openpyxl = "^3.1.0.20240408"
58
58
  types-python-dateutil = "^2.9.0.20240316"
59
- types-requests = "^2.31.0.20240311"
59
+ types-requests = "^2.31.0.20240406"
60
60
 
61
61
  [build-system]
62
62
  requires = ["poetry-core>=1.8.2"]
63
63
  build-backend = "poetry.core.masonry.api"
64
64
 
65
- [tool.setuptools_scm]
66
-
67
- [poetry.virtualenvs]
68
- create = true
69
- in-project = true
70
- path = "venv"
71
-
72
65
  [tool.pytest.ini_options]
73
66
  filterwarnings = [
74
- "ignore::RuntimeWarning:pandas.*:"
67
+ "ignore::DeprecationWarning:openpyxl.*:"
75
68
  ]
76
69
 
77
70
  [tool.coverage.run]
@@ -83,15 +76,17 @@ skip_empty = true
83
76
  fail_under = 99
84
77
 
85
78
  [tool.mypy]
79
+ exclude = ["venv/*"]
86
80
  strict = true
87
- follow_imports = "silent"
81
+ pretty = true
82
+ warn_unreachable = false
88
83
  warn_redundant_casts = true
89
84
  warn_unused_ignores = true
90
85
  disallow_any_generics = true
91
86
  check_untyped_defs = true
92
87
  no_implicit_reexport = true
93
88
  disallow_untyped_defs = true
94
- exclude = ["venv/*"]
89
+ follow_imports = "normal"
95
90
  plugins = [
96
91
  "pydantic.mypy",
97
92
  "numpy.typing.mypy_plugin"
@@ -1 +0,0 @@
1
- """OpenSeries.openseries.__init__.py."""
File without changes