Skip to main content

Downloading and analyzing financial data, including indices, stocks, bonds, and mutual funds, from India, that is Bharat.

Project description

BharatFinTrack

Status Description
PyPI PyPI - Version PyPI - Status PyPI - Python Version PyPI - Wheel
GitHub GitHub last commit flake8 mypy pytest
Codecov codecov
Read the Docs Documentation Status
PePy Pepy Total Downloads
License PyPI - License

BharatFinTrack is a Python package designed to simplify the process of downloading and analyzing financial data from India. Conceptualized on September 1, 2024, and launched on September 8, 2024, this package is tailored for long-term investors seeking to streamline their financial data workflows.

BharatFinTrack focuses on open-source financial data, with an initial emphasis on analyzing NSE equity indices. However, it is important to note that the package does not include features for technical indicators or real-time trading. Active development is ongoing, with exciting new features planned for future releases. The goal of BharatFinTrack is to empower users by providing easy access to open-source data, enabling them to make informed financial decisions. Currently, the package offers the following features:

Nifty Indices

  • Provides access to detailed information about NSE equity indices.
  • Enables downloading and updating daily (TRI) data for all NSE equity indices.
  • Fetches closing values for both Price (excluding dividend reinvestment) and TRI for all NSE equity indices.
  • Identifies key turning points in consecutive corrections and recoveries over the historical values of an index.

Compound Annual Growth Rate (CAGR)

  • Calculates CAGR for both Price and TRI since the inception of all NSE equity indices.
  • Compare CAGR (%) between Price and TRI.
  • Sorts NSE equity indices by CAGR (%) values.
  • Sorts NSE equity indices by CAGR (%) within each category.
  • Compares the year-wise CAGR (%) and growth of a fixed yearly investment across multiple NSE equity TRI indices.

Systematic Investment Plan (SIP)

  • Computes the year-wise SIP return for a fixed monthly contribution to a specified NSE equity TRI index.
  • Calculates the closing summary of an SIP with a fixed monthly contribution to a specified NSE equity TRI index, starting from a given date.
  • Compares the year-wise XIRR (%) and growth of a fixed monthly SIP investment across multiple NSE equity TRI indices.
  • Estimates annual SIP performance, including investment amount, closing balance, and cumulative growth over a specified number of years and expected annual return, with options for yearly, quarterly, monthly, or weekly contributions.

Visualization

  • Displays bar graphs of NSE equity indices’ closing values with descending CAGR (%) since inception, both overall and by index category.
  • Shows bar graphs of top-performing NSE equity indices by CAGR (%) since launch, with options to view a specified number of top indices, either overall or within each category.
  • Depicts a bar graph of year-wise investments and returns for a monthly SIP of 1,000 Rupees in a specified NSE equity TRI index since its inception.
  • Provides a return comparison between a specified index and government bonds for a monthly SIP of 1,000 Rupees over the years.
  • Illustrates a line plot comparing the growth of a monthly SIP investment across multiple NSE equity TRI indices over the years.

Example Insights

Using BharatFinTrack, you can quickly gain insights into the performance of NSE equity indices. For instance, the following bar plot highlights the top five NSE equity indices by TRI CAGR (%) within each category since their respective launches. This snapshot provides a powerful visual overview of long-term performance trends of investment multiples (X) across different index categories over the years. Because performance data updates daily with each trading session, you can replicate and customize this analysis to generate up-to-date insights tailored to your research needs or investment strategies.

Category-wise Top Five TRI CAGR(%) of NSE Equity Indices

In the above graph, the NIFTY MIDCAP150 MOMENTUM 50 emerges as one of the best-performing NSE equity TRI indices in terms of long-term CAGR. The next graph illustrates a comparison of year-wise investments and returns for a monthly SIP of 1,000 Rupees between a government bond and a passive fund tracking the TRI data of NIFTY MIDCAP150 MOMENTUM 50.

Year-wise SIP comparison between Government Bond and NIFTY_MIDCAP150_MOMENTUM_50

Additionally, the following plot compares the growth multiples (X) of a monthly SIP investment across TRI indices, including the popular index NIFTY 50 and other top-performing NSE equity indices over the years.

Year-wise SIP growth comparison across multiple indices

Easy Installation

To install, use pip:

pip install BharatFinTrack

Quickstart

A brief example of how to start:

>>> import BharatFinTrack
>>> nse_product = BharatFinTrack.NSEProduct()
>>> nse_product.equity_index_category
['broad', 'sector', 'thematic', 'strategy', 'variant']

# list of all NSE equity indices
>>> nse_product.all_equity_indices
['NIFTY 100',
 'NIFTY 200',
 'NIFTY 50',
 ...]

Documentation

For detailed information, see the documentation.

Support

If this project has been helpful and you'd like to contribute to its development, consider sponsoring with a coffee! Support will help maintain, improve, and expand this open-source project, ensuring continued valuable tools for the community.

Buy Me a Coffee

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

bharatfintrack-0.2.0.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

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

bharatfintrack-0.2.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file bharatfintrack-0.2.0.tar.gz.

File metadata

  • Download URL: bharatfintrack-0.2.0.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for bharatfintrack-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b551d8f3fe68020d63b67de19ea0361e5c391f11f5691b9090898988fc8b0006
MD5 a3059797aba695c107e44aff74d1d849
BLAKE2b-256 7cd67a12b4fc2cd407d272c77adf5768d7bbf224a9431b888f0faa435be56fd2

See more details on using hashes here.

File details

Details for the file bharatfintrack-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bharatfintrack-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for bharatfintrack-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b492af1cfc0a8c0f3dc6727eab0910a6b4a290518ac379f98da5de8e8743430c
MD5 b4cc7c1059f02b96bd9335f8c24a53fb
BLAKE2b-256 89d84e50d2ab6e0caf4ac9ff575a414d4c52ad91051f557f4d62c99dbfb5e514

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