Skip to main content

Money control financial data extractor-Requires python 3.7+

Project description

mcfinance

Developed by 05kashyap and ragha1992

PyPI stats:

Downloads

Description:

Extract financial data from the money control website using the company name, BSE or NSE number. Export any selected data into either pandas dataframe or excel sheet with ease!

.

Disclaimer: We are in no way affiliated with moneycontrol.com

Usage:

pip install mcfinance

Initialise company details:

Create an Extractor instance with company name/ BSE/ NSE ID (required) and/or number of years(default), required documents(default), and filepath to write documents(default current directory).

from mcfinance import Extractor
Company = Extractor(user_input= "Company_name")
#years and docs are default
Company = Extractor(user_input= "Company_name",years = 10, docs = ["balance sheet", "profit loss"], filepath = "/files")

any of the inputs can be changed later on as per user convenience

Company.set_inputs(years = 6)

Export company details as excel file (default)

The get_info() function can be used to extract and store company data in an excel file. The file will be stored in the current filepath or the user defined filepath as per object initialisation

Company.get_info()

or

Company.get_info(option = 1)

Export company details into pandas data frame

DataFrame1, DataFrame2, DataFrame3 = Company.get_info(option = 0)

Plot certain attribute over selected years using matplotlib

The plotter() function can be used to show the companies attribute from a certain document over the selected period of time using a line graph from the matplotlib library. The function accepts a single required arguement for the attribute selection.

company.plotter("certain file attribute of the document")

Usage example:

cmp = Extractor("TCS", years = 10, docs = ["ratios"])
cmp.plotter("EV/EBITDA (X)")

output:

image

We can also plot the data of multiple companies on the same graph for comparison purposes

company1 = Extractor("TCS", years = 10, docs = ["ratios"])
company2 = Extractor("Infosys", years = 10, docs = ["ratios"])
Extractor.cmp_plot(comp = [company1, company2], attributes = "EV/EBITDA (X)")

output:

image

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

mcfinance-0.1.8.tar.gz (245.8 kB view details)

Uploaded Source

Built Distribution

mcfinance-0.1.8-py3-none-any.whl (249.4 kB view details)

Uploaded Python 3

File details

Details for the file mcfinance-0.1.8.tar.gz.

File metadata

  • Download URL: mcfinance-0.1.8.tar.gz
  • Upload date:
  • Size: 245.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for mcfinance-0.1.8.tar.gz
Algorithm Hash digest
SHA256 876255b31b80129c5cbf97f9554cbc49e3aa81a55526a783e6e1ddfae7fcbda1
MD5 4b7aa157ea4c2f729aa55fff06a5276a
BLAKE2b-256 594adef78edc3f27b9cf6af6d2b9170dde429957a2a03abc34273ff94754d5de

See more details on using hashes here.

File details

Details for the file mcfinance-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: mcfinance-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 249.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for mcfinance-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d29917cf470d5271718c20f4cca26631b96f7591efee2148ecf8634bf697ce1d
MD5 cc3076743b259790540eb4a69264de20
BLAKE2b-256 f9b31814fac79eb626a4a2ebbee8b3ec559e1de70d1e43cdb74d8019dee1317d

See more details on using hashes here.

Supported by

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