Skip to main content

A micro package for cryptocurrency technical analysis

Project description

microcrypta

microcrypta is a Python package for cryptocurrency technical analysis. It provides tools for fetching market data, performing technical analysis, and backtesting trading strategies.

Installation

To install the package, run:

pip install microcrypta

Usage

Here is an example of how to use the microcrypta package:

# example_usage.py

from microcrypta.coin import Coin
from microcrypta.account import correlation_matrix, Account
from microcrypta.coinmarket import CoinMarket
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from microcrypta.bsh import BSH
from microcrypta.backtest import Backtest
import microcrypta.config as config

# Initialize coins
corr_coins = ['BTC', 'ETH','SHIB','ADA']
correlation_matrix(corr_coins,time_frame='4h')# Create a market object
market = CoinMarket(btc, usdt, "1h")

coin = Coin('REQ')
usd = Coin('BTC')
coin_usd = CoinMarket(coin,usd,time_frame = "1h")
bshs = BSH(coin_usd)

# Create an account object
account = Account(1000, 1)

# Generate buy/sell/hold signals using the moving average strategy
signal = bsh.moving_average()

# Backtest the strategy
backtest = Backtest(market, signal, "Moving Average")
position_size, coin_count, percent_gain = backtest.backtest(plot=True)

print(f"Position Size: {position_size}")
print(f"Coin Count: {coin_count}")
print(f"Percent Gain: {percent_gain:.2f}%")

Features

  • Fetch market data from various cryptocurrency exchanges using ccxt.
  • Perform technical analysis with indicators like Moving Averages, RSI, MACD, Bollinger Bands, etc. Visualization of Aaron Oscillator
  • Backtest trading strategies based on technical indicators. Visualization of backtesting
  • Visualize data and analysis results using matplotlib. Visualization of Aaron Oscillator

Dependencies

  • ccxt
  • pandas
  • numpy
  • matplotlib
  • mplfinance
  • seaborn
  • tqdm

License

This project is licensed under the MIT License.

Acknowledgements

Special thanks to the developers of ccxt, pandas, numpy, matplotlib, mplfinance, seaborn, and tqdm.

Project Structure

microcrypta/

├── microcrypta/
│ ├── init.py
│ ├── config.py
│ ├── coin.py
│ ├── coinmarket.py
│ ├── account.py
│ ├── bsh.py
│ └── backtest.py

├── setup.py
├── README.md
└── LICENSE

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

microcrypta-0.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

microcrypta-0.1.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file microcrypta-0.1.1.tar.gz.

File metadata

  • Download URL: microcrypta-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.17

File hashes

Hashes for microcrypta-0.1.1.tar.gz
Algorithm Hash digest
SHA256 61f231ef6f5f000046e5e3bd3629448d01a19015f75ed1e3b1dcd2528924c041
MD5 30acbf109016e66666786fc8b667ffaa
BLAKE2b-256 0db9cae4ba31ee5a6dc8918ab6516a02cfe850a1ac73f9326a0f7cc3e440ebcc

See more details on using hashes here.

File details

Details for the file microcrypta-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: microcrypta-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.17

File hashes

Hashes for microcrypta-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f30b4011a48b88cee3a0e626f6a511130186adedc0355ff11538b2f45bb081d0
MD5 aceb645a55d438e59c66b09c91d0520e
BLAKE2b-256 eb8c987b8659e35411444a19ba471c147224af971c92caa622eff56acea879e0

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