Skip to main content

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, the package is tailored for long-term investors looking to streamline their financial data workflows using reliable public sources. This package focuses on historical data and fundamental tracking; it does not include features for technical indicators or real-time trading. 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.

National Pension System

  • Provides complete access to Pension Fund Manager (PFM) information alongside their respective schemes and unique identifiers.
  • Enables downloading full historical Net Asset Value (NAV) data from inception for any given PFM and specified scheme.
  • Fetches the most recent NAV values for selected schemes across multiple PFMs in a single workflow.

Compound Annual Growth Rate (CAGR)

  • Sorts PRI and TRI indices by CAGR (%) either globally or filtered within specific categories.
  • Calculates year-wise CAGR rolling backward from the present date for a specified asset (either a TRI index or an NPS scheme).
  • Compares the year-wise CAGR (%) and the compounding growth of a fixed annual investment across multiple assets (chosen from TRI indices or NPS schemes).

Systematic Investment Plan (SIP)

  • 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.
  • Calculates the terminal closing summary of an SIP with a fixed monthly contribution to a specified asset (either a TRI index or an NPS scheme) starting from a given date.
  • Computes year-wise SIP returns rolling backward from the present date for a fixed monthly contribution, accepting either a specific TRI index or an NPS scheme as the asset.
  • Compares the year-wise XIRR (%) and compounding growth of a fixed monthly SIP investment across multiple assets (chosen from TRI indices or NPS schemes).

Analysis

  • Identifies key turning points, peak-to-trough corrections, and recoveries over the historical timeline of an specified asset.
  • Extracts historical values from downloaded data between the specified given start and end dates.

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 analytical insights into the performance of equity indices and various financial assets. The visualizations below highlight the top-performing TRI indices based on CAGR (%), both overall and categorized by their market segments, since inception. These snapshots offer a powerful overview of long-term performance trends.

Overall Top TRI CAGR(%) of NSE Equity Indices

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

In the analysis above, the NIFTY MIDCAP150 MOMENTUM 50 index stands out as a top-performing NSE equity index in terms of long-term CAGR (%). The following graph illustrates a comparative study of year-wise investments and terminal values for a fixed monthly SIP of ₹1, comparing government securities against a passive fund tracking the NIFTY MIDCAP150 MOMENTUM 50 TRI.

Year-wise SIP comparison between NIFTY_MIDCAP150_MOMENTUM_50 and Government Bond

Furthermore, the plot below compares the growth multiples ($X$) of monthly SIP investments across multiple TRI indices. This comparison highlights the performance delta between the NIFTY MIDCAP150 MOMENTUM 50, the broader NIFTY MIDCAP 150 (excluding the momentum factor), and the benchmark NIFTY 50.

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

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bharatfintrack-0.4.5.tar.gz
Algorithm Hash digest
SHA256 5552c487a6ddda3ac218e52d0f423958e53530a7551a6c27c5f14178ddb950bb
MD5 191f052bc267332f98d9a3448811cf57
BLAKE2b-256 604d624300deac34720735d366c23b1e84822beaed84f96f6afd680b53b516cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bharatfintrack-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 34.4 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.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 90fd9d014bf0c7c42fb953e442fbfae527d17a7687652952b9f25acb2f2dcf4f
MD5 a4c019d490f0f6c2a4d7143a8c95c459
BLAKE2b-256 66affe2479a27abdd41c46f10a4a0bdab849bb34c397cbb04eda03aaa6043208

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.6

2 files

This release

0.4.5 This release

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page