Skip to main content

A package to analyze historical cryptocurrency prices and performance

Project description

cryptocurrencyeda

ci-cd

This is a Python package to analyze historical cryptocurrency prices and performance through simple exploratory data analysis including calculations and plotting. Data is sourced from the KuCoin API. There are four functions that are included in this python package which are described in more detail below. Cryptocurrency investors and enthusiasts can use this package to analyze cryptocurrencies of interest.

There are existing Python libraries to access information of cryptocurrency such as cryptocompare and cryptofeed. There are also existing Python libraries to visualize financial data such as mplfinance. However, there is no integrated Python library for accessing, analyzing, and visualizing cryptocurrency data altogether. Therefore, we want to build a simple tool that can facilitate simple cryptocurrency data analysis all at once.

Function List

The package contains the following four functions:

  • retrieve_data: downloads historical data from a cryptocurrency exchange using an an http request from a cryptocurrency exchange.

  • plot_price: generates and visualizes a plot of the price of the cryptocurrenty inputted over a period of time.

  • daily_growth_rate: performs calculation of daily growth rate of the cryptocurrenty inputted over a period of time.

  • avg_daily_return: performs calculation of the average daily return of the inputted cryptocurrency price.

Installation and Usage

In order to use the package, please follow these steps:

Create a new conda environment:

conda create --name cryptocurrencyeda python=3.9 -y

Activate the environment:

conda activate cryptocurrencyeda

Install the package:

pip install cryptocurrencyeda
or 
pip install git+https://github.com/UBC-MDS/cryptocurrencyeda

Open Python:

Python

Import all functions:

>>> from cryptocurrencyeda.retrieve_data import retrieve_data
>>> from cryptocurrencyeda.plot_price import plot_price
>>> from cryptocurrencyeda.avg_daily_return import avg_daily_return
>>> from cryptocurrencyeda.daily_growth_rate import daily_growth_rate

Use the functions:

>>> retrieve_data(symbol="BTC-USDT",
                  time_period="1day",
                  start_date="2018-01-01",
                  end_date="2022-01-10",
                 )

>>> plot_price(price_df)

>>> daily_growth_rate(price_df, "Close")

>>> avg_daily_return(price_df["Close"])

Documentation

The documentation is hosted on ReadTheDocs here

Contributors

We welcome and recognize all contributions. You can see a list of current contributors in the contributors tab. If you are interested in contributing to this project, please check out our CONDUCT.md

  • Berkay Bulut
  • Cici Du
  • Alex Yinan Guo
  • Nobby Nguyen

License

cryptocurrencyeda was created by MDS Students from Group-11 for course 524. It is licensed under the terms of the MIT license.

Credits

cryptocurrencyeda was created with cookiecutter and the py-pkgs-cookiecutter template.

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

cryptocurrencyeda-0.3.9.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

cryptocurrencyeda-0.3.9-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file cryptocurrencyeda-0.3.9.tar.gz.

File metadata

  • Download URL: cryptocurrencyeda-0.3.9.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for cryptocurrencyeda-0.3.9.tar.gz
Algorithm Hash digest
SHA256 9ab600e7a1c141fd38350b5623722c8cc0ffc524db5e975935754238e4e16ef5
MD5 4aeddd59152493432d0a10b14611e32b
BLAKE2b-256 2cac85a41ea065c07b475287068208459f1a792d544c97a622b7bdbc03670dab

See more details on using hashes here.

File details

Details for the file cryptocurrencyeda-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: cryptocurrencyeda-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for cryptocurrencyeda-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fe15e1f2abfa97d5f1dbdd624a49f7abdda39e3aa7cb946f0411fd747a5c7496
MD5 65a67a83825f45a791fe3f7818df4fad
BLAKE2b-256 9349eee303397bece88317fc577c5888449ec8c157f0000985286c2c308207db

See more details on using hashes here.

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