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.
- getfactormodels/__init__.py +1 -1
- getfactormodels/models/models.py +1 -0
- {getfactormodels-0.0.1.dist-info → getfactormodels-0.0.2.dist-info}/METADATA +12 -12
- {getfactormodels-0.0.1.dist-info → getfactormodels-0.0.2.dist-info}/RECORD +7 -7
- {getfactormodels-0.0.1.dist-info → getfactormodels-0.0.2.dist-info}/LICENSE +0 -0
- {getfactormodels-0.0.1.dist-info → getfactormodels-0.0.2.dist-info}/WHEEL +0 -0
- {getfactormodels-0.0.1.dist-info → getfactormodels-0.0.2.dist-info}/entry_points.txt +0 -0
getfactormodels/__init__.py
CHANGED
|
@@ -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.
|
|
23
|
+
__version__ = "0.0.2"
|
|
24
24
|
|
|
25
25
|
from .__main__ import FactorExtractor, get_factors
|
|
26
26
|
from .models import models # noqa: F401
|
getfactormodels/models/models.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: getfactormodels
|
|
3
|
-
Version: 0.0.
|
|
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
|
-

|
|
39
|
+
 
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
77
|
+
import getfactormodels
|
|
79
78
|
|
|
80
|
-
|
|
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
|
-
|
|
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=
|
|
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=
|
|
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.
|
|
10
|
-
getfactormodels-0.0.
|
|
11
|
-
getfactormodels-0.0.
|
|
12
|
-
getfactormodels-0.0.
|
|
13
|
-
getfactormodels-0.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|