openseries 1.9.6__py3-none-any.whl → 1.9.7__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/_common_model.py +319 -161
- openseries/frame.py +41 -74
- openseries/owntypes.py +1 -1
- openseries/portfoliotools.py +13 -28
- openseries/py.typed +0 -0
- openseries/report.py +3 -2
- openseries/series.py +18 -29
- openseries/simulation.py +94 -22
- {openseries-1.9.6.dist-info → openseries-1.9.7.dist-info}/METADATA +14 -18
- openseries-1.9.7.dist-info/RECORD +18 -0
- {openseries-1.9.6.dist-info → openseries-1.9.7.dist-info}/WHEEL +1 -1
- openseries-1.9.6.dist-info/RECORD +0 -17
- {openseries-1.9.6.dist-info → openseries-1.9.7.dist-info}/licenses/LICENSE.md +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: openseries
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.7
|
4
4
|
Summary: Tools for analyzing financial timeseries.
|
5
5
|
License: # BSD 3-Clause License
|
6
6
|
|
@@ -118,7 +118,7 @@ _,_=series.plot_series()
|
|
118
118
|
|
119
119
|
```
|
120
120
|
|
121
|
-
### Sample output using the report_html() function
|
121
|
+
### Sample output using the report_html() function
|
122
122
|
|
123
123
|
<img src="https://raw.githubusercontent.com/CaptorAB/openseries/master/openseries_plot.png" alt="Two Assets Compared" width="1000" />
|
124
124
|
|
@@ -152,10 +152,7 @@ source source_me
|
|
152
152
|
|
153
153
|
## Testing and Linting / Type-checking
|
154
154
|
|
155
|
-
Ruff and
|
156
|
-
are also used in the project's GitHub workflows and are run when the `lint`
|
157
|
-
alternative is chosen in the below commands.
|
158
|
-
Any silenced error codes can be found in the
|
155
|
+
[Ruff](https://docs.astral.sh/ruff/) and [mypy](https://mypy-lang.org/) checking is embedded in the pre-commit hook. Both are also used in the project's GitHub workflows and are run when the `lint` alternative is chosen in the below commands. Any silenced error codes can be found in the
|
159
156
|
[pyproject.toml](https://github.com/CaptorAB/openseries/blob/master/pyproject.toml)
|
160
157
|
file or in in-line comments.
|
161
158
|
|
@@ -201,7 +198,7 @@ make lint
|
|
201
198
|
| [report.py](https://github.com/CaptorAB/openseries/blob/master/openseries/report.py) | Defines the _report_html_ function that is used to create a landscape orientation report on at least two assets. All preceding assets will be measured against the last asset in the input OpenFrame. |
|
202
199
|
| [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 |
|
203
200
|
|
204
|
-
### Class methods used to construct objects
|
201
|
+
### Class methods used to construct objects
|
205
202
|
|
206
203
|
| Method | Applies to | Description |
|
207
204
|
|:------------------|:------------------------------|:---------------------------------------------------------------------------------------------------|
|
@@ -210,7 +207,7 @@ make lint
|
|
210
207
|
| `from_fixed_rate` | `OpenTimeSeries` | Class method to create an OpenTimeSeries object from a fixed rate, number of days and an end date. |
|
211
208
|
| `from_deepcopy` | `OpenTimeSeries`, `OpenFrame` | Creates a copy of an OpenTimeSeries object. |
|
212
209
|
|
213
|
-
### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class
|
210
|
+
### Non-numerical or "helper" properties that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class
|
214
211
|
|
215
212
|
| Property | type | Applies to | Description |
|
216
213
|
|:----------------|:---------------------|:-----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -228,7 +225,7 @@ make lint
|
|
228
225
|
| `markets` | `list[str]` or `str` | `OpenTimeSeries` | (List of) markets code(s) according to market code(s) input for the [pandas-market-calendars](https://pandas-market-calendars.readthedocs.io/en/latest/) package. |
|
229
226
|
| `valuetype` | `ValueType` | `OpenTimeSeries` | Field identifies the type of values in the series. ValueType is an Enum. |
|
230
227
|
|
231
|
-
### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class
|
228
|
+
### Non-numerical or "helper" properties that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class
|
232
229
|
|
233
230
|
| Property | type | Applies to | Description |
|
234
231
|
|:-------------------|:---------------------------------|:------------|:-------------------------------------------------------------------------|
|
@@ -242,7 +239,7 @@ make lint
|
|
242
239
|
| `lengths_of_items` | `pandas.Series[int]` | `OpenFrame` | Number of items in each of the series in the OpenFrame. |
|
243
240
|
| `span_of_days_all` | `pandas.Series[int]` | `OpenFrame` | Number of days from the first to the last in each of the series. |
|
244
241
|
|
245
|
-
### 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
|
242
|
+
### 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
|
246
243
|
|
247
244
|
| Property | type | Applies to | Description |
|
248
245
|
|:--------------------|:---------------------------------|:------------------------------|:----------------------------------------------------------------------------------|
|
@@ -255,7 +252,7 @@ make lint
|
|
255
252
|
| `periods_in_a_year` | `float` | `OpenTimeSeries`, `OpenFrame` | The number of observations in an average year for all days in the data. |
|
256
253
|
| `yearfrac` | `float` | `OpenTimeSeries`, `OpenFrame` | Length of timeseries expressed as np.float64 fraction of a year with 365.25 days. |
|
257
254
|
|
258
|
-
### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class
|
255
|
+
### Methods that apply only to the [OpenTimeSeries](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py) class
|
259
256
|
|
260
257
|
| Method | Applies to | Description |
|
261
258
|
|:-------------------------|:-----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -263,10 +260,9 @@ make lint
|
|
263
260
|
| `set_new_label` | `OpenTimeSeries` | Method to change the pandas.DataFrame column MultiIndex. |
|
264
261
|
| `running_adjustment` | `OpenTimeSeries` | Adjusts the series performance with a `float` factor. |
|
265
262
|
| `ewma_vol_func` | `OpenTimeSeries` | Returns a `pandas.Series` with volatility based on [Exponentially Weighted Moving Average](https://www.investopedia.com/articles/07/ewma.asp). |
|
266
|
-
| `from_1d_rate_to_cumret` | `OpenTimeSeries` | Converts a series of 1-day rates into a cumulative valueseries.
|
267
|
-
|
|
263
|
+
| `from_1d_rate_to_cumret` | `OpenTimeSeries` | Converts a series of 1-day rates into a cumulative valueseries. |
|
268
264
|
|
269
|
-
### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class
|
265
|
+
### Methods that apply only to the [OpenFrame](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py) class
|
270
266
|
|
271
267
|
| Method | Applies to | Description |
|
272
268
|
|:---------------------------------|:------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -275,7 +271,7 @@ make lint
|
|
275
271
|
| `add_timeseries` | `OpenFrame` | Adds a given OpenTimeSeries to the OpenFrame. |
|
276
272
|
| `delete_timeseries` | `OpenFrame` | Deletes an OpenTimeSeries from the OpenFrame. |
|
277
273
|
| `relative` | `OpenFrame` | Calculates a new series that is the relative performance of two others. |
|
278
|
-
| `make_portfolio` | `OpenFrame` | Calculates a portfolio timeseries based on the series and weights. Weights
|
274
|
+
| `make_portfolio` | `OpenFrame` | Calculates a portfolio timeseries based on the series and weights. Weights an be provided as a list, or a weight strategy can be set as _equal weights_ or _inverted volatility_. |
|
279
275
|
| `ord_least_squares_fit` | `OpenFrame` | Performs a regression and an [Ordinary Least Squares](https://www.statsmodels.org/stable/examples/notebooks/generated/ols.html) fit. |
|
280
276
|
| `beta` | `OpenFrame` | Calculates [Beta](https://www.investopedia.com/terms/b/beta.asp) of an asset relative a market. |
|
281
277
|
| `jensen_alpha` | `OpenFrame` | Calculates [Jensen's Alpha](https://www.investopedia.com/terms/j/jensensmeasure.asp) of an asset relative a market. |
|
@@ -289,7 +285,7 @@ make lint
|
|
289
285
|
| `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). |
|
290
286
|
| `multi_factor_linear_regression` | `OpenFrame` | Treats one specified series as the dependent variable (y) and uses all remaining series as independent variables (X) in a linear regression and returns a DataFrame with summary output and a series of predicted values. |
|
291
287
|
|
292
|
-
### 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
|
288
|
+
### 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
|
293
289
|
|
294
290
|
| Method | Applies to | Description |
|
295
291
|
|:-----------------------------------|:------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -315,7 +311,7 @@ make lint
|
|
315
311
|
| `rolling_cvar_down` | `OpenTimeSeries`, `OpenFrame` | Returns a pandas.DataFrame with rolling CVaR figures. |
|
316
312
|
| `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. |
|
317
313
|
|
318
|
-
### 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)
|
314
|
+
### 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
315
|
|
320
316
|
| Property | type | Applies to | Description |
|
321
317
|
|:------------------------|:-------------------------|:------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
@@ -341,7 +337,7 @@ make lint
|
|
341
337
|
| `kurtosis` | `float`, `pandas.Series` | `OpenTimeSeries`, `OpenFrame` | [Kurtosis](https://www.investopedia.com/terms/k/kurtosis.asp) of the return distribution. |
|
342
338
|
| `z_score` | `float`, `pandas.Series` | `OpenTimeSeries`, `OpenFrame` | [Z-score](https://www.investopedia.com/terms/z/zscore.asp) as (last return - mean return) / standard deviation of returns. |
|
343
339
|
|
344
|
-
### Methods below are identical to the Numerical Properties above
|
340
|
+
### Methods below are identical to the Numerical Properties above
|
345
341
|
|
346
342
|
_They are simply methods that take different date or length inputs to return the
|
347
343
|
properties for subset periods._
|
@@ -0,0 +1,18 @@
|
|
1
|
+
openseries/__init__.py,sha256=WAh79oE-ceGG_yl4nBukkp3UPvmLk4u_GySL2xOKbxE,1375
|
2
|
+
openseries/_common_model.py,sha256=BTWXpXkKrvihVdHF4HsnIwd1tH_YgAnoxMz940qoy-8,89569
|
3
|
+
openseries/_risk.py,sha256=8XKZWWXrECo0Vd9r2kbcn4dzyPuo93DAEO8eSkv4w20,2357
|
4
|
+
openseries/datefixer.py,sha256=eVhxaFj_la_XZQuPQHvinTWEzCCn8ct_AnZEYPOpY6U,15775
|
5
|
+
openseries/frame.py,sha256=PGtcxCTmkKO42IYhovxZoCccTF97Ls_4Ru7ovIUETOU,56529
|
6
|
+
openseries/load_plotly.py,sha256=C6iQyabfi5ubSONuis3yRHb3bUktBtTDlovsDIaeHNQ,2266
|
7
|
+
openseries/owntypes.py,sha256=3n3IgqRjIvUfYD-37Bedilgx0UDGA-RPU0IC7wujMWg,9681
|
8
|
+
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
9
|
+
openseries/plotly_layouts.json,sha256=MvDEQuiqIhMBXBelXb1sedTOlTPheizv6NZRLeE9YS4,1431
|
10
|
+
openseries/portfoliotools.py,sha256=zXnKiPoKQ691Qq_o7cg_fBRIPaj55r52OEanjBw8jOA,19339
|
11
|
+
openseries/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
+
openseries/report.py,sha256=FKnOMrTc9Ofe_I_eBdBnmIaWluAYvGPCZ16VjbzwF10,14375
|
13
|
+
openseries/series.py,sha256=dQh7dAosFxJqiUdj8Cf7A19vv-w4hTAkU4_O_WnvxA4,28617
|
14
|
+
openseries/simulation.py,sha256=LRg7hx5iWuoosESgKzaEnj5XkEv5bTNjRAj3SDMo4kM,16321
|
15
|
+
openseries-1.9.7.dist-info/METADATA,sha256=rR7bJ3SWtXHL82WBxvW3FUrCkNIsGF31XX3n8kpiYYI,48251
|
16
|
+
openseries-1.9.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
17
|
+
openseries-1.9.7.dist-info/licenses/LICENSE.md,sha256=wNupG-KLsG0aTncb_SMNDh1ExtrKXlpxSJ6RC-g-SWs,1516
|
18
|
+
openseries-1.9.7.dist-info/RECORD,,
|
@@ -1,17 +0,0 @@
|
|
1
|
-
openseries/__init__.py,sha256=WAh79oE-ceGG_yl4nBukkp3UPvmLk4u_GySL2xOKbxE,1375
|
2
|
-
openseries/_common_model.py,sha256=oZDTfUiQ4OG0T0RsBwTwRPHQcFpdOv1X7447hssoma4,82768
|
3
|
-
openseries/_risk.py,sha256=8XKZWWXrECo0Vd9r2kbcn4dzyPuo93DAEO8eSkv4w20,2357
|
4
|
-
openseries/datefixer.py,sha256=eVhxaFj_la_XZQuPQHvinTWEzCCn8ct_AnZEYPOpY6U,15775
|
5
|
-
openseries/frame.py,sha256=BG_Qnp0PMIZ7ZiShqTjO3Koj7Gs04n4WyzApCvtcUQY,57953
|
6
|
-
openseries/load_plotly.py,sha256=C6iQyabfi5ubSONuis3yRHb3bUktBtTDlovsDIaeHNQ,2266
|
7
|
-
openseries/owntypes.py,sha256=4IZvwl_YtoUZKlmVX65j5fp1zmfmOJLvaX8vxEIzIAY,9665
|
8
|
-
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
9
|
-
openseries/plotly_layouts.json,sha256=MvDEQuiqIhMBXBelXb1sedTOlTPheizv6NZRLeE9YS4,1431
|
10
|
-
openseries/portfoliotools.py,sha256=NqSTMlVv9Szu2usXtYzt__661VJoLsAf059ThfBr99Q,19677
|
11
|
-
openseries/report.py,sha256=pnxiEfbbkDmzj-lPcWgmYao1vtv1DUG8b73QDQKJa8o,14379
|
12
|
-
openseries/series.py,sha256=NgEZ2YPiLG55Bba48XS2zSh5dRLqz8hyGm-CGG1jNmY,29122
|
13
|
-
openseries/simulation.py,sha256=8J_iDlKjDVDiHMTWQAzHdXWxNR81pOz2RfdfUMHKSqQ,14337
|
14
|
-
openseries-1.9.6.dist-info/METADATA,sha256=GrNCO5aUnS5cuboqOsyU8sTN1YyHARF3RhFT1keNM3s,48324
|
15
|
-
openseries-1.9.6.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
16
|
-
openseries-1.9.6.dist-info/licenses/LICENSE.md,sha256=wNupG-KLsG0aTncb_SMNDh1ExtrKXlpxSJ6RC-g-SWs,1516
|
17
|
-
openseries-1.9.6.dist-info/RECORD,,
|
File without changes
|