Skip to main content

A micro package for cryptocurrency technical analysis

Project description

microta

microta 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 microta

Usage

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

# example_usage.py

from microta.coin import Coin
from microta.account import correlation_matrix, Account
from microta.coinmarket import CoinMarket
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from microta.bsh import BSH
from microta.backtest import Backtest
import microta.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.

Author

Your Name - Your Email

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Acknowledgements

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

Project Structure

microta/

├── microta/
│ ├── 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.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

microcrypta-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: microcrypta-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 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.0.tar.gz
Algorithm Hash digest
SHA256 4a692344cb8af43b72cc445c626511d65a8aea328f80449b2c87c53e28e44d9f
MD5 4f5a413164048d1c49092b8ff837fca9
BLAKE2b-256 9a2f9e6233e2a1463599bfc01d2a752ee6d7580975b1c79d19651dbf719e7e53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: microcrypta-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a214d5db38e45ed277809247efddb76b07bd7450ab8858e01ff9cd45bed62e7d
MD5 7311c81bb027e87760bbf4dd2c1699bd
BLAKE2b-256 f2e852a424f0af71e9b6492bbc9ecdc7fae5e72a1205e70b0c4c2ec0fd868774

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