Metadata-Version: 2.1
Name: tefas
Version: 1.0.0
Summary: Extract text from a YouTube video in a single command, using OpenAi's Whisper speech recognition model
Home-page: https://github.com/atahanuz/tefas
Author: Atahan Uz
Author-email: atahanuz23@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: selenium
Requires-Dist: pandas

# tefas
Get daily price data of 5 years from TEFAS, Turkey's exchange traded funds (in Turkish: Yatırım Fonları) platform
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

```python
import tefas

data= tefas.get_data("AFT","MAC","TCD")
```
call tefas.get_data() function with ETF names. You can pass as many ETFs as you want.
You will get a Pandas dataframe with days as indexes and each ETFs daily price as columns

You can pass an optional verbose=False argument if you want to disable printg progression to console

```python
import tefas

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

### Example Dataframe
<img src="https://i.imgur.com/0uSyTcH.png" width="100%" height="100%">




### Additional Features ?

I initially though 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. 
Examples

```python
import tefas

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

# print 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
<img src="https://i.imgur.com/nKX6Idi.png" width="100%" height="100%">




## Contact
Raise an issue on the GitHub repo:
https://github.com/atahanuz/lol-stats/
<br>

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



