openseries 1.7.8__py3-none-any.whl → 1.8.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/__init__.py +2 -1
- openseries/_common_model.py +107 -82
- openseries/_risk.py +3 -3
- openseries/datefixer.py +12 -6
- openseries/frame.py +93 -75
- openseries/load_plotly.py +5 -3
- openseries/{types.py → owntypes.py} +65 -4
- openseries/plotly_layouts.json +3 -3
- openseries/portfoliotools.py +29 -23
- openseries/series.py +45 -55
- openseries/simulation.py +6 -5
- openseries-1.8.1.dist-info/LICENSE.md +27 -0
- {openseries-1.7.8.dist-info → openseries-1.8.1.dist-info}/METADATA +55 -29
- openseries-1.8.1.dist-info/RECORD +16 -0
- {openseries-1.7.8.dist-info → openseries-1.8.1.dist-info}/WHEEL +1 -1
- openseries-1.7.8.dist-info/LICENSE.md +0 -27
- openseries-1.7.8.dist-info/RECORD +0 -16
@@ -1,37 +1,66 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: openseries
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.8.1
|
4
4
|
Summary: Tools for analyzing financial timeseries.
|
5
|
-
|
6
|
-
|
5
|
+
License: # BSD 3-Clause License
|
6
|
+
|
7
|
+
## Copyright (c) Captor Fund Management AB
|
8
|
+
|
9
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
10
|
+
permitted provided that the following conditions are met:
|
11
|
+
|
12
|
+
1. Redistributions of source code must retain the above copyright notice, this list of
|
13
|
+
conditions and the following disclaimer.
|
14
|
+
|
15
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
16
|
+
of conditions and the following disclaimer in the documentation and/or other
|
17
|
+
materials provided with the distribution.
|
18
|
+
|
19
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be
|
20
|
+
used to endorse or promote products derived from this software without specific prior
|
21
|
+
written permission.
|
22
|
+
|
23
|
+
This software is provided by the copyright holders and contributors “as is” and any
|
24
|
+
express or implied warranties, including, but not limited to, the implied warranties of
|
25
|
+
merchantability and fitness for a particular purpose, are disclaimed. In no event shall
|
26
|
+
the copyright holder or contributors be liable for any direct, indirect, incidental,
|
27
|
+
special, exemplary, or consequential damages (including, but not limited to, procurement
|
28
|
+
of substitute goods or services; loss of use, data, or profits; or business interruption)
|
29
|
+
however caused and on any theory of liability, whether in contract, strict liability,
|
30
|
+
or tort (including negligence or otherwise) arising in any way out of the use of this
|
31
|
+
software, even if advised of the possibility of such damage.
|
7
32
|
Keywords: python,finance,fintech,data-science,timeseries,timeseries-data,timeseries-analysis,investment,investment-analysis,investing
|
8
33
|
Author: Martin Karrin
|
9
34
|
Author-email: martin.karrin@captor.se
|
35
|
+
Maintainer: Martin Karrin
|
36
|
+
Maintainer-email: martin.karrin@captor.se
|
10
37
|
Requires-Python: >=3.10,<3.14
|
11
|
-
Classifier: Development Status :: 5 - Production/Stable
|
12
|
-
Classifier: Framework :: Pydantic
|
13
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
15
|
-
Classifier: Natural Language :: English
|
16
|
-
Classifier: Operating System :: OS Independent
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
18
38
|
Classifier: Programming Language :: Python :: 3.10
|
19
39
|
Classifier: Programming Language :: Python :: 3.11
|
20
40
|
Classifier: Programming Language :: Python :: 3.12
|
21
41
|
Classifier: Programming Language :: Python :: 3.13
|
42
|
+
Classifier: License :: OSI Approved :: BSD License
|
43
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
22
44
|
Classifier: Topic :: Office/Business :: Financial :: Investment
|
45
|
+
Classifier: Natural Language :: English
|
46
|
+
Classifier: Development Status :: 5 - Production/Stable
|
47
|
+
Classifier: Operating System :: OS Independent
|
48
|
+
Classifier: Framework :: Pydantic
|
23
49
|
Requires-Dist: holidays (>=0.30,<1.0)
|
24
50
|
Requires-Dist: numpy (>=1.23.2,<3.0.0)
|
25
|
-
Requires-Dist: openpyxl (>=3.1.2,<
|
51
|
+
Requires-Dist: openpyxl (>=3.1.2,<5.0.0)
|
26
52
|
Requires-Dist: pandas (>=2.1.2,<3.0.0)
|
27
|
-
Requires-Dist: plotly (>=5.18.0,<
|
28
|
-
Requires-Dist: pyarrow (>=14.0.2,<
|
53
|
+
Requires-Dist: plotly (>=5.18.0,<7.0.0)
|
54
|
+
Requires-Dist: pyarrow (>=14.0.2,<21.0.0)
|
29
55
|
Requires-Dist: pydantic (>=2.5.2,<3.0.0)
|
30
|
-
Requires-Dist: python-dateutil (>=2.8.2,<
|
56
|
+
Requires-Dist: python-dateutil (>=2.8.2,<4.0.0)
|
31
57
|
Requires-Dist: requests (>=2.20.0,<3.0.0)
|
32
58
|
Requires-Dist: scipy (>=1.11.4,<2.0.0)
|
33
59
|
Requires-Dist: statsmodels (>=0.14.0,!=0.14.2,<1.0.0)
|
34
|
-
Project-URL:
|
60
|
+
Project-URL: Homepage, https://github.com/CaptorAB/openseries
|
61
|
+
Project-URL: Issue Tracker, https://github.com/CaptorAB/openseries/issues
|
62
|
+
Project-URL: Release Notes, https://github.com/CaptorAB/openseries/releases
|
63
|
+
Project-URL: Source, https://github.com/CaptorAB/openseries
|
35
64
|
Description-Content-Type: text/markdown
|
36
65
|
|
37
66
|
<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/>
|
@@ -43,6 +72,7 @@ Description-Content-Type: text/markdown
|
|
43
72
|
[](https://pypi.org/project/openseries/)
|
44
73
|
[](https://anaconda.org/conda-forge/openseries)
|
45
74
|
[](https://anaconda.org/conda-forge/openseries)
|
75
|
+
[](https://nbviewer.org/github/karrmagadgeteer2/NoteBook/blob/master/openseriesnotebook.ipynb)
|
46
76
|
[](https://www.python.org/)
|
47
77
|
[](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
|
48
78
|
[](https://github.com/CaptorAB/openseries/actions/workflows/test.yml)
|
@@ -80,10 +110,10 @@ Install openseries and yfinance first.
|
|
80
110
|
from openseries import OpenTimeSeries
|
81
111
|
import yfinance as yf
|
82
112
|
|
83
|
-
move=yf.Ticker("^MOVE")
|
113
|
+
move=yf.Ticker(ticker="^MOVE")
|
84
114
|
history=move.history(period="max")
|
85
|
-
series=OpenTimeSeries.from_df(history.loc[:, "Close"])
|
86
|
-
_=series.set_new_label("ICE BofAML MOVE Index")
|
115
|
+
series=OpenTimeSeries.from_df(dframe=history.loc[:, "Close"])
|
116
|
+
_=series.set_new_label(lvl_zero="ICE BofAML MOVE Index")
|
87
117
|
_,_=series.plot_series()
|
88
118
|
|
89
119
|
```
|
@@ -117,11 +147,6 @@ first indices 2006-01-03
|
|
117
147
|
last indices 2023-04-05 2023-04-05
|
118
148
|
```
|
119
149
|
|
120
|
-
### Usage example on Jupyter Nbviewer
|
121
|
-
|
122
|
-
[](https://nbviewer.org/github/karrmagadgeteer2/NoteBook/blob/master/openseriesnotebook.ipynb)
|
123
|
-
|
124
|
-
|
125
150
|
## Development Instructions
|
126
151
|
|
127
152
|
These instructions assume that you have a compatible Python version installed on
|
@@ -196,11 +221,12 @@ make lint
|
|
196
221
|
|
197
222
|
### On some files in the project
|
198
223
|
|
199
|
-
| File
|
200
|
-
|
201
|
-
| [series.py](https://github.com/CaptorAB/openseries/blob/master/openseries/series.py)
|
202
|
-
| [frame.py](https://github.com/CaptorAB/openseries/blob/master/openseries/frame.py)
|
203
|
-
| [
|
224
|
+
| File | Description |
|
225
|
+
|:-----------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
226
|
+
| [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. |
|
227
|
+
| [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. |
|
228
|
+
| [portfoliotools.py](https://github.com/CaptorAB/openseries/blob/master/openseries/portfoliotools.py) | Defines functions to simulate, optimize, and plot portfolios. |
|
229
|
+
| [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
230
|
|
205
231
|
### Class methods used to construct objects.
|
206
232
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
openseries/__init__.py,sha256=dKw_wEfgrCwwV1IRljesrtxjE9AVFwTyhE8k4CFIck8,1053
|
2
|
+
openseries/_common_model.py,sha256=x1CqaMjWo-nG-sRYxhKaIT_UBPGhfsNTGFF2x4tf3Gk,74451
|
3
|
+
openseries/_risk.py,sha256=5Lu4vK2oQlDdtv5WKD2ZTGrMIlsa0TiPxk6opgtnVlA,2084
|
4
|
+
openseries/datefixer.py,sha256=w_3lH9cmAm-Xl8t8-X3FdW22AA3zb5OqS0A4FrgS9vc,12479
|
5
|
+
openseries/frame.py,sha256=j5kD6s6kXLDjlSQEpKaFzT1bDN9Pmb2PbAF-hSf-NGc,55894
|
6
|
+
openseries/load_plotly.py,sha256=CzD-ZJNk6WGzIkzIHso4aULDpoWXsjH3xL7p7MP0lqY,1998
|
7
|
+
openseries/owntypes.py,sha256=aqidJ09w3autlgLD6fVEtANbgzh28K53gWDB6j_P4T4,9047
|
8
|
+
openseries/plotly_captor_logo.json,sha256=F5nhMzEyxKywtjvQqMTKgKRCJQYMDIiBgDSxdte8Clo,178
|
9
|
+
openseries/plotly_layouts.json,sha256=im8QZPRB--zV_rOu1OiSbvJPA52oJ6QZRFzkwB1C708,1430
|
10
|
+
openseries/portfoliotools.py,sha256=8XTjPMPHuazh20LeYj-y4hTZnGX8hrArLwS9Ot_MufM,19261
|
11
|
+
openseries/series.py,sha256=rwd-J_cD1lElC7W65kt2xGLPHFRfmWAwxe_KEJvi3Pc,27099
|
12
|
+
openseries/simulation.py,sha256=TLEsIZq8SzQ5BRQqjQMIeCY8ibPX5tkftnx4R-zLspQ,13905
|
13
|
+
openseries-1.8.1.dist-info/LICENSE.md,sha256=wNupG-KLsG0aTncb_SMNDh1ExtrKXlpxSJ6RC-g-SWs,1516
|
14
|
+
openseries-1.8.1.dist-info/METADATA,sha256=JcL-WQlrWAvJu2cfcxNwqDKsIrSgFrK6Uad2jqC-Xzs,45658
|
15
|
+
openseries-1.8.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
16
|
+
openseries-1.8.1.dist-info/RECORD,,
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# BSD 3-Clause License
|
2
|
-
|
3
|
-
## Copyright (c) Captor Fund Management AB
|
4
|
-
|
5
|
-
Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
permitted provided that the following conditions are met:
|
7
|
-
|
8
|
-
1. Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
conditions and the following disclaimer.
|
10
|
-
|
11
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
12
|
-
of conditions and the following disclaimer in the documentation and/or other
|
13
|
-
materials provided with the distribution.
|
14
|
-
|
15
|
-
3. Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
-
used to endorse or promote products derived from this software without specific prior
|
17
|
-
written permission.
|
18
|
-
|
19
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY
|
20
|
-
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
22
|
-
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
24
|
-
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
26
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -1,16 +0,0 @@
|
|
1
|
-
openseries/__init__.py,sha256=gWSOyzR78BMAANZokCz2CoC1RxZM4eSpJOHFGQfFToc,1032
|
2
|
-
openseries/_common_model.py,sha256=R9PhG5hrOk5pJjv3aox9fI1-Pv90wXYjbdbOU_YNlVA,73768
|
3
|
-
openseries/_risk.py,sha256=PReIfkzhInvIgJkzI4k1wYvhmLZ4cCurYKuQAvlHLlE,2082
|
4
|
-
openseries/datefixer.py,sha256=3E8Ddf3Ps9k5qUWqL13ONelyMECZsvtyrsFJg7r3bxE,12298
|
5
|
-
openseries/frame.py,sha256=nGqqLlENLuSj0YuR1AXtgLg-w8kPCfUQf6xkjGiOTEI,55378
|
6
|
-
openseries/load_plotly.py,sha256=vL4nZuX20d3F5q-NbaHldIsKInUc9tXOu6S-rDGHuDw,1956
|
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=B4oJkT_j44h3IsRsFAQcepGonvXda8uriAWGXEHyWmE,19087
|
10
|
-
openseries/series.py,sha256=vvwpTH-My5ju-m2LOQOYzXV0VCU4DJCxOo6v-DXpWHI,27514
|
11
|
-
openseries/simulation.py,sha256=Gc5h3KD3K5AySWqXzm1lbsn2_mwOEWjHr6EVNHb1R-w,13878
|
12
|
-
openseries/types.py,sha256=J102TI1x1X6BQxsF65RN3U1heBUfzrCFVRwXAJj_R7k,7302
|
13
|
-
openseries-1.7.8.dist-info/LICENSE.md,sha256=IQ8_IMXgHxyv4M48G14fJsjcrkiSASdalASTXWCOsj4,1515
|
14
|
-
openseries-1.7.8.dist-info/METADATA,sha256=8030LLO_xBVZTcuFhmR4_YJieAG17NepGvoi7M_hgZ8,43744
|
15
|
-
openseries-1.7.8.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
16
|
-
openseries-1.7.8.dist-info/RECORD,,
|