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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file tefas-1.0.1.tar.gz.

File metadata

  • Download URL: tefas-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tefas-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d0f9ce1f61c65b8aee9b689e8283d8ef7c05071a591bf111beffca73b0c1592d
MD5 4d5b1300f143b24f17ca63faa2868472
BLAKE2b-256 0748932c80018ed00e1878580fc76c050c8f93cb8c1038b6f7fc1cf3660b1dc2

See more details on using hashes here.

File details

Details for the file tefas-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tefas-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for tefas-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81727cb491e0b0d80fe6b6ad29a30b212f6eb66f89f00a4f5c8abef2588d3ec8
MD5 6886dd64d56b0a53f13ec0292b1782d7
BLAKE2b-256 96cc0c472ee088710d2199106439a6cbea542b79ed654ec5587837bd4136a176

See more details on using hashes here.

Supported by

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