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.
- Backtest trading strategies based on technical indicators.
- Visualize data and analysis results using
matplotlib.
Dependencies
ccxtpandasnumpymatplotlibmplfinanceseaborntqdm
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
Metadata
Release files for microcrypta 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| microcrypta-0.1.1.tar.gz | 12.6 kB | Without provenance | Details for microcrypta-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microcrypta-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for microcrypta-0.1.1-py3-none-any.whl |
Total release size: 27.7 kB
Release files / microcrypta-0.1.1.tar.gz
| Download URL | microcrypta-0.1.1.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61f231ef6f5f000046e5e3bd3629448d01a19015f75ed1e3b1dcd2528924c041
|
|
BLAKE2b-256 checksum How to use checksums |
0db9cae4ba31ee5a6dc8918ab6516a02cfe850a1ac73f9326a0f7cc3e440ebcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.17
|
Release files / microcrypta-0.1.1-py3-none-any.whl
| Download URL | microcrypta-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f30b4011a48b88cee3a0e626f6a511130186adedc0355ff11538b2f45bb081d0
|
|
BLAKE2b-256 checksum How to use checksums |
eb8c987b8659e35411444a19ba471c147224af971c92caa622eff56acea879e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.17
|
Security for microcrypta 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.