pyndex: the python reconstructor for the FTSE Russell US indexes.
What is it?
pyndex is a Python package developed to reconstruct the Russell US indexes. It is based on the results of the paper:
Evidence of Crowding on Russell 3000 Reconstitution Events
Main features
Here are the main features of pyndex:
- Reconstruction of Russell U.S. indexes to great accuracy
- Point in time control of index constituents
- Calendar for Index reconstruction for each year from 1989
Where to get it
The source code is currently hosted in the following GitHub repository folder:
Binary installers for the latest released version are available at the Python package index. To install type on your terminal:
# PyPI
pip install pyndex-fin
Citation
Please use following citation to cite pyndex in scientific publications:
Bibtex entry:
@misc{aless2020evidence,
title={Evidence of Crowding on Russell 3000 Reconstitution Events},
author={Alessandro Micheli and Eyal Neuman},
year={2020},
eprint={2006.07456},
archivePrefix={arXiv},
primaryClass={q-fin.TR}
}
License
The software is distributed under GNU General Public License v3.0.
Usage
The package can reconstruct the Russell 1000, 2000 and 3000 index. The index to be reconstructed is passed via the argument index as "1000", "2000" and "3000", respectively. The oldest year supported is 1989.
First, start your connection to the WRDS database.
>>> import wrds
>>> db = wrds.Connection()
Loading library list...
Done
Then pass your WRDS connection to the package along with the parameters year and index.
>>> import pyndex as px
>>> index = px.Index.from_wrds(db, year = 2010, index = "3000")
>>> calendar = px.Index.get_calendar(year = 2010)
The method px.Index.from_wrds() will return a pandas MultiIndex DataFrame containing the index weights identified by permno, permco and cusip. The method px.Index.get_calendar() will return the index reconstruction calendar for the corresponding year.
One can join a sequence of year in a single DataFrame using px.join.
>>> index_2010 = px.Index.from_wrds(db, year = 2010, index = "3000")
>>> index_2011 = px.Index.from_wrds(db, year = 2011, index = "3000")
>>> new_index = px.join([index_2010,index_2011])
To check the difference of index constituents between two points in time you can use px.diff as follows,
>>> index_2010 = px.Index.from_wrds(db, year = 2010, index = "3000")
>>> slice_1 = index_2010["2010-08-20","2010-08-20"]
>>> slice_2 = index_2010["2010-09-20","2010-09-20"]
>>> additions, deletions = px.diff(slice_1, slice_2)
The first value contains the index additions from slice_1 to slice_2 while the second one contains the index deletions. This is particularly useful if one has to find the index addition between two index events, e.g. the annual rebalance and the Q3 quarterly additions.
In this case one would use px.diff as follows.
>>> index_2010 = px.Index.from_wrds(db, year = 2010, index = "3000")
>>> annual_rebalance = index_2010["2010-06-25":"2010-06-25"]
>>> q3_rebalance = index_2010["2010-09-17":"2010-09-17"]
>>> additions, deletions = px.diff(annual_rebalance, q3_rebalance)
Getting Help
For any usage or installation questions, please get in touch with Alessandro Micheli at am1118@ic.ac.uk .
Changelog
2-Jul-2020 : Debugged duplicated dates in Index time series.
Metadata
Release files for pyndex-fin 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyndex-fin-0.1.2.tar.gz | 7.5 kB | Without provenance | Details for pyndex-fin-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyndex_fin-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyndex_fin-0.1.2-py3-none-any.whl |
Total release size: 28.4 kB
Release files / pyndex-fin-0.1.2.tar.gz
| Download URL | pyndex-fin-0.1.2.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7262e63a9822e3b6b64a4e67b9023ea09a9489b0a8d2fde44df2aa38d661901
|
|
BLAKE2b-256 checksum How to use checksums |
16c45cc5fb0db55f974530727662bd7596542100fe87af07540469d72b131a7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
|
Release files / pyndex_fin-0.1.2-py3-none-any.whl
| Download URL | pyndex_fin-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24d69f3e94a6f7dc66523f07e6ca02ba0fd152dc2314209cb4061053586a46c7
|
|
BLAKE2b-256 checksum How to use checksums |
4137919bf76b88b3a828cfa09a1f62f0aa86f08a8107f2218329e27308870158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
|
Security for pyndex-fin 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.