Skip to main content

A Python library to fetch data from Invespar Factor library for Indian equities.

Project description

IndiaFactorLibrary

Remote data access for Invespar's Data Library: Fama-French Factors, Momentum, and Low-Risk Factors for the Indian Market.

PyPI Version Code Coverage Docs Latest Code Style License

Installation

Install using pip:

pip install indiafactorlibrary

## Usage

from indiafactorlibrary import IndiaFactorLibrary

# Create an instance of the library
ifl = IndiaFactorLibrary()

# Retrieve a list of available datasets
available_datasets = ifl.get_available_datasets()
print(available_datasets)

# Read a specific dataset
dataset = ifl.read('ff4')
print(dataset)

### Requirements

Using IndiaFactorLibrary package requires the following packages:

-   pandas>=1.5.3
-   lxml
-   requests>=2.19.0


## Documentation

### IndiaFactorLibrary Class (Invespar Data Library: Fama-French Factors, Momentum, and Low-Risk Factors for the Indian Market)

**Methods:**

- **read(symbol):**  
  Read data for a given symbol.

  - **Parameters:**  
    - `symbol` (str): The symbol for which to read the data.

  - **Returns:**  
    - `dict`: A dictionary of DataFrames parsed from the data.

- **get_available_datasets():**  
  Get the list of datasets available.

  - **Returns:**  
    - `list`: A list of valid data files for the IndiaFactorLibrary.

### Properties:

- **url:**  
  API URL for data access.


### Examples

To access the Fama-French dataset, you can call `read()` with the appropriate symbol like so:

```python
# Read the Fama-French 4-factor dataset
dataset = ifl.read('ff4')
print(dataset['DESCR'])
print(dataset[0])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indiafactorlibrary-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

indiafactorlibrary-0.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file indiafactorlibrary-0.0.2.tar.gz.

File metadata

  • Download URL: indiafactorlibrary-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for indiafactorlibrary-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8789e7416c2117a6f96bb780c11cab409f6abe65f18a6a0b27303b01af4d7f49
MD5 d1920d73254e8d00329bdbe9a5fb3abe
BLAKE2b-256 1fa1df6d8194eaea6d9cbc0bbc432feb82d286e3856c2c54fe544663e23645b7

See more details on using hashes here.

File details

Details for the file indiafactorlibrary-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for indiafactorlibrary-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aae360cae127b5325f3ed45cc0a4082dda66d9048fb324a5fcb9307a8f822d6b
MD5 e663baa0c6ff724eab4259ba02561083
BLAKE2b-256 4f59ed9655476ea73b336b54f43da415ca45633e82cf4b0df1a5d5e47d5cef88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page