getfactormodels 0.0.1__py3-none-any.whl → 0.0.2__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.

Potentially problematic release.


This version of getfactormodels might be problematic. Click here for more details.

@@ -20,7 +20,7 @@
20
20
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
- __version__ = "0.0.1"
23
+ __version__ = "0.0.2"
24
24
 
25
25
  from .__main__ import FactorExtractor, get_factors
26
26
  from .models import models # noqa: F401
@@ -321,6 +321,7 @@ def _create_cache():
321
321
  cache_dir = os.path.expanduser('~/.cache/getfactormodels')
322
322
  if not os.path.exists(cache_dir):
323
323
  os.makedirs(cache_dir)
324
+ return cache_dir
324
325
 
325
326
 
326
327
  def hml_devil_factors(frequency='M',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: getfactormodels
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Retreive data for various multifactor asset pricing models.
5
5
  Keywords: finance,pricing models,financial analysis,econometrics,asset pricing,multifactor models
6
6
  Author-email: "S. Martin" <x512@pm.me>
@@ -36,7 +36,7 @@ Provides-Extra: dev
36
36
 
37
37
  # getfactormodels
38
38
 
39
- ![Python 3.11](https://img.shields.io/badge/Python-3.7+-306998.svg?logo=python&logoColor=ffde57&style=flat-square)
39
+ ![Python 3.11](https://img.shields.io/badge/Python-3.7+-306998.svg?logo=python&logoColor=ffde57&style=flat-square) ![PyPI - Version](https://img.shields.io/pypi/v/getfactormodels?style=flat-square&label=PyPI)
40
40
 
41
41
 
42
42
  Reliably retrieve data for various multi-factor asset pricing models.
@@ -55,8 +55,7 @@ Reliably retrieve data for various multi-factor asset pricing models.
55
55
  - The 6-factor model of Barillas and Shanken<sup>[[12]](#12)</sup>
56
56
 
57
57
 
58
- _Thanks to: Kenneth French, Robert Stambaugh, Lin Sun, Zhiguo He, AQR Capital Management (AQR.com) and Hou, Xue and Zhang (global-q.org), for their research and for the datasets they publically provide._
59
-
58
+ _Thanks to: Kenneth French, Robert Stambaugh, Lin Sun, Zhiguo He, AQR Capital Management (AQR.com) and Hou, Xue and Zhang (global-q.org), for their research and for the datasets they provide._
60
59
 
61
60
  ## Installation
62
61
 
@@ -64,7 +63,7 @@ _Thanks to: Kenneth French, Robert Stambaugh, Lin Sun, Zhiguo He, AQR Capital Ma
64
63
 
65
64
  * Install with pip:
66
65
  ```shell
67
- $ pip install getfactormodels
66
+ pip install getfactormodels
68
67
  ```
69
68
 
70
69
  ## Usage
@@ -75,9 +74,9 @@ After installing, import ``getfactormodels`` and call ``get_factors()`` with the
75
74
  * For example, to retrieve the daily q-factor model data:
76
75
 
77
76
  ```py
78
- import getfactormodels as getfactormodels
77
+ import getfactormodels
79
78
 
80
- df = getfactormodels.get_factors(model='q', frequency='d')
79
+ getfactormodels.get_factors(model='q', frequency='d')
81
80
  ```
82
81
  > _Trimmed output:_
83
82
  ```txt
@@ -117,10 +116,9 @@ After installing, import ``getfactormodels`` and call ``get_factors()`` with the
117
116
  ```
118
117
  >The output parameter accepts a filename, path or directory, and can be one of csv, md, txt, xlsx, pkl.
119
118
 
119
+ * You can also import just the models that you need.:
120
120
 
121
- You can also import just the models that you need.
122
-
123
- * For example, to import only the *ICR* and *q*-factor models:
121
+ * For example, to import only the *ICR* and *q*-factor models:
124
122
 
125
123
  ```py
126
124
  from getfactormodels import icr_factors, q_factors
@@ -132,7 +130,7 @@ You can also import just the models that you need.
132
130
  df = q_factors(frequency="W", start_date="1992-01-01)
133
131
  ```
134
132
 
135
- * If using ``ff_factors()``, then an additional ``model`` parameter should be specified:
133
+ * If using ``ff_factors()``, then an additional ``model`` parameter should be specified:
136
134
 
137
135
  ```py
138
136
  from getfactormodels import ff_factors
@@ -149,7 +147,9 @@ You can also import just the models that you need.
149
147
  * or import all the models:
150
148
 
151
149
  ```py
152
- from getfactormodels import models
150
+ from getfactormodels.models import models
151
+
152
+ df = models.barillas_shanken_factors('m')
153
153
  ```
154
154
 
155
155
  * There's also the `FactorExtractor` class that the CLI uses (it doesn't really do a whole lot yet):
@@ -1,13 +1,13 @@
1
- getfactormodels/__init__.py,sha256=OBR7bzlxouVp0fnnNiTPEu2Dg5WT7jY-Ss4AXhpPaQ0,1882
1
+ getfactormodels/__init__.py,sha256=kEyQDvcs6ssEAoec_13BcuWr9RSb8teDxAi7RR1CQeo,1882
2
2
  getfactormodels/__main__.py,sha256=wog0NDpyKmUmFWJ0brIJIPoKN_m0HGXtLiXEuO3PrRs,5565
3
3
  getfactormodels/models/__init__.py,sha256=TuTNVPCEwd9xxlAHzoEk4sYDenYQcBdCiMbiulOT-Y0,1237
4
4
  getfactormodels/models/ff_models.py,sha256=8ek3Q40acyOuILcbiAJvYfPnyPisY4oPapeRf4w9FzI,4492
5
- getfactormodels/models/models.py,sha256=VdRWssoqKZKojJyzRj0KstXbLex7WfPU5bgN9NblQoE,17884
5
+ getfactormodels/models/models.py,sha256=Ga5AYEG-mrAFweBuBGRU19lLw0IOIcbLuCBBlTA8olY,17905
6
6
  getfactormodels/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  getfactormodels/utils/cli.py,sha256=Gtyuph2HCYgnx-qy6Aq4QRgDJzzxQ_bPX5iG463uJkE,1455
8
8
  getfactormodels/utils/utils.py,sha256=G-LcqJLWP-VGt3QlLsmQDwd7fbFK4itlNwpeADZRE_s,5559
9
- getfactormodels-0.0.1.dist-info/entry_points.txt,sha256=BeSOuEFV8LlnhTxpKpbeJLQfl_kS-bVif0k4Z1ghOnY,65
10
- getfactormodels-0.0.1.dist-info/LICENSE,sha256=3AA29XMl8p-SVQzn1hMvq478uj3FHVjEUknv6YaGeYk,1066
11
- getfactormodels-0.0.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
12
- getfactormodels-0.0.1.dist-info/METADATA,sha256=KKWEMEIvtRE--mXWonwR8Mwj05zxrKryyRtIwfmzbVg,11895
13
- getfactormodels-0.0.1.dist-info/RECORD,,
9
+ getfactormodels-0.0.2.dist-info/entry_points.txt,sha256=BeSOuEFV8LlnhTxpKpbeJLQfl_kS-bVif0k4Z1ghOnY,65
10
+ getfactormodels-0.0.2.dist-info/LICENSE,sha256=3AA29XMl8p-SVQzn1hMvq478uj3FHVjEUknv6YaGeYk,1066
11
+ getfactormodels-0.0.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
12
+ getfactormodels-0.0.2.dist-info/METADATA,sha256=TKe4WbZq5FzQeqVpo63HepAGpEwp5s_aPL2l7iXQhS0,12018
13
+ getfactormodels-0.0.2.dist-info/RECORD,,