Downloading and analyzing financial data, including indices, stocks, bonds, and mutual funds, from India, that is Bharat.
Project description
BharatFinTrack
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, andTRIfor 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
NAVvalues for selected schemes across multiple PFMs in a single workflow.
Compound Annual Growth Rate (CAGR)
- Sorts
PRIandTRIindices 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
TRIindex or anNPSscheme). - Compares the year-wise CAGR (%) and the compounding growth of a fixed annual investment across multiple assets (chosen from
TRIindices orNPSschemes).
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
TRIindex or anNPSscheme) 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
TRIindex or anNPSscheme as the asset. - Compares the year-wise XIRR (%) and compounding growth of a fixed monthly SIP investment across multiple assets (chosen from
TRIindices orNPSschemes).
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
PRIandTRIindices 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
TRIindices over the years. - Depicts a line plot comparing the growth of a one-time investment across multiple NSE equity
TRIindices 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.
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.
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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bharatfintrack-0.4.3.tar.gz.
File metadata
- Download URL: bharatfintrack-0.4.3.tar.gz
- Upload date:
- Size: 31.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbfeb16a9afc6b7b2b559e4ca1efd6b0298ce0ae7b4e14ebc695bf4815727a5d
|
|
| MD5 |
cab64a3d0849813780b603a3a7d89060
|
|
| BLAKE2b-256 |
a636b0ffbc66bcad663a1afd989260b196e07e576de20f8415dea650cb6892c7
|
File details
Details for the file bharatfintrack-0.4.3-py3-none-any.whl.
File metadata
- Download URL: bharatfintrack-0.4.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44db17cc10af9abd7f8f8d9222c6655381e9e0562ab27b6ebc8b7ffe7fa6461f
|
|
| MD5 |
9938736306c182ce1091f339a1ea06b4
|
|
| BLAKE2b-256 |
010516f9aa84a316b0702cdb795f567a83496b7c67d25ce520f07a7a49989345
|