Giter VIP home page Giter VIP logo

mcfinance's Introduction

mcfinance

Developed by 05kashyap and ragha1992

PyPI stats:

Downloads 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

mcfinance's People

Contributors

05kashyap avatar ragha1992 avatar

Stargazers

Abhishek Srinivas avatar  avatar Adya N A avatar Vijay Kumar B avatar  avatar

Watchers

 avatar

mcfinance's Issues

Scraper failing for 5+ years data

Description

Addition of 2023 data and new paths are causing the scraper to return errors in the url generation.

Files

extractors.py
-search_gen function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.