Skip to content

AlbertRtk/marketools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marketools: tools for stock market analysis

PyPI Latest Release License Python Versions

About

marketools is a Python package for web scraping and analysis of stock market data. Project is under development. At the moment, analysis functionality is limited. You are welcomed to contribute to the project.

Source of data

Data are scraped from Stooq service.

Support

You may report issues and functionality requests here.

Installation

pip install marketools

or

git clone https://github.com/AlbertRtk/marketools.git

Documentation

Example

Import Stock class

from marketools import Stock

Create Stock instance for selected ticker, here PKN

pkn = Stock('PKN')

For not Polish stocks, you need to append country code to the ticker (after a dot), e.g.,

apple = Stock('AAPL.US')

Get and print OHLC (open-high-low-close) data from the last 5 days

pkn_ohlc = pkn.ohlc  # returns pandas.DataFrame
print(pkn_ohlc.tail(5))

Print available fundamental information

print(pkn.fundamentals)