openseries 1.7.6__py3-none-any.whl → 1.7.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/__init__.py +8 -8
- openseries/frame.py +2 -1
- openseries/load_plotly.py +2 -2
- {openseries-1.7.6.dist-info → openseries-1.7.7.dist-info}/METADATA +10 -12
- {openseries-1.7.6.dist-info → openseries-1.7.7.dist-info}/RECORD +7 -7
- {openseries-1.7.6.dist-info → openseries-1.7.7.dist-info}/LICENSE.md +0 -0
- {openseries-1.7.6.dist-info → openseries-1.7.7.dist-info}/WHEEL +0 -0
openseries/__init__.py
CHANGED
@@ -23,20 +23,20 @@ from .types import ValueType
|
|
23
23
|
|
24
24
|
__all__ = [
|
25
25
|
"OpenFrame",
|
26
|
+
"OpenTimeSeries",
|
27
|
+
"ReturnSimulation",
|
28
|
+
"ValueType",
|
26
29
|
"constrain_optimized_portfolios",
|
27
|
-
"efficient_frontier",
|
28
|
-
"prepare_plot_data",
|
29
|
-
"sharpeplot",
|
30
|
-
"simulate_portfolios",
|
31
30
|
"date_fix",
|
32
31
|
"date_offset_foll",
|
32
|
+
"efficient_frontier",
|
33
33
|
"generate_calendar_date_range",
|
34
34
|
"get_previous_business_day_before_today",
|
35
35
|
"holiday_calendar",
|
36
|
-
"offset_business_days",
|
37
36
|
"load_plotly_dict",
|
38
|
-
"
|
37
|
+
"offset_business_days",
|
38
|
+
"prepare_plot_data",
|
39
|
+
"sharpeplot",
|
40
|
+
"simulate_portfolios",
|
39
41
|
"timeseries_chain",
|
40
|
-
"ReturnSimulation",
|
41
|
-
"ValueType",
|
42
42
|
]
|
openseries/frame.py
CHANGED
@@ -13,6 +13,7 @@ if TYPE_CHECKING:
|
|
13
13
|
|
14
14
|
import statsmodels.api as sm # type: ignore[import-untyped,unused-ignore]
|
15
15
|
from numpy import (
|
16
|
+
array,
|
16
17
|
cov,
|
17
18
|
divide,
|
18
19
|
isinf,
|
@@ -1456,7 +1457,7 @@ class OpenFrame(_CommonModel):
|
|
1456
1457
|
raise NotImplementedError(msg)
|
1457
1458
|
|
1458
1459
|
return DataFrame(
|
1459
|
-
data=(returns @ self.weights).add(1.0).cumprod(),
|
1460
|
+
data=(returns @ array(self.weights)).add(1.0).cumprod(),
|
1460
1461
|
index=self.tsdf.index,
|
1461
1462
|
columns=[[name], [ValueType.PRICE]],
|
1462
1463
|
dtype="float64",
|
openseries/load_plotly.py
CHANGED
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
8
8
|
from typing import TYPE_CHECKING
|
9
9
|
|
10
10
|
import requests
|
11
|
-
from requests.exceptions import ConnectionError
|
11
|
+
from requests.exceptions import ConnectionError as RequestsConnectionError
|
12
12
|
|
13
13
|
if TYPE_CHECKING:
|
14
14
|
from .types import CaptorLogoType, PlotlyLayoutType # pragma: no cover
|
@@ -36,7 +36,7 @@ def _check_remote_file_existence(url: str) -> bool:
|
|
36
36
|
response = requests.head(url, timeout=30)
|
37
37
|
if response.status_code != ok_code:
|
38
38
|
return False
|
39
|
-
except
|
39
|
+
except RequestsConnectionError:
|
40
40
|
return False
|
41
41
|
return True
|
42
42
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: openseries
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.7
|
4
4
|
Summary: Tools for analyzing financial timeseries.
|
5
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
|
9
9
|
Author-email: martin.karrin@captor.se
|
10
|
-
Requires-Python: >=3.10,<3.
|
10
|
+
Requires-Python: >=3.10,<3.14
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
12
12
|
Classifier: Framework :: Pydantic
|
13
13
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Classifier: Topic :: Office/Business :: Financial :: Investment
|
22
23
|
Requires-Dist: holidays (>=0.30,<1.0)
|
23
24
|
Requires-Dist: numpy (>=1.23.2,<3.0.0)
|
@@ -33,21 +34,18 @@ Requires-Dist: statsmodels (>=0.14.0,!=0.14.2,<1.0.0)
|
|
33
34
|
Project-URL: Repository, https://github.com/CaptorAB/openseries
|
34
35
|
Description-Content-Type: text/markdown
|
35
36
|
|
36
|
-
<img src="https://sales.captor.se/captor_logo_sv_1600_icketransparent.png" alt="Captor
|
37
|
-
Fund Management AB"
|
38
|
-
width="81" height="100" align="left" float="right"/><br/>
|
37
|
+
<a href="https://captor.se/"><img src="https://sales.captor.se/captor_logo_sv_1600_icketransparent.png" alt="Captor Fund Management AB" width="81" height="100" align="left" float="right"/></a><br/>
|
39
38
|
|
40
39
|
<br><br>
|
41
40
|
|
42
41
|
# openseries
|
43
42
|
|
44
43
|
[](https://pypi.org/project/openseries/)
|
45
|
-
[](https://anaconda.org/conda-forge/openseries)
|
46
45
|
[](https://anaconda.org/conda-forge/openseries)
|
47
46
|
[](https://www.python.org/)
|
48
47
|
[](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
|
49
48
|
[](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
|
50
|
-
[](https://github.com/CaptorAB/openseries/actions/workflows/check.yml)
|
51
49
|
[](https://python-poetry.org/)
|
52
50
|
[](https://beta.ruff.rs/docs/)
|
53
51
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
@@ -55,8 +53,6 @@ width="81" height="100" align="left" float="right"/><br/>
|
|
55
53
|
This is a project with tools to analyze financial timeseries of a single
|
56
54
|
asset or a group of assets. It is solely made for daily or less frequent data.
|
57
55
|
|
58
|
-
<span style="font-size:2em;">[CHANGELOG](https://github.com/CaptorAB/openseries/blob/master/CHANGELOG.md)</span>
|
59
|
-
|
60
56
|
|
61
57
|
## Basic Usage
|
62
58
|
|
@@ -66,6 +62,8 @@ To install:
|
|
66
62
|
pip install openseries
|
67
63
|
```
|
68
64
|
|
65
|
+
or:
|
66
|
+
|
69
67
|
```bash
|
70
68
|
conda install -c conda-forge openseries
|
71
69
|
```
|
@@ -82,10 +80,10 @@ Install openseries and yfinance first.
|
|
82
80
|
from openseries import OpenTimeSeries
|
83
81
|
import yfinance as yf
|
84
82
|
|
85
|
-
|
86
|
-
history=
|
83
|
+
move=yf.Ticker("^MOVE")
|
84
|
+
history=move.history(period="max")
|
87
85
|
series=OpenTimeSeries.from_df(history.loc[:, "Close"])
|
88
|
-
_=series.
|
86
|
+
_=series.set_new_label("ICE BofAML MOVE Index")
|
89
87
|
_,_=series.plot_series()
|
90
88
|
|
91
89
|
```
|
@@ -1,16 +1,16 @@
|
|
1
|
-
openseries/__init__.py,sha256=
|
1
|
+
openseries/__init__.py,sha256=gWSOyzR78BMAANZokCz2CoC1RxZM4eSpJOHFGQfFToc,1032
|
2
2
|
openseries/_common_model.py,sha256=R9PhG5hrOk5pJjv3aox9fI1-Pv90wXYjbdbOU_YNlVA,73768
|
3
3
|
openseries/_risk.py,sha256=PReIfkzhInvIgJkzI4k1wYvhmLZ4cCurYKuQAvlHLlE,2082
|
4
4
|
openseries/datefixer.py,sha256=3E8Ddf3Ps9k5qUWqL13ONelyMECZsvtyrsFJg7r3bxE,12298
|
5
|
-
openseries/frame.py,sha256=
|
6
|
-
openseries/load_plotly.py,sha256=
|
5
|
+
openseries/frame.py,sha256=nGqqLlENLuSj0YuR1AXtgLg-w8kPCfUQf6xkjGiOTEI,55378
|
6
|
+
openseries/load_plotly.py,sha256=vL4nZuX20d3F5q-NbaHldIsKInUc9tXOu6S-rDGHuDw,1956
|
7
7
|
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
8
8
|
openseries/plotly_layouts.json,sha256=ahx8-dL4_RPzvHtBOX0SiL0AH7xQJzNRSDhGrSmU-Og,1429
|
9
9
|
openseries/portfoliotools.py,sha256=s8bQ1SfcXF-xY3GbpyOvMHfypPBXtEl6jDZwVRcrSY4,19102
|
10
10
|
openseries/series.py,sha256=i-zVf3lsk4u_4VlWCSFRQax51LAStMewKIVgiqlo7gQ,27654
|
11
11
|
openseries/simulation.py,sha256=Gc5h3KD3K5AySWqXzm1lbsn2_mwOEWjHr6EVNHb1R-w,13878
|
12
12
|
openseries/types.py,sha256=IbzW9iVuA3MEx3WtjyB6QYeSd3TkGjTOkFnnpSADKlY,7491
|
13
|
-
openseries-1.7.
|
14
|
-
openseries-1.7.
|
15
|
-
openseries-1.7.
|
16
|
-
openseries-1.7.
|
13
|
+
openseries-1.7.7.dist-info/LICENSE.md,sha256=IQ8_IMXgHxyv4M48G14fJsjcrkiSASdalASTXWCOsj4,1515
|
14
|
+
openseries-1.7.7.dist-info/METADATA,sha256=nnf395aWacK9fb1hkrRk65fx250WqtnGFth8JDm2XAs,43744
|
15
|
+
openseries-1.7.7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
16
|
+
openseries-1.7.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|