Skip to main content

Extract text from a YouTube video in a single command, using OpenAi's Whisper speech recognition model

Project description

tefas

Github: https://github.com/atahanuz/tefas/

Get daily price data of 5 years from TEFAS, Turkey's exchange traded funds platform. (in Turkish: Yatırım Fonları)
https://www.tefas.gov.tr

TEFAS doesn't provice an API for easy data retrieval, so the program uses Selenium to physically visit the website and scrape the data.

Installation

pip install tefas

Usage

import tefas

data= tefas.get_data("AFT","MAC","TCD")

call tefas.get_data() function with the ETF names. You can pass a single or as many ETFs as you want. You will get a Pandas dataframe with days as indexes and each ETFs daily prices as columns.

You can pass an optional verbose=False argument if you want to disable printing scraping progression to the console.

import tefas

data= tefas.get_data("IPJ",verbose=False)

Example Dataframe

Additional Features ?

Initially, I thougt about adding various data manipulation functions to the library. But to keep the library lightweight, I think it is enough to retrieve the dataframe. Because once the dataframe is ready, users can easily process the data according to their needs using the Pandas library. Examples:

import tefas

data= tefas.get_data("AFT","MAC","TCD")

# print the correlation matrix between ETFs
print(data.corr(),"\n")

#print total percentage return for each ETF
for column in data:
    print(f"{column} total return: {data[column].iloc[-1] / data[column].iloc[0] * 100 - 100:.2f} %")

Output

Contact

Raise an issue on the GitHub repo and I'll happily respond: https://github.com/atahanuz/tefas/issues/new

Disclaimer: This program doesn't provide any investment advice, it simply displays data based on user request.

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

tefas-1.0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

tefas-1.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

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