Package: priceindices
Development EnvironmentPoetryInstall Poetrycurl-sSLhttps://install.python-poetry.org|python3-Install dependenciespoetryinstallTo add new dependencies usepoetry addpoetryadddependency_nameReadPoetrydocumentationfor more.Installationpippip install PriceIndicsPoetrypoetry add PriceIndicesFrom Source (Github)git clonehttps://github.com/dc-aichara/Price-Indices.gitcd Price-Indicespython3 setup.py installUsagesfromPriceIndicesimportMarketHistory,IndicesExamplesGet market history and closing price>>>history=MarketHistory()# Get Market History>>>df_history=history.get_history("bitcoin","2020-03-16","2021-03-15")>>>df_history.head()openhighlowclosevolumemarket_capdate059267.42904960540.99271255393.16536355907.2002266.641937e+101.042946e+122021-03-15161221.13429761597.91839659302.31697759302.3169774.390123e+101.106226e+122021-03-14257343.37024761683.86401456217.97238261243.0847666.066983e+101.142369e+122021-03-13357821.21874757996.61949055376.65008857332.0889645.568994e+101.069366e+122021-03-12455963.18008958091.06270354484.59308957805.1230195.677234e+101.078136e+122021-03-11# Get closing price>>>price_data=history.get_price("bitcoin","2020-03-16","2021-03-15")>>>price_data.head()dateprice02021-03-1555907.20022612021-03-1459302.31697722021-03-1361243.08476632021-03-1257332.08896442021-03-1157805.123019Calculate Volatility Indexindices=Indices(df=price_data,plot_dir="plots")>>>df_bvol=indices.get_vola_index(plot=True,plot_name="vola_index.png",show_plot=False)>>>df_bvol.head()datepriceBVOL_Index02019-10-299427.690.71110712019-10-289256.150.70726922019-10-279551.710.70976532019-10-269244.970.69854442019-10-258660.700.692656Plot Volatility IndexPlot will be saved in plots directory asvola_index.png.Calculate Relative Strength Index (RSI)>>>df_rsi=indices.get_rsi(plot=True,plot_name="rsi.png",show_plot=False,)>>>print(df_rsi.head())datepriceRSI_1RS_SmoothRSI_202019-10-309205.7364.6418551.62495861.90415112019-10-299427.6965.7070971.70907263.08698422019-10-289256.1561.3334331.59775561.50522432019-10-279551.7166.8733272.01234566.80326742019-10-269244.9763.5353681.79120864.173219Plot RSIPlot will be saved in plots directory asrsi.png.Get Bollinger Bands and its plot>>>df_bb=indices.get_bollinger_bands(days=20,plot=True,plot_name="bollinger_bands.png",show_plot=False,)>>>df_bb.head()datepriceBB_upperBB_lower02019-10-309205.739635.043581-8428.585512019-10-299427.699550.707153-8397.622522019-10-289256.159408.263164-8356.025032019-10-279551.719268.466516-8304.656542019-10-269244.979003.752779-8239.3520"""This will also save Bollingers bands plot in your working directory as 'bollinger_bands.png' in plots folder."""Get Moving Average Convergence Divergence (MACD) and its plot>>>df_macd=indices.get_moving_average_convergence_divergence(plot=True,plot_name="macd.png",show_plot=False,)"""This will return a pandas DataFrame and save EMA plot as 'macd.png' in in plots folder."""">>>df_macd.head()datepriceMACD02019-10-309205.730.00000012019-10-299427.6917.70621122019-10-289256.1517.69271532019-10-279551.7141.05795242019-10-269244.9734.426864Get Simple Moving Average (SMA) and its plot>>>df_sma=indices.get_simple_moving_average(days=20,plot=True,plot_name="sma.png",show_plot=False,)"""This will return a pandas DataFrame and save EMA plot as 'sma.png' in plots folder."""">>>df_sma.head()datepriceSMA02019-10-309205.738467.48800012019-10-299427.698400.79733322019-10-289256.158330.59733332019-10-279551.718268.25466742019-10-269244.978187.244667Get Exponential Moving Average (EMA) and its plot>>>df_ema=indices.get_exponential_moving_average(periods=(20,70),plot=True,plot_name="ema.png",show_plot=False,)"""This will return a pandas DataFrame and save EMA plot as 'ema.png' in plots folder."""">>>df_ema.head()datepriceEMA_20EMA_7002019-10-309205.739205.7300009205.73000012019-10-299427.699226.8690489211.98239422019-10-289256.159229.6577109213.22655232019-10-279551.719260.3293569222.76129742019-10-269244.979258.8665619223.386895>>>LicenseMIT©Dayal Chand AicharaCheck outwebpageof PriceIndices package.I have created acryptocurrency technical indicators dashboardwhich uses this library.Disclaimer:All content provided here, is for educational purpose and your general information only, procured  from third party sources.
I make no warranties of any kind in relation to this content, including but  not limited to accuracy
and updatedness. No part of the content that I provide  constitutes  financial  advice, legal advice 
or any other form of advice meant for your specific reliance for any purpose. Any use or reliance on
my content is solely at your own risk  and  discretion. You should conduct your own research, review, 
analyse and  verify my content  before relying  on them. Trading is a highly risky activity that can 
lead to  major  losses, please  therefore  consult your financial advisor before making any decision.
No content on this Site is meant to be a solicitation or offer.