Skip to main content

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

Project description

BharatFinTrack

PyPI - Version PyPI - Status PyPI - Python Version PyPI - Wheel

GitHub last commit GitHub commit activity codecov

flake8 mypy pytest Read the Docs

GitHub Release Date GitHub Created At

Pepy Total Downloads 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. The package focuses on open-source financial data, with an initial emphasis on analyzing Nifty 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 package aims 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 Equity Indices

  • Provides access to detailed information about equity indices.
  • Enables downloading and updating daily Total Return Index (TRI) data for all equity indices.
  • Fetches closing values for both Price Return Index (PRI), excluding dividend reinvestment, and TRI for all 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 PRI and TRI indices since the inception.
  • Sorts PRI and TRI indices by CAGR (%) either overall or within each category.
  • Compares the year-wise CAGR (%) and growth of a fixed yearly investment across multiple TRI indices.

Systematic Investment Plan (SIP)

  • Computes the year-wise SIP return for a fixed monthly contribution to a specified TRI index.
  • Calculates the closing summary of an SIP with a fixed monthly contribution to a specified TRI index, starting from a given date.
  • Compares the year-wise XIRR (%) and growth of a fixed monthly SIP investment across multiple 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

  • Shows bar graphs of top-performing PRI and TRI indices by CAGR (%) since launch, with options to view a specified number of top indices, either overall or within each category.
  • Compares returns between a specified index and government securities for a monthly SIP of 1 Rupee over time.
  • Illustrates a line plot comparing the growth of a monthly SIP investment across multiple NSE equity TRI indices over the years.
  • Depicts a line plot comparing the growth of a one-time investment across multiple NSE equity TRI indices over the years.

Application

BharatFinTrack provides insights into the performance of equity indices. For instance, the following bar plot highlights the top five 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 CAGR (%) across different index categories over the years.

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

In the above graph, the NIFTY MIDCAP150 MOMENTUM 50 stands out as one of the best-performing NSE equity indices within the strategy category in terms of long-term CAGR (%). The following graph presents a comparison of year-wise investments and returns for a monthly SIP of 1 Rupee between government securities and a passive fund tracking the TRI of NIFTY MIDCAP150 MOMENTUM 50.

Year-wise SIP comparison between NIFTY_MIDCAP150_MOMENTUM_50 and Government Bond

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

Installation

To install, use pip:

pip install BharatFinTrack

After a successful installation, the following code should run without errors:

import BharatFinTrack
nse_product = BharatFinTrack.NSEProduct()

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.3.1.tar.gz (46.2 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.3.1-py3-none-any.whl (46.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bharatfintrack-0.3.1.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bharatfintrack-0.3.1.tar.gz
Algorithm Hash digest
SHA256 0fade37938cd6a01458015d07fe64cc1bb2beca5e43a160d17415674f24940a3
MD5 5ade256e1ec1e861bfee55d4f6a2dd26
BLAKE2b-256 3ef87a654328005f4ef0ead1eb867fa0727df414c2be099b0c9b8fa49b92b334

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bharatfintrack-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 46.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bharatfintrack-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c68f06fc8cdf78da543890ef0de06666a9ad244d48cdded5d633d0179ffb1bb1
MD5 7ed9502a3bb7e0f20d98bd65c75b7a1f
BLAKE2b-256 67cb23700c744bc0a37995c7b86eacf70163a733e245a4671bee67c109f00a85

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