openseries 1.6.0__py3-none-any.whl → 1.7.0__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 +233 -292
- openseries/_risk.py +9 -10
- openseries/datefixer.py +31 -36
- openseries/frame.py +113 -149
- openseries/load_plotly.py +8 -8
- openseries/portfoliotools.py +25 -26
- openseries/series.py +44 -64
- openseries/simulation.py +25 -34
- openseries/types.py +17 -24
- {openseries-1.6.0.dist-info → openseries-1.7.0.dist-info}/LICENSE.md +1 -1
- {openseries-1.6.0.dist-info → openseries-1.7.0.dist-info}/METADATA +4 -5
- openseries-1.7.0.dist-info/RECORD +16 -0
- openseries-1.6.0.dist-info/RECORD +0 -16
- {openseries-1.6.0.dist-info → openseries-1.7.0.dist-info}/WHEEL +0 -0
openseries/types.py
CHANGED
@@ -33,7 +33,6 @@ CountriesType = Union[CountryListType, CountryStringType] # type: ignore[valid-
|
|
33
33
|
|
34
34
|
|
35
35
|
class Countries(BaseModel):
|
36
|
-
|
37
36
|
"""Declare Countries."""
|
38
37
|
|
39
38
|
countryinput: CountriesType
|
@@ -53,7 +52,6 @@ CurrencyStringType = Annotated[
|
|
53
52
|
|
54
53
|
|
55
54
|
class Currency(BaseModel):
|
56
|
-
|
57
55
|
"""Declare Currency."""
|
58
56
|
|
59
57
|
ccy: CurrencyStringType
|
@@ -90,31 +88,29 @@ DatabaseIdStringType = Annotated[
|
|
90
88
|
|
91
89
|
DaysInYearType = Annotated[int, Field(strict=True, ge=1, le=366)]
|
92
90
|
|
93
|
-
DateType =
|
91
|
+
DateType = str | dt.date | dt.datetime | datetime64 | Timestamp
|
94
92
|
|
95
|
-
HolidayType =
|
96
|
-
dict[
|
97
|
-
list[
|
98
|
-
dt.date
|
99
|
-
dt.datetime
|
100
|
-
str
|
101
|
-
float
|
102
|
-
int
|
103
|
-
|
93
|
+
HolidayType = (
|
94
|
+
dict[dt.date | dt.datetime | str | float | int, str]
|
95
|
+
| list[dt.date | dt.datetime | str | float | int]
|
96
|
+
| dt.date
|
97
|
+
| dt.datetime
|
98
|
+
| str
|
99
|
+
| float
|
100
|
+
| int
|
101
|
+
)
|
104
102
|
|
105
103
|
PlotlyLayoutType = dict[
|
106
104
|
str,
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
dict[str, Union[str, int, float, bool, list[str]]],
|
114
|
-
],
|
105
|
+
str
|
106
|
+
| int
|
107
|
+
| float
|
108
|
+
| bool
|
109
|
+
| list[str]
|
110
|
+
| dict[str, str | int | float | bool | list[str]],
|
115
111
|
]
|
116
112
|
|
117
|
-
CaptorLogoType = dict[str,
|
113
|
+
CaptorLogoType = dict[str, str | float]
|
118
114
|
|
119
115
|
LiteralJsonOutput = Literal["values", "tsdf"]
|
120
116
|
LiteralTrunc = Literal["before", "after", "both"]
|
@@ -230,7 +226,6 @@ LiteralFrameProps = Literal[
|
|
230
226
|
|
231
227
|
|
232
228
|
class OpenTimeSeriesPropertiesList(list[str]):
|
233
|
-
|
234
229
|
"""Allowed property arguments for the OpenTimeSeries class."""
|
235
230
|
|
236
231
|
allowed_strings: ClassVar[set[str]] = {
|
@@ -287,7 +282,6 @@ class OpenTimeSeriesPropertiesList(list[str]):
|
|
287
282
|
|
288
283
|
|
289
284
|
class OpenFramePropertiesList(list[str]):
|
290
|
-
|
291
285
|
"""Allowed property arguments for the OpenFrame class."""
|
292
286
|
|
293
287
|
allowed_strings: ClassVar[set[str]] = {
|
@@ -339,7 +333,6 @@ class OpenFramePropertiesList(list[str]):
|
|
339
333
|
|
340
334
|
|
341
335
|
class ValueType(str, Enum):
|
342
|
-
|
343
336
|
"""Enum types of OpenTimeSeries to identify the output."""
|
344
337
|
|
345
338
|
EWMA = "EWMA"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# BSD 3-Clause License
|
2
2
|
|
3
|
-
## Copyright (c)
|
3
|
+
## Copyright (c) Captor Fund Management AB
|
4
4
|
|
5
5
|
Redistribution and use in source and binary forms, with or without modification, are
|
6
6
|
permitted provided that the following conditions are met:
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: openseries
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.7.0
|
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
|
+
Requires-Python: >=3.10,<3.13
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
12
12
|
Classifier: Framework :: Pydantic
|
13
13
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
@@ -15,7 +15,6 @@ Classifier: License :: OSI Approved :: BSD License
|
|
15
15
|
Classifier: Natural Language :: English
|
16
16
|
Classifier: Operating System :: OS Independent
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -25,7 +24,7 @@ Requires-Dist: numpy (>=1.23.2,<=3.0.0)
|
|
25
24
|
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
|
26
25
|
Requires-Dist: pandas (>=2.1.2,<3.0.0)
|
27
26
|
Requires-Dist: plotly (>=5.18.0,<6.0.0)
|
28
|
-
Requires-Dist: pyarrow (>=14.0.2,<
|
27
|
+
Requires-Dist: pyarrow (>=14.0.2,<18.0.0)
|
29
28
|
Requires-Dist: pydantic (>=2.5.2,<3.0.0)
|
30
29
|
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
31
30
|
Requires-Dist: requests (>=2.20.0,<3.0.0)
|
@@ -80,7 +79,7 @@ The code snippet can be pasted into a Python console to run it.
|
|
80
79
|
Install openseries and yfinance first.
|
81
80
|
|
82
81
|
```python
|
83
|
-
from openseries
|
82
|
+
from openseries import OpenTimeSeries
|
84
83
|
import yfinance as yf
|
85
84
|
|
86
85
|
msft=yf.Ticker("MSFT")
|
@@ -0,0 +1,16 @@
|
|
1
|
+
openseries/__init__.py,sha256=k2r-yXfmxqBT7_voQ-4HL5dBxfkQIItsm-o77ot3aDQ,1116
|
2
|
+
openseries/_common_model.py,sha256=smkqaErhDGbcihsqzFeF7tbwstlmlkgcPF2C1KaaGbU,74369
|
3
|
+
openseries/_risk.py,sha256=PReIfkzhInvIgJkzI4k1wYvhmLZ4cCurYKuQAvlHLlE,2082
|
4
|
+
openseries/datefixer.py,sha256=CFsZfooXIl2q7w8x8O2xRwfmQP67offwbWEaNYpEJGU,12778
|
5
|
+
openseries/frame.py,sha256=6u5UGLSVyaBC3YdB84mF3iBSw70Gwnrk4iBQiNeJppg,55580
|
6
|
+
openseries/load_plotly.py,sha256=Uuk_-iIY4_C6Z5U3rAneOh8ZlGYWbkuis9s4Amxzko4,1921
|
7
|
+
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
8
|
+
openseries/plotly_layouts.json,sha256=ahx8-dL4_RPzvHtBOX0SiL0AH7xQJzNRSDhGrSmU-Og,1429
|
9
|
+
openseries/portfoliotools.py,sha256=asD8n8m8roEN0SuJK_LoLc5OnTcPmFVl64598dG2sUQ,18749
|
10
|
+
openseries/series.py,sha256=WqDSGOEBFuVQkfdrysXS4PBi2B7HFT-v9f41vt9JaSA,27984
|
11
|
+
openseries/simulation.py,sha256=QpeEC2nsG3DAqd51spAccrYWhUbsFWfCyyCkrjCMd7Y,13860
|
12
|
+
openseries/types.py,sha256=KoqDGI-DOJGP3zPzhx0an7IGIttWG0zYw-VJqolc1xA,7908
|
13
|
+
openseries-1.7.0.dist-info/LICENSE.md,sha256=IQ8_IMXgHxyv4M48G14fJsjcrkiSASdalASTXWCOsj4,1515
|
14
|
+
openseries-1.7.0.dist-info/METADATA,sha256=G82OxH9BK1fRJVI45Lr-PNu_hbHKmdo1uKnZZa8JIx0,44166
|
15
|
+
openseries-1.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
16
|
+
openseries-1.7.0.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
openseries/__init__.py,sha256=k2r-yXfmxqBT7_voQ-4HL5dBxfkQIItsm-o77ot3aDQ,1116
|
2
|
-
openseries/_common_model.py,sha256=qDrEjLLz7FmXbfMl07eocz7i892JdighGpigWCFBpmo,75623
|
3
|
-
openseries/_risk.py,sha256=etureOLszoEgD48NEOZkx24gaK8I-PfjRXV4Ymjkh7w,2072
|
4
|
-
openseries/datefixer.py,sha256=rNHH5yT8gV9iHgd_TCiVuwTMNB5TcxeqSsvIAq36dXU,12717
|
5
|
-
openseries/frame.py,sha256=w6eZgfPx9gRnmUj_i0--KdurBoy5p18B7k0kpGwSoTM,56440
|
6
|
-
openseries/load_plotly.py,sha256=GLsYrbRYEC3HcKHb7vwZIrlRl3ZjnRhSXoMGJsO8weA,1888
|
7
|
-
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
8
|
-
openseries/plotly_layouts.json,sha256=ahx8-dL4_RPzvHtBOX0SiL0AH7xQJzNRSDhGrSmU-Og,1429
|
9
|
-
openseries/portfoliotools.py,sha256=r6Y1ZRuTV4nsRL4s7WEJfv1u6__6kkc3d5Rb-MhQn2k,18807
|
10
|
-
openseries/series.py,sha256=gZCASMtN6Drw7CcmRTNtKBT66YCsnP7Ei7Jhdytp-oE,28236
|
11
|
-
openseries/simulation.py,sha256=LlssueX0tXHvnEZqiubkfsluOkdd9oQE57RbHZDD7_k,13942
|
12
|
-
openseries/types.py,sha256=hIEPm-5BFs_ZIXoMw2DWnbJWe2xFmWDYkSQsEYlLEEA,7968
|
13
|
-
openseries-1.6.0.dist-info/LICENSE.md,sha256=cPUabMxJ6-ziqzqS6aLGkR-ilIOKe_s3Qtyp0ioTmo0,1521
|
14
|
-
openseries-1.6.0.dist-info/METADATA,sha256=wD4JNrn68QfVpJtZRm7y8BgN7c6jykxMWUmOhHJVH1M,44222
|
15
|
-
openseries-1.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
16
|
-
openseries-1.6.0.dist-info/RECORD,,
|
File without changes
|