The bundled opensource toolkit for book Navigate through the Factor Zoo: The Science of Factor Investing.
Project description
F.I.R.E. Factor Investment Research Engine
This repo is the bundled opensource toolkit for book Navigating the Factor Zoo:The Science of Quantitative Investing.
Installation
# for stable version
pip install firefin
# for test and nightly version
pip install -i https://test.pypi.org/simple/ firefin
# Install from source for loacl testing!!!
## replace $ThisRepoURL with the actual repo url
git clone $ThisRepoURL
## install from source
pip install -e .
Usage
Download the data from here
run the command and download data put in correct path automatically.
# We have not released this repo yet, so you need download the data manually!!! See command below!!!
# Auto download data
firefin download
If you have already downloaded the data from here, you can run the command to check the data and put the data in the correct path
# replace path_to_data.tar.gz with the actual path
firefin load path_to_data.tar.gz
Start to code
import firefin
# get data
data = firefin.fetch_data(["open", "close", "volume"])
open_price = data["open"]
def pv_corr(close, volume):
# price volume correlation
return close.rolling(20).corr(volume)
factor = pv_corr(data["close"], data["volume"])
# compute forward returns
fr = firefin.compute_forward_returns(open_price.shift(-1), [1, 5, 10])
# evaluate factor
mng = firefin.Evaluator(factor, fr)
mng.get_ic("pearson")
mng.get_quantile_returns(5)
Features
- handy functions for fast factor computation
- various tools for factor evaluation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firefin-0.3.2.tar.gz.
File metadata
- Download URL: firefin-0.3.2.tar.gz
- Upload date:
- Size: 47.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9626d211e6d0a6fb0ea8f49a24b279c8b30fe045769637737f67698f6773d4c3
|
|
| MD5 |
d98ab3e190f67734a1c644f1249d2d8c
|
|
| BLAKE2b-256 |
bf4f99690e45a247aea08e22e9ef039bcd88f3fd96f08e3ff24971eb74327fea
|
Provenance
The following attestation bundles were made for firefin-0.3.2.tar.gz:
Publisher:
pypi.yaml on fire-institute/fire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firefin-0.3.2.tar.gz -
Subject digest:
9626d211e6d0a6fb0ea8f49a24b279c8b30fe045769637737f67698f6773d4c3 - Sigstore transparency entry: 458243770
- Sigstore integration time:
-
Permalink:
fire-institute/fire@1d428068a1ee9d75044c779460ea69f41e223621 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/fire-institute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@1d428068a1ee9d75044c779460ea69f41e223621 -
Trigger Event:
push
-
Statement type:
File details
Details for the file firefin-0.3.2-py3-none-any.whl.
File metadata
- Download URL: firefin-0.3.2-py3-none-any.whl
- Upload date:
- Size: 62.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f977f612617b57b69af62a76de72e626c5c3b6c640a7752214c51f177362f86
|
|
| MD5 |
90c37a4d14e6f371d5d8d8d15a6f4885
|
|
| BLAKE2b-256 |
f5a9a106bb1f46244718478dd238e0475db52859d3fc099954918f71a5013d38
|
Provenance
The following attestation bundles were made for firefin-0.3.2-py3-none-any.whl:
Publisher:
pypi.yaml on fire-institute/fire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firefin-0.3.2-py3-none-any.whl -
Subject digest:
5f977f612617b57b69af62a76de72e626c5c3b6c640a7752214c51f177362f86 - Sigstore transparency entry: 458243775
- Sigstore integration time:
-
Permalink:
fire-institute/fire@1d428068a1ee9d75044c779460ea69f41e223621 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/fire-institute
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@1d428068a1ee9d75044c779460ea69f41e223621 -
Trigger Event:
push
-
Statement type: